magick wrote:Replace the pixel with the pixel prior / adjacent to the median.
I don't understand how this represents a 'non-peak' statistic. That seems to be just another type of 'median'.
Say you have a pixel of value 9, surrounded by other pixels forming a sorted list...
1,3,3,3,5,5,6,9,10
The minimum value is 1, maximum is 10, median (center of sorted list) is 5, most common is 3.
average or mean is add/divide or 5.0 (could be a floating-point value, rounded unless HDRI).
What then is non-peak?
Also would a statistic of (max-min)/2 => 4.5 be useful? (Centric)
Other ''statistics'' from morphology using flat shaped neighbourhood kernels -- EG Squares/Rectangles
Erode => as minimum 1
Dialate => as maximum 10
Convolve => mean 5
Gradient => abs( maximum - minimum ) => 9 (maximum difference in area)
TopHat => abs( pixel - minimum ) => 8 (difference from minimum)
BottomHat => abs( maximim - pixel ) => 1 (difference from maximim)
I am planning on making all 5 operations primitives in IM morphology, At this moment only erode and dialate are primitives, with the other three implemented as composition of primitives (1 or 2 convolutions and 1 compositions of the images)
ASIDE:
Alternative meaning of TopHat (I found BOTH in various papers)
TopHat => pixel - minimum => 8 (difference from minimum)
BottomHat => maximim - pixel => 1 (difference from maximim)
However I can not find a case where the two will be different to the previous definition, though Fred at one point indicated that their was. Fred can you enlighten!