Open tldrafael opened 1 year ago
Hi @tldrafael , from your code it seems like you converted all u,v coordinates to XYZ coordinates with the CameraGeometry object. However this is not intended use of the CameraGeometry object. The conversion to XYZ only works for u,v coordinates that correspond to the road. Maybe read the derivation in the book again to see why.
Thank you for your reply @thomasfermi. Yes, I converted all (u, v) coords to XYZ. I see that the only correct XYZ coords would be the ones that the (u,v) belong to the road because of the assumptions of height=0 and planer road. However, the XYZ values seem awkward. It happens with different camera settings. For example, another image below with the depth information:
I also checked your notebook InversePerspectiveMapping.ipynb. If you see the distribution from the y_arr
(the depth on the ISO8855. This "symmetry problem" also happens there.
First off, thank you for this incredible work! It's been very insightful for my studies!
But, I'm facing a problem when I try to extract the XYZ road coordinates from the UV-grid. I'm currently trying to create Bird's Eye View (BEV) projection from CARLA's frame using the camera's intrinsic and extrinsic parameters. I'm computing the XYZ world/road coordinates based on your work camera_calibration.py and lidar_to_camera.py tutorial, such that I can generate the BEV image later.
However, after I compute the XYZ road coordinates from (u, v), I get a lot of negative values on the x-axis, which I assume it does not make sense as the car would be the depth reference of 0, and any (u,v) of the image would be greater than zero. I also noticed the results over the x-axis are symmetrical around zero and around the v-axis of the image (see the image at the end of the issue).
I have been struggling some days with this problem. I would appreciate a ton any help or hint if possible. Thank you very much.
A reproducible code from what I am facing:
Get the camera's parameters and generate XYZ coords from uv-grid.
Investigating the coordinates "deciles":
I plot the depth information below, and it is noticed the symmetry on the x-axis of the plot, and that the maximum values are concentrated at half of the image. Is it an expected behavior?
System information:
CARLA - 0.9.13 Ubuntu - 20.04