Normalization of a series of images based on the pixel value in a fixed point or ROI

I want to normalize several images in imageJ using the mean pixel value in a ROI (located in the same position in all the images), so that after applyng a normalization factor the mean pixel value in this ROI is the same in all the images. For example, dividing the pixel values on each image by the mean PV in the ROI and multiply by 10000 so that in all the images the mean PV in this region is 10000).

Alternatively, it may be sufficient if I use the pixel value of a point in a fixed coordinate (the same in all images) instead of a ROI.

How can I do it? (preferably a method that can be easily implemented with a macro)
Thanks!

Are you looking to do this via a macro script or the graphical interface? Also, are you looking to normalize each image to the mean of its own pixels within a given 2D ROI or a single 2D ROI from just one of the images?

Hi Andrew
What I want to do is to normalize each image to the mean of its own pixels within a given 2D ROI.

I have been looking a tool for this in the GUI but the only way I find is a little convoluted: make a ROI, analyze>measure, copy the mean, go to process>math>macro and write the equation using the mean in the ROI. Since I have to do this many times I would like to do it in a quicker way, but apparently it is not possible to automate it by recording a simple macro and I have little programming skills.

To do it via GUI, you can just use the Process > Math > Divide... option optionally followed by Process > math > Multiply....

As for a macro, try this one. I would suggest verifying that it works by using it on a few images and then doing those imaged via the GUI. Then compare them to see if they come out the same. I had to rename it to a ZIP file because this site won’t allow text or macro files (I know, seems stupid). You should not try to unzip it; just rename it to either a TXT or IJM file.

Normalize to ROI.zip (1.9 KB)

1 Like

Thank you Andrew! It works!
It gave me an error in the saveAs row but easy to fix.

Glad to hear it. What was the error?