Summary of Computer Vision (i)--mean shift

Source: Internet
Author: User

Before we get a thorough understanding of mean shift, we need to address three questions:

First question: No parameter density estimation

Without parameter density estimation, it does not attach any assumptions to the data distribution law, but directly studies the data distribution characteristics from the data sample itself, requires less prior knowledge, relies entirely on training data to estimate, and can handle any probability distribution.

eg. histogram method, nearest neighbor domain method, kernel density estimation method .

The parameter density estimates are: Gaussian statistical model

As an example:

There are n number of points, their coordinate distribution as shown, how to find out in this area, where the sample distribution density is the largest, in other words, if the first n+1 sample point, it is the largest possible location where.

Second question: Kernel density estimation

For a sample collection in a given dimension space, the kernel function density estimate for the point about the kernel function and the bandwidth matrix is expressed as:

which

Because of this, density estimation can be written in the form of contour functions for kernel functions:

As can be seen from the above formula, in fact, the kernel density estimation can be regarded as a weight function, the role of each sample point by the distance from the point x weighted, the distance from the x point near the probability density of the sample points, the greater the influence of the weight value, the lower the weight value.

question three: Mean shift vector

The kernel function density estimation of the data is obtained from the upper wheel, and now we want to analyze the distribution of the most dense data in the data set by the probability density distribution, firstly, the kernel density function is derived,

Derivative = 0, you can get

The position of the x is the point where the probability density is greatest.

We make the mean shift vector, then there is

Therefore, the average offset of the Mean shift vector (that is, the gradient direction) points to the most dense direction of the sample point. Mean shift shifts to the point where the sample points change the most. And the closer the sample point to the X the more important the statistical characteristics around the X, the concept of nuclear function introduced, it can be understood that the essence of each sample point to the weight of X contribution. Can make a metaphor, imagine dozens of horses at the same time pull a car of the grand scene (of course, the car is stable enough, not rotten ~), each horse to their own direction, but the closer to the X horse, the greater the power, the final direction of course is moving in the direction of the resultant force, as the yellow arrow direction.

application I. Image Segmentation:

Essentially, mean shift solves the problem based on conversion to density estimation. For image applications, spatial information has 2 dimensions, and the range space has a P dimension.

Multi-core used in image segmentation:

The bandwidth of the nucleus of the coordinate space and the core of the color space (bandwidth), respectively. The results of the discontinuity preserving smoothing filter are as follows:

Image segmentation is the clustering of the points of the same pixel value after filtering, divided into M regions.

application II. Tracking

The target tracking algorithm based on mean shift is used to calculate the eigenvalue probability of the pixels in the target region and the candidate region, and then the target model and the candidate model are described, then the similarity function is applied to measure the similarities between the initial frame target model and the current frame candidate region. Select the candidate model with the maximal similarity function and get the mean shift vector about the target model, which is the displacement vector of the target region moving from the initial position to the correct position. Due to the fast convergence of the mean shift algorithm, the algorithm can converge to the real position of the target by iterative computation of the mean shift vector, thus achieving tracking goal.

MEAN Shift Tracking Results

Summary of Computer Vision (i)--mean shift

Related Article

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.