Is it possible to retrieve image intensity information post-watershed segmentation?

3 views (last 30 days)
I've been working on image segmentation and analysis of some bacterial colony images in a petri dish. So far, I have used watershed transformations and regionprops in order to segment the colonies and determine the number of colonies, the individuals areas, perimeters, and centroids.
However, now I would really love to do obtain information about the color breakdown of each colony (r,b, and g fractions) and the moment of inertia or weighted centroid, but both of these require rbg or grayscale information about the image that I lost when doing the watershed transform. Does anyone know of a way to retrieve this information or another way to segment that would allow me to calculate these things? The ultimate goal is to use all of these variables to do principal component analysis and categorize the colonies by type.
Thank you!

Answers (1)

Image Analyst
Image Analyst on 10 Apr 2015
Huh? Wha.....? How did you lose the original color image? I t should still be there in a variable somewhere. Just don't clear or delete it. Or else get it back in scope by passing it to the routine that you need it to be in.
  4 Comments
Diondra
Diondra on 15 Apr 2015
The rgb image was named "I" before I changed it to grayscale and then did the watershed. I've attached my code if that helps.
Image Analyst
Image Analyst on 15 Apr 2015
Don't overwrite I with this line
I = uint8(BW2);
Call it bw28 or something. You're using the same badly-named variable I for your new binary image, thus overwriting your original RGB image.

Sign in to comment.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!