I want to divide pixel intensities on an image (8 bit) by a unique factor, say 6. I do this on 6 images having the same size. The next step is to add them in one image output, pixel by pixel, so that each pixel output stays in the 8 bit range.
If you add 6 images together and divide by 6, you are taking
the average of the images. In this specific case, the following
Image > Stacks > Images to Stack
Image > Stacks > Z Project...`
Images to Stack works on all of the images you have
open (so open the images to average first). Then choose Average Intensity in the Projection type drop-down
when you run Z Project...
If you don’t necessarily want to calculate the standard average
and need greater control over the math you do, you could use Process > Image Calculator... to add the images together
two at a time (checking 32-bit (float) result to avoid
overflow). You can then use the various commands under Process > Math to do other math, for example, to divide by
by your factor of 6 by running Process > Math > Divide....
Then run Image > Type > 8-bit to convert your image
back to an 8-bit image. (It appears that you may have to run Image > Adjust > Brightness/Contrast before
converting back to 8 bits to get the conversion to scale properly.)
No, the Brightness/Contrast... wasn’t for the original
images, only for the 32-bit image before converting back to
I don’t understand in detail what is going on, but, sensibly, the
32-bit-to-8-bit conversion does some kind of scaling, and the
way I found to get that scaling to work for your use case was
to run Brightness/Contrast....
But if Z Project... works for you, I wouldn’t mess with the
added complexity of using Image Calculator..., step by
step, two images at a time.