Skip to content

Allow negative disparity in dialog for stereo matchers#817

Merged
matlabbe merged 3 commits intointrolab:masterfrom
i3drobotics:negative-disparity
Jan 24, 2022
Merged

Allow negative disparity in dialog for stereo matchers#817
matlabbe merged 3 commits intointrolab:masterfrom
i3drobotics:negative-disparity

Conversation

@benknight135
Copy link
Copy Markdown
Contributor

Some stereo cameras need to allow negative disparity. Depth will still be possitive values but negative disparity occurs when depth value is behind cross over point of toed in cameras. StereoBM & StereoSGBM classes allow negative values but dialog limits between 0 and 999999. This PR changes the minimum to -999999 in the dialog for StereoBM and StereoSGBM.

@matlabbe matlabbe merged commit 2dc7b59 into introlab:master Jan 24, 2022
@matlabbe
Copy link
Copy Markdown
Member

For reference:

In StereoBM doc, they don't explain what is minDisparity, just the following is refering it:

numDisparities the disparity search range. For each pixel algorithm will find the best disparity from 0 (default minimum disparity) to numDisparities. The search range can then be shifted by changing the minimum disparity.

It is more clear in StereoSGBM doc:

minDisparity Minimum possible disparity value. Normally, it is zero but sometimes rectification algorithms can shift images, so this parameter needs to be adjusted accordingly.
numDisparities Maximum disparity minus minimum disparity. The value is always greater than zero. In the current implementation, this parameter must be divisible by 16.

Thx

@benknight135 benknight135 deleted the negative-disparity branch January 24, 2022 22:09
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