1
votes

I have several color images that I want to label connected component in it. Unfortunately, bwlabel can't help me because it operates on a binary images, and converting my images to binary wouldn't be useful to me. How can I do this?

Another question: if I detect a connected component in an image, and a special pixel exists in that connected component, then if I want to add all pixels in this connected component to that pixel and having that pixel and all other pixels which are in the same connected component. How can I do this?

1
Your second question is unclear. As a sidenote, I suggest that you ask it separately. - Eitan T
ok i have an image and i have some connected component in the image i want to do some region growing processing which means if i have a pixel in one of these connected component then i can understand which other pixels are in the same connected component with that pixels? - user2352637
Regarding your first problem: your color image can be represented in the RGB color space as three separate matrices. If you find the connected-components in each of the three matrices, you can reduce the problem to labeling connected components in a greyscale image. The latter is still not trivial, yet it is a simpler task. There a lot of articles describing various solutions for this, I suggest you pick one and implement it. Once you've labeled all three, merging the labels into one map should be easy. - Eitan T
excuse me im a beginner in matlab is there any way to find connected component in gray scale images can you help me or address a link which explain it? - user2352637
This paper puts some light on labeling of connected components of grayscale images. - Autonomous

1 Answers

0
votes

You should take a look at the flood fill algorithm:

http://en.wikipedia.org/wiki/Flood_fill

You could modify it to do component labeling rather than converting the source pixels to another color

As mentioned in the comments above, it would be ideal for you to convert your image to greyscale and operate on that. See this on ways to achieve greyscale images from RGB. I would suggest the last one (luminosity)

Good luck