problems with stereo calibration and bad depth estimation
- Edited
I added the script to the same drive under disparity.py
(https://drive.google.com/drive/folders/1wITNra_xuafv5RCj7222uhPM0IfPHbqV). It is based on https://docs.luxonis.com/software/depthai/examples/stereo_depth_video/
Distance from the camera is around 130cm
PD the image's titles are set wrongly (left and rectifiedLeft should be right and rectified right and vice versa)
the distribution is the one shown in the harware mounting, They should be in the same horizontal... I am going to check if there is any slack
I swapped the sockets based on your previous comment:
Try switching the left and right when performing stereo.
Linking
monoLeft.out.link(depth.right)
monoRight.out.link(depth.left)
depth.disparity.link(xout.input)
or switch sockets for left and right.Thanks,
Jaka
Should I change them back?
I am trying to correct camera positions, not sure why I have such slack using OAK-FFC 4P
Hi Jakaskerl,
I realised that I had the cameras swapped on OAK-FFC-4P.json.
I also discovered that there is an inconsistency when you add the parameter -rlp.
As you can see from the images below. When you are capturing the images, you get the name mapping your camId
(the socket name). However, when you set the calibration, you get the name mapping the cam_info
(from json file)
If you change the mapping when capturing the images from camId
mapping to cam_info
should work fine.
That being said, I have redefined the workflow and uploaded it here There are different calibration folders name as calib_X
being X the horizontal distance between cameras
I have added more info than before:
- The stereo pair images rectified (I am getting high errors in some pictures and I cannot figure out why. Can you take a look?)
- I have also realised that the fov has changed (When I run
disparity.py
the images are zoomed in compared to when I runcam_test.py
from the depthai_python repository. It also seems that the autofocus is still set even after using-rlp
when calibrating
These are the depth and disparity results for calib_5. The epipolar error I am getting is still too high (2.81) and there is a big difference between right and left reprojection error (almost double, I am not sure if that is normal)
Thank you in advance
Adrián
I have changed those attributes:
However, when I run te script the windows are frozen:
At least, the left frame where it hangs up seems to be fixed.
Any idea?
- Edited
I set setIspScale to (1,3) to meet the restrictions and now it works:
PD: Do you have any module/script for color correction?