First page Back Continue Last page Overview Text
And of course there is a much better way to search for window shape. Minimum ratio cycle algorithm is a graph algorithm which will help us efficiently optimize over a huge set of windows. Here is the formulation for the minimum ratio cycle algorithm. We are given a directed graph G(V,E), and two sets of edge weights, w, and t. There are no restrictions on w, the w weights can be any real numbers. However there is a restriction on weights t. The sum of edge weights t must be positive over any cycle of the graph G.
The MRC problem is to find the cycle which minimizes the sum of cycle edge weights w over the sum of cycle edge weights t, so pictorially it is the edge weights w over this cycle divided by edge weights t over the same cycle.
Now notice that if the faces of the graphs (these squares which are in between the vertices) correspond to image pixels, then inside a cycle we have a connected set of pixels which can serve as a suitable window. The set of pixels inside this cycle we are going to call cycle area. Remember that the window costs sum up some terms over image pixels. If we can sum up terms in the cycle area using only the cycle edges, then we an evaluate window costs using the MRC algorithm.