Hi,
I have been trying to write a macro that stores the data from the "Results" window into variables. The results table contains the mean, mode, and std. dev. for the three color channels red, green and blue obtained from using Analyze>Tools>Color Histogram. Here is my code -
run("Clear Results");
run("Color Histogram");
red = getResult("mean",1);
green = getResult("mean",2);
blue = getResult("mean",3);
RGB = newArray(red, green,blue);
print(RGB);
When I select an area of a picture and then execute the macro. I get the following error message -
"Results" table empty in line 3.
red =
getResult("mean",1<)>;
Does any body knows the solution to this problem? Your help will be much appreciated. Thanks!
-geowim