Posted by
Jacqueline Ross on
Oct 13, 2009; 5:52am
URL: http://imagej.273.s1.nabble.com/quick-way-to-select-the-maximum-pixel-tp3690812p3690819.html
Dear All,
Thanks very much to all of you who have replied to my question and I
apologise for being slow in providing feedback about whether these
suggestions worked.
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.
The built-in median filter did work but resulted in too much blurring of
the rest of the image even when I used a radius of 1.0 pixel.
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 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. This is important
because the labelling is actually quite punctuate.
Thanks everyone for taking the time to think about this and reply! It is
much appreciated.
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
Gabriel Landini
Sent: Friday, 9 October 2009 2:02 a.m.
To:
[hidden email]
Subject: Re: Antwort: Re: quick way to select the maximum pixel
On Thursday 08 October 2009 13:35:11 Joachim Wesner wrote:
> however, as I understood the original poster, he
> 1) knows the coordinates of these few "hot pixels" from earlier
> measurements
Yes, the hot pixels will be always in the same place for a particular
camera.
One can exploit that too.
> 2) the pixels are "hot" at long exposures times relative to the
> surroundings, but not necessarily at shorter exp times and their
values
> will not always be 255
Yes, in which case they would be compensated by image ratio with the
empty
background. I am considering brightfield images here...
I guess that one could have a precomputed binary mask with those hot
pixels
set at 255 (and 0 elsewhere) and add it to the original. Of course if
there is
already an area with white which does not require correction, one can
convert
the image to 16bit first so the pixels to correct are those with values
>255
after the addition of the mask.
> I would also suggest, as has been done before, to use a median filter
only
> around those known coordinatesI would also suggest, as has been done
before,
> to use a median filter only around those known coordinates
I now realise that one needs to build a custom median filter (ie, not
use the
built-in one). Otherwise the central (biased) pixel would also be
included in
the ranking. Since we now have an even number of pixels (4 or 8
neighbours)
the median here is defined as the average of the 2 median values.
Regards
Gabriel