Hi,
I need to distort a 3D view to match with a real camera view. I have calibrated the camera with opencv and I need to have a shader to distort (not undistort!) the 3d view.
I have tried various glsl shader and try to simulate the result and it seems it’s not working.
1/ is K1 > 0 a barrel distortion ? I find various sources with some saying that I need to have K1<0 to have barrel?
2/ Do I need to do that to distort (I need to do at this a texture fetch with a sampler in the image so I need to find the correct distorted u,v to display in my glsl shader :
According to this post, they use this Geometric Image Transformations — OpenCV 2.4.13.7 documentation to undistort the image (undistort glsl pixel shader help. · Issue #1041 · microsoft/Azure-Kinect-Sensor-SDK · GitHub) from what I understand it’s to distort the image ? Not undistort? Why do I need to divide by f to normalize ? I was thinking that I need to normalize by the width in pixel of the camera image ?
Best regards
`