Parallel Belief Propagation for Stereo Matching Biliana Kaneva 18.337
Stereo Correspondence • a) Left Image • b) Right Image • c) Disparity (Depth) Map
Epipolar Geometry • Assumption – the cameras are rectified, i.e. looking perpendicular to the line joining the two camera centers. • Simple relationship between 3D depths Z and disparities d
Graphical Model • Find the best disparity map D given the observation IL and IR • That is, find D that maximizes P(D | IL, IR) Observations IL and IR disparity dij
Bayesian Interpretation Likelihood term Prior term Data Cost Smoothness Cost
Energy Interpretation • Find D that minimizes the energy E(D | IL, IR). • This formulation is less sensitive to numerical problems. Data Cost Smoothness Cost
Loopy Belief Propagation Observations IL and IR • Iterative method using message passing in parallel. disparity dq disparity dp
Loopy Belief Propagation Observations IL and IR • Belief after T iterations. disparity dp
Fast Belief Propagation • Message updates using min convolution. • Reduced message passing on the grid by viewing it as a bipartite graph. • Multi-grid Belief Propagation performed in a coarse-to-fine manner.
Parallel Implementation • Using C++ and OpenMP • Intel machine with 2 Quad-core CPUs 2.66GHz (total of 8 processors) (shared memory) • Parallelize message passing at each iteration P1 P2 P3 P4 P1 P2 P3 P4 Horizontal message passing Vertical message passing
Parallel Performance 437x370 pixels max_d = 51 Left Image Right Image Standard BP Fast BP
Conclusions • Both versions of the BP algorithms are inherently parallel • Run time reduced by half every time the number of processors doubles. • Using OpenMP and shared memory has the benefit of not incurring any cost for splitting the data among the multiple cores. • Performance improvement limited by the number of processors on the machine.