how to determine if an image has an object or empty
7 ビュー (過去 30 日間)
古いコメントを表示
i want to do shape detection however i was wondering if i would able to make the system able to determine if the image has an object or its an empty image. if yes, which method should i use? thanks in advance
4 件のコメント
Walter Roberson
2016 年 6 月 16 日
How should your code know if it is object 1 that is missing or object 2 that is missing? Are the objects always in the same place?
If you just want to know how many objects you have, then bwlabel() the thresholded image and look at the second output num of bwlabel()
回答 (2 件)
Image Analyst
2016 年 6 月 16 日
Try this, like Walter said:
[~, numberOfObjects] = bwlabel(binaryImage);
0 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!