how to divide the image into regions based on color values.
8 views (last 30 days)
Show older comments
Ariff pasha
on 6 Dec 2015
Commented: Amith Kamath
on 10 Dec 2015
hi. may i know how to divide the image into regions based on color values. for example gold coin and silver coin. how can i differentiate between gold and silver and get the each of color pixel value. tq
0 Comments
Accepted Answer
Image Analyst
on 6 Dec 2015
If you need color to distinguish between the two (which you may not), I have several color segmentation demos in my File Exchange: http://www.mathworks.com/matlabcentral/fileexchange/?term=authorid%3A31862
If you know you have 3 colors, gold, silver, and the background color, you can use rgb2ind() to classify them
classifiedImage = rgb2ind(rgbImage, 3);
though it won't work if only one color coins is present - you'd have to change the 3 to 2 in that case.
1 Comment
Amith Kamath
on 10 Dec 2015
As it happens, we have an App for that!
More Answers (1)
See Also
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!