Energy functions for CRF/MRF

331 Views Asked by At

I am currently working in image segmentation. I have read several papers and books where Markov or Conditional Random Fields are used in order to segment images. Most of them also mention an energy function as their minimization criteria. It is usually defined as: $$ U(f) = \sum_{i \in S}V_1(f_i)+ \sum_{i \in S}\sum_{j \in N_i}V_2(f_i,f_j) $$

In the previous function $V_1$ represents the contributions from the unary cliques and $V_2$ represents the contributions from the pairwise cliques. The issue is that some of these functions can't be optimized. However Kolmogorov, V. and Zabih, R. in their paper "What energy functions can be minimized by graph cuts" have a slightly different definition: $$ E(x_1,...x_n) = \sum_i E^i(x_i) \sum_i\sum_{i<j} E^{i,j}(x_i,x_j) $$ Where $x_1...x_n$ are binary variables. They then say that an energy function is graph representable if and only if $$ E^{i,j}(0,0) + E^{i,j}(1,1) \leq E^{i,j}(0,1) + E^{i,j}(1,0) $$

However they give no examples of functions that comply with this property, which takes me to my problem. My input is a stereo image that has been prevously segmented using stixels. I have to take these stixels (they have stixel ID, segment ID, height of the segment, and disparity value) and cluster them in order to segment the image objects. However I haven't found any example of functions of this type. I considered using the Euclidean distance (since it can be calculated from the data I have) however I don't understand how could it be used as my energy function. So are there any examples of function with these characteristics? And would the Euclidean distance be a decent energy function?