I am trying to use the functionality of “Image > Color > Split Channels” menu for an image. Here is the code I’ve come up with:
ChannelSplitter splitter = new ChannelSplitter(); ImagePlus channels = splitter.split(imp);
This gives me three
ImagePlus objects which seem to be the red, green and blue channels of the original image. I just want to make sure that this is exactly equivalent to “Image > Color > Split Channels”, because when I compare the results, the images that I get using
splitter.split are a little different. So I thought maybe I should use the getChannel function of the
ChannelSplitter class instead. The documentation of
getChannel is poor though and I don’t know how I should use it.