Ask Your Question
0

OCL StereoBM and images needing negative minimum disparity

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

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
0

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

xaffeine gravatar image

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

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

Comments

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

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

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

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

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

xaffeine gravatar image

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

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

Stats

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

Seen: 643 times

Last updated: Feb 06 '14