Skip to content
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

StereoDepth: Add option for disparity shift #615

Merged
merged 5 commits into from Jul 6, 2022

Conversation

SzabolcsGergely
Copy link
Collaborator

@SzabolcsGergely SzabolcsGergely commented Jul 5, 2022

An alternative approach to reducing the minZ is to use the “Disparity shift” parameter. Normally the depth sensor is set to generate depth for objects at distances ranging from minZ-to-infinity. By increasing the disparity shift from 0 to 96, for example, you will be able to shift that range to a NewMinZ-to-NewMaxZ. We normally only recommend doing this when it is known that there will be no objects farther away than MaxZ, such as having a depth camera mounted above a table pointing down at the table surface. Note that, because of the inverse relationship between disparity and depth, MaxZ will decrease much faster than minZ as the disparity shift is increased. Therefore, it is advised to not use a larger than necessary disparity shift. For example, if using a disparity shift of 96 then the newMaxZ is roughly equal to the original MinZ and the newMinZ is roughly equal to half of the original MinZ. Note that the tradeoff in reducing the MinZ this way is that objects at distances farther away than MaxZ will not be seen.

This can be combined with extended/subpixel/LR-check.

Note that the output disparity map is not expanded, only the depth map. So if disparity shift is set to 50, and disparity value obtained is 90, the real disparity is 140.

As described by Realsense:
image

Related: luxonis/depthai-core#512

@SzabolcsGergely SzabolcsGergely merged commit c2839d3 into develop Jul 6, 2022
@SzabolcsGergely SzabolcsGergely deleted the stereo_pixel_shift branch July 6, 2022 08:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants