Extract the rice objects from the input image

22 ビュー (過去 30 日間)
Shafiqah Alya
Shafiqah Alya 2020 年 12 月 21 日
編集済み: Uday Pradhan 2020 年 12 月 21 日
How to extract rice from this image? Please help me out. Thank you.

採用された回答

Uday Pradhan
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 件)

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by