Open ffabi opened 4 years ago
@marcgpuig which model did you follow to implement the lens distortion?
For a while, pinhole camera model was sufficient for me, but I would like to generate images with a given radial and tangential distortion according to the Brown–Conrady model. I would like to mimic a real-world sensor which has defined k1, k2, p1, p2, k3 parameters.
@marcgpuig are we using the Brown–Conrady model to create the lens distortion?
I have the same problem about the lens distortion attributes defined in CARLA.
If the default value of the lens_k and lens_kcube mean without distortion, the assumption of the lens_k=k1 and lens_kcube=k2 are unreasonable.
In addition, I am also confused about the other attributes.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
@marcgpuig do you have 10 min to answer this?
Hi, I have found that the distortion model is "plumb_bob
".
I used the ros-bridge, ran rostopic echo /carla/ego_vehicle/rgb_view/camera_info
and get something like this:
header: seq: 10 stamp: secs: 435 nsecs: 313154742 frame_id: "ego_vehicle/rgb_test" height: 480 width: 848 distortion_model: "plumb_bob" D: [0.0, 0.0, 0.0, 0.0, 0.0] K: [431.4655346201811, 0.0, 424.0, 0.0, 431.4655346201811, 240.0, 0.0, 0.0, 1.0] R: [1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0] P: [431.4655346201811, 0.0, 424.0, 0.0, 0.0, 431.4655346201811, 240.0, 0.0, 0.0, 0.0, 1.0, 0.0] binning_x: 0 binning_y: 0 roi: x_offset: 0 y_offset: 0 height: 0 width: 0 do_rectify: False
We changed K
(and hence P
) by setting the fov and image size. Specifically, K1, K5 (fx, fy) by fov (fov = 2 arctan (fx/2f)) and K3, K6 (cx, cy) by image size (halve). Definition of D,K,R,P and more information of plumb_bob distortion model can be found in http://docs.ros.org/en/melodic/api/sensor_msgs/html/msg/CameraInfo.html.
Question remained: we still cannot set D
, the distortion model. I have tried to set the CARLA Camera lens distortion attributes as mentioned above, but that does not lead to changes in nor D or other matrix in the above camera information.
Can you help on this? It would be very helpful for the community if the camera distortion section documentation can be improved.
Many thanks in advance!
Hi all, we are on the way of changing the lens distortion algorithms as we found some issues and inaccurate results with the current implementation. We plan to expose these parameters so that they can be tuned easily.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Hi all, we are on the way of changing the lens distortion algorithms as we found some issues and inaccurate results with the current implementation. We plan to expose these parameters so that they can be tuned easily.
Hi @Axel1092 , any update on this! I'm very interested in getting basic lens distortion with matching OpenCV parameters!
I am also interested in this issue.
Hi, I am also interested in this topic/issue. any updates ! Thanks
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
I am still interested in this!
Does any one know any update on this? I just checked the latest Carla version 0.9.13, and it still uses the old model
so upset to see that no updates with such a basic concept
also sad
Looking forward to distortion model of opencv used in carla
Hi all, we are on the way of changing the lens distortion algorithms as we found some issues and inaccurate results with the current implementation. We plan to expose these parameters so that they can be tuned easily.
Hello sir, Is there any update? Which model was used in CARLA to model distortion? How can we modify it?
Hi all, we are on the way of changing the lens distortion algorithms as we found some issues and inaccurate results with the current implementation. We plan to expose these parameters so that they can be tuned easily.
any updates on the distortion model?
If you look into Carla/PostProcessingMaterials/PhysicLensDistortion.uasset, you will find that carla use this distortion model: https://www.ssontech.com/content/lensalg.html
But it seems to be a bug that this uasset does not works properly.
I am still interested in this!
Still interested in this issue
Can you help me find the correlation between the lens distortion attributes defined in Carla and radial/tangential distortion coefficients?
OpenCV documentation defines k1-k6 for radial distortion and p1, p2 for tangential distortion: https://docs.opencv.org/2.4/modules/calib3d/doc/camera_calibration_and_3d_reconstruction.html
I would like to define these values, can you help me calculate the attributes needed for Carla camera sensor? Can you provide a more detailed description of these values?
Maybe lens_k = k1 and lens_kcube = k2 ?
I could not find these Carla attributes in Unreal engine documentation either.