[FFmpeg-user] lenscorrection and vignette filters
Michael Koch
astroelectronic at t-online.de
Wed Feb 24 09:45:24 CET 2016
> Please consider sending a patch that updates the documentation.
I recommend to make the following changes in chapter 38.73.1:
The filter accepts the following options:
cx
Relative x-coordinate of the center of the distortion. This value
has a range [0,1] and is expressed as fractions of the image width.
The default value is 0.5.
cy
Relative y-coordinate of the center of the distortion. This value
has a range [0,1] and is expressed as fractions of the image height.
The default value is 0.5.
k1
Coefficient of the quadratic correction term. 0 means no correction.
The default value is 0. A positive value shifts the border towards
the center, and the new border of the output image is filled with an
unpredictable color. A negative value shifts the border away from
the center, so that some content is lost in the output image.
k2
Coefficient of the double quadratic correction term. 0 means no
correction. The default value is 0.
This is the formula that describes the distortion of the lens:
r_img = r_src * (1 + k1 * (r_src / r_0)^2 + k2 * (r_src / r_0)^4)
where r_img is the distance from the center of distortion in the
distorted image, r_src is the distance from the center of distortion in
object space and r_0 is halve of the image diagonal in object space. The
lenscorrection filter does apply the inverse of the above formula.
Michael
More information about the ffmpeg-user
mailing list