Breaking a color image into RGB channels


I am using photos of wing membranes, back-lit with UV light.

Analysis goals

I am looking to see how much of the wing fluoresces orange. What ratio of fluorescence is on the wing/total wing area.


  • In previous protocol, they split up the image into red, green, and blue channels and then traced the sections manually with a table. Is splitting the image into channels possible to do without converting the image to gray scale?
  • Are there better pipelines out there that I could use to determine fluorescent area/total wing area?


Hi @robobrooke

You should provide a representative image to make helping you easier. Your question seems simple enough for cellprofiler however this will depend on how defined the wings are?
If the image is RBG then yes I would suggest a simple pipeline
1- split image channels
2- identify primary objects (find the wings)
3- measure object intensities / area


Hi Lee, I wasn’t sure if I would be able to upload a photo since it was my first day on the photo, but I was able to upload one just now.

I was unable to find split image channels in the pipelines for Cell Profiler…

Would I have to do identify secondary objects as well (for the orange spots)?

I want to get a ratio of fluorescent orange area/total wing area…

I’m thinking I might also have to do some sort of mask, since fingers are in the way of the total wing on all photos…

Hi @robobrooke

So your image is going to be difficult because your UV light can not be separated into RGB easily. You could use the unimax color function to identify the correct ratios of RGB to isolate the “orange” but I think I have an easier way.

1- There is not a good answer to identify the wing as the wing is not clearly defined in the image so I made a mask.

2- I then used Ilastik to identify the orange pixels. Using a random forest pixel probability is a good way to identify the “orange” pixels.
IMG_2413_Probabilities.tif (2.2 MB)

3- I would then use cellprofiler to identify the objects and measure the total area. IMG_2413.cpproj (670.6 KB)

4- Results
Screen Shot 2020-05-20 at 4.24.02 PM

The orange appears as black in the saturation channel after converting to HSB in ImageJ. Maybe cellprofiler also has this conversion option.

Hi @eljonco

Yes cell profiler has the unmixes function that provides multiple known stains. And a custom version that will allow for you to designate the correct ratios for yourself. However as you can see, even if your own image the objects of interest are not that much greater in intensity than the background.

Thanks for all the help! Can I ask, did you create the mask by manually tracing, or were you able to pull it apart from the background somehow?

Hi @robobrooke

I did try to create a pixel classifier to identify the pixels associated with the wing but the background but the wing intensity is to close to the background and the changes of intensity across the image make this difficult.
If you could take a birghtfeild image without the uv light on at the same time this then could be done as the wing would be different from the background.
I would also suggest that you try not to do this in jpg but rather in tiff as you lose information.


I’ve made progress on my pipeline, but I am having some issues with threshold. This is the closest I’ve gotten…but it includes some areas that I do not want. Any ideas?

uvzoom pdzoom

By inverting the image AFTER masking it, you’re making all the masked areas (which were previously 0) 1, which is what’s throwing the results off; if you invert, THEN mask, you should see fewer issues.

Ok thank you, I think that helped