How to find length, width,edges of rice in this image??

3 次查看(过去 30 天)
c.jpg

采纳的回答

Image Analyst
Image Analyst 2018-11-16
See my Image Processing Tutorial in My File Exchange

更多回答(1 个)

Mark Sherstan
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:
Capture.PNG
  2 个评论
Jasleen Kaur
Jasleen Kaur 2018-11-17
rice named image exists in my laptop but it gives error, i dint know why15424762880751037376185291316968.jpg
Mark Sherstan
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.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Get Started with Image Processing Toolbox 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by