Area of a certain color in a stack

Dear Community.
I have a stack of three (RGB) images, and I am interested in finding the area of the yellow color as a fraction of the total block (Excluding the red, which comes form the background) I am interested in finding the area the yellow color in each image in the stack. Is this possible?


Thank you

Hi Friedrich,

You already prepared a nice image. From the RGB, convert the image to grey. As you have only a few well-defined colours, they map to four distinct grey values. These can be measured individually by setting a threshold (Image>Adjust>Threshold) and measure, while ‘limit to threshold’ is set in Analyse>Set Measurements. While doing so, I Plugins>Macro>Record 'ed this macro:

run("8-bit");
run("Set Measurements...", "area min limit redirect=None decimal=5");
setThreshold(70,100);
run("Measure");
setThreshold(100,159);
run("Measure");
setThreshold(159,171);
run("Measure");
setThreshold(171,195);
run("Measure");

Yellow is converted to grey which falls in the range setThreshold(159,171); is this what you need?

2 Likes

Dear @eljonco Yes. Thank you for your help :slight_smile: