Login  Register

Re: Antwort: Re: quick way to select the maximum pixel

Posted by Gabriel Landini on Oct 13, 2009; 2:33pm
URL: http://imagej.273.s1.nabble.com/quick-way-to-select-the-maximum-pixel-tp3690812p3690820.html

On Tuesday 13 October 2009  15:22:42 Jacqui Ross wrote:
> I realise that I forgot to mention that the images are in 16bit
> grayscale not 8bit. This meant that the macro that Gabriel initially
> provided didn't work. I tried converting the image to 8bit but it still
> didn't seem to work for some reason? I think that when I did the
> conversion for some reason the hot pixel didn't have a 255 grey value.

Duplicate the image, threshold it (so dead pixels are 255 and the rest is 0)
and add it back to the original. That would saturate them. Then run the macro.

> One other suggestion I have been given by our camera agent is to create
> a defect map, i.e. record the hot pixel locations by taking a very long
> exposure image with no light on the camera. Then set these pixels to be
> equal to the mean value of their neighbours.  I guess this is along the
> lines that Gabriel & Joachim have  mentioned. However, I wasn't quite
> sure how to go about this although I can identify the x & y coordinates
> from the images I already have.

The macro I sent does it for you, just make sure the pixels are saturated. You
can then modify to 16 bit too.

> The best result so far came with Michael's suggestion to use Process -
> Noise - Remove Outliers. Using a radius of 1.0 pixel, threshold 1.0 and
> Bright, this worked brilliantly. The hot pixels (there are 2!) were
> removed without blurring the rest of the image.

The problem with that is that you are removing without knowing other outlier
pixels as well, not only the hot ones. Just compare the result and the
original with the "Difference" operation in the ImageCalculator and set  the
result as 32 bit, then load some colorful lut and you will understand what I
mean.

Cheers
G.