 # Count vs Mean gray value

Hi, I am new to image analysis. I tried to run a plug-in script for a batch of tissue core images. Measurements were done on the binary images, but i noticed that where the core is considered as a single count, Mean gray value is a ratio of IntDen & Area. But where the count is greater than one, Mean gray value is NOT equal to that ratio. I don’t understand that difference. Could anyone here please help me with understanding that?

Hi @bushra

in theory, IntDen (a better name would be “Total intensity”) should be mean average intensity times area.
http://imagejdocu.tudor.lu/doku.php?id=gui:analyze:set_measurements

If this is not the case in your particular example, it would be nice if you could share an image where that happens. Furthermore, the plugin/script you are running would be interesting as well. Would you mind sharing it?

Cheers,
Robert

Hi @bushra,

Best,
Robert

Hi @bushra,

sorry for the late reply, but I finally found the time to look into this.

Your plugin uses the Particle Analyser to measure properties of segmented parts of the image. Furthermore, it shows only the summary of your analysis. So, I changed a single line in your code to display the results of the analysis before the summary is calculated (line 91):

before:

``````        IJ.run(impDup, "Analyze Particles...", "size=80000-Infinity show=Masks pixel summarize");
``````

after:

``````        IJ.run(impDup, "Analyze Particles...", "size=80000-Infinity show=Masks display pixel summarize");
``````

Afterwards, the output are two tables:

The second table is the one you know already. But let’s look into the first one first:
The column “Area” contains the number of pixels belonging to a segment which was thresholded using your fixed-threshold approach. If we multiply it with the “Mean” column, we get the value 80708956 representing the total intensity. Ignoring some rounding errors, this is equal to the column “IntDen”.

Now, we look in the second “Summary” table: The count column contains the number of objects which could be differentiated using your segmentation algorithm and connected components labelling. So, there are two objects which have a mean signal intensity of (7.699 + 5.535) / 2 = 6.617. Thus, ignoring that the one object is much larger than the other one, both mean signal intensities of the objects are just averaged. The same is true for the IntDen value.

I hope, this helps in understanding the values in the result table.

I would recommend playing a bit with the Particle Analyser before continuing the programming. For example the option “Add to Manager” allows you visualising the two objects which are outlined. This may help in finding a good threshold before doing the measurements and analysis.

Cheers,
Robert