Findcontours 2.4.13 vs findcontours 4.5.2 c++

I have created a c ++ program using opencv 2.4.13 and the function findContours like this:

findContours (dst, contours, CV_RETR_EXTERNAL, CV_CHAIN_APPROX_NONE)

Then I updated the opencv version to 4.5.2 and the function findContours began to produce a different value for the contours (there are more of them) on the same image.

How to return contour values from opencv 2.4.13?

Then I updated the opencv version to 4.5.2 and the function findContours began to produce a different value for the contours (there are more of them) on the same image

findContours code have an update since ver 3.2 (adding an extra one pixel boundary on the image before finding contour)

So the difference in results is normal

1 Like