|Image Distortion (barrel and pincushion distortion)|
This kind of distortion is caused by the optics because the magnification is slightly changing from the center of the image towards the corners. This causes straight lines on the image to bend.
|Color Fringing (lateral chromatic aberration)|
Chromatic aberration takes place in the optics because light rays with different color (with different wavelength) are dispersed by the lens elements. This causes the three different color planes of the image to have different sharpness, and also causes the mostly purple and green color fringes in the corner of the image.
Slight chromatic aberration
Chromatic aberration of the corners
Usage of OptiCorr
|Image Correction with OptiCorr|
For correcting any digital image, the correction data for the lens used (at the given focal length) is needed. Once a correction data is available in OptiCorr, it will be automatically selected at correction, based on the EXIF information in the image (manual selection is also available when EXIF information is not sufficient). For zoom lenses, the correction data with the nearest focal length is used. The exactness of correction only depends on the availability of a correct data set.
The correction data contains a 4th-order rational approximation of the image distortion for each color plane. When correction is applied on any image, the distortion and color fringing described by this data will be cancelled.
Currently, OptiCorr is capable of opening JPG and BMP images. When the correction is applied, 3rd-order Lanczos filtering is used to resample image. This filter is known for its good properties to preserve image detail well and introduce minimal artifacts.
|Taking test images for OptiCorr|
OptiCorr uses it's own test image for measuring image distortion. This image can be printed by OptiCorr. The printout will be optimized to the resolution of the camera that will be tested.
Once a test image is printed, the user takes a photo of it using the camera and the focal length that will need to be corrected later. Photographing the test image could need some extra care, like the following:
- The test image has to be as flat as possible. It's a good idea to fix it to some plain surface with scotch-tape, or the like.
- The image needs to be lit evenly, and the camera has to be held firmly, in front of the test image
- The camera has to be set to its largest resolution, and to the focal length to be tested
- The picture should be framed so that the test image covers the most of the image area, while its corners shouldn't be cropped
However, ensuring the above few points, the rest of the test will be fully automatic, and the modeling of correction data is not influenced by the following circumstances (which often produce unreliable results with other distortion correction methods):
- Image noise (and ISO setting for digital cameras)
- Small camera shake, slightly incorrect focus (not sharp picture)
- slight perspective errors (when camera is not completely perpendicular to image)
- Image exposure settings (as long as dark and light patches of the test image can be distinguished)
- White balance setting of the camera
- Small lighting differences on the test image
Once the test image is created, it is transferred to the computer, and OptiCorr is ready to create correction data based on it.
|Creating correction data with OptiCorr|
Once a test image is available, it can be opened with OptiCorr Correction Modeling Wizard for the second step: modeling corrections.
Before modeling starts, the parameters for the correction data set to be created are extracted from the EXIF information of the image (and can be further edited by the user). The parameters recorded in the correction data set are:
- Camera maker and model
- Focal length
- Additional comments (wide-angle or teleconverter add-on lenses can also be recorded)
- Time of creating data set
After establishing image parameters, the automatic error modeling is started with the following steps:
- The image is filtered to cancel lighting differences, image blur, noisiness, etc.
- An image recognition algorithm finds the marks on the test image
- Synthetic representation of the distorted image is built
- An iterative modeling algorithm fits correction data to the synthetic model
The whole process can take some time, like a few minutes (with state-of-art PCs this time will remain well below 10 minutes). Then, the correction data is added to the database of OptiCorr, and can be used to correct images from the camera later.
Also, at the end of error modeling, OptiCorr evaluates the exactness of correction data, and gives hints if the test image creation can be made more precise.
For most other image distortion correction software, either a test shot should be carried out with a very exact setup, where the camera position should be carefully fixed relative to the test image, or the test image should be processed by hand (for example, by marking points on a line that should be straightened). OptiCorr is built to make this process as flexible as possible, so that no hand work is required after taking test shot, and the recognition and modeling algorithms ensure that circumstances of making the test shot are not critical.
When the user makes the photo of the test image, the photo will show some perspective distortion as well as the distortion of the optics:
Typical test image photo
As the above illustration shows, the perspective and distortion errors in the image are modeled separately, so distortion correction parameters can be obtained separately from perspective of the test shot.
|Publishing and collecting correction data with OptiCorr|
OptiCorr has built-in methods to search for new correction data sets online, and download them. This means that gradually most of the cameras and lenses will have correction data available, which can be used immediately to correct images, without the need of the time-consuming error modeling process.
For updating the collection of such correction data sets, each OptiCorr user may publish data created by him/her.