Lens correction (ffmpeg K1 K2)
Purpose: this processor can be used to correct for radial distortion as can result from the use of wide angle lenses (fish-eye), and thereby re-rectify the image.
Keyframable: YES. This processor can be used as a video effect to change progressively the image geometry in an animation.
Parameters: K1 and K2 may be set either with the sliders or by editing the displayed numeric values.
Remark: searching the web with keywords "ffmpeg lenscorrection K1 K2" and the model of your camera may provide you with possible correct values to use.
Calibration procedure:
- open 3De
- click somewhere in the left media panel to display the main empty monitor.
- click on the grid button and choose value 30.
- click on the full-screen preview button .
- take a shot of your screen with your camera, paying attention to be as centered and as aligned with your screen as possible.
- open the resulting image in 3De (as a not-stereo view).
- double-click on the new media in the left column to add it in the timeline.
- click on the new clip in the timeline.
- double-click on the Lens correction processor in the right processor library to add it to the clip.
- adjust K1 to get the lines as straight as possible. The lines may be not fully parallel, nor fully horizontal, nor fully vertical, because of a bad camera alignment with the screen, but they should be as straight as possible.
- adjust K2 together with K1 to refine the result. K2 is supposed to change the outermost part of the picture, while K1 has more effect on the middle part.
- take a note on the K1 and K2 values to set it later on your real scene pictures.
Remark: ffmpeg lenscorrection doesn't use an anti-aliasing processing. You may experiment some staircase effects on objects borders. This should be of minor impact using a processing resolution higher than the final rendering resolution.