Which lens undistortion algorithm is used in Blender? I want to know more about these K1, K2, K3 parameters. How do they work? How they relate to each other. Why I need K2 and K3 if K1 does the job? Any info will be usefull.
they are just the factors of parabolic and quadratic distortion, as well as a distortion of power 6. lens distortion has to be symmetric/isotrtopic, hence it can be written as function of a pixels distance to the center. this distance changes with an towards the center (=distortion).
The new distorted distance to the center is D_r(r) = r+ k1*(r)^2 + k2*(r)^4 + k3*(r)^6
with r being the distance in pixels. So its rather just mathematical parameters, that approximate real lens distortion, than any parameters of real lenses present in your camera.