How to using the color intensity of each fruit, segment the three different fruits.

1 回表示 (過去 30 日間)
chia chun
chia chun 2024 年 10 月 16 日
コメント済み: chia chun 2024 年 12 月 10 日

回答 (1 件)

Image Analyst
Image Analyst 2024 年 10 月 16 日
This looks like a homework problem. If you have any questions ask your instructor or read the link below to get started:
Obviously, if it is homework, we can't give you the full solution because you're not allowed to turn in our code as your own. But search the forum for the tag "color segmentation" (click on the tag on the right hand side of this page) and you'll find lots of examples you can adapt.
One way could be to convert from RGB to HSV and do kmeans on the hue channel, since I think you'll find the most contrast in that channel. Since the apple has orange in it, you'll have to do a hole filling on each segmented color with imfill. Tell kmeans that k=4 since there are 4 colors there (red, orange, yellow, & white).
Also see color segmentation demos in my File Exchange. Image Analyst's File Exchange
  5 件のコメント
Image Analyst
Image Analyst 2024 年 12 月 10 日
Where is the "Define masks" functionality? It's not an Image Processing Toolbox and I don't see it as one the App names in the Image Processing group (Apps tab of the tool ribbon). Where did you find it? Help me locate it.
chia chun
chia chun 2024 年 12 月 10 日
review the my message, sir , tq

サインインしてコメントする。

Community Treasure Hunt

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

Start Hunting!

Translated by