Graph Cuts is a very useful and popular Energy Optimization algorithm. It is widely used in the computer vision field in image segmentation, stereo vision, and image matting). Graph Cuts theory first appeared in the stream network optimization field, such as water pipe network, communication transmission network, and urban traffic network. In this case, the graph cuts algorithm is used to determine the minimum segmentation of network streams, that is, to find a set with the smallest edge capacity, and remove all the edges in the set to block the network. It should be noted that the Graph Cuts algorithm is usually used to optimize the model using the maximum stream-Minimum segmentation. Other graph cutting algorithms are generally replaced by the graph partitioning term.
First, you must understand the meaning of graph and cuts in graph cuts. The graph here is slightly different from the common graph. A common graph consists of vertices and edges. If the edges have a direction, such an image is called a directed graph. Otherwise, the edges are undirected graphs and the edges are of a valid value, different edges can have different weights, representing different physical meanings. The graph cuts graph has two more vertices on the basis of a common graph. These two vertices are represented by the symbols "S" and "T" respectively, collectively referred to as terminal vertices. All other vertices must be connected to these two vertices to form a part of the edge set. The edges in all graph cuts are also divided into two types. One is the link between a common vertex and an adjacent vertex or a vertex associated with it, one is the line between the common vertex and the two terminal vertex. The cuts in graph cuts refers to a set of such edges. Obviously, these edge sets include the above two edges, the disconnection of edges in the set will lead to the separation of the residual "S" and "T" graphs, and the sum of the ownership values in the set of these edges is the smallest. Therefore, it is also called the minimum cut. Graph Cuts is as follows:
Graph cutting is widely used in image segmentation. How can we associate graph cutting theory with computer vision? How can we establish a connection between a graph cut model and an image? A netizen made a summary in his blog graph cutting summary, which is a good metaphor. It gives a preliminary impression on the role of image cutting in image segmentation.
After referring to the iccv2001 Article interactive graph cuts for Optimal Boundary & region segmentation of objects in Nd images, you may find some answers to the above questions. First, an image can be regarded as a matrix. each pixel in the graph is a position in the Matrix. This pixel can be regarded as a vertex in the graph. Then we connect adjacent vertices with short lines (directed or undirected), which forms an edge. Now this image has vertices and edges, it also forms a graph. How to calculate the edge weight is a theoretical concept. After reading the explanation in the paper, the edge weight in the image is generally composed of two parts: smoothing items and data items. The proportion of the two parts is balanced by one coefficient, among them, the smoothing item mainly reflects the change intensity between the vertex pixel and the pixel in the adjacent area. If the change is drastic, it indicates that the two are likely to be separated out of the edge part, according to the segmentation principle of the minimum cut, the smoothing weight of the two should be smaller. In the data item section, the corresponding vertex belongs to the foreground or background penalty item. The mathematical formula in this paper is:
R (A) indicates the region data item, B (a) indicates the boundary smoothing item, and E (a) indicates the weight, that is, the loss function, also called the energy function, the goal of graph cutting is to optimize the energy function to minimize its value.
In addition, graph cuts requires two terminal nodes "S" and "T", which respectively represent the initial target region and background region. In the image segmentation field of computer vision, you need to manually specify the initial S vertex and T vertex. If HCI exists, you can use the mouse to directly point the two regions. One area represents one pixel location on the target to be split, and the other is one pixel location on the background. With the definition of the energy function and the initial terminal vertex, we can use the graph cut theory to continuously iterate and split the target.
References:
Http://en.wikipedia.org/wiki/Graph_cuts_in_computer_vision
Http://www.cnblogs.com/longdouhzt/archive/2012/05/11/2496373.html
[Basic algorithm] graph cut and Its Application in computer vision
[Thesis Note] Cuda cuts: Fast graph cuts on the GPU
Graph cut Summary
Boykov, Y. y. and M. p. jolly (2001 ). interactive graph cuts for Optimal Boundary & region segmentation of objects in Nd images. computer Vision, 2001. iccv 2001. proceedings. eighth IEEE International Conference on, IEEE.