andrewdcampbell / OpenCV-Document-Scanner

An interactive document scanner built in Python using OpenCV featuring automatic corner detection, image sharpening, and color thresholding.
479 stars 144 forks source link

Wrong edge detection in case of no background available #15

Open viveksatasiya opened 2 years ago

viveksatasiya commented 2 years ago

Hello, First of all, I want to say thank you for this wonderful code repository. It really helps me a lot.

I have tried converting many different types of images and it is working quite well, but I have found one case where it detects the wrong contour. When I pass the image with little or no background at that time it detects the wrong contour.

here is the source image, 8

here is the final transformed image, 8

It detected the wrong contour.

Can you please guide me to resolve this issue.

Thanks in advance.

gregorylearns commented 1 year ago

You could try using the interactive mode using the -i flag and manually tune the dimensions