Skip to content

Add eps error checking for approxPolyDP to allow sensible values only#16094

Merged
alalek merged 2 commits intoopencv:3.4from
saskatchewancatch:issue-16053
Dec 9, 2019
Merged

Add eps error checking for approxPolyDP to allow sensible values only#16094
alalek merged 2 commits intoopencv:3.4from
saskatchewancatch:issue-16053

Conversation

@saskatchewancatch
Copy link
Copy Markdown
Contributor

@saskatchewancatch saskatchewancatch commented Dec 8, 2019

for epsilon value of Douglas-Peucker algorithm.

resolves #16053

for epsilon value of Douglas-Peucker algorithm.
Copy link
Copy Markdown
Member

@alalek alalek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for contribution!

inputPoints.push_back(Point2f(0.0f, 0.0f));
std::vector<Point2f> outputPoints;

double eps = INFINITY;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use std::numeric_limits<double>::infinity() instead of C macros.

Copy link
Copy Markdown
Member

@alalek alalek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you 👍

@alalek alalek merged commit b9435b9 into opencv:3.4 Dec 9, 2019
@alalek alalek mentioned this pull request Dec 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants