Hello, we are currently having trouble generating a disparity map in our stereopi v2 camera
image below:
https://imgur.com/gallery/stereopi-disp ... ap-8ykjeRO
As seen in the image, most of the disparity map is dark blue and for objects to be reflected in the disparity map they have to be very close and and are usually in a slightly lighter shade of blue which still makes it quite undistinguishable.
I am here to ask for advice for what may seem like potential errors in calibration or adjustments we can make in its code. Thank you so much.
StereoPi V2 Depth Map
- Realizator
- Site Admin
- Posts: 925
- Joined: Tue Apr 16, 2019 9:23 am
- Contact:
Re: StereoPi V2 Depth Map
Hello,
Here are some quick tips based on your text and photo:
1. Please use 5_dm_tune.py to adjust the depth map parameters
2. It's better to do on an external monitor but not on the built-in screen
3. When you're tuning the depth map, please have a few objects at close distance (30-40 cm), and a few far objects (up to 5-10 meters). While tuning you should set parameters to see closer objects in red, and far objects in dark blue colors.
In your photo, I see the camera looks at very close objects, maybe even too close for the disparity (distance between cameras).
Here are some quick tips based on your text and photo:
1. Please use 5_dm_tune.py to adjust the depth map parameters
2. It's better to do on an external monitor but not on the built-in screen

3. When you're tuning the depth map, please have a few objects at close distance (30-40 cm), and a few far objects (up to 5-10 meters). While tuning you should set parameters to see closer objects in red, and far objects in dark blue colors.
In your photo, I see the camera looks at very close objects, maybe even too close for the disparity (distance between cameras).
Eugene a.k.a. Realizator
Re: StereoPi V2 Depth Map
Thanks for the response, I would also like to ask if a bigger checkerboard is better for calibration as we used a 14 × 22 checkerboard (2mm squares)
Re: StereoPi V2 Depth Map
Another question, so we were able to recalibrate and adjust the values in dm_tune.py however when we utilized the camera on the field for our thesis data gathering, the following disparity map is displayed:
https://imgur.com/a/ZhMZRAG
In our thesis, we are supposed to utilize StereoPi in taking pictures of potholes in the road and then estimate its depth from the stereo images. However, with the current disparity map we hit a brick wall. I would like to hear your advice and possible solutions to this matter.
Your assistance is very much appreciated and we will be crediting your expertise in our published study.
https://imgur.com/a/ZhMZRAG
In our thesis, we are supposed to utilize StereoPi in taking pictures of potholes in the road and then estimate its depth from the stereo images. However, with the current disparity map we hit a brick wall. I would like to hear your advice and possible solutions to this matter.
Your assistance is very much appreciated and we will be crediting your expertise in our published study.
- Realizator
- Site Admin
- Posts: 925
- Joined: Tue Apr 16, 2019 9:23 am
- Contact:
Re: StereoPi V2 Depth Map
Could you please share the pair of calibrated images used for the depth map on your picture?
I've quickly checked your image, and I see that your left and right images are correct; the left is left, and right is right (no swap), and I can see a 3D image from your photo. I see that there are a lot of far and close objects on the image, i.e. we can use this particular photo to adjust your parameters.
I'll check the 3D map tuning parameters and share my finding with you. You're one step away from the result you need.
I've quickly checked your image, and I see that your left and right images are correct; the left is left, and right is right (no swap), and I can see a 3D image from your photo. I see that there are a lot of far and close objects on the image, i.e. we can use this particular photo to adjust your parameters.
I'll check the 3D map tuning parameters and share my finding with you. You're one step away from the result you need.
Eugene a.k.a. Realizator
Re: StereoPi V2 Depth Map
Hello, here is the image we used for the disparity map
https://imgur.com/a/NWUOktj
The settings used for the disparity map is the one loaded in the previous screenshot.
Thank you.
https://imgur.com/a/NWUOktj
The settings used for the disparity map is the one loaded in the previous screenshot.
Thank you.