I need a code for red tomato detection from plant
3 views (last 30 days)
Show older comments
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/249354/tomatoes_helios4eos_gettyimages-edit.jpeg)
1 Comment
Walter Roberson
on 21 Nov 2019
As discussed in https://www.mathworks.com/matlabcentral/answers/382021-i-am-doing-image-processing-for-red-tomato-detection-how-can-i-do-complete-the-fruit-image-and-remo you need to define what "red" means. But much more importantly, you need to define what "ripe" means.
Accepted Answer
Nicolas B.
on 21 Nov 2019
There is a paper about the tomato recognition here. I guess, once you have detected the tomatoes, it's not that difficult to get a color detection.
1 Comment
Siressa Etefa
on 4 Jan 2022
yes it about that, but I am challenged with some problem if possible by capturing the image of tomato and detect that image to identify its ripeness
More Answers (2)
Siressa Etefa
on 4 Jan 2022
i want a matlab program that detect the maturity of tomato by image processing techniques
2 Comments
Walter Roberson
on 4 Jan 2022
Edited: Walter Roberson
on 4 Jan 2022
Remind us again which of these is ripe, and which are not?
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/853005/image.jpeg)
and see https://www.almanac.com/some-green-tomatoes-are-meant-stay-green for a variety of tomato that never gets red.
Walter Roberson
on 5 Jan 2022
https://www.davidsonfarmersmarket.org/painted-tomatoes-ethaline-gas-speeds-ripening/ on why you cannot determine maturity from color.
Image Analyst
on 4 Jan 2022
Use the Color Thresholder in HSV space. See attached demo.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/853150/image.png)
4 Comments
Walter Roberson
on 5 Jan 2022
But the new poster who revived the thread needs to detect "maturity" rather than "red"
Image Analyst
on 5 Jan 2022
Yes, and I thought you answered that pretty well, but the original poster didn't have an answer yet so I thought I'd add one.
The link you gave says that tomatoes turn red, even when not ripe, by exposing them to ethylene. Though one reason I've heard for tomatoes being hard is that people don't like naturally ripe tomoatoes because they are more liquidy, squishy, and jelly/goopy inside. For sandwiches people generally like tomato slices that are less goopy and more solid, so farmers are "breeding" tomatoes with more "solid" characteristics. And of course they'd rather have a solid red tomato slice than a solid green tomato slice. But I'm not sure what "ripe" means (certain water or sugar concentration???) and if it's possible that a tomato can be ripe independent of the amount of solid matter in the tomato.
Some researchers have had success with hyperspectral imaging in the visible:
but I'd also want to consider SWIR imaging (short wave infra-red): https://swir-led.com/optical-food-sorting-leds/
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!