Question concerning color segmentation performance.

2 次查看(过去 30 天)
Hello there!
I am looking to perform color segmentation on specific images in order to isolate the green objects in the image (more specifically, a green glove). I have this part covered, with all credit going to Image Analyst, whose Simple Color Detection code is the basis of the program, which is attached. However, I've encountered a problem where, in very similar circumstances, I successfully isolate the green in one image, while I am unable to detect any green at all in the other. I am using the same thresholds all throughout.
Specifically, said successful image is here:
While unsuccessful image is here:
Can anyone please explain why this happens? Is it simply a matter of adjusting the thresholds ever so slightly, or is there something I am missing here?
And if possible, is there a way for me to improve the performance and robustness of this color segmentation method?
Thank you for your time. Any help would be greatly appreciated.

采纳的回答

Image Analyst
Image Analyst 2014-9-6
Probably. My demo code (attached below here) gives you the histograms of the h, s, and v channels. You need to see where green lies. It's probably around 0.2-0.4 or so You might have to combine it with other color channels. For example since everything else is some shade of gray, you might be able to threshold on the saturation channel. Attach your two images (working and not working) if you want more help.
  4 个评论
Image Analyst
Image Analyst 2014-9-8
So now that you've had a chance to try it, what do you think? Good enough to accept the answer, or not?
Cosmic Clarity
Cosmic Clarity 2014-9-8
You've suggested a lot of ways to improve the program, and these codes will help immensely in optimizing the color segmentation. This is more than enough. Thank you for the help.

请先登录,再进行评论。

更多回答(0 个)

Community Treasure Hunt

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

Start Hunting!

Translated by