Login  Register

Re: finding the location of the brightest pixel(s)

Posted by Jeremy Adler on Mar 14, 2016; 12:22pm
URL: http://imagej.273.s1.nabble.com/finding-the-location-of-the-brightest-pixel-s-tp5015879p5015887.html

Hi Gabriel, Christian and Herbie,

Thanks,
I appreciate that you can use Find Maxima to obtain the most intense of the maxima (say by checking the coordinates produced with  the 'list' option) but the list of maxima does not necessarily include the most intense pixel  because a maxima is defined with respect to the surrounding intensities, so a low frequency  peak may not register as a local maxima even if it contains the most intense pixel in an image.

I could also take the maximum from Histogram or getMinandMax, use it to set a threshold and then find the location of the resulting ROIs but this lacks elegance.

I was very surprised that ImageJ does not have a command for finding the location of the brightest pixel - fairly basic operation, and  was hoping that Histogram of getMinandMax could be tweaked in an update of ImageJ, since they already  return the max & min  intensity and presumably could be persuaded to report their coordinate(s) without appreciably increasing the processing time.


-----Original Message-----
From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of Christian Liebig
Sent: den 14 mars 2016 13:16
To: [hidden email]
Subject: Re: finding the location of the brightest pixel(s)

Hi Jeremy,

this little macro should go in the right direction:

getMinAndMax(min,max);
setThreshold(max, max);
run("Convert to Mask");
run("Create Selection");
roiManager("Add");

Best,
Christian


On 14.03.2016 11:56, Jeremy Adler wrote:

> Have I failed to spot a simple command that finds the most intense pixel(s) and reports its location ?
>
> Process/Find maxima provides a list of all the maxima which probably but not necessarily includes the pixel(s) with the peak intensity- and the results could be searched for the brightest.
>
> Perhaps the Histogram command could be extended to produce a pair of arrays that hold the coordinates - it already provides the intensity of the most intense pixel(s).
>
> I appreciate that it is easy to create a macro to find the most intense pixel and its location but, I suspect that an easily applicable command would be of general use.
>
>
>
> Jeremy
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html

--
Christian Liebig, PhD

Light Microscopy Facility
Max-Planck-Institute for Developmental Biology Spemannstrasse 35
D-72076 Tuebingen
Germany

Phone:  +49 7071 601 443
e-mail: [hidden email]

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html