Ask Your Question

OCL StereoBM and images needing negative minimum disparity

asked 2014-02-06 10:10:09 -0500

I was wondering if there is any reason why there is no ability to set the minimum disparity?

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted

answered 2014-02-06 16:51:42 -0500

xaffeine gravatar image

updated 2014-02-06 16:52:25 -0500

If minDisp is not available, you can shift one of your images left or right by the amount you would have used for minDisp. After doing the BM, you can then subtract/add the same amount to the results to compensate.

edit flag offensive delete link more


That would still leave me with issues on one of the edges though.

Lockethane gravatar imageLockethane ( 2014-02-07 08:50:41 -0500 )edit

I think the same would be true if you could set minDisp.

xaffeine gravatar imagexaffeine ( 2014-02-07 13:05:39 -0500 )edit

answered 2014-02-06 16:46:21 -0500

xaffeine gravatar image

updated 2014-02-06 16:49:42 -0500

StereoBM has a state member that points to a CvStereoBMState. The CvStereoBMState has a member called minDisparity. If you have a StereoBM variable called bm, you just need to set bm.state->minDisparity to the value you want.

EDIT: I might be wrong about the OCL version. This is what works in the regular (cpu) version of StereoBM.

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2014-02-06 10:10:09 -0500

Seen: 526 times

Last updated: Feb 06 '14