A study on the use of plane partition correlation function in open CV

Source: Internet
Author: User

The problem of triangular gridding (triangulation) of arbitrary point sets has always been a close concern of people. The problem of triangular meshes is widely used in many fields. Delaunay triangulation is the most widely used method of dissection, because of its many advantages, the following simple list of two:

Null Circumcircle property: In a D-triangular network generated by a point set V, the circumcircle of each triangle does not contain any other points of the point set.

Maximum Minimum Angle property: the smallest angle in all triangles is the largest in a D-triangular network generated by the point set V.

Open CV in the realization of Delaunay, greatly facilitated the vast number of scientific research workers. Although the open CV provides a detailed documentation, and provide related sample, but because of the original document and reference books [1,3,4] understanding of the deficiencies, the author in the use of the process still encountered many problems, the following will own some of the understanding and exploration of the summary, the fallacy of hope that everyone criticized. Please note that there is no detailed description of how the open CV is Delaunay, please refer to the sample program DELAUNAY.C with the open CV.

1. Also said the "Quartet Edge (Quad-edge)" Structure

Figure 1 side e and edges related to side e (the figure comes from the open CV document)

This structure diagram is very difficult to understand (for me), but very critical, is the open CV Plane division of the most basic elements, the data structure is as follows:

/* Quad-edge Structure fields * * *
#define CV_QUADEDGE2D_FIELDS ()
    int flags;                     \
    struct cvsubdiv2dpoint* pt[4]; \
    Cvsubdiv2dedge  next[4];
typedef struct CVQUADEDGE2D
{
    cv_quadedge2d_fields ()
}
cvquadedge2d;

The key data for this structure is array next[4], which holds four edges (code) in order: E,erot and their reverse edges. Note: I use "Edge code" here because the open CV is a long code to represent a side of the plane partition.

The left area of the elnext:e (or upper area) is a polygon, E is one of the edges, the elnext is another side of the area, which is similar to the representation of the cross list in the data structure, which is connected with E;

Ernext: To understand the same elnext, but to point to the right area of E (or the lower area) of another side, and e is connected together;

Ednext: Another side of "purpose point" with E;

Eonext: Another side of "starting point" with e altogether;

Erot:e's dual side, there is no good explanation.

After understanding these knowledge points, we can obtain the following application:

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.