Shape characteristic-hu moment

Source: Internet
Author: User

P+q Order moment: A parade function with two edges f (x, y) of the p+q order mPQ is defined as

    

, thatis, p and Q have all nonnegative integer values, thus producing an infinite set of moments, and the set can fully determine the function f (x, y) itself. In other words, the function has a one by one relationship with its moment set: set {mPQ} for function f (x, y) is unique, and only f (x, Y) has that particular moment set.

For a digital image of size MXN f (i,j), the p+q order is

    

The 0-order moment is only one m, andm00 is the synthesis of each pixel grayscale of the image, and the m00 of the binary image represents the area of the target object. 1 order moments have two, Higher moments more. With 0-order moments, all 1-order moments and higher moments can make them irrelevant to the size of the object.

If the 1-order M 10 and m01 are normalized with m-00来, then the centroid of the target object (that is, the core) coordinates are obtained:

    

The center moment can be calculated using the centroid as the origin point:

In order to get the nature of the zoom lunch, the center moment can be normalized, that is, the center moment with a 0-order center moment to one, called Normalized center distance:

Which ;p +q=2,3,4 ...

Relative to the spindle calculation and the center moment normalized by the area, the object is enlarged, translated and rotated to remain unchanged. The Simple center moment, although it can characterize the geometric shape of a plane object, does not have a non-deformation, but can be constructed by these moments invariants. This approach was originally proposed by Ming-kuei Hu in 1962, He uses normalized 2-order and 3-order center moments, with 7 local transformations, rotation and scale-independent moments (Hu invariant moments):

        

        

        

        

        

         

        

An algorithm for target recognition using invariant moments take a step at a moment:

    1. The initial target image and the test image are preprocessed, the target is segmented from the background, and the gray image is converted to two value image.
    2. Extracting the edge of the target and calculating the center moment of the target region and boundary;
    3. The two sets of central moments are normalized, and 7 invariant moment m1~m7 are calculated on the basis of normalization, which together compose the target image and the eigenvector of the target in the test image;
    4. Calculates the Euclidean distance d between two vectors, that is, the Euclidean distance of the normalized eigenvector of the target image and the test image. Set a threshold of L to determine the similarity between them, and if d<l, the target in the test image is the target to look for, and vice versa.

Shape characteristic-hu moment

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.