How to find length, width,edges of rice in this image??
조회 수: 4 (최근 30일)
이전 댓글 표시

댓글 수: 0
채택된 답변
추가 답변 (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!
