Let's say I have an image of a ball like this one:
I want to separate the colors of the ball to the color groups. In this case I should have 2 main color groups - "brown" and "white". The "brown" group will have all the brown pixels and the "white" group will have all the white pixels. I'm using matlab for this task. The way that I thought to do is:
- to look at the RGB channels. I used
scatter
to look if I could clearly see some groups, but I didn't. - to look at the bayer vales. But couldn't see any groups either.
- to run an edge detector. Then, in each enclosed area I'll find the mean of the pixels. The areas that will have similar mean values (within a certain threshold) will belong to the same group. It seemed to sort of to work but in many case it didn't
- Any other ideas?