asked 2017-11-26 05:40:14 -0500

Jeana gravatar image

From the documentation of Imgproc.findContours :

CV_CHAIN_APPROX_SIMPLE compresses horizontal, vertical, and diagonal segments and leaves only their end points. For example, an up-right rectangular contour is encoded with 4 points.

How does this work exactly? Does this use the Douglas-Peucker algorithm?

edit retag flag offensive close merge delete


I'm interpreting it wrong I think, it just ignores points if they're on a horizontal/diagonal/vertical line but doesn't do anything too fancy? ApproxPolyDP uses Douglas-Peucker.

Jeana gravatar imageJeana ( 2017-11-26 07:08:17 -0500 )edit

take a look at the code

i can say it uses a simple method not Douglas-Peucker algorithm

sturkmen gravatar imagesturkmen ( 2017-11-26 07:20:57 -0500 )edit