Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Undistorted image lots of black

Consider the image above. It has been undistorted. Lines that are parallel in 3D space are now parallel in the 2D projection (the 2D image). Radial distortion has been removed. But what's up with the "four pointed star" shape? This is because in order to correct for radial distortion, pixels that are further away from the center of distortion must get pushed more than pixels closer to the center of distortion. See the picture below:

image description

The red dots represent pixel locations before undistorting: they follow a regular grid. But the radial distortion model says that as one moves away from center of distortion, the distortion gets worse. It is called a radial distortion model because this is a function of the size of the radius of a circle centered around the center of distortion. The heads of the blue vectors represent where the red pixels will get undistorted to. Since the original image is a rectangle, the points toward the corners have the highest radius, and they must get pushed out more. But if you want to see every pixel from the original image, this means you will have the black "hills" on the sides of the undistorted image. If you don't want to see these black hills, set alpha to 0. If you do want to see these black hills, set alpha to 1. If you want to see the black hills, but you want them to be smaller, set alpha to 0.5. You get the picture.

Undistorted image lots of black

Consider the image above. It has been undistorted. Lines that are parallel straight in 3D space are now parallel straight in the 2D projection (the 2D image). Radial distortion has been removed. But what's up with the "four pointed star" shape? This is because in order to correct for radial distortion, pixels that are further away from the center of distortion must get pushed more than pixels closer to the center of distortion. See the picture below:

image description

The red dots represent pixel locations before undistorting: they follow a regular grid. But the radial distortion model says that as one moves away from center of distortion, the distortion gets worse. It is called a radial distortion model because this is a function of the size of the radius of a circle centered around the center of distortion. The heads of the blue vectors represent where the red pixels will get undistorted to. Since the original image is a rectangle, the points toward the corners have the highest radius, and they must get pushed out more. But if you want to see every pixel from the original image, this means you will have the black "hills" on the sides of the undistorted image. If you don't want to see these black hills, set alpha to 0. If you do want to see these black hills, set alpha to 1. If you want to see the black hills, but you want them to be smaller, set alpha to 0.5. You get the picture.