-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Homography between the ground plane and the camera plane #293
Comments
Hi @aloukkal, glad you are working with CARLA :) We don't provide this feature currently.
Maybe you can give more information of what are you trying to achieve. Regards! |
@marcgpuig Thank you for your quick answer. My objective is to have the camera intrinsic matrix ( As I have access to the camera FOV, this is ok) , the rotation and translation matrix to do the IPM Inverse perspective mapping between the bird eye view and the camera plane: One way to have the homography between the ground plane and the camera plane is to put a chessboard on the ground and use some opencv feature to extract the matrix. I am not familiar with unreal engine editor but I will give it a try, thanks. I don't want to have directly the bird eye view image, I need to know the transformation between the bird eye view plane and the camera plane. Regards. |
Thanks @aloukkal now I understand it better! Think that the road is a perfect plane that extends through the Waiting for good news :) |
Hi @marcgpuig, I have been trying without success to do the inverse mapping. I will explain in more details maybe you could help.
My camera is defined this way:
Your help would be much appreciated, thanks |
Hi @aloukkal, Did you took a look at Outside of your game loop you can do: # Compute the camera transform matrix
camera_to_car_transform = camera0.get_unreal_transform() (Use Now, inside the game loop: # (Camera) local 3d to world
# Get the transform from the player protobuf transformation
world_transform = Transform(measurements.player_measurements.transform)
# Compute the final transformation matrix
car_to_world_transform = world_transform * camera_to_car_transform I think that |
@marcgpuig Hi, Thank you I have just download the 0.8 version of carla, thanks again for your amazing work (LIDAR !!!). I have tried saving the car_to_world_transform matrix as a numpy file but I can't load it with error "No module named 'carla' ". Can you please tell me how to save and load this transformation matrix ? I have succeeded in doing the warping by taking 4 points on the edges of the boardwalk, and using the depth of these four points and the fact that one pixel is 16cm in the map I have identified these four points on the map. Then with the findhomography feature of opencv I have obtained the matrix, it works but it's not perfect. Doing it with the unreal transform would be much better. |
Hey @aloukkal, that sounds really cool! It look like you are saving the You have 2 options here:
Hope this helps. |
Hi @aloukkal , were you able to get the transform and the BEV mapping? |
First of all thank you for your amazing work. I am looking for a way to have the homography between the ground plane and the camera plane to warp the image from the camera in the bird eye view plan and reversely.
I would like to know if I can have this homography directly or if it is possible to put a calibration pattern like a chessboard on the road ?
Thanks.
The text was updated successfully, but these errors were encountered: