On Mar 8, 2010, at 7:33 AM, Tom_R wrote:
> Hi Everyone,
> I have a bit of a problem I hope you can help me with:
>
> - I have a stack of colour time-lapse JPEGs (approx 2000 in each).
> - I convert these to RGB stack
> - Within the stack there is daily variation in the brightness and
> spectral composition which I'd like to remove.
> - On each image I have a standard grey-card (reflects 18% of all light).
>
> QUESTION: How exactly can I use this reflectance standard to
> remove the daily variation across the stack?
>
> Note, that I don't want to convert to greyscale, as the RGB colour
> information is essential for object identification (via process ->
> binary -> find maxima).
>
> If you have any suggestions, could you please give specific
> instructions, as I am an ImageJ novice.
You could use this macro, which normalize the stack by adding, to each image, the intensity difference between the reference standard of the displayed image and the reference standard of the image.
n = nSlices;
if (n==1) exit("Stack required");
type = selectionType;
if (type<0||type>4)
exit("Area selection required");
getSelectionCoordinates(xpoints, ypoints);
Stack.getStatistics(count, stackMean);
for (i=1; i<=n; i++) {
setSlice(i);
makeSelection("polygon", xpoints, ypoints);
getStatistics(count, mean);
run("Select None");
run("Add...", "slice value="+(stackMean-mean));
}
-wayne