Depth accuracy inquiry
Hi this is a continuation from https://discuss.luxonis.com/d/1339-depth-accuracy-inquiry. I couldn't upload the videos on the discussion forum so I uploaded them here.
Videos
code used to record on Oak-D PRO AF
from depthai_sdk import OakCamera, RecordType
with OakCamera() as oak:
color = oak.create_camera('color', resolution='1080P', fps=20, encode='H265')
left = oak.create_camera('left', resolution='400p', fps=20, encode='H265')
right = oak.create_camera('right', resolution='400p', fps=20, encode='H265')
# # Synchronize & save all (encoded) streams
oak.record([color.out.encoded, left.out.encoded, right.out.encoded], './', RecordType.VIDEO)
# Show color stream
oak.visualize([color.out.camera], scale=1/3, fps=True)
oak.visualize([left.out.camera], scale=2/3, fps=True)
oak.visualize([right.out.camera], scale=2/3, fps=True)
oak.start(blocking=True)
Physical setup
Pretty sure everything is flat

Hi @glitchyordis ,
For others reading this, I'd first suggest reading Improving stereo depth quality tutorial.
I checked your recording, to me, it looks like (very) bad texture. If metal plate, or camera would be rotated by 90deg it would likely be much better - as on aluminum, you have horizontal lines, which makes for very bad texture for (horizontal) disparity matching.
Accuracy seems to be correct though. So the mat is 56cm, while the plate is 53cm (exactly 3cm difference). My guess would be that it is eg. 1cm error, plus about 2cm of measurement error on your side. Thoughts?

Hi @glitchyordis , For others reading this, I'd first suggest reading Improving stereo depth quality tutorial. I checked your recording, to me, it looks like (very) bad texture. If metal plate, or camera would be rotated by 90deg it would likely be much better - as on aluminum, you have horizontal lines, which makes for very bad texture for (horizontal) disparity matching. Accuracy seems to be correct though. So the mat is 56cm, while the plate is 53cm (exactly 3cm difference). My guess would be that it is eg. 1cm error, plus about 2cm of measurement error on your side. Thoughts?
![]()
Hi @Erol444,
Thanks for the input; yeah it did improve when we turn things 90 degrees. May I know how to perform the reconstruction of the depth map from the recording of L and R cam?
Hi @glitchyordis , You can use SDK's Replay functionality: https://docs.luxonis.com/projects/sdk/en/latest/features/replaying/ So if you create 2 cameras (left, right) and use Replay, it will actually source images from the video files instead the actual cameras. Then you can create Stereo component, which would take those frames and reconstruct them:
from depthai_sdk import OakCamera, RecordType
with OakCamera(replay='D:/Downloads/2-18443010A14E940F00') as oak:
left = oak.create_camera('left')
right = oak.create_camera('right')
stereo = oak.create_stereo(left=left, right=right)
oak.visualize(stereo.out.depth)
oak.start(blocking=True)
Could you perhaps also confirm the depth accuracy, so we can close this issue? Thanks, Erik