TRadialDistortionTransformation

Ancestors

TObject
   |
TTransformation

Description

The radial distortion transformation can be used to correct or create a kind of distortion created by optical lenses. This kind of distortion is normally visible as barrel distortion, pincushion distortion or a blend between those types.

This transformation uses the formula of the Brown-Conrady model:

p_dst = p_center + (p_src - p_center) * (Coefficient1 * sqr(r) + Coefficient2 * sqr(sqr(r)))
r = abs(p_src - p_center)

Where:

This transformation implements the forward and backward transform. The forward transform is given by the formula above. The backward transform requires to invert a 4th degree polynomial, which is a nonlinear function. Because of that a discrete map is used. The number of elements of this map can be set using MapElements.

Only the float transform level is implemented. Speedups could still be gained by implementing fixed and integer transforms.

Reference

Methods Properties
In TRadialDistortionTransformation:
Coefficient1
Coefficient2
MapElements
In TTransformation:
GetTransformedBounds SrcRect
HasTransformedBounds
ReverseTransform
Transform

See Also

TFishEyeTransformation