Image Segmentation Series: 1. Graph cuts

Source: Internet
Author: User

Written in the front: a brief summary of recent work, after all, old, easy to forget. Strive to be concise, understand ideas, not too deep into the algorithm.

Here are two links for everyone's reference:

1. Https://www.youtube.com/watch?v=HMGX8HXskKk

2. http://blog.csdn.net/zouxy09/article/details/8532111

Brief introduction:

Graph cuts is also called graph cut (plural), so literally a graph (figure in graph) can have multiple cuts, here the cut, refers to the division, that is, segmetation. The meaning of the algorithm is to use graph theory (graph) to partition the image (images), edge extraction.

Body:

Step 1: Build the diagram, from the image to the diagram.

Vertex: Each pixel of the image (note is each pixel) as a vertex in the graph, also called the first type of vertex, the second type of vertex is introduced for the graph cutting algorithm, called sourse and sink respectively corresponding s and T, the vertex of the graph is established.

Edge: The link between the vertices of the graph, which is the edge. Two vertices establish two kinds of edges: the first edge is the link between the first type of vertex, called N-links, and the second edge is the edge between the second type of vertex and the first type of vertex, called T-links.

Step 2: Split, introduce the min cut in graph theory (minimum cut), as the name implies, so that the entire graph to pay the lowest cost, that is, the loss of the function of the weight and minimum. So the edge of the graph also needs weight (loss function), from which we find some edge thick, some edge thin, they represent the weight of the edge. How to design the loss function (the weight of the edge)?

The first type of Edge (n-links) is the measurement of pixel similarity, General's idea is: the similarity between pixels, the greater the similarity, the greater the weight, the smaller the similarity, the smaller the weight, we cut off the similarity of small edges, to achieve the purpose of image segmentation, so that the foreground and background are separated.

How is the weight of the second-class edge (t-links) defined? Simply put, graph cuts requires a user's pre-defined two points, s and T, so we know at least two points that belong to the foreground and the background, so the probability of being in that foreground or background is very large, and we can even pre-define some foreground and background points as input to the algorithm.

By the Min cut algorithm, the segmentation of the image is obtained. Requirement 1: Split can divide the vertices in the graph into two separate sets of disjoint. Requirement 2: Minimum loss. This division is through T-links and n-links. At the same time we get the image segmentation (segmentation).

Diagram 2 of the entire process:

Mathematical:

The weight of the first type of edge (also called the area entry):

Weight of the second type of edge (also called boundary entry):

The energy of the image indicates that min cut is to find the smallest energy:

Image Segmentation Series: 1. Graph cuts

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.