Mean gray intensity, Integrated density and Raw integrated density

Hi everyone, I am a new user of ImageJ and was suggested by my colleague to use Mean gray intensity, Integrated density and Raw integrated density to measure the brightness of my image. I used these measurements to quantify a brown stain called Perls (that stain for iron present in tissues) and now I have to present my results to lay audience. What would be the best way to explain about these three measurements to people lay audience?
Thanks very much


as a novice it’s always a good idea to read the manual and docs—no?

Here are the relevant sections:…

What distinguishes a novice from lay people?



Hi Herbie,

I’ve read the manual on the links supplied and I cannot find where difference the between IntDen and RawIntDen is defined:

Integrated density The sum of the values of the pixels in the image or selection. This is equivalent to the product of Area and Mean Gray Value. With IJ 1.44c and later, Raw integrated density (sum of pixel values) is displayed under the heading RawIntDen when Integrated density is enabled. The Dot Blot Analysis tutorial demonstrates how to use this option to analyze a dot blot assay.

The DotBlot analysis doesn’t even mention Raw intensity.

Playing around with some images it appears that:
• RawIntDen = sum of pixel values in selection
• Mean = RawIntDen / (Area in pixels )
• IntDen = RawInden * (Area in scaled units) / (Area in pixels)




Good day Christian!

Without playing around I found in the ImageJ user guide:

30.7 Set Measurements…

Mean gray value Average gray value within the selection. This is the sum of the gray values of all the pixels in the selection divided by the number of pixels. Reported in calibrated units (e.g., optical density) if Analyze▷Calibrate…↓ was used to calibrate the image.

Integrated density The sum of the values of the pixels in the image or selection. This is equivalent to the product of Area and Mean Gray Value. With IJ 1.44c and later, Raw integrated density (sum of pixel values) is displayed under the heading RawIntDen when Integrated density is enabled.

The last sentence refers to the whole paragraph not specifically to “RawIntDen”.

I think both paragraphs tell all you’ve found out by playing around.



Hi Herbie,

OK, I can see how the documentation says that now, but it is difficult (for me at least) to parse that. The relationship between IntDen and RawIntDen require going through the mean grey value definition and is not very enlightening.

So while the manual is technically correct, I suggest that the manual should say something like:

  • RawIntDen = (sum of pixel values in selection)
  • IntDen = (sum of pixel values in selection) * (area of one pixel)

NB: if the image is unscaled then IntDen = RawIntDen

This makes the relationship between IntDen and RawIntDen much clearer - it’s about a conversion to scaled coordinates.



1 Like

Good day,

i’m by no means resposible for the user guide, as there is nobody here on the Forum responsible for anything. That’s how volteers and open source work …



Hi evenhuis,

I also have read the manuals several times but still could not figure out the difference between IntDen and RawIntDen. I know several students in my department who have the same confusion.

Thank you for explaining the difference. I find your answer more helpful than Herbie’s.




please read carefully:

Integrated density
This is equivalent to the product of Area and Mean Gray Value.

Mean gray value
Reported in calibrated units (e.g., optical density) if Analyze▷Calibrate…↓ was used to calibrate the image.

Consequently, not only the “Mean gray value” depends on Calibration but “Integrated density” as well, because, as explained above, the latter refers to the former.
Then of course “Raw integrated density” means “Integrated density” without Calibration.
(If no Calibration is present it holds: “Raw integrated density” = “Integrated density”)

Where is the problem?



Hi Herbie,

Your updated explanation makes a lot sense. Thank you!


The difference between Integrated density and Raw Integrated density is in image scaling and not in Calibration. In imagej “calibration” is the assignment of a physical meaning to the grey values of the pixels (e.g. Optical Density units, photon number, electron number etc). For the calibration of the interpixel distance is used the term “image scale”.
If the image brightness is calibrated both the mean grey value and the Integrated density are reported in calibrated units.
If the image interpixel distance is calibrated,i.e. a scale is set (a physical distance unit is assigned to the interpixel distance ) the Integrated density is different from the Raw Integrated density in the already explained dependancy:
Raw Integrated density is the sum of all pixel values (or ODU, etc) in an area, while the
Integrated density equals the Mean Grey value (or mean OD, or mean electron number etc) times the area in scaled units . Thus Integrated density=Raw Integrated density * Area of a region with size one pixel
E.g. if interpixel distance pixel in the image is scaled to 0.5 micrometers then IntDen=RawIntDen*0.25 sq um but it uses the same pixel brightness units (either calibrated or not).


Hello all,

Sorry to reopen this issue after such a long time but it is really confusing…

We have images with a certain scale (microns per pixel) value, no grey intensity values calibration done with standards, just images taken with a microscope.

If I understood well, without this signal calibration, the Integrated Density units would be just arbitrary units or relative intensity values.

It is very confusing because it does change with image pixel scaling…

Sorry for the inconvenience and thanks a lot in advance!


Hi @VeroMicro,

This issue is usually a source confusion to many users. I’ll try my hand at explaining it:

Let’s start by noting that there are two different types of calibration: spatial calibration (i.e. scale) and intensity calibration (i.e. a function that maps raw pixel values to some other intensity scale: OD, temperature, etc.).

Also, let’s remember that an image can be simply viewed as a table (rows and columns) composed of cells (pixels) that have some (finite) range of posible values. So, for example, if you have an 8-bit image, it is just a table of integer values ranging from 0 to 255.

For an image which is not spatially calibrated, the area is just the amount of pixels it contains. Let’s call it N.

Now, if you know that these pixels are spaced by some magnitude sf (e.g. 0.1 micron/px), then the area of a single pixel is sf * sf = sf^2 . (In the case of no spatial calibration, sf = 1)

So, the area of an image is simply the product:

A = N * sf^2

What is the mean value of the image? If the image is not spatially calibrated, you can calculate that quantity by summing the values of every pixel and dividing by N, which effectively yields an average pixel value:

mean = SUM(pixel_values) / N

What happens if the image is spatially calibrated? Well, in that case, you can think of the mean value as the quotient of two magnitudes: a total value integrated over the whole image, divided by the area it represents. The first term is called Integrated Density (IntDen), and is the sum of the contribution of each pixel weighted by its area. That is:

IntDen = SUM (pixel_value * pixel_area) = SUM (pixel_value * sf^2 ) = SUM(pixel_value) * sf^2

So, the mean value of the spatially calibrated image results:

mean = IntDen /  A = ( SUM(pixel_values) * sf^2 ) / ( N * sf^2 ) =  SUM(pixel_values) / N

As you can see, you arrive at the same expression as before for the mean, regardless of the spatial calibration.

Also note that the IntDen value does in fact depend on the spatial calibration. The term SUM(pixel_values) is known as the Raw Integrated Density, and is independent of spatial calibration.

Up to now, the pixel values that we used are in an arbitrary scale (raw pixel values), an so is the mean value that we computed.

Finally, what happens if the image is intensity-calibrated? In that case, you will have a function that takes raw pixel values and outputs calibrated values (“real world values” if your calibration represents some known physical magnitude and its units). This function can take many forms, and is not necesarily linear.

So, before computing a mean value (or the IntDen), you would first translate every pixel value into its calibrated value. You can think of this as creating a second image (table) with all the transformed values, and then operating on this new version. Note that the area of the image is independent of the intesity calibration, as it’s expression does not contain pixel values.

I hope this helps.



Hi Everyone,

As a novice/lay person/ whatever you want to call a newbie trying to figure out the difference in RawIntDen vs IntDen, I think I finally figured out a simple way to describe it that may not be 100% correct but is applicable to those imaging on a microscope that collects metadata in the image file (i.e. .csv or .liff). It goes like this:

RawIntDen = (Sum of all grey values in each pixel in a selected area in a specific channel)
^this ignores the metadata

IntDen = (RawIntDen/Pixel Number)*(selected area IN UNITS such as microns)
^this uses the metadata

if there is no metadata in the file, then RawIntDen=IntDen because image j will substitute (selected area IN UNITS such as microns) with (Pixel Number)

How do we feel about this? Is it good enough for confocal imaging?


Dear NicoDF,

Sorry for this very late reply!! Thank you so much for your detailed explanation, I am sure is going to help a lot of people!

I still have one doubt regarding the way to publish this kind of data…As Integrated Density is dependent on pixel scaling, in a not intensity calibrated image but scaled image (the usual we get from a confocal) what are really the units of the Integrated Density?

It is confusing because, as you set very clearly on your formula explanation, on one hand we have the arbitrary units coming from the raw integrated density, and then we multiply them by the pixel size area (for example, square microns).

Following the example of a confocal image with scaled pixels but no intensity calibration: How can I express then the value coming out of the Integrated Density calculation? Signal*um^2? Arbitray units?

Thanks again for all you help!


Hi Vero,

Sorry for the delay. Let’s try to clarify:

From most confocal images you will just get an intensity reading in arbitrary units. That is, for the most part, you cannot directly link the number you get for each pixel to a photon count (or any measure of actual incident fluorescence intensity), nor a concentration of fluorophore. Nonetheless, you usually can be fairly confident that you obtain a number that is proportional to any of those quantities. This is fine for establishing comparisons (given that all the parameters and conditions that the acquisition depends on are kept the same).

A you note, when you then integrate that “intensity” over a certain area, the result will be expressed in A.U. (of fluorescence intensity) / µm^2, given that you include the spatial calibration. So, yes, you’re still dealing with an unknown constant in your final numbers, even if you use the spatial calibration. If you crank up the laser intensity, or change the PMT gain, you’ll be changing that particular constant.

Bare in mind, though, that there are special applications of confocal microscopy that rely on careful calibration procedures to provide absolute intensity/concentration measurements (but are usually closer to the chemistry/physical-chemistry branch of microscopy, even if applied to biological systems).

I hope this helps.



Cristal clear! Thank you so much Nico!! :slight_smile:

1 Like