This program models radial distortion of images and camera calibration needed to correct distortion. The mathematical model used in the repository is adapted from formulas at https://www.mathworks.com/help/vision/ug/camera-calibration.html. The script allows alteration of k1, k2, k3 coefficient in the distortion model. The script is also able to undistort the images using desired # of k coefficients.
Below are few distorted images generated by the repository. Different k coefficients were used for the distortions, generating a different level of distortion for each image.
Distortion | Generated Image |
---|---|
Pincusion Distortion with k1 value | |
Pincusion Distortion with k2 value | |
Pincusion Distortion with k3 value | |
Barrel Distortion with negative k values |
Below is an example of undistortion of a previously distorted image using this script.
Distorted Image | Recovered Image |
---|---|