Newbie ImageJ user - question about pixel selections

Hi there! I’m fairly new to ImageJ, and am using it for a project. For this project, I am analyzing shade cover for particular patches of grass, but have been unable to select all blue pixels (sky). How can I select all blue pixels, and total number of pixels in the image?
Thanks.

Hi
@CD98
To help you we need, at a minimum:

  • an unannotated image
  • an annotated image (show what you want to measure: length, area, etc.)

Your macro at the moment.
Greetings

Hi Mathew - I just uploaded an un-annotated image now.

Hi
@CD98

Your image is 64 bit. You will need the plugin (RGB to CMYK);


Macro:

macro "Sky_Pixel_selection"
{
requires("1.52u");
setBackgroundColor(0,0,0);
setOption("BlackBackground",true);
//---------------------------
// Start batch mode
setBatchMode(true);

//-----------------------------
//Copy and select
orig=getImageID();
run("Duplicate...","copy1");
close("\\Others");
copy1=getImageID();
selectImage(copy1);
run("Duplicate...","copy2");

//-------------------------------
// Start processing
run("Invert");
run("RGB to CMYK");
close("K"); close("M"); close("C"); 
wait(1000);
run("Stack to Images");
selectWindow("Y");
setOption("ScaleConversions", true);
run("8-bit");
setAutoThreshold("RenyiEntropy dark");
//run("Threshold...");
run("Set Measurements...", "area add redirect=None decimal=4");
run("Analyze Particles...", "size=0-Infinity display summarize");
close("Results");
// End of processing

//----------------------------
// End of batch mode
setBatchMode(false);
run("Tile");
//--------------------------------
exit("All is done !");
}

Can you tell me about your results, if you don’t mind.
Greetings

Hi Mathew - this macro worked wonderfully, thank you so much! Here are the results for this image:
Slice=Y, Count=5728, Total Area=2807544, Average Size=490.1439, %Area=23.0263.

I’ll be applying this macro to at least thirty images, and using the %Area value to help with statistical analysis. Thank you again for this macro.