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:
Though I'm not sure how to translate this into constructing the 2nd order functions with OpenGM, any help is appreciated, thanks!