Extract the rice objects from the input image
조회 수: 24 (최근 30일)
이전 댓글 표시
채택된 답변
Uday Pradhan
2020년 12월 21일
편집: Uday Pradhan
2020년 12월 21일
Hi Shafiqah,
You could try binary thresholding in this case:
BW = imbinarize(img,'adaptive');
The binary image thus obtained will contain certain small noisy portions as well which can further be filtered using the bwareaopen function. Then you can use bwconncomp to extract the rice grains and get their pixel indices. I hope this helps!
Edit: Also check out the regionprops function and KSSV's comment for information on additional functionalities!
댓글 수: 0
추가 답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!