Skip to content

JosepMarinG/surround-view-python

Repository files navigation

This repository is a modified version of the project surround-view-system-introduction.

It includes:

YAML calibration files for the MiniCERNBot with USB fisheye cameras.

A new script that publishes the generated surround view image on a ROS 2 topic.

📷 Hardware Setup: image This image shows the MiniCERNBot with a Nuc and 4 USB fisheye cameras.

🔧Here is an explanation of the repo: run_calibrate_camera.py calibrates the camera with a nice UI.

python3 run_calibrate_camera.py   -i 2   --grid 11x8   --resolution 1920x1080   -framestep 10   -o yaml/cam2.yaml   --fisheye   --no_gst
image

run_get_projection_maps.py gets the perspective. Change the data on the param_settings.py file inside the surround_view folder before runing the projection script. The order of seleccion of the points is very important. First the top left, top right, bottom left, bottom right.

python3 run_get_projection_maps.py -camera front
image image This images show how the points should be clicked and the demo result. image This shows a calibration pattern used for the perspective setup of the MiniCERNBot.

The projection script uses an image saved in the folder images with the name front.png, back.png... To obtain this images a script was created called take_picture.py

In param_settings the variables to change according to the calibration pattern you use are the following (everything is in pixels): shift_w = how far away the birdview looks outside of the calibration pattern horizontaly shift_h = how far away the birdview looks outside of the calibration pattern verticaly inn_shift_w = size of the gap between the calibration pattern and the robot horizontaly inn_shift_h = size of the gap between the calibration pattern and the robot verticaly total_w = Total width of the whole picture total_h = Total height of the whole picture xl = horizontal component of the top left point of the robot image xr = horizontal component of the bottom right point of the robot image yt = vertical component of the top left point of the robot image yb = vertical component of the bottom right point of the robot image project_keypoints = pixel locations of the four points to be chosen when running the projection script

image

✅ Results

image image image

⚠️ Performance Consideration

The original Python implementation was too slow for real-time use. To overcome this, we explored a C++ alternative already available at: 👉 https://github.com/JokerEyeAdas/AdasSourrondView/tree/main

Our improved fork of this C++ implementation can continuously generate and publish the surround view in a ROS 2 topic: 👉 https://github.com/JosepMarinG/SourrondViewC-

About

No description, website, or topics provided.

Resources

License

Stars

1 star

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages