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

3 ビュー (過去 30 日間)
Jasleen Kaur
Jasleen Kaur 2018 年 11 月 16 日
コメント済み: Mark Sherstan 2018 年 11 月 17 日
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 Center および File ExchangeGet 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