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

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)

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's "Answer" moved here.
by "lost" I meant that in order to perform the watershed transform, I had to change the image into binary. Now that it is segmented through watershed, I'm not sure how to retrieve the color information for each segment and use it for individual colony/segment analysis. Sorry that wasn't clear.
Diondra, what was the name of your RGB image variable? What happened to it? Why is it no longer available??? It should be there.
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.
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.

Categories

Asked:

on 10 Apr 2015

Commented:

on 15 Apr 2015

Community Treasure Hunt

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

Start Hunting!