Login  Register

Re: help_standardizing images

Posted by Frederick Ross on Apr 24, 2007; 2:32am
URL: http://imagej.273.s1.nabble.com/help-standardizing-images-tp3699688p3699692.html

Certainly it's possible.  Since you only have a few images, doing it
by hand won't be that onerous.  I assume your card's histogram is just
going to be scaled and offset, not distorted.  If it is, then you have
to do something more sophisticated (search on 'histogram
equalization'...it's not hard, it's just not as simple).

First, open all your images.  In each image, draw an ROI on each
reference card, and take the histogram of it (Analyze->Histogram).
Find the upper and lower limits (or any two distinctive features) of
the histogram for each image and note them down (note that the
interface tells you exactly where your mouse is, so just point to the
ends).

Then choose the reference, and figure out what offset and scaling
factor you need to apply to make the lower and upper ends of the
histogram line up.  Then go through and scale the image
(Process->Maths->Multiply) and add the offset (Process->Maths->Add).
The images will all be standardized.

I would use the narrowest histogram as the reference image.  When you
expand the greyscale range, you end up with gaps in the histogram
which can be a pain if you're trying to compare greyscales ("these two
are in bins separated by one, but the neighboring bins are both
zero...is it an artifact?").  You lose precision by contracting, but
it doesn't put in holes and makes interpretation very simple.  Though
if your measurements are entirely insensitive to having holes in the
histogram, then this obviously doesn't apply.

Hope this helps.

On 4/23/07, Ryan Garrick <[hidden email]> wrote:

> Dear All,
>
> I have a question about whether I can perform image standardization in
> ImageJ. I have a series of digital photographs (of an insect), and want to
> score some morphological traits. As a first step, I want to use the
> graycard I have included in each photo to standardize all images, relative
> to a single 'reference' image (i.e. just one of the photos, the choice of
> which one is to be used as the reference is arbitrary, because I am only
> interested in relative measures of phenotypic variation, not absolute
> values).
>
> The spirit of what I want to do is something like this:
> (1) select the graycard in the reference image, then select the graycard
> in the target image;
> (2) use ImageJ to calculate what adjustments need to be made to make the
> ROI in the target image match the ROI in the reference image;
> (3) apply the calculated adjustment to the entire target image;
> (4) repeat the procedure for all remaining target images
>
> I hope to end up with all of the images having been standardized, so that
> measurements of phenotypic characters that make us of setting thresholds
> to objectively delineate edges are not impacted by slight differences in
> illumination of the original digital photographs.
>
> Is this possible with ImageJ, and if not, can you direct me towards
> software that will perform this sort of task?
>
> Thanks for your help.
>
> cheers,
> Ryan
>
> email: [hidden email]
>


--
Frederick Ross
Graduate Fellow, (|Siggia> + |McKinney>)/sqrt(2) Lab
The Rockefeller University
Je ne suis pas Fred Cross!