Home > OS >  OpenCV - Can't find correct contours in similar images
OpenCV - Can't find correct contours in similar images

Time:07-21

the task I want to do looks pretty simple: I take as input several images with an object centered in the photo and a little color chart needed for other purposes. My code normally works for the majority of the cases, but sometimes fails miserably and I just can't understand why.

For example (these are the source images), it works correctly on this

Output images:

enter image description here

enter image description here

The green outlines are the contours of the objects, and the red outlines are the bounding boxes of the objects.

  • Related