Uploaded March 2016 | Updated September 2026, 2 hours ago
This shows off code to distort an entire image according to OpenCV fx,fy,cx,cy and distortion coefficients, and then undistort it using the standard rectification function.
The source image is on the left, the distorted image next, then the rectified image, then the difference of the input image and the rectified image on the right.
The difference isn't always zero because information is lost in the distortion- parts of the image go out of the boundaries, or are so distorted to a subpixel level they can't be brought back.
I've been meaning to git forward image distortion added to OpenCV for several years, but have neglected to push for it. The source code is currently here github.com/lucasw/vimjay/blob/master/src/standalone/distort_image.cpp
Using ros:
roslaunch vimjay distort.launch
This shows off code to distort an entire image according to OpenCV fx,fy,cx,cy and distortion coefficients, and then undistort it using the standard rectification function.
The source image is on the left, the distorted image next, then the rectified image, then the difference of the input image and the rectified image on the right.
The difference isn't always zero because information is lost in the distortion- parts of the image go out of the boundaries, or are so distorted to a subpixel level they can't be brought back.
I've been meaning to git forward image distortion added to OpenCV for several years, but have neglected to push for it. The source code is currently here github.com/lucasw/vimjay/blob/master/src/standalone/distort_image.cpp
Using ros:
roslaunch vimjay distort.launch










