Skip to content

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

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

alalek merged 2 commits into
opencv:3.4from
saskatchewancatch:issue-16053

Conversation

@saskatchewancatch

@saskatchewancatch saskatchewancatch commented Dec 8, 2019 •

Copy link
Copy Markdown
Contributor

for epsilon value of Douglas-Peucker algorithm.

resolves #16053

for epsilon value of Douglas-Peucker algorithm.

@alalek alalek left a comment

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.

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.

@alalek alalek left a comment

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.

Thank you 👍

@alalek
alalek merged commit b9435b9 into opencv:3.4 Dec 9, 2019
@alalek alalek mentioned this pull request Dec 11, 2019
SavyaSanchi-Sharma pushed a commit to SavyaSanchi-Sharma/opencv that referenced this pull request Jul 30, 2026
* Add eps error checking for approxPolyDP to allow sensible values only
for epsilon value of Douglas-Peucker algorithm.

* Review changes for PR
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