Skip to content

fix the bug, when k[4] is negative, icdist may be negative at the edg…#14583

Merged
opencv-pushbot merged 1 commit intoopencv:3.4from
FanaticsKang:fix_undistortPoint_bug
Jun 14, 2019
Merged

fix the bug, when k[4] is negative, icdist may be negative at the edg…#14583
opencv-pushbot merged 1 commit intoopencv:3.4from
FanaticsKang:fix_undistortPoint_bug

Conversation

@FanaticsKang
Copy link
Copy Markdown
Contributor

This pull request changes

The cvUndistortPointsInternal function.
The k[4] is negative of my camera, the icdist will be negative at the edge of image. This cause the error like the point at right will be undistort to the left.
So the function will return when icdist < 0, and use the last compute result.

@FanaticsKang FanaticsKang changed the base branch from master to 3.4 May 19, 2019 07:23
@alalek
Copy link
Copy Markdown
Member

alalek commented May 20, 2019

Please capture your inputs and add some simple regression test for that case.

@alalek
Copy link
Copy Markdown
Member

alalek commented Jun 13, 2019

@SachieKang Could you share some image/calibration parameters for regression test?

@FanaticsKang
Copy link
Copy Markdown
Contributor Author

I update a test, and #14800 is the test with original code. You will see the error by running ./bin/opencv_test_imgproc.

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.

Looks good to me 👍

@FanaticsKang Please don't close #14800. It will be merged next.

@opencv-pushbot opencv-pushbot merged commit 549c531 into opencv:3.4 Jun 14, 2019
@alalek alalek mentioned this pull request Jun 15, 2019
arnaudbrejeon pushed a commit to arnaudbrejeon/opencv that referenced this pull request Jan 23, 2020
…test

Test request by opencv#14583 (opencv#14800)

* add test to show the undistort bug

* move test to calib3d
akretz added a commit to akretz/opencv that referenced this pull request Nov 10, 2025
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.

4 participants