Optimizationπ
Calibrating aberrationsπ
Aberrationπ
Aberration is the effect that, when looking perpendicularly on a planar surface, not all pixels are in focus at the same time. Either the center or the outer part of the image are completely in focus. This effect is illustrated in Figure 1.
Aberration is the curvature of field that effects images taken with cameras using standard lenses but also cannot be completely avoided when using cameras with telecentric lenses. It results in an error in the depth image.
There are two main kinds of optical aberration:
- Spherical aberration occurs when light rays have different focus points depending on their distance to the optical axis, i.e., the center part and the border of the image are not simultaneously sharp, even though a planar object is imaged.
- Coma is the asymmetric accumulation of light intensity for off-axis points. It effects the periphery of the field of view. This kind of aberration is, however, not relevant here and is just mentioned for the sake of completeness.
The following paragraph describes how to calibrate spherical aberration and therefore avoid errors.
Setting up aberration calibrationπ
In order to get an accurate result from your depth from focus application, aberration has to be calibrated. This enables the calculation of correct sharp depth images and also enable further processing of the DFF results.
Rules for setting up your calibration to correct aberration.
- A planar surface with reasonable texture is needed as reference plane.
- The camera has to be mounted perpendicular to the surface (angles can be determined with HALCONβs camera calibration if necessary).
- It is important that the same distance and camera setting are used as will be applied during application!
- Using depth from focus, the curvature on the surface, i.e., the aberration is determined.
- The extracted reference surface is used to correct the later measurements.
- It is recommended to store the reference image to file for further use.
- It is recommended to store the used parameters to file for further use.
- The aberration can be approximated by a paraboloidal function.
- The approximation has the advantage of reducing noise effects that influence the measurements.
- The parameters of the paraboloidal function can be used to generate a reference image.
- By subtracting the reference image from the depth measurement the error caused by the aberration can be corrected.