Re: quick way to select the maximum pixel
Posted by
jmutterer on
Oct 08, 2009; 8:38am
URL: http://imagej.273.s1.nabble.com/quick-way-to-select-the-maximum-pixel-tp3690812p3690821.html
Alternatively, the following macro median-filters pixels with a given value:
value=0;
w=getWidth; h=getHeight;
for (x=0; x<w;x++) {
for (y=0; y<h;y++) {
if (getPixel(x,y)==value) {
makeRectangle(x,y,1,1);
run("Median...","radius=1");
}
}
}
run("Select None");
// end
jerome.
On Thu, Oct 8, 2009 at 10:28 AM, Gabriel Landini <
[hidden email]>wrote:
> > 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?
>
> Have a look at the macro here. It will convert all the single pixels which
> have a value of 255 to the mean of the neighbours (colour or greyscale
> image).
>
>
>
http://imagejdocu.tudor.lu/doku.php?id=howto:working:how_to_correct_background_illumination_in_brightfield_microscopy>
> I hope it helps
>
> Gabriel
>