Average particle color analysis

Hi,

I have a bunch of images each one with over 100-500 particles. I have tresholded the image and analyzed the particles (shape, length, etc.) but I would like to extract an average color value of all the pixels contained in each particle (preferably in CIE Lab color space, or RGB if not possible).

If possible, I would like to create a result table with all shape descriptors I created for each particle with it’s average color value.

Is there any way of doing this in an easy manner?

Thanks!

Could you please tell us how you define the “average color”?

Regards

Herbie

The average of the CIE Lab parameters (L* a* b*) in each pixel contained in the particle. In any case, I am trying to quantify the color in each particle, although some are translucent and thus influenced by background color. Any idea?

Thanks,

Liam

Sorry Liam,

but I don’t get it …

I would like to extract an average color value

A single value as you write or three values “L a b”?

In the latter case looping over the pixels of a ROI and getting the means of “L a b” is one way to go.

Regards

Herbie

PS:
For ROI #35 of your sample image I get roughly the values:
L: 19.5
a: -1.7
b: 1.4

I think this link might be the answer

Yes, as you said I am looking for three values “L a b”, I should have been more concise. How can I loop over the pixels of a ROI?

Thanks for your answers.

Liam

Liam,

before I can provide a suitable method, please post the original image without the selections (ROIs), preferably in the original uncompressed format (TIFF as zip-file or PNG). Even better would be a TIFF-image (as zip-file) with all selections as overlay.

In any case the processing steps are

  1. “RGB -> Lab”-conversion that gives you a stack of three 32bit gray-value images.
  2. You have to apply the selections to this stack and
  3. measure the mean gray values of all selections in the stack which gives you three values per selection

If you provide the desired image, I’d try to post an ImageJ macro that does all of these processing steps.

Regards

Herbie

That would be very helpful, thanks a lot. Here is a zip file containing the TIFF image and the ROIs as overlay.

Regards

Liam

ImageJ.zip (3.9 MB)

That’s great!

Thanks a lot

Liam

Just one last question, do you know any way of representing each “L a b” coordinate on a 2D or 3D graph? Just like 3D Color Inspector does it, but only with the average L a b values of each particle.

Regards

Liam

It looks like Lab was added in v1.2

http://imagej.net/plugins/color-inspector.html

I have successfully used the image>adjust> color threshold…give it a try.

Is there a way to get average RGB and HSI values of all the pixels of a cropped area of an image? Have tried it in ImageJ software. I am able to get the average RGB values for all pixels an image, but is there any way that I even get HSI (Hue, Saturation, Intensity) for the same by cropping a certain area of any image? This would be of great help for my project.