4
$\begingroup$

I need to set a camera and render images with that camera. I have rotation and position data as extrinsic parameters and focal length, shift values and radial and tangential distortion coefficients as intrinsic parameters from opencv. I succesfully applied all the parameters except radial and tangential distortion coefficients.

There is an lens distortion value in Blender in Compositor Editor but it is just single value. I need three parameters k1, k2, k3 for radial distortion and two parameters p1, p2 for tangential distortion. How can I achive to use those parameters? I can manually set the projection matrix by myself. However is it possible to use custom projection matrix for each 3d points in the scene for render image?

enter image description here

$\endgroup$

2 Answers 2

2
$\begingroup$

The tangential distortion can not be modeled in the current version.

The radial distortion with three parameters can be entered in the Movie Clip Editor (Shift F2) in the 'Track' panel under 'Lens'. Then they can be applied with the Movie Distortion node in the Compositor (Shift F3).

The same question was asked by me here and also asked here. Check the answers to those questions for more details.

Regarding the projection matrix: 6 years ago, it was not possible to set a custom projection matrix, but a workaround using orthographic projection was suggested: see here. However, I don't know if this has changed since 2014.

$\endgroup$
2
$\begingroup$

As pointed out by others already, the distortion parameters can be set in the move clip editor. Blenders. Interface deals only with radial distortion (k1,k2,k3).

In the compositor the node to use is not the lens distortion one, but the movie distortion one and needs to be linked to a move clip, or image, used in the move clip editor.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .