How can I classify a fruit based on its color into white(unripe), turning, ripe using color image processing in matlab. Is there any code for it or some ideas on how to do it.

7 views (last 30 days)
I was looking for help in classifying a fruit image based on its color.
say for example if the picture shows red color in the image of the fruit(for eg strawberry) how can it be classified as ripe fruit, if its white in color it needs to be classified as unripe and if its mix of white and orange should be classified as turning. How can this be done using matlab. I was looking for an immediate help. Thank you

Answers (1)

Dhruv G
Dhruv G on 27 Jul 2021
If the fruit occupies most of the image you can get the RGB values of a cluster of pixels near the center of the image and average over the cluster. You could then classify based on color, eg - (255,255,255) is white, (255,0,0) is red etc.

Categories

Find more on Convert Image Type in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!