What's the difference between the Undistortion node and the "Render undistorted"option in the camera background settings? When you do camera tracking in Blender and press the &quot;Setup Tracking Scene button&quot;, Blender automatically sets up a compositing node configuration that makes is easy to add 3D elements to the video footage.
One of the nodes is an Undistortion node, that is supposed to undo the lens distortion, to make the undistorted 3D elements generated by Blender fit into the footage.
When you are working on your scene, you can set the video to be the background image for your camera. In the settings for the background image, by default the &quot;Render undistorted&quot; checkbox is checked.
My expectation was that this would have the same behaviour as the Undistortion node in the compositor, but this appears to not be the case.
In the camera background picture, the undistort-option makes the picture look worse than the original: a line that was originally pretty straight, looks bent after performing the undistortion.
In the compositor, the undistorted picture looks exactly the same as the original footage, as if Blender has decided that the original video was not distored at all, and doesn't need any undistortion treatment.
My question is: how is it possible that the Undistortion node has a different behaviour from the &quot;Render undistorted&quot; option for the camera background? Do they, for some reason use different distortion values (K1, K2) to do their calculations?
The camera background image in the viewport, with Render Undistorted option enabled,

should look the same as the result of the &quot;undistort node&quot; in the compositor,

and same as when you check the &quot;render undistorted&quot; in the Clip Display options in the Movie Clip editor.

In the undistorted image, straight lines should look straight, not curved. If they don't, then the Radial distortion coefficients k1, k2 (and k3) are not set correctly, or the optical center of the image might be incorrect as well.
To determine the distortion coefficients photograph a chart (or anything that has straight lines), open the image in the movie clip editor and use the annotation tool to trace thosestraight lines and distort them to match the image as shown in the following link:
How to determine lens undistortion values for motion tracking?