How to find length, width,edges of rice in this image??
3 次查看(过去 30 天)
显示 更早的评论
采纳的回答
更多回答(1 个)
Mark Sherstan
2018-11-16
Use the Image Processing Toolbox and this code:
I = imread('download.jpg');
I = rgb2gray(I);
BW = imbinarize(I);
stats = regionprops(I)
You can retrive the results from the structure in stats. Alternatively you could use the Image Region Analyzer app which is also part of the toolbox:

2 个评论
Mark Sherstan
2018-11-17
You have an extra space at the end of your string. Also please confirm that the image and your script are in the same directory.
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!