Problem with obtaining correct IntDen and Mean values for multiple particles

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Problem with obtaining correct IntDen and Mean values for multiple particles

Andy - Paris
Hi,

  I'm posting in the hope that someone can help me out with the following problem:

I'm using ImageJ to obtain mean and total (IntDen) intensity for greyscale images using the analyze particles option.

  I use a macro to analyze large numbers of images like this.

The procedure is the following:

   I use the image calculator to play with my images and obtain images with a black background and
   several greyscale regions of interest.

   I then threshold the images to remove the black background.

   I then use "analyze particles" to obtain the IntDen and mean values.

The problem is that I've noticed that when I have one particle the mean and IntDen values are correct, but when I have several particles the mean and IntDen values are the mean of the values that have already been calculated for the particles. This means that the size of each particle is not taken into account. I'll give an example:

If I have one particle with 1 million pixels, mean grey value=250, IntDen= 250 million
and 10 particles with 1 pixel each, mean grey value= 2, IntDen=2

Then the summary stats will give:
 size 90910, mean gray value=25, IntDen= 22 million

Therefore the average size of the particles is correct, and the average mean gray value and IntDen of the particles is also correct but is not weighted for particle size.

What I need is the total IntDen of all of the particles and the weighted mean of all of the particles (the mean of all none background areas in the image).

I can easily calculate either of these if I have the other as ImageJ does give me the total area in pixels.

The only way I've found to do this for the moment is to check the "display results" box in the "analyze particles" window and then calculate the weighted values myself in excel. The problem with this is that I have thousands of images which is why I wrote a macro in the first place!!

If anyone has any ideas I'd be extremely grateful.

Thanks in advance,

Andy
Reply | Threaded
Open this post in threaded view
|

Re: Problem with obtaining correct IntDen and Mean values for multiple particles

Andy - Paris
Hi again,

   I've found a much better work around - I must be tired not to have thought of that before....

Since the results window does give me values for the total area measured, the mean IntDen (mean of the means already calculated for each particle) and the number of particles I can:

mean IntDen (mean of the means already calculated for each particle) x number of particles = total IntDen

total IntDen/ total area = mean grey value (of the whole area measured irrespective of the number of particles).

This is much better than manually treating each image but if anyone knows a better way to do this, such as a way to get ImageJ to produce these values without carrying out the calculations in Excel after I'd greatly appreciate it.

Andy