// Lists the red, green and blue histogram counts of an RGB image. requires("1.45o"); if (bitDepth!=24) exit("RGB image required"); setRGBWeights(1,0,0); getStatistics(area, mean, min, max, std, rhist); setRGBWeights(0,1,0); getStatistics(area, mean, min, max, std, ghist); setRGBWeights(0,0,1); getStatistics(area, mean, min, max, std, bhist); run("Clear Results"); for (i=0; i<256; i++) { setResult("Value", i, i); setResult("Red Count", i, rhist[i]); setResult("Green Count", i, ghist[i]); setResult("Blue Count", i, bhist[i]); } setOption("ShowRowNumbers", false); updateResults; //saveAs("Results", getDirectory("home")+"Results.csv");