< Previous | Contents | Manuals Home | Boris FX | Next >

Cubic and Quartic Distortion Correction

The basic quadratic distortion coefficient on the Lens panel and image preprocessor’s Lens tab can encompass a moderate amount of distortion. However, with wider-angle lenses, higher-order (more complex) distortion becomes significant, especially in the corners of the image. If you shoot a lens distortion grid (see the web site) and correct the distortion at the top middle and bottom middle of the image, you might see that the corners are not corrected due to the more complex distortion.

The solver and image preprocessor have two additional parameters that can tweak the corners into place, after fixing the basic distortion: cubic (x to the 3rd) and quartic (x to the 4th) distortions. The quartic affects the corners more strongly than the cubic. If you're adjusting manually, you may have to go back and forth between the parameters a few times to get a good match. You can start with the quadratic and quartic, or work your way from quadratic to cubic to quartic. The cubic parameter will usually have the opposite sign of the main distortion (ie one is positive, the other negative), and the quartic yet the opposite sign.

SynthEyes's Advanced Lens Controls panel (accessed from the more button on the Lens panel) controls the computation of the cubic and quartic distortion coefficients (and rolling shutter) as part of the solve (as well as other lens). These parameters typically are more challenging to push through an entire lens distortion workflow.

WARNING : You must have a large number of trackers in the scene and significant camera motion. Without these, distortion cannot be distinguished from the effect of camera motion, and the resulting solution will be theoretically correct, but practically meaningless, or fail outright.

Note : Note that when cubic and quartic terms or other advanced lens parameters are non-zero on the solver panel, meshes will take longer to display in the camera view.

If SynthEyes is computing distortion, we recommend computing first the quadratic only, then quadratic and cubic, and then quadratic and quartic. Only after doing that should you try computing quadratic, cubic, and quartic. Compare the error residual (hpix) as you try each case to verify that adding the additional distortion term significantly reduces the error (eg by several tenths of a pixel, not thousandths). If the improvement is small, do not compute that term.

Be especially careful with the final quadratic, cubic, and quartic calculation: not only should it substantially reduce the error, but ensure that the actual error terms have not dramatically increased. Mathematically, the 3 errors are fairly correlated, especially if you don't have many trackers towards the edge of the image, so it is common for the coefficients to greatly increase for the quadratic+cubic+quartic case, with values of alternating signs that largely cancel each other out. If they have increased a lot, they probably are self-cancelling, except for very wide-angle lenses.

When you use higher-order terms that are unnecessary, you will reduce the error (a little), but actually increase the error for 3D elements that you are inserting into the

scene, due to overfitting. See Using Zero-Weighted Trackers as Canaries for a way to check up on this.

©2024 Boris FX, Inc. — UNOFFICIAL — Converted from original PDF.