Is this a bug in Find Maxima...?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Is this a bug in Find Maxima...?

ved sharma
Attached is an 8-bit image with all pixel values zero except for one pixel which I set to 100. When I run "Find Maxima...", it finds that one pixel, but no matter how much do I increase the noise tolerance, I always get 1 maxima. Shouldn't it give zero maxima for high noise tolerance values?

-Ved

test.tif (214K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Is this a bug in Find Maxima...?

Michael Schmid
Hi Ved,

the noise tolerance in Find Maxima was meant for suppressing weak  
side maxima of a large one.  It does not suppress a single maximum if  
it is the only one.  I agree that this is not a consistent way of  
doing it (I must admit that I did not think about it when writing the  
code).

Currently, "Find Maxima" reports 0 maxima only if all pixels are equal.

In principle this could be changed, but I do not want to break any  
macros or plugins that might rely on the current behavior.

If there are users who have (mis-)used the current (inconsistent)  
behavior to find the brightest pixel of an image, by specifying a  
high noise tolerance, then we are in trouble...


Michael
________________________________________________________________

On 20 Oct 2011, at 17:47, Ved Sharma wrote:

> Attached is an 8-bit image with all pixel values zero except for  
> one pixel which I set to 100. When I run "Find Maxima...", it finds  
> that one pixel, but no matter how much do I increase the noise  
> tolerance, I always get 1 maxima. Shouldn't it give zero maxima for  
> high noise tolerance values?
>
> -Ved
Reply | Threaded
Open this post in threaded view
|

Re: Is this a bug in Find Maxima...?

ved sharma
In reply to this post by ved sharma
Thanks for your reply!

A temporary fix, which works for me is to set the pixel at (0,0) to the highest value (e.g. 255 for 8 bit) and then play around with the noise tolerance to detect the spots in the image. And at the end, I subtract 1 (corresponding to the maxima at 0,0) from the total number of maxima.

-Ved