How do I automatically detect an object and create its BoundingBox?

4 vues (au cours des 30 derniers jours)
Jannis Holtkoetter
Jannis Holtkoetter le 25 Oct 2020
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 commentaires
Jannis Holtkoetter
Jannis Holtkoetter le 26 Oct 2020
Hey, thank you, it really does a good job so far. I used some more morphological operations and the results are quite okay.
However, on some images there can be some brighter pixels in the background...then the binary image looks like this:
Does anybody know, how to remove the large white blob, which is attached to the blister?
Shantanu Dwivedi
Shantanu Dwivedi le 30 Oct 2020
Have you tried the following edge detection techniques ?

Connectez-vous pour commenter.

Réponses (0)

Community Treasure Hunt

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

Start Hunting!

Translated by