How do I automatically detect an object and create its BoundingBox?
古いコメントを表示
Hello, I want to detect the pill package on the table automatically in my script and then use the BoudingBox to crop the image. So far, I am working around this problem by automatically cropping the image (displayed as green box in image). The detection doesn't need to be 100% exact, it can be more or less like the green box in the image.
I already tried adaptive thresholding and multilevel thresholding, but it does seem to work and I get really bad results which are unusable. Can anybody help me?
The multilevel thresholding of the Saturation channel of this image looks like this:
During the script I also create an image based on the local standard deviation, which looks like the image below. It seems that it could somehow be possible to detect the borders of the pill package but I couldn't figure out how...

3 件のコメント
Walter Roberson
2020 年 10 月 25 日
What happens if you first threshold for brighter white, and then bwareafilt() to remove what speckle noise remains? I suspect that the resulting image would have gaps but you would still be able to do boundary detection on it.
Jannis Holtkoetter
2020 年 10 月 26 日
Shantanu Dwivedi
2020 年 10 月 30 日
Have you tried the following edge detection techniques ?
回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Image Thresholding についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
