LBP for stereo disparity

35 views
Skip to first unread message

Bobby Pardridge

unread,
Mar 7, 2017, 12:23:20 PM3/7/17
to opengm
Hi, I would like to try using the OpenGM LBP example in src\tutorials\c++\basics\doMinSumInference.cxx for the stereo disparity problem, described by this blog post: http://nghiaho.com/?page_id=1366, but I am not sure exactly how to set it up.

My number of variables will be equal to the number of pixels in the scene, and I will have N labels, where each label is a possible disparity for each pixel in the left image.

My graph is a 4 connected graph, where each pixel is a node and has an edge to its 4 neighbors (left, up, right, down) .

I am guessing that I will change the first order function values f(0), f(1), f(2) ... f(N), etc to be the "DataCost" (unary cost for assigning disparity label to a pixel).

And I am guessing the 2nd order functions will be for the "SmoothnessCost" (cost of assigning a disparity label based on how much it differs with its neighbors). The smoothness cost for the "Min-Sum message update" in that blog post is described like this:


msg_{i \rightarrow j}\left( l \right) = \min\limits_{l' \in \mbox{all labels}} \left[ \begin{array}{c} DataCost\left(y_i,l'\right) + SmoothnessCost\left(l,l'\right) + \\ \sum\limits_{k=\mbox{neighours of i except j}} msg_{k\rightarrow i}\left(l'\right) \end{array} \right]


Though I'm not sure how to translate this into constructing the 2nd order functions with OpenGM, any help is appreciated, thanks!
Reply all
Reply to author
Forward
0 new messages