Error message for macro



Hi there,

I’m super new to imagej ( i literally know nothing) and i am trying to process an image through a macro (here is the original thread which explains the macro - , which has worked many times for other people, yet comes up with an error for me which says:

"Non-RGB image expected in line 3:
Set AutoThreshold (“Triangle dark” <)>;

Could anyone help, this is for my University honours so any advice would be GREATLY appreciated.

Thankyou heaps!!


The macro expects (threshold at line 3) a greyscale image (8-bit, 16-bit, 32 bit). If you convert the image to a grayscale then the macro should work (Menu: Image->Type):

So just add, e.g., this line at the beginning to convert the image,e.g., to 8-bit grayscale before:


Or apply a color threshold to create a binary.


It worked. Thankyou so much! i would have never of known.

Appreciate it.