Skip to content

StereoDepth: Add option for disparity shift#615

Merged
SzabolcsGergely merged 5 commits into
developfrom
stereo_pixel_shift
Jul 6, 2022
Merged

StereoDepth: Add option for disparity shift#615
SzabolcsGergely merged 5 commits into
developfrom
stereo_pixel_shift

Conversation

@SzabolcsGergely

@SzabolcsGergely SzabolcsGergely commented Jul 5, 2022

Copy link
Copy Markdown
Contributor

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.

2 participants