Login  Register

Re: quick way to select the maximum pixel

Posted by Aryeh Weiss on Oct 07, 2009; 9:07pm
URL: http://imagej.273.s1.nabble.com/quick-way-to-select-the-maximum-pixel-tp3690812p3690822.html

If you know where they are, and they are isolated pixels, you can use a
local median filter to replace the bad pixel with the median of the
surrounding pixels. That should  provide a pretty good estimate.

--aryeh

Jacqui Ross wrote:

> Hi All,
>
> I have a related question to the previous email about finding the
> maximum grayscale pixels.
>
> We recently discovered a couple of dead pixels in our monochrome camera.
> They only show up when people have very very low intensity labelling and
> are using long exposure times so normally not a problem.
>
> However, it was suggested to me that to eliminate them from the images,
> I could "find" the dead pixels (since they are maximum intensity) and
> then fill them with the average grayscale value of the background (I
> guess the minimum?).
>
> Can anyone offer me some suggestions on how to do this?
>
> Kind regards,
>
> Jacqui
>
> Jacqueline Ross
>
> Biomedical Imaging Microscopist
> Biomedical Imaging Research Unit
> School of Medical Sciences
> Faculty of Medical & Health Sciences
> The University of Auckland
> Private Bag 92019
> Auckland, NEW ZEALAND
>
> Tel: 64 9 373 7599 Ext 87438
> Fax: 64 9 373 7484
>
> http://www.fmhs.auckland.ac.nz/sms/biru/
>
>
> -----Original Message-----
> From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of
> Wayne Rasband
> Sent: Thursday, 8 October 2009 5:20 a.m.
> To: [hidden email]
> Subject: Re: quick way to select the maximum pixel
>
>  > does anyone know if there is a function to find the maximum
>  > pixel in an image?
>
>  > I know that i can get a measurement of the maximum pixel
>  > and then run through the image pixel by pixel until i find
>  > it, but i was hoping that there is a faster way to do this.
>
> The Process>Binary>Find Maxima command seems to find the image maximum
> if you use the maximum pixel value as the "Noise Tolerance". Here is a
> macro the uses Find Maxima to display the location and value of the
> image maximum.
>
>     getRawStatistics(nPixels, mean, min, max);
>     run("Find Maxima...", "noise="+max+" output=[Point Selection]");
>     getSelectionBounds(x, y, w, h);
>     print("coordinates=("+x+","+y+"), value="+getPixel(x,y));
>
> -wayne
>


--
Aryeh Weiss
School of Engineering
Bar Ilan University
Ramat Gan 52900 Israel

Ph:  972-3-5317638
FAX: 972-3-7384050