Two-dimensional shape intrinsic symmetry detection method and two-dimensional animal shape symmetry detection method
The two-dimensional shape intrinsic symmetry detection model constructed through shape feature point extraction and function mapping framework solves the accuracy and reliability problems of intrinsic symmetry detection of two-dimensional graphics and achieves high-quality symmetry detection results.
Patent Information
- Application Number
- CN202310758604.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-26
- Publication Date
- 2025-10-03
- Estimated Expiration
- 2043-06-26
AI Technical Summary
Existing methods for detecting intrinsic symmetry of two-dimensional shapes have deficiencies in accuracy and reliability, especially when processing two-dimensional graphics, they are unable to effectively detect their intrinsic symmetry.
Using shape feature point extraction algorithm and function mapping framework, combined with thermal kernel signature and characteristic function properties, a two-dimensional shape intrinsic symmetry detection model is constructed. Through feature point matching and optimization model solution, accurate matching and detection of symmetrical feature point pairs are achieved.
The reliability and accuracy of intrinsic symmetry detection of two-dimensional shapes are improved. It can accurately extract feature point pairs in the presence of noise and deformation, reduce mapping degradation, and provide higher quality symmetry detection results.
Smart Images

Figure CN116958236B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of image data processing, and in particular relates to a two-dimensional shape intrinsic symmetry detection method and a two-dimensional animal shape symmetry detection method. Background Art
[0002] Symmetry is a ubiquitous phenomenon, encompassing reflection and rotational symmetry. Symmetry also evokes a sense of neatness and elegance, and is widely used in fields such as architecture, art design, and 3D printing. In geometric modeling and processing, symmetry information plays a crucial role in operations such as model segmentation, geometric completion and repair, model matching, and model editing. Therefore, symmetry detection is particularly important.
[0003] Existing commonly used methods for detecting symmetry in two-dimensional shapes are generally targeted at rotational or axisymmetric figures. These solutions rely on manual methods to determine the shape's axis of symmetry, and they perform well for these figures. However, these solutions are not suitable for figures with intrinsic symmetry. Furthermore, for various reasons, real-world two-dimensional shapes are rarely completely rotationally or axisymmetric, while intrinsic symmetry is more common. For example, the limbs of a two-dimensional human figure can be deformed isometrically (preserving geodesic distances) to obtain a two-dimensional figure that satisfies intrinsic symmetry. Therefore, detecting intrinsic symmetry in figures is of great significance.
[0004] Current intrinsic symmetry detection methods primarily target three-dimensional shapes. In recent years, a function mapping framework based on spectral methods has been introduced to the task of intrinsic symmetry detection. Methods based on this framework, such as the ZoomOut scheme, have achieved good results in detecting intrinsic symmetry on three-dimensional models. However, two-dimensional shapes are projections of three-dimensional shapes onto a plane, and they contain much less shape information than three-dimensional shapes. This results in poor accuracy and low reliability of current intrinsic symmetry detection methods for three-dimensional shapes when applied to two-dimensional shape intrinsic detection. Summary of the Invention
[0005] One of the purposes of the present invention is to provide a method for detecting intrinsic symmetry of two-dimensional shapes with high reliability and good accuracy.
[0006] A second object of the present invention is to provide a two-dimensional animal shape symmetry detection method that includes the two-dimensional shape intrinsic symmetry detection method.
[0007] The method for detecting intrinsic symmetry of a two-dimensional shape provided by the present invention comprises the following steps:
[0008] S1. Obtain existing two-dimensional shape data;
[0009] S2. Preprocess the two-dimensional shape data obtained in step S1 to obtain preprocessed data features;
[0010] S3. Based on the preprocessed data features obtained in step S2, a shape feature point extraction algorithm is used to extract feature points of a two-dimensional shape;
[0011] S4. According to the feature points of the two-dimensional shape obtained in step S3, a shape feature point matching algorithm is used to match the two-dimensional shape feature points under intrinsic symmetry;
[0012] S5. According to the matching results obtained in step S4, a two-dimensional shape intrinsic symmetry detection solution model is constructed based on the feature symmetry point pairs and function mapping framework;
[0013] S6. Solve the two-dimensional shape intrinsic symmetry detection model constructed in step S5 to obtain the final two-dimensional shape intrinsic symmetry detection model;
[0014] S7. Input the data of the target two-dimensional shape into the two-dimensional shape intrinsic symmetry detection model obtained in step S6, obtain the point-by-point correspondence result of the boundary of the target two-dimensional shape under intrinsic symmetry, and complete the intrinsic symmetry detection of the target two-dimensional shape.
[0015] The two-dimensional shape data described in step S1 specifically includes the two-dimensional graphic data in the two-dimensional graphic dataset UTLN-SRA and the two-dimensional graphic data in the two-dimensional graphic dataset MPEG-7_CE_Shape-1_Part-B.
[0016] Step S2 is to perform data preprocessing on the two-dimensional shape data obtained in step S1 to obtain preprocessed data features, which specifically includes the following steps:
[0017] For the acquired two-dimensional shape data, an off file of each two-dimensional shape is created, and then the HKS feature descriptor of each two-dimensional shape is calculated; the HKS feature descriptor includes the first k truncated eigenvalues and corresponding eigenvectors of each two-dimensional shape.
[0018] Step S3, based on the pre-processed data features obtained in step S2, uses a shape feature point extraction algorithm to extract feature points of a two-dimensional shape, specifically comprising the following steps:
[0019] Use shape feature point extraction algorithm to extract feature points of two-dimensional shapes:
[0020] For points on the two-dimensional shape contour whose curvature is greater than the set value; calculate the distance d' from the corner point j to the straight line connecting the two contour points i and k on both sides of the point j, and then make a judgment: if d'>D, then the corner point j is a candidate feature point, otherwise the corner point j is excluded; D is the set threshold; use the above method to obtain all candidate feature points;
[0021] For all candidate feature points, the following steps are performed: set the interval radius R; if there are other candidate feature points in the area with a radius of R centered on the candidate feature point j, then select the candidate feature point with a larger d' value as the final feature point;
[0022] Finally, several feature points of the two-dimensional shape are extracted.
[0023] Step S4, in accordance with the feature points of the two-dimensional shape obtained in step S3, uses a shape feature point matching algorithm to match the feature points of the two-dimensional shape under intrinsic symmetry, specifically comprising the following steps:
[0024] Based on the thermal core signature and characteristic function properties, an optimization model is established;
[0025] Weight matrix of feature points Defined as:
[0026]
[0027] Where W j,j' is the j'th element in the jth row of matrix W; h j is the HKS vector representation of the jth feature point; h j' is the HKS vector representation of the j'th feature point; ||||2 is the 2-norm; q is the weight factor; η() is a binary function and the value rule is s j is the symbolic vector representation of the truncated feature vector of the jth feature point; s j' is the symbolic vector representation of the truncated feature vector of the j'th feature point; W j,j is the jth element in the jth row of matrix W;
[0028] The following formula is used as the optimization model:
[0029]
[0030] Where 1 is a column vector of all 1s; T is the transpose symbol of the vector and matrix; M is a binary matrix, and if M i,j =1 means that the i-th feature point and the j-th feature point are a set of symmetrical feature point pairs. If M i,j = 0 means that the i-th feature point and the j-th feature point are not a set of symmetrical feature point pairs; p is the number of symmetrical feature point pairs; is the Hadamard product of the matrix;
[0031] The optimization model is converted into a linear assignment problem for solution. When solving, p = 1 and the symmetric feature point pairs obtained are used as landmark symmetric point pairs to guide subsequent solutions.
[0032] Judging the symmetrical feature point pairs:
[0033] Condition 1: The symmetric feature point pair is located on the same side of the line connecting the symmetric point pair of the landmark along the boundary;
[0034] Condition 2: A pair of symmetrical feature points whose distance from each other in the geodesic sense is closest to the feature point constitutes a pair of landmark symmetrical point pairs;
[0035] Condition 3: The error in the geodesic distance between the symmetrical feature point pair and the symmetrical point pair of the landmark is within a set range; the geodesic distance is the geodesic distance of the one-dimensional manifold corresponding to the two-dimensional figure;
[0036] If the symmetrical feature point pair satisfies conditions 1 to 3 at the same time, then the symmetrical feature point pair is the new landmark symmetrical point pair;
[0037] The above detection is performed on the feature points of the two-dimensional shape obtained in step S3: if there are two feature points that meet the above conditions, the two feature points are regarded as a pair of symmetrical feature points; if a feature point does not correspond to another feature point that meets the conditions, the feature point is not given a corresponding symmetrical feature point;
[0038] Finally, the symmetrical feature point pairs of the two-dimensional shape feature points under intrinsic symmetry are obtained.
[0039] According to the matching results obtained in step S4, step S5 constructs a two-dimensional shape intrinsic symmetry detection and solution model based on the characteristic symmetry point pairs and the function mapping framework, which specifically includes the following steps:
[0040] The following formula is used as the solution model for intrinsic symmetry detection of two-dimensional shapes:
[0041]
[0042]
[0043] Where Π is a binary matrix, and the value rule is T p () is a point-by-point mapping from shape M to shape N, u is a point on shape M, v is a point on shape M that is different from point u; k is the order of matrix C; C k is the k-order principal submatrix of matrix C; matrix C is the discrete representation of function mapping T; is the matrix C k The transpose of I k is the k×k identity matrix; is the square of the Frobenius norm; The first k truncated eigenvectors of the Laplace Beltrami operator of shape M; is a matrix of pseudo-rebellion; For directed line segments Mapping, if there is a directed line segment The direction is clockwise along the geodesic curve. If a directed line segment The direction is counterclockwise along the geodesic curve. ζ(y) is the mapping of vertex y in set Y to its nearest landmark point; Y is the set of vertices on the boundary of the shape triangle except the feature points; T p (y) is the mapping of a point y on the boundary of shape M other than the feature point to another point different from y on the boundary of shape M; ζ(T p (y)) is the vertex T in the set Y p (y) is mapped to its nearest landmark point; fix () is a set of symmetric feature point pairs of two-dimensional shape feature points under intrinsic symmetry.
[0044] Step S6 solves the two-dimensional shape intrinsic symmetry detection model constructed in step S5 to obtain a final two-dimensional shape intrinsic symmetry detection model, which specifically includes the following steps:
[0045] A. Convert the two-dimensional shape intrinsic symmetry detection solution model constructed in step S5 into a form containing a binary matrix П:
[0046] For a fixed value of k, we have The matrix C is split by semi-quadratic splitting method. k Decoupling from the matrix π, we get two sub-problems:
[0047] First sub-question:
[0048] Second sub-question:
[0049] Where Y is the vertex set on the triangle boundary excluding the feature points;
[0050] For the first subproblem, add a regular term R(Π) to the optimization objective:
[0051]
[0052] Among them A M is the area diagonal matrix of shape M, where the elements on the diagonal are the local areas of the vertices; is the setting function, and trace() is the trace of the matrix;
[0053] After adding the regularization term, we get the final two sub-problems:
[0054] Sub-question 1:
[0055] Sub-question 2:
[0056] B. Alternately iteratively optimize the matrix C and the matrix П in the spectral domain and the spatial domain:
[0057] First, the nearest neighbor search algorithm is used to solve sub-problem 1 separately;
[0058] Then, by equation Directly solve sub-problem 2;
[0059] When solving, starting from the set initial value k0, the spectral upsampling technique is used to gradually increase the spectral embedding dimension in the iteration, alternately solving subproblems one and two, and finally obtaining the final matrix C. The matrix C is used to calculate the matrix π, and the matrix C is used to obtain the point-by-point self-mapping of the two-dimensional shape.
[0060] The present invention also provides a two-dimensional animal shape symmetry detection method including the two-dimensional shape intrinsic symmetry detection method, comprising the following steps:
[0061] a. Obtaining data information of the two-dimensional animal shape to be detected;
[0062] b. Using the two-dimensional shape intrinsic symmetry detection method, the two-dimensional animal shape to be detected obtained in step a is subjected to intrinsic symmetry detection;
[0063] c. Based on the intrinsic symmetry detection result obtained in step b, complete the symmetry detection of the two-dimensional animal shape to be detected.
[0064] The two-dimensional shape intrinsic symmetry detection method and the two-dimensional animal shape symmetry detection method provided by the present invention design a feature symmetry point pair extraction algorithm, establish a two-dimensional intrinsic symmetry detection optimization model using a function mapping framework, and design an effective alternating iterative algorithm to solve the model; therefore, the method of the present invention can not only realize the intrinsic symmetry detection of two-dimensional shapes, but also has higher reliability and better accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0065] Figure 1 Schematic diagram of the method flow of the two-dimensional shape intrinsic symmetry detection method of the present invention.
[0066] Figure 2 Schematic diagram of candidate feature point extraction for the two-dimensional shape intrinsic symmetry detection method of the present invention.
[0067] Figure 3 Schematic diagram of the matching criteria of the two-dimensional shape intrinsic symmetry detection method of the present invention.
[0068] Figure 4Schematic diagram of the matching effect of the two-dimensional shape intrinsic symmetry detection method of the present invention.
[0069] Figure 5 Schematic diagram of the method flow of the two-dimensional animal shape symmetry detection method of the present invention.
[0070] Figure 6 This is a schematic diagram of smooth axisymmetric two-dimensional animal shape data and the obtained dense boundary point pairs according to an embodiment of the two-dimensional animal shape symmetry detection method of the present invention.
[0071] Figure 7 This is a schematic diagram of smooth intrinsically symmetrical two-dimensional animal shape data and the obtained symmetry axis in an embodiment of the two-dimensional animal shape symmetry detection method of the present invention.
[0072] Figure 8 Schematic diagram of noisy axisymmetric two-dimensional animal shape data and the obtained dense boundary point pairs according to an embodiment of the two-dimensional animal shape symmetry detection method of the present invention.
[0073] Figure 9 This is a schematic diagram of noisy intrinsically symmetrical two-dimensional animal shape data and the obtained symmetry axis in an embodiment of the two-dimensional animal shape symmetry detection method of the present invention. DETAILED DESCRIPTION
[0074] like Figure 1 The figure shows a schematic flow chart of the method for detecting intrinsic symmetry of a two-dimensional shape according to the present invention. The method for detecting intrinsic symmetry of a two-dimensional shape according to the present invention comprises the following steps:
[0075] S1 obtains existing two-dimensional shape data; specifically including two-dimensional graphics data set UTLN-SRA and two-dimensional graphics data set MPEG-7_CE_Shape-1_Part-B two-dimensional graphics data;
[0076] In the specific implementation, these nearly intrinsically symmetrical figures were manually deformed and Gaussian noise was added to obtain approximately equidistant data, which was then made into grid data for algorithm performance testing. In order to unify the evaluation standards, 1000 points were sampled on the boundaries of all data.
[0077] S2. Perform data preprocessing on the two-dimensional shape data obtained in step S1 to obtain preprocessed data features; specifically comprising the following steps:
[0078] For the acquired two-dimensional shape data, an off file of each two-dimensional shape is created, and then the HKS feature descriptor of each two-dimensional shape is calculated; the HKS feature descriptor includes the first k truncated eigenvalues and corresponding eigenvectors of each two-dimensional shape; the preferred value of k is 13;
[0079] S3. Based on the preprocessed data features obtained in step S2, a shape feature point extraction algorithm is used to extract feature points of a two-dimensional shape; specifically comprising the following steps:
[0080] Use shape feature point extraction algorithm to extract feature points of two-dimensional shapes:
[0081] For points on the two-dimensional shape contour whose curvature is greater than the set value; calculate the distance d' from the corner point j to the straight line connecting the two contour points i and k on both sides of the point j, and then make a judgment: if d'>D, then the corner point j is a candidate feature point, otherwise the corner point j is excluded; D is the set threshold; use the above method to obtain all candidate feature points;
[0082] For all candidate feature points, the following steps are performed: set the interval radius R; if there are other candidate feature points in the area with a radius of R centered on the candidate feature point j, then select the candidate feature point with a larger d' value as the final feature point;
[0083] Finally, several feature points of the two-dimensional shape are extracted;
[0084] In specific implementation, R is preferably 26, and the value of D is directly proportional to the contour length S, D = k'S, k' is preferably
[0085] S4. Based on the feature points of the two-dimensional shape obtained in step S3, a shape feature point matching algorithm is used to match the feature points of the two-dimensional shape under intrinsic symmetry; specifically comprising the following steps:
[0086] Based on the thermal core signature and characteristic function properties, an optimization model is established;
[0087] Weight matrix of feature points Defined as:
[0088]
[0089] Where W j,j' is the j'th element in the jth row of matrix W; h j is the HKS vector representation of the jth feature point; h j' is the HKS vector representation of the j'th feature point; ||||2 is the 2-norm; q is the weight factor, preferably 100; η() is a binary function and the value rule is s j is the symbolic vector representation of the truncated feature vector of the jth feature point; s j' is the symbolic vector representation of the truncated feature vector of the j'th feature point; W j,j is the jth element in the jth row of matrix W;
[0090] The following formula is used as the optimization model:
[0091]
[0092] Where 1 is a column vector of all 1s; T is the transpose symbol of the vector and matrix; M is a binary matrix, and if M i,j =1 means that the i-th feature point and the j-th feature point are a set of symmetrical feature point pairs. If M i,j = 0 means that the i-th feature point and the j-th feature point are not a set of symmetrical feature point pairs; p is the number of symmetrical feature point pairs; is the Hadamard product of the matrix;
[0093] This step can find at least one pair of high-quality symmetric point pairs; the optimization model is converted into a linear assignment problem for solution; when solving, set p = 1 and use the solved symmetric feature point pairs as landmark symmetric point pairs to guide subsequent solutions;
[0094] Judging the symmetrical feature point pairs:
[0095] Condition 1: The symmetric feature point pair is located on the same side of the line connecting the symmetric point pair of the landmark along the boundary;
[0096] Condition 2: A pair of symmetrical feature points whose distance from each other in the geodesic sense is closest to the feature point constitutes a pair of landmark symmetrical point pairs;
[0097] Condition 3: The error in the geodesic distance between the symmetrical feature point pair and the symmetrical landmark point pair is within a set range; the geodesic distance is the geodesic distance of the one-dimensional manifold (i.e., the contour of the two-dimensional figure) corresponding to the two-dimensional figure;
[0098] If the symmetrical feature point pair satisfies conditions 1 to 3 at the same time, then the symmetrical feature point pair is the new landmark symmetrical point pair;
[0099] The above detection is performed on the feature points of the two-dimensional shape obtained in step S3: if there are two feature points that meet the above conditions, the two feature points are regarded as a pair of symmetrical feature points; if a feature point does not correspond to another feature point that meets the conditions, the feature point is not given a corresponding symmetrical feature point;
[0100] Finally, the symmetrical feature point pairs of the two-dimensional shape feature points under intrinsic symmetry are obtained;
[0101] like Figure 3 As shown, assuming that {a, b} is a pair of symmetrical landmark points detected by the above method, then Figure 3In the example, {c, d} in subgraphs (a) and (b) satisfy condition 1, while {c, d} in subgraphs (c) and (d) do not satisfy condition 1. The present invention examines the feature points obtained in step S3. If there are two feature points that satisfy the above conditions, they are considered as a pair of feature point pairs. If there is no point that meets the conditions corresponding to a certain point, no feature point matching the point is given. The effect of this method is as follows: Figure 4 As shown by Figure 4 It can be seen that the above method can accurately extract the feature points of the two-dimensional graphics and obtain multiple pairs of symmetrical points in the sense of intrinsic symmetry, and has certain noise resistance performance;
[0102] S5. Based on the matching results obtained in step S4, a two-dimensional shape intrinsic symmetry detection solution model is constructed based on the feature symmetry point pairs and function mapping framework; specifically comprising the following steps:
[0103] The following formula is used as the solution model for intrinsic symmetry detection of two-dimensional shapes:
[0104]
[0105]
[0106] Where П is a binary matrix, and the value rule is T p () is a point-by-point mapping from shape M to shape N, u is a point on shape M, v is a point on shape M that is different from point u; k is the order of matrix C; C k The matrix C is a k-order principal matrix; the matrix C is a discrete representation of the function mapping T; is the matrix C k The transpose of I k is the k×k identity matrix; is the square of the Frobenius norm; The first k truncated eigenvectors of the Laplace Beltrami operator of shape M; is a matrix of pseudo-rebellion; For directed line segments Mapping, if there is a directed line segment The direction is clockwise along the geodesic curve. If a directed line segment The direction is counterclockwise along the geodesic curve. ζ(y) is the mapping of vertex y in set Y to its nearest landmark point; Y is the set of vertices on the boundary of the shape triangle except the feature points; T p (y) is the mapping of a point y on the boundary of shape M other than the feature point to another point different from y on the boundary of shape M; ζ(T p(y)) is the vertex T in the set Y p (y) is mapped to the nearest landmark point; Π fix () is the set of symmetric feature point pairs of two-dimensional shape feature points under intrinsic symmetry;
[0107] The process of building the model in this step is as follows:
[0108] For a completely intrinsically symmetric shape, the function mapping matrix C corresponding to the function mapping that represents the point-by-point intrinsically symmetric mapping satisfies
[0109] For two-dimensional plane triangular meshes, this method appropriately relaxes the above constraints and considers the unit orthogonality of each principal submatrix of the optimization function mapping matrix C. Here, the function mapping matrix is about the point-by-point mapping matrix π, and the energy functional expression of the optimization problem is defined as Where P is the solution space of the function mapping C, C k is the k-order principal matrix of C, I k is a k×k identity matrix; in order to obtain the ideal functional mapping matrix C; current methods generally adopt the functional mapping framework; this framework was originally used to establish a point-to-point dense correspondence between two equidistant shapes; its main idea is to find a correspondence between functions defined on two shapes; let M and N be two shapes, and the linear mapping between the functions on these two shapes is defined as T:L 2 (N)→L 2 (M); if and There is a corresponding relationship, that is, T(g) = f; given a point-by-point mapping T p' :M→N, which can be expressed as a binary matrix П∈{0,1} m×m ,satisfy
[0110] Here m represents the number of vertices of the triangle; then, the discrete representation of the function mapping T is the matrix It can be expressed as in, and are the matrices of the first k truncated eigenvectors of the Laplacian Beltrami operators of shapes M and N, respectively, is the truncated eigenvector matrix The pseudo-inverse of ; Therefore, the above energy expression can be expressed as the objective function of the point-by-point mapping matrix П
[0111]
[0112]
[0113] If no additional constraints are imposed, the point-by-point mapping T calculated using the above objective function is p There may be cases where there are unreasonable symmetric mappings; for example, on the boundary of a two-dimensional shape, some mappings degenerate to points corresponding to themselves, on opposite sides of a pair of landmark feature points (such as Figure 3 (c)(d)) and so on; In order to reduce the occurrence of such unreasonable point pairs as much as possible, this method uses the multiple pairs of landmark symmetric points obtained in step S4 to propose some constraints for the above optimization problem to improve the point-by-point mapping T p quality;
[0114] For the constraints of symmetrical point pairs on the boundary, we still use Figure 3 Assume that {a, b} is a pair of symmetrical landmark points detected in step S4, and take the pair {c, d} as an example; the closest landmark point to point c in geodesic sense is a, and the closest landmark point to point d is b; this method defines the directed line segment Mapping If its direction is clockwise along the geodesic curve, then If it is counterclockwise, Next, we examine the directed line segment starting from the landmark point. direction, if Then the point pair {c, d} is said to be on the same side of the path from a to b; Figure 3 The point pairs {c,d} in (a) and (b) are both point pairs that meet the constraint, but Figure 3 The point pair {c, d} in (c) (d) has the same geodesic distance and similar local features, but the two points are not on the same side of the path from a to b. Therefore, they do not satisfy the above constraints and are not an intrinsically symmetric point pair.
[0115] Using the n pairs of landmark symmetric point pairs G={{a1,b1},{a2,b2},...,{a n ,b n}}After the point-by-point mapping T p The corresponding value is fixed in T p (a i )=b i ,T p (b i )=a i ,i=1,2,...,n; Since this method only considers the point-by-point mapping of the triangle patch boundary, the matrix Π is written as [Π fix ; Π1; Π2], where Π fix, Π1 and Π2 represent the point-by-point mapping matrices corresponding to feature points, triangle boundary points, and triangle internal points, respectively. Their dimensions are n×m, m1×m, and m2×m, respectively. m1 and m2 are the number of vertices on the triangle boundary excluding feature points and the number of vertices inside the triangle, respectively. And n+m1+m2=m, Π fix (a i ,b i )=Π fix (b i ,a i )=1,{a i ,b i}∈G;
[0116] Let the set of vertices on the triangle boundary excluding the feature points be Y, then |Y|=m1; since the energy expression given by this method promotes the point-by-point self-mapping T on the intrinsic shape p :M→M is completely isometric, so the third judgment condition in step S4 is already contained in the objective function; therefore, the point-by-point mapping T is given. p :M→M constraint expression is as follows:
[0117]
[0118] Where ζ is the mapping of the vertex in the set Y to its nearest landmark point;
[0119] Based on the above expressions, the optimization model established by this method to solve the dense point correspondence on the contour of a two-dimensional intrinsically symmetric shape is:
[0120]
[0121]
[0122] S6. Solve the two-dimensional shape intrinsic symmetry detection solution model constructed in step S5 to obtain a final two-dimensional shape intrinsic symmetry detection model; specifically comprising the following steps:
[0123] A. Convert the two-dimensional shape intrinsic symmetry detection solution model constructed in step S5 into a form containing a binary matrix П:
[0124] For a fixed value of k, we have The matrix C is split by semi-quadratic splitting method. k Decoupling from the matrix π, we get two sub-problems:
[0125] First sub-question:
[0126] Second sub-question: Where Y is the vertex set on the triangle boundary excluding the feature points;
[0127] For the first subproblem, add a regular term R(Π) to the optimization objective:
[0128]
[0129] Among them A M is the area diagonal matrix of shape M, where the elements on the diagonal are the local areas of the vertices; is the setting function, and trace() is the trace of the matrix;
[0130] After adding the regularization term, we get the final two sub-problems:
[0131] Sub-question 1:
[0132] Sub-question 2:
[0133] B. Alternately iteratively optimize the matrix C and the matrix П in the spectral domain and the spatial domain:
[0134] First, the nearest neighbor search algorithm is used to solve sub-problem 1 separately;
[0135] Then, by equation Directly solve sub-problem 2;
[0136] When solving, starting from the set initial value k0, the spectrum upsampling technique is used to gradually increase the spectrum embedding dimension in the iteration, alternately solving subproblems 1 and 2, and finally obtaining the final matrix C. The matrix C is used to calculate the matrix П; and the matrix C is used to obtain the point-by-point self-mapping T of the two-dimensional shape. p :M→M;
[0137] Due to the constraints contained in the optimization model established in step S5, this method greatly reduces the possibility that some mappings may degenerate to points corresponding to themselves or points located on opposite sides of a pair of landmark feature points (such as Figure 3 (c)(d)) and other situations, this method can basically achieve point-by-point self-mapping T for each boundary point. p :M→M finds another pair of corresponding points on the boundary in the sense of intrinsic symmetry. For the boundary of a two-dimensional shape, this method obtains the complete point correspondence in the sense of intrinsic symmetry.
[0138] S7. Input the data of the target two-dimensional shape into the two-dimensional shape intrinsic symmetry detection model obtained in step S6, obtain the point-by-point correspondence result of the boundary of the target two-dimensional shape under intrinsic symmetry, and complete the intrinsic symmetry detection of the target two-dimensional shape.
[0139] like Figure 5The figure shows a schematic flow chart of the method for detecting symmetry of two-dimensional animal shapes according to the present invention. The method for detecting symmetry of two-dimensional animal shapes according to the present invention, which includes the two-dimensional shape intrinsic symmetry detection method, comprises the following steps:
[0140] a. Obtaining data information of the two-dimensional animal shape to be detected;
[0141] b. Using the two-dimensional shape intrinsic symmetry detection method, the two-dimensional animal shape to be detected obtained in step a is subjected to intrinsic symmetry detection;
[0142] c. According to the intrinsic symmetry detection results obtained in step b, the symmetry detection of the two-dimensional animal shape to be detected is completed; the test results are as follows Figure 8 、 9 shown.
[0143] The method of the present invention is described below with reference to the following embodiments:
[0144] This method adds constraints to the established functional mapping optimization model based on the intrinsic symmetric point pairs extracted from the shape contour, such as Figure 2 Schematic diagram of the two-dimensional shape feature point extraction method used in the method of the present invention, Figure 3 The figure is a schematic diagram of the matching of two-dimensional shape feature points in the sense of intrinsic symmetry by the method of the present invention.
[0145] Figure 4 This is the matching effect diagram of the two-dimensional shape feature points proposed by the method of the present invention under the meaning of intrinsic symmetry. Figure 4 a is the matching effect diagram of the feature points of the smooth shape. Figure 4 b is the effect diagram of feature point matching with boundary noise shape. Figure 4 It shows that this method can accurately extract the feature points of two-dimensional graphics and obtain multiple pairs of symmetrical points in the sense of intrinsic symmetry, and has certain anti-noise performance.
[0146] Figure 6 Schematic diagram of the two-dimensional animal shape data and the obtained dense point pairs of its boundaries shown in the embodiment of the present invention. Figure 3 The constraints mentioned above can be used to find another sampling point on the boundary with different intrinsic symmetry for almost every sampling point on the two-dimensional shape boundary, effectively reducing the possibility that some mappings degenerate to points corresponding to themselves or points located on opposite sides of a pair of landmark feature points (such as Figure 3 (c)(d) and other situations.
[0147] Experimental configuration: The software version used in this method experiment is Matlab R2022a, and the hardware is Intel(R) Core(TM) i7-12700H, 2.30GHz CPU and 16.0GB memory. In the experiment, the threshold τ is set in step S4 in a proportional relationship with the contour length S, that is, τ = k1S, where k1 = 1 / 45; for the parameter setting of step B in step S6, k0 = 5, k max =40; the initial point-by-point mapping adopts a method of using multiple pairs of landmark symmetric point pairs to give the initial point-by-point mapping.
[0148] Corresponding Performance: This method uses the 2D image datasets MPEG-7_CE_Shape-1_Part-B and UTLN-SRA, which feature animal shapes with near intrinsic symmetry. The MPEG-7_CE_Shape-1_Part-B dataset consists of 70 classes, each containing 20 binary shapes. The UTLN-SRA dataset contains shapes with single reflection symmetry, designed to evaluate image symmetry. These near intrinsically symmetric shapes were manually deformed and subjected to Gaussian noise to obtain near-equidistant data. This data was then converted into mesh data for algorithm performance testing. To ensure consistent evaluation criteria, 1000 points were sampled along the boundaries of all data.
[0149] Inspection indicators:
[0150] (1) Axisymmetric figures: In order to examine the quality of the symmetry axis, this method uses two indicators for research; for each symmetry axis of a figure, the angle Δ between it and the exact symmetry axis of the figure is measured. θ =|θ D -θ G |, where θ D and θ G They are the calculated symmetry axis, the angle between the exact symmetry axis of the figure and the horizontal direction; secondly, the center point c of the figure is examined. D Distance Δ to the calculated axis of symmetry d ; The smaller the values of the above two indicators, the better the properties of the detected symmetry axis;
[0151] (2) Intrinsically symmetric shapes: Due to the lack of annotated intrinsically symmetric datasets for two-dimensional shapes, it is impossible to calculate the error based on the actual point-by-point mapping as in the case of three-dimensional shapes. Therefore, this method proposes a new metric to evaluate the performance of the algorithm; the set of n landmark point pairs G = {{a1, b1}, {a2, b2}, ..., {a n ,b n}} is considered as a correct matching point pair, and the point pair {x i ,T p (xi )}, calculate the geodesic distance from each of the nearest landmarks, that is, d1 = d(ζ(x i ),x i ),d2=d(ζ(T p (x i )),T p (x i )); But if the nearest landmark point is the same, that is, ζ(x)=ζ(T p (x)) and d1<d2, then take d1=d(ζ(x i ),x i ) and d2=d(ζ(ζ(T p (x i ))),T p (x i )); Considering that the inspection matching points obtained by other methods are not on the same side of the landmark point pair (such as Figure 3 (c)(d)), point pair {x i ,T p (x i )} is defined as follows:
[0152]
[0153] According to this indicator, all γ non-degenerate point pairs on the boundary are examined and their average geodesic error is calculated. Where L is the boundary length of the two-dimensional shape. This index can reflect the geodesic properties of a symmetric point pair to a certain extent. The smaller the index value, the better the point-by-point mapping properties. For the sake of fairness, all non-degenerate point pairs on the boundary obtained by different methods are selected for index calculation.
[0154] The comparison data of smooth graphics are shown in Table 1 and Table 2:
[0155] Table 1 Statistics of symmetry axis index values obtained by different methods for different smooth axisymmetric figures
[0156]
[0157] Table 2 Statistics of average geodesic errors obtained by different methods for different smooth intrinsically symmetric figures
[0158] method FA BCICP ZoomOut MWP Method of the present invention Beetle 0.0433 0.0432 0.0602 0.0377 0.0118 Butterfly 0.0130 0.0090 0.0095 0.0093 0.0042 Fly 0.1573 0.1305 0.1176 0.1745 0.0039 Human 0.0703 0.0232 0.0292 0.0304 0.0175 Octopus 0.0796 0.0604 0.0463 0.0243 0.0044 Average 0.0727 0.0533 0.0526 0.0552 0.0084
[0159] Tables 1 and 2 give the index statistics of two-dimensional smooth axisymmetric shapes and intrinsically symmetric shapes; for axisymmetric shapes, such as Figure 6 The first row shows that the method of the present invention has a good visual effect. θIn terms of the performance, the method of the present invention is slightly inferior to the R-Detector and LIP-Detector methods, but the difference is very small; in terms of the numerical index Δ d In general, the error of the method of the present invention is much smaller than that of other methods; in general, the method of the present invention can achieve an effect that exceeds that of other methods;
[0160] Among them, SCC, R-Detector, and LIP-Detector are different existing technologies.
[0161] For intrinsically symmetrical graphics, the method of the present invention can show good results in visualization, such as Figure 6 As shown in the figure, the proposed method can obtain more symmetrical point pairs with better properties than other methods. This is because the proposed method imposes boundary point mapping constraints based on landmark symmetrical point pairs, which can greatly reduce the degradation of dense point pair mapping and at the same time make the boundary points of the two-dimensional shape correspond to each other as much as possible. Similarly, in terms of average error, the proposed method can achieve the best results, and the average geodesic error is much smaller than that of other methods.
[0162] Among them, FA, ZoomOut, MWP, and BCICP are different existing technologies based on functional mapping frameworks.
[0163] The comparison data of noise graphs are shown in Table 3 and Table 4:
[0164] Table 3 Statistics of symmetry axis index values obtained by different methods for different noise axisymmetric figures
[0165]
[0166] Table 4 Statistics of average geodesic errors obtained by different methods for different intrinsically symmetrical figures containing noise
[0167] method FA BCICP ZoomOut MWP Method of the present invention Beetle(noise) 0.0432 0.0456 0.0409 0.0525 0.0136 Butterfly(noise) 0.0145 0.0133 0.0124 0.0134 0.0093 Fly(noise) 0.1060 0.1295 0.1039 0.0851 0.0037 Human(noise) 0.0407 0.0612 0.0482 0.0198 0.0200 Octopus(noise) 0.1032 0.0473 0.1038 0.0785 0.0063 Average 0.0615 0.0594 0.0618 0.0499 0.0106
[0168] Tables 3 and 4 give the index statistics of the two-dimensional noise axisymmetric shape and the intrinsic symmetric shape; for the axisymmetric shape, such as Figure 6 As shown in the first row, the visual effects of the proposed method, R-Detector, and LIP-Detector are better; compared with the visualization of smooth graphics ( Figure 6 ), it can be found that the method of the present invention and the method used for comparison have certain noise resistance, such as Figure 7 As shown; in the numerical index Δ θ As with smooth graphs, the results of the proposed method are slightly worse than those of the R-Detector and LIP-Detector methods, but the difference is very small. dIn general, the error of the method of the present invention is much smaller than that of other methods; in general, the effect of the method of the present invention exceeds that of other methods.
[0169] For intrinsically symmetrical figures, in terms of visualization, the method of the present invention can also produce good results for noisy shapes; in terms of average error, the method of the present invention can achieve the best results, and the average geodesic error is significantly smaller than that of other methods.
[0170] Examples demonstrate that the proposed method exhibits high accuracy and excellent noise immunity. On two-dimensional shapes with minimal information, the proposed method achieves an average geodesic error index of only 0.0106, significantly lower than other methods. Compared to other unsupervised methods based on the functional mapping framework, the proposed method achieves superior results while maintaining comparable robustness.
[0171] The two-dimensional shape intrinsic symmetry detection method provided by the present invention is suitable for restoring the complete axial symmetry of two-dimensional approximate axially symmetrical shapes in CAD industrial design. Since this method can provide a symmetry axis with better properties under an axially symmetrical figure with large noise, this method can restore the approximate axially symmetrical figure to a standard axially symmetrical figure. In CAD drawing, this method can also detect whether the drawn two-dimensional shape is axially symmetrical or intrinsically symmetrical. For example, for two-dimensional shapes such as faucets and gears, the combination of faucets with different water outlet directions and gears of different sizes controlled by a foot pedal will cause the original shape to form an intrinsically symmetrical shape. Artists can also use the method of the present invention to detect the axial symmetry or intrinsic symmetry of the shapes they create.
[0172] For example, when applied to the intrinsic symmetry detection process of a two-dimensional shape in a CAD drawing, the corresponding "Intrinsic Symmetry Detection Method for Two-Dimensional Shapes in CAD Drawings" has the following steps:
[0173] Obtain data information of the two-dimensional shape in the target CAD drawing;
[0174] Performing data preprocessing on the acquired two-dimensional shape data to obtain preprocessed data features;
[0175] According to the obtained pre-processed data features, a shape feature point extraction algorithm is used to extract the feature points of the two-dimensional shape;
[0176] According to the obtained two-dimensional shape feature points, a shape feature point matching algorithm is used to match the two-dimensional shape feature points under intrinsic symmetry;
[0177] According to the matching results, a two-dimensional shape intrinsic symmetry detection and solution model is constructed based on the feature symmetry point pairs and function mapping framework;
[0178] Solve the constructed two-dimensional shape intrinsic symmetry detection model to obtain the final two-dimensional shape intrinsic symmetry detection model;
[0179] The data of the target two-dimensional shape is input into the obtained two-dimensional shape intrinsic symmetry detection model to obtain the point-by-point correspondence result of the boundary of the target two-dimensional shape under intrinsic symmetry, thereby completing the intrinsic symmetry detection of the two-dimensional shape in the target CAD drawing.
[0180] Similarly, the two-dimensional animal shape symmetry detection method provided by the present invention is suitable for the intrinsic symmetry detection of flat two-dimensional graphics when 3D printing desktop ornaments; it can also be used for the symmetry detection of two-dimensional animal models in industrial manufacturing; the information possessed by each point on the contour of the two-dimensional animal shape in the game can also be matched in the sense of intrinsic symmetry through the method of the present invention.
[0181] When 3D printing animal-shaped desktop ornaments, inherent symmetry can create a sense of neatness and elegance. Therefore, if inherent symmetry issues arise, it will directly affect the product quality of the 3D-printed animal-shaped desktop ornaments. Therefore, it is essential to perform intrinsic symmetry testing on 3D-printed animal-shaped desktop ornaments. When applied to intrinsic symmetry testing of two-dimensional planar graphics for 3D-printed desktop ornaments, the corresponding "Method for Intrinsic Symmetry Testing of Two-Dimensional Planar Graphics for 3D-Printed Desktop Ornaments" specifically includes the following steps:
[0182] Obtaining data information of the two-dimensional animal shape corresponding to the 3D printed desktop ornament to be tested;
[0183] Using the two-dimensional shape intrinsic symmetry detection method, the acquired data information of the two-dimensional animal shape corresponding to the 3D printed desktop ornament to be detected is subjected to intrinsic symmetry detection;
[0184] According to the obtained intrinsic symmetry detection result, the symmetry detection of the two-dimensional animal shape to be detected is completed;
[0185] The method for detecting intrinsic symmetry of a two-dimensional shape specifically includes the following steps:
[0186] The acquired data information of the two-dimensional animal shape corresponding to the 3D printed desktop ornament to be tested is used as the target two-dimensional shape data;
[0187] Performing data preprocessing on the acquired two-dimensional shape data to obtain preprocessed data features;
[0188] According to the obtained pre-processed data features, a shape feature point extraction algorithm is used to extract the feature points of the two-dimensional shape;
[0189] According to the obtained two-dimensional shape feature points, a shape feature point matching algorithm is used to match the two-dimensional shape feature points under intrinsic symmetry;
[0190] According to the matching results, a two-dimensional shape intrinsic symmetry detection and solution model is constructed based on the feature symmetry point pairs and function mapping framework;
[0191] Solve the constructed two-dimensional shape intrinsic symmetry detection model to obtain the final two-dimensional shape intrinsic symmetry detection model;
[0192] The data of the target two-dimensional shape is input into the obtained two-dimensional shape intrinsic symmetry detection model to obtain the point-by-point correspondence result of the boundary of the target two-dimensional shape under intrinsic symmetry, thereby completing the intrinsic symmetry detection of the planar two-dimensional graphics of the 3D printed desktop ornaments.
Claims
1. A method for detecting intrinsic symmetry of a two-dimensional shape, comprising the following steps: S1. Obtain existing two-dimensional shape data; S2. Preprocess the two-dimensional shape data obtained in step S1 to obtain preprocessed data features; S3. Based on the preprocessed data features obtained in step S2, a shape feature point extraction algorithm is used to extract feature points of a two-dimensional shape; S4. According to the feature points of the two-dimensional shape obtained in step S3, a shape feature point matching algorithm is used to match the two-dimensional shape feature points under intrinsic symmetry; S5. Based on the matching results obtained in step S4, a two-dimensional shape intrinsic symmetry detection solution model is constructed based on the feature symmetry point pairs and function mapping framework; specifically comprising the following steps: The following formula is used as the solution model for intrinsic symmetry detection of two-dimensional shapes: Where Π is a binary matrix, and the value rule is T p () is a point-by-point mapping from shape M to shape N, u is a point on shape M, v is a point on shape M that is different from point u; k is the order of matrix C; C k is the k-order principal submatrix of matrix C; matrix C is the discrete representation of function mapping T; is the matrix C k The transpose of I k is the k×k identity matrix; is the square of the Frobenius norm; The first k truncated eigenvectors of the Laplace Beltrami operator of shape M; is a matrix of pseudo-rebellion; For directed line segments Mapping, if there is a directed line segment The direction is clockwise along the geodesic curve. If a directed line segment The direction is counterclockwise along the geodesic curve. ζ(y) is the mapping of vertex y in set Y to its nearest landmark point; Y is the set of vertices on the boundary of the shape triangle except the feature points; T p (y) is the mapping of a point y on the boundary of shape M other than the feature point to another point different from y on the boundary of shape M; ζ(T p (y)) is the vertex T in the set Y p (y) is mapped to the nearest landmark point; Π fix () is the set of symmetric feature point pairs of two-dimensional shape feature points under intrinsic symmetry; S6. Solve the two-dimensional shape intrinsic symmetry detection model constructed in step S5 to obtain the final two-dimensional shape intrinsic symmetry detection model; S7. Input the target two-dimensional shape data into the two-dimensional shape intrinsic symmetry detection model obtained in step S6 to obtain the point-by-point correspondence result of the boundary of the target two-dimensional shape under the intrinsic symmetry, and complete the intrinsic symmetry detection of the target two-dimensional shape; Among them, the two-dimensional shape intrinsic symmetry detection method is applied to the symmetry detection of two-dimensional animal shapes; the two-dimensional shape data is specifically two-dimensional animal shape data.
2. The method for detecting intrinsic symmetry of a two-dimensional shape according to claim 1, characterized in that The two-dimensional shape data described in step S1 specifically includes the two-dimensional graphic data in the two-dimensional graphic dataset UTLN-SRA and the two-dimensional graphic data in the two-dimensional graphic dataset MPEG-7_CE_Shape-1_Part-B.
3. The method for detecting intrinsic symmetry of a two-dimensional shape according to claim 1 or 2, characterized in that Step S2 is to perform data preprocessing on the two-dimensional shape data obtained in step S1 to obtain preprocessed data features, which specifically includes the following steps: For the acquired two-dimensional shape data, an off file of each two-dimensional shape is created, and then the HKS feature descriptor of each two-dimensional shape is calculated; the HKS feature descriptor includes the first k truncated eigenvalues and corresponding eigenvectors of each two-dimensional shape.
4. The method for detecting intrinsic symmetry of a two-dimensional shape according to claim 3, characterized in that Step S3, based on the pre-processed data features obtained in step S2, uses a shape feature point extraction algorithm to extract feature points of a two-dimensional shape, specifically comprising the following steps: Use shape feature point extraction algorithm to extract feature points of two-dimensional shapes: For points on the two-dimensional shape contour whose curvature is greater than the set value; calculate the distance d' from the corner point j to the straight line connecting the two contour points i and k on both sides of the point j, and then make a judgment: if d'>D, then the corner point j is a candidate feature point, otherwise the corner point j is excluded; D is the set threshold; use the above method to obtain all candidate feature points; For all candidate feature points, the following steps are performed: set the interval radius R; if there are other candidate feature points in the area with a radius of R centered on the candidate feature point j, then select the candidate feature point with a larger d' value as the final feature point; Finally, several feature points of the two-dimensional shape are extracted.
5. The method for detecting intrinsic symmetry of a two-dimensional shape according to claim 4, characterized in that Step S4, in accordance with the feature points of the two-dimensional shape obtained in step S3, uses a shape feature point matching algorithm to match the feature points of the two-dimensional shape under intrinsic symmetry, specifically comprising the following steps: Based on the thermal core signature and characteristic function properties, an optimization model is established; Weight matrix of feature points Defined as: Where W j,j' is the j'th element in the jth row of matrix W; h j is the HKS vector representation of the jth feature point; h j' is the HKS vector representation of the j'th feature point; || ||2 is the 2-norm; q is the weight factor; η() is a binary function and the value rule is s j is the symbolic vector representation of the truncated feature vector of the jth feature point; s j' is the symbolic vector representation of the truncated feature vector of the j'th feature point; W j,j is the jth element in the jth row of matrix W; The following formula is used as the optimization model: Where 1 is a column vector of all ones; is the transpose symbol of vector and matrix; M is a binary matrix, and if M i,j =1 means that the i-th feature point and the j-th feature point are a set of symmetrical feature point pairs. If M i,j =0 means that the i-th feature point and the j-th feature point are not a symmetrical feature point pair; p is the number of symmetric feature point pairs; ο is the Hadamard product of the matrix; Convert the optimization model into a linear assignment problem for solution; When solving, set p = 1 and use the symmetrical feature point pairs obtained as the landmark symmetrical point pairs to guide the subsequent solution; Judging the symmetrical feature point pairs: Condition 1: The symmetric feature point pair is located on the same side of the line connecting the symmetric point pair of the landmark along the boundary; Condition 2: A pair of symmetrical feature points whose distance from each other in the geodesic sense is closest to the feature point constitutes a pair of landmark symmetrical point pairs; Condition 3: The error in the geodesic distance between the symmetrical feature point pair and the symmetrical point pair of the landmark is within a set range; the geodesic distance is the geodesic distance of the one-dimensional manifold corresponding to the two-dimensional figure; If the symmetrical feature point pair satisfies conditions 1 to 3 at the same time, then the symmetrical feature point pair is the new landmark symmetrical point pair; Perform the above detection on the feature points of the two-dimensional shape obtained in step S3: if there are two feature points that meet the above conditions, then the two feature points are regarded as a pair of symmetrical feature points; If a feature point does not correspond to other feature points that meet the conditions, no corresponding symmetrical feature point will be given to the feature point; Finally, the symmetrical feature point pairs of the two-dimensional shape feature points under intrinsic symmetry are obtained.
6. The method for detecting intrinsic symmetry of a two-dimensional shape according to claim 5, characterized in that Step S6 solves the two-dimensional shape intrinsic symmetry detection model constructed in step S5 to obtain a final two-dimensional shape intrinsic symmetry detection model, which specifically includes the following steps: A. Convert the two-dimensional shape intrinsic symmetry detection solution model constructed in step S5 into a form containing a binary matrix π: For a fixed value of k, we have The matrix C is split by semi-quadratic splitting method. k Decoupling from the matrix π, we get two sub-problems: First sub-question: Second sub-question: Where Y is the vertex set on the triangle boundary excluding the feature points; For the first subproblem, add a regular term R(Π) to the optimization objective: Among them A M is the area diagonal matrix of shape M, where the elements on the diagonal are the local areas of the vertices; is the setting function, and trace() is the trace of the matrix; After adding the regularization term, we get the final two sub-problems: Sub-question 1: Sub-question 2: B. Alternately iterate and optimize the matrix C and matrix π in the spectral domain and spatial domain: First, the nearest neighbor search algorithm is used to solve sub-problem 1 separately; Then, by equation Directly solve sub-problem 2; When solving, starting from the set initial value k0, the spectral upsampling technique is used to gradually increase the spectral embedding dimension in the iteration, alternately solving subproblems one and two, and finally obtaining the final matrix C. The matrix C is used to calculate the matrix π, and the matrix C is used to obtain the point-by-point self-mapping of the two-dimensional shape.