Skip to content Skip to sidebar Skip to footer

Detecting The Largest Contour With Opencv

Question 1: What I have tried ? I am building a document scanner app with document recognition and perspective correction. For this I am using OpenCV. Here are the steps : Take

Solution 1:

I can't comment but I'll try to make an answer for your Question 1.

Where is your original Image?

You need to have something like a Binary Image which consists of 0 & 255 color pixels and is a Gray Image (So you only have 1 channel). you need to have a full block of image in order for the OpenCV findContour() function to work.

By then I'm sure you will find your contour. There is no problem with your code.

PS. You don't even need to use Canny for Contour Detection. You only use it if you really want to get the edges of an Image.

Hope it helps.

Post a Comment for "Detecting The Largest Contour With Opencv"