Although RL can be used for both minimization and maximization, it is sometimes algorithmically more suitable for maximization. Therefore, in practice, we convert the minimization of the MRF energy into the maximization of a corresponding gain function. The gain is the sum of compatibility functions.
The RL compatibility functions can be defined based on the Gibbs clique potential functions as follows: The unary compatibility function is defined by
where is the function of potentials incurred by
single-site cliques. The binary compatibility function is defined by
where is the function of potentials incurred by
pair-site cliques. The constants
and
are chosen so
that all the compatibility functions are non-negative.
The gain with the labeling assignment representation can now be written as
which is to be maximized. The above is the standard form of
objective functions in RL formulations. Obviously, there is one-one
correspondence between the maxima of and the minima of
because of the relationship
where Const is
some constant.