Created
May 7, 2015 10:44
-
-
Save mutterer/38cc6b9207de1ab4f5b3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
run("RGB Stack"); // convert RGB image in a stack | |
run("32-bit"); // make it 32 bit for computations | |
run("Multiply...", "value=-1 stack"); // invert values for r,g,b | |
setSlice(2); // go to the green channel | |
run("Multiply...", "value=-2 slice"); // -g*-2 = +2g | |
run("Z Project...", "start=1 stop=3 projection=[Sum Slices]"); // sum all channels result= -r + 2g -b | |
setAutoThreshold("Intermodes dark"); // auto thresholding now works |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This ImageJ macro helps with segmenting image areas that are greener.
I first learned about this method at the ImageJ conference 2010 from Gerrit Polder.