Subject: Re: RGB to HSB question



On Saturday 14 January 2006 04:24, Cheok Yan Cheng wrote:
> Recently, I try to find out the HSB histogram of an
> image using ImageJ.
> Since my java code had problem running
> HSB_Histogram.txt, where my java
> program cannot allocated Color_Histogram.jar although
> it had been installed
> at /home/yccheok/ImageJ/plugins.

I get this error with the updated ColorHistogram. The histogram seems to be
calculated, though.

java.lang.NoSuchMethodError: ColorHistogramWindow.getMean()[D
at ColorHistogram_.run(ColorHistogram_.java:72)
at ij.IJ.runFilterPlugIn(IJ.java:197)
at ij.IJ.runUserPlugIn(IJ.java:275)
at ij.IJ.runPlugIn(IJ.java:117)
at ij.Executer.runPlugIn(Executer.java:171)
at ij.Executer.runCommand(Executer.java:133)
at ij.Executer.run(Executer.java:63)
at java.lang.Thread.run(Thread.java:595)


By the way, trying the HSB_Histogram macro here I noted that the name of the
Histogram window does not include the ".tif" anymore (I do not know since
when) so the HSB_Histogram.txt macro needed some fixing. Here is the latest
version.

-----------------------8<-----------------------------
// Calculates the HSB histogram of an RGB image
// The RGB histograms correspond to the H, S and B components respectively
// Requires Color_Histogram plugin by Dimiter Prodanov
// 14/1/2006 fixed renaming of images

a=getTitle();
if (bitDepth()==24) {
run("HSB Stack");
run("Convert Stack to RGB");
run("Color Histogram");
b=getTitle();
selectWindow(a+" (RGB)");
run("Close");
selectWindow(a);
run("RGB Color");
c="title='HSB Histogram of "+a+"'";
selectWindow(b);
run("Rename...", c);
}
else{
showMessage(a +" is not an RGB i...

mage.");
}
-----------------------8<-----------------------------

Cheers,
Gabriel





Programming list archiving by: Enterprise Git Hosting