A target recognition method based on contour centroid height increment feature

Through the target recognition method based on the height incremental feature of the contour centroid height, the problems of low recognition accuracy and high complexity in traditional algorithms are solved, and higher recognition accuracy and noise immunity are achieved. Dynamic programming algorithm is used to calculate feature distance and shape complexity analysis, which improves the stability and accuracy of recognition.

CN114820673BActive Publication Date: 2025-08-26SHENYANG LIGONG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210447396.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-26
Publication Date
2025-08-26
Estimated Expiration
2042-04-26

AI Technical Summary

Technical Problem

Traditional object recognition algorithms have low recognition accuracy, high complexity, and low noise resistance, which cannot achieve stable and accurate recognition effects.

Method used

The target recognition method based on the height incremental characteristics of the contour centroid height is adopted, including image preprocessing, contour extraction, uniform sampling and center of mass extraction, center of mass height incremental descriptor establishment, normalization and smoothing processing, dynamic programming algorithm calculation feature distance, and shape complexity analysis, to improve recognition accuracy and noise immunity.

Benefits of technology

By constructing a centroid height incremental profile descriptor, the robustness and accuracy of the recognition algorithm are improved, the computational complexity is reduced, and a more stable and accurate target recognition effect is achieved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114820673B_ABST
    Figure CN114820673B_ABST
Patent Text Reader

Abstract

The present invention provides a target recognition method based on contour centroid height increment features. The method comprises the following steps: establishing a contour template database of multiple types of target images and template images, performing image preprocessing and contour extraction on the template image and the target image respectively, and generating a contour point set, extracting contour centroid height increment features from the template image and the target image respectively, and performing normalization and smoothing processing, calculating the contour centroid height increment feature distance between the template image and the target image by a dynamic programming algorithm, and jointly recognizing the target image by combining the dynamic programming algorithm and shape complexity analysis to obtain a final recognition result. The database specifically includes the geometric transformation features and complete image features of the image, thereby solving the problem that traditional target recognition algorithms have low recognition accuracy, high complexity, and low recognition noise resistance, and thus cannot achieve stable and accurate recognition effects.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of vision and target detection technology, and in particular relates to a target recognition method based on contour centroid height increment features. Background Art

[0002] Object recognition has always been a key research direction in the development of computer vision. However, traditional object recognition algorithms, with their low accuracy and high complexity, have long been a challenge and a hot topic within the field. It is generally hoped that recognition features will be adaptable to the environment in which the target is to be identified, thereby enabling more effective identification of target instances from scene images. Because object shape is a very stable and important visual feature, it has always been an effective and highly utilized feature in object matching. Shape representation methods can be broadly divided into three categories: contour-based shape representation, region-based shape representation, and skeleton-based shape representation. Contour-based representation methods describe the outer edges of an image by extracting its contours. Domestic and international scholars have conducted extensive research on contour-based object recognition methods and have proposed numerous methods for describing contour features.

[0003] The shape context descriptor proposed by Belongie et al. in 2001 is the most representative contour description method in recent years. Due to its excellent recognition performance and strong anti-interference ability, it has been widely used in the field of shape retrieval. Wu Xiaoyu et al. proposed a shape context recognition algorithm with rotation invariance. By changing the image angle by finding the angle interval with the most sampling points, the shape context descriptor is given rotation invariance. Zhang Guimei et al. replaced the Euclidean distance with the internal distance and proposed the internal distance shape context descriptor. This achieved good recognition results for targets with non-rigidity and limb changes, but the descriptor construction is complex and computationally intensive. Mokhtarian et al. proposed a curvature scale space descriptor, which is robust to boundary noise and scale changes. However, it requires further evolution of the contour, which increases the workload of feature extraction and results in low recognition accuracy. Alajlan et al. proposed a shape descriptor based on triangular area representation, which effectively obtains global and local information of the target. However, this method has poor recognition robustness and low ability to distinguish similar shapes.

[0004] Traditional target recognition algorithms have low recognition accuracy, high complexity, and low recognition resistance, and thus cannot achieve stable and accurate recognition results. Summary of the Invention

[0005] Therefore, the technical problem to be solved by the present invention is to provide a target recognition method based on the contour centroid height increment feature, which can solve the problem that the traditional target recognition algorithm has low recognition accuracy, high complexity, and low recognition noise resistance, and thus cannot achieve stable and accurate recognition effects.

[0006] In order to solve the above problems, the present invention provides a target recognition method based on the contour centroid height increment feature, which comprises the following steps:

[0007] A target recognition method based on contour centroid height increment feature, characterized in that the method comprises the following steps:

[0008] S1: Image preprocessing and contour extraction: Preprocess the target image and several template images and use the contour extraction algorithm to extract their respective peripheral contours; the target image is an image of an uncertain object, and the template image is an image of a certain object;

[0009] S2: Uniformly sample the contour and extract the centroid: extract the outer contour of the target to be measured, select N sampling points on the outer contour, and extract the contour centroid of the N sampling points;

[0010] S3: Taking the contour centroid as the reference point, establish a centroid height increment descriptor based on the height relationship of other points compared to this point: calculate the distance between each sampling point selected in S2 and the centroid and the centroid height increment;

[0011] S4: Normalize and smooth the centroid height increment feature: reduce the dimension of the centroid height increment feature obtained in S3 and make it translation and rotation invariant;

[0012] S5: Calculate the characteristic distance between the two contours using a dynamic programming algorithm: Apply the processed centroid height increment feature obtained in S4 to calculate the matching cost and then calculate the characteristic distance between the contours;

[0013] S6: Filter out the final result by combining the complexity analysis of the contour features: filter out the final result by changing the distance formula parameter settings;

[0014] S2 specifically includes the following steps:

[0015] S2.1: Extract N valid feature points on the outer contour of the image;

[0016] S2.2: Calculate the contour centroid according to the algorithm;

[0017] In S3, the following steps are specifically included:

[0018] S3.1: Calculate the distance between the sampling point and the centroid, i.e. the centroid height;

[0019] S3.2: Determination of the centroid height increment sequence;

[0020] S3.3: Determination of the centroid height increment matrix;

[0021] S4 specifically includes the following steps:

[0022] S4.1: Normalize the centroid height increment features of the contour sampling points;

[0023] S4.2: Smoothing the centroid height increment features of the contour sampling points;

[0024] Smoothness processing in S4.2 includes:

[0025] For p i The centroid height increment of a point can be expressed as: 2

[0026] The sequence contains N elements, corresponding to the centroid height increments of N sampling points relative to the point. A positive integer coefficient k (1 < k < N) is added to divide the sequence into M non-overlapping subsequences [1, k], [k+1, 2k], ..., where M = [N / k]. The average centroid height increment of each sequence is calculated: Where, t = 1, 2, ... M;

[0027] Arrange the M mean data in order and get point p i The smoothed feature sequence G i , that is: G i =(g i,1 ,g i,2 ,....g i,M-1 ,g i,M ) T , arrange the smoothed descriptors of all sampling points in order, and obtain the centroid height increment feature matrix E(P) of the contour P: E(P)=(G1,G2,...,G N-1 ,G N );

[0028] S5 specifically includes the following steps:

[0029] S5.1: Calculate the matching cost between the sampling points on the two shapes: that is, calculate the distance between the centroid height increment feature of each sampling point on the two shapes, design the weight coefficient, and obtain the matching cost matrix between the two contours;

[0030] S5.2: Use a dynamic programming algorithm to match the contour point sets and determine the corresponding relationship so that the sum of the matching costs of each pair of contour points between the contours is minimized, thereby obtaining the optimal matching cost between the two contour point set sequences;

[0031] The matching cost in S5.1 includes:

[0032] Preset sampling point p i and q jBelong to shapes P and Q respectively, set the matching cost to p i ,q j The centroid height increment feature G corresponding to the two points i and G j the distance between them;

[0033] Set the weight coefficient w t The local features of the highlighted contour are calculated as follows: Based on the weight coefficient, the matching cost c(p i ,q j ) is calculated as follows:

[0034] Among them, d(g i,t ,g j,t ) indicates p i ,q j The data difference between two points on the tth component of their centroid height increment;

[0035] The determination of the optimal matching cost in S5.2 includes:

[0036] After obtaining the matching cost of any two points, the contour point sets are matched and the dynamic programming algorithm is used to determine the corresponding relationship so that the sum of the matching cost of each pair of contour points between the contours is minimized. Suppose the sampling point p of shape P is i and the sampling point τ(p i ) match, then the distance difference between the two shapes is defined as: Among them, c(p i ,τ(p i )) is the sampling point p i and τ(p i ) matching cost between them;

[0037] In S6, shape complexity is introduced to further improve the matching effect of contours. The following methods are used to further improve the matching effect of contours:

[0038] Set the complexity of the shape outline to: Among them, std represents standard deviation;

[0039] By introducing shape complexity, we can get the distance S(P,Q) between two shapes: Where C(P) and C(Q) are the complexities of shapes P and Q respectively, and η is a parameter that adjusts the size of the denominator.

[0040] Preferably, the contour extraction in S1 specifically includes the following steps:

[0041] S1.1: Convert the image from three-channel to single-channel image;

[0042] S1.2: Perform thresholding noise reduction on the image;

[0043] S1.3: Use the Canny differential operator to extract the edge of the image;

[0044] S1.4: Use image morphological operations to dilate small edges and fill holes to form a complete outer contour;

[0045] S1.5: The Canny differential operator is used again to accurately extract the outer contour.

[0046] Preferably, in S2.1, extracting N valid feature points on the outer contour of the image is performed by sampling at equal intervals, and selecting a certain number of contour points; the method comprises the following steps: extracting a complete contour point set of the image contour, selecting the number of contour points as N, dividing the total number of contour points m by the required number of points N, to obtain a contour sampling distance m / N, and selecting a starting point for the contour points can be random; it can be concluded that the larger the number of sampling points N, the more accurate the shape described;

[0047] S2.2 uses the contour point set obtained in S2.1 and records it as P = {p i}(i=1,2,...,N), where N is the number of sampling points, p i is the i-th sampling point of the contour, and the sampling point p i (x i ,y i ), the calculation formula of the contour centroid W(x0,y0) is as follows:

[0048] Preferably, extracting the centroid height increment feature of the target image in S3.1 specifically includes the following steps:

[0049] S3.1: Determination of the height value of the contour centroid: The obtained height value represents the position of the sampling point on the contour. For the sampling point p i (x i ,y i ), set the center of mass height g i is the Euclidean distance between the point and the centroid W(x0,y0), that is:

[0050] S3.2.1: Determination of centroid height increment: According to the centroid height value of N sampling points of the contour, set any sampling point p j (j=1,2,...N) and the current sampling point p i The difference in the center of mass height is the center of mass height increment h i,j , that is: h i,j =g j -g i(j=1,2,...N);

[0051] S3.2.2: To obtain the centroid height increment sequence: All sampling points are relative to point p i The centroid height increments are arranged in the order of contour points to obtain the sampling point p i The center of mass height increment sequence H i ,Right now:

[0052] S3.3: Obtaining the centroid height increment matrix: The centroid height increment sequence H corresponding to each point on the shape contour P i Arrange the contour points in order and get a matrix of size N×N: L(P)=(H1,H2,...,H N-1 ,H N );

[0053] Furthermore, S6 combines the complexity analysis of the contour features to select the final result, which mainly includes the following steps:

[0054] Since the higher the complexity of the shape, the lower the sensitivity to local deformation of the contour, and the more reliable the recognition result, shape complexity is introduced to further improve the contour matching effect. The complexity of the shape contour is defined as: Where std represents standard deviation;

[0055] By introducing shape complexity, we can finally get the distance S(P,Q) between the two shapes: Where C(P) and C(Q) are the complexities of shapes P and Q respectively, and η is a parameter that adjusts the size of the denominator;

[0056] In addition, in the actual recognition process, the target to be identified is often flipped, which can easily cause mismatching. Therefore, a simple strategy is adopted: flip the target P to be detected to obtain shape PF, match shapes P and PF with shape Q respectively, and take the minimum matching distance between the two as the final matching result of shapes P and Q.

[0057] Preferably, the normalization process in S4.1 makes the centroid height increment feature of the contour sampling point scale invariant, and each row of the matrix is ​​normalized: Among them, ||h t,j || is the modulus of the centroid height increment data.

[0058] Beneficial effects:

[0059] The present invention provides a target recognition method based on the contour centroid height increment feature. The present invention constructs a contour descriptor of the centroid height increment according to the change of the contour point relative to the centroid height, and improves the robustness of the descriptor to noise and nonlinear deformation through normalization and smoothing. Considering the spatial relationship characteristics of the centroid height increment, in order to reduce the feature dimension and thus reduce the algorithm complexity during the recognition process, a dynamic programming algorithm is used to calculate the similarity of the centroid height increment feature, and the final recognition result is obtained by combining the contour shape complexity analysis. In the case of low target recognition accuracy, the target feature information is often added, which also increases the complexity of the recognition algorithm. In this case, the spatial position distribution relationship between the contour centroid and contour points of different contours is taken into account to improve the recognition accuracy and noise resistance of the target shape. The present invention can achieve good recognition effect and solve the problem that traditional target recognition algorithms have low recognition accuracy, high complexity, and low recognition noise resistance, and thus cannot achieve stable and accurate recognition effect. BRIEF DESCRIPTION OF THE DRAWINGS

[0060] Figure 1 A diagram showing target identification steps according to an embodiment of the present invention;

[0061] Figure 2 This is a target recognition flow chart of an embodiment of the present invention;

[0062] Figure 3 This is a flow chart of a dynamic programming algorithm according to an embodiment of the present invention;

[0063] Figure 4 (a), (b) and (c) are schematic diagrams of target image, contour extraction and uniform sampling according to an embodiment of the present invention, respectively;

[0064] Figure 5 This is a diagram showing the effect of extracting the centroid height increment feature of dissimilar contour sampling points according to an embodiment of the present invention;

[0065] Figure 6 This is a partial target matching result diagram on the test set of an embodiment of the present invention. DETAILED DESCRIPTION

[0066] See also Figures 1 to 6 As shown, according to an embodiment of the present invention, a target recognition method based on contour centroid height increment feature is provided. Figure 1 The specific steps are as follows:

[0067] Step 1: Image Preprocessing and Contour Extraction: Preprocess the target image and several template images and use a contour extraction algorithm to extract their respective contours. The target image is an image of an uncertain object, and the template image is an image of a certain object.

[0068] Step 2: Uniformly sample the contour and extract the centroid: Extract the outer contour of the target to be measured, select N sampling points on the outer contour, and extract the contour centroid of the N sampling points.

[0069] Step 3: Using the contour centroid as the reference point, establish a centroid height increment descriptor based on the height relationship of other points compared to this point: for the sampling points selected in step 2, calculate their respective distances from the centroid and the centroid height increment.

[0070] Step 4: Normalize and smooth the centroid height increment feature: Reduce the dimension of the centroid height increment feature obtained in step 3 and make it translation and rotation invariant.

[0071] Step 5: Use dynamic programming algorithm to calculate the feature distance between the two contours: Apply the processed centroid height increment feature obtained in step 4 to calculate the matching cost and then calculate the feature distance between the contours.

[0072] Step 6: Filter out the final result by combining the complexity analysis of the contour features: Filter out the final result by changing the distance formula parameter settings.

[0073] This invention constructs a centroid height incremental contour descriptor based on the height variations of contour points relative to the centroid. Normalization and smoothing are used to improve the descriptor's robustness to noise and nonlinear deformation. A dynamic programming algorithm is used to calculate the similarity of the centroid height incremental features, combined with contour shape complexity analysis to obtain the final recognition result. This method achieves excellent recognition results by considering the spatial distribution relationship between the contour centroid and contour points of different contours, improving the recognition accuracy and noise resistance of the target shape, and achieving more stable and accurate recognition results.

[0074] Furthermore, in step 1, image preprocessing and contour extraction are performed: the target image and several template images are preprocessed and their respective outer contours are extracted using a contour extraction algorithm. The target image is an image of an uncertain object, and the template image is an image of a certain object.

[0075] Contour extraction in step 1 specifically includes the following steps:

[0076] 1.1: The image is converted from a three-channel image to a single-channel image;

[0077] 1.2: Perform threshold noise reduction on the image;

[0078] 1.3: Use the Canny differential operator to extract the edge of the image;

[0079] 1.4: Use image morphological operations to dilate small edges and fill holes to form a complete outer contour;

[0080] 1.5: The Canny differential operator is used again to accurately extract the outer contour.

[0081] Furthermore, thresholding the image can maximize the image noise reduction; image morphological processing can fill the redundant holes caused by the small contours inside the target, and the Canny differential operator is used twice to extract the edge contour, and finally the outermost contour of the image is obtained.

[0082] Wherein, step 2 includes the following steps 2.1 to 2.2:

[0083] 2.1: Extract N valid feature points on the outer contour of the image;

[0084] 2.2: Calculate the contour centroid according to the algorithm.

[0085] Among them, step three includes the following steps 3.1 to 3.3:

[0086] 3.1: Find the distance between the sampling point and the centroid, that is, the centroid height value;

[0087] 3.2: Obtaining the center of mass height increment sequence;

[0088] 3.3: Calculation of the centroid height increment matrix.

[0089] like Figure 4 (a) and (b) in Figure 2.1. Furthermore, the extraction of contour feature points in step 2.1 involves sampling at equal intervals, selecting a certain number of contour points. This involves the following steps: For the complete contour point set extracted from the image contour, select N as the number of contour points. Divide the total number of contour points m by the required number of points N to obtain the contour sampling distance m / N. The starting point for selecting contour points can be random. This indicates that the larger the number of sampling points N, the more accurate the shape description.

[0090] like Figure 4 (c) in step 2.2, the contour point set obtained in step 2.1 is recorded as P = {p i}(i=1,2,...,N), where N is the number of sampling points, p i is the i-th sampling point of the contour. Let the sampling point p i (x i ,y i ), the calculation formula of the contour centroid W(x0,y0) is as follows:

[0091] Furthermore, in step 3.1, the centroid height increment of the contour is calculated. The most important thing is to find the distance between the sampling point and the centroid, that is, the centroid height value. This value represents the position of the sampling point on the contour. For the sampling point p i (xi ,y i ), define the center of mass height g ii is the Euclidean distance between the point and the centroid W(x0,y0), that is:

[0092] Furthermore, in step 3.2, the centroid height increment is obtained: according to the centroid height values ​​of the N sampling points of the contour, set any sampling point p j (j=1,2,...N) and the current sampling point p i The difference in the center of mass height is the center of mass height increment h i,j , that is: h i,j =g j -g i (j=1,2,...N).

[0093] Furthermore, in step 3.2, the centroid height increment sequence is obtained by moving all sampling points relative to point p i The centroid height increments are arranged in the order of contour points to obtain the sampling point p i The center of mass height increment sequence H i ,Right now:

[0094] Furthermore, in step 3.3, the centroid height increment matrix is ​​obtained by converting the centroid height increment sequence H corresponding to each point on the shape contour P into i Arrange the contour points in order and get a matrix of size N×N: L(P)=(H1,H2,...,H N-1 ,H N ), where L(P) represents the contour centroid height increment matrix, and the i-th column of the matrix represents the sampling point p on the contour P i The centroid height delta descriptor describes the relative height relationship between contour points and does not change with the rotation and translation of the contour.

[0095] Furthermore, the normalization and smoothing of the centroid height increment feature in step 4 includes the following steps:

[0096] To make the descriptor scale-invariant, we normalize each row of the matrix: Where ||h t,j || is the modulus of the centroid height increment data.

[0097] This formula defines the sampling point p i The centroid height increment of all sampling points relative to the contour effectively describes the contour information, but it is too sensitive to local deformation of the contour caused by noise, and the feature dimension is too high and the calculation is complex.

[0098] Furthermore, we can achieve a good compromise between the accuracy, noise immunity, and simplicity of the descriptor. The specific process is as follows:

[0099] For p i The centroid height increment of a point can be expressed as:

[0100] The sequence contains N elements, corresponding to the centroid height increments of N sampling points relative to the point. A positive integer coefficient k (1 < k < N) is added to divide the sequence into M non-overlapping subsequences [1, k], [k+1, 2k], ..., where M = [N / k]. The average centroid height increment of each sequence is calculated: Where t = 1, 2, ...M.

[0101] Furthermore, the M mean data are arranged in order to obtain point p i The smoothed feature sequence G i , that is: G i =(g i,1 ,g i,2 ,....g i,M-1 ,g i,M ) T ;

[0102] After smoothing, not only the robustness of the descriptor to contour deformation and noise interference is improved, but also the dimension of the feature vector is reduced, which is convenient for subsequent matching. The descriptors of all the smoothed sampling points are arranged in order to obtain the centroid height increment feature matrix E(P) of the contour P: E(P) = (G1, G2, ..., G N-1 ,G N ).

[0103] Furthermore, in step 5, the dynamic programming algorithm is used to calculate the characteristic distance between the two contours, which includes the following steps:

[0104] like Figure 2 and Figure 3 As shown in Figure 2, after obtaining the feature descriptor of the shape in step 4, the similarity between the two shapes is calculated. Since the centroid height increment descriptor contains the global feature of the order of the contour point set, this paper selects a dynamic programming algorithm to match the obtained shape features.

[0105] The centroid height increment descriptor describes the feature relationship between contour points. First, the matching cost between the sampling points on the two shapes is calculated. The more similar the features between the sampling points of different contours are, the smaller the matching cost is. Assume that the sampling point p i and q j Belong to shapes P and Q respectively, and define the matching cost as p i ,q jThe centroid height increment feature G corresponding to the two points i and G j Considering the distance between the sampling points p i and q j The effect of the centroid height increment is greater, so the weight coefficient w is designed t The local features of the highlighted contour are calculated as follows: On this basis, we get the matching cost c(p i ,q j ) is calculated as follows: Where d(g i,t ,g j,t ) indicates p i ,q j The data difference between two points on the tth component of their centroid height increment.

[0106] After obtaining the matching cost of any two points, the contour point sets are matched and the dynamic programming algorithm is used to match them. The corresponding relationship is determined so that the sum of the matching cost of each pair of contour points between the contours is minimized. Suppose the sampling point p of shape P is i and the sampling point τ(p i ) match, then the distance difference between the two shapes is defined as: Among them, c(p i ,τ(p i )) is the sampling point p i and τ(p i ) is the matching cost between .

[0107] Furthermore, in step 6, the final result is selected by combining the complexity analysis of the contour features, which mainly includes the following steps:

[0108] Since the higher the shape complexity, the lower the sensitivity to local deformation of the contour, and the more credible the recognition result, shape complexity is introduced to further improve the contour matching effect. The complexity of the shape contour is defined as: Where std represents the standard deviation.

[0109] By introducing shape complexity, we can finally get the distance S(P,Q) between the two shapes: Where C(P) and C(Q) are the complexities of shapes P and Q, respectively, and η is a parameter that adjusts the denominator size, which can be adjusted appropriately based on experience.

[0110] In addition, in the actual recognition process, the target to be identified is often flipped, which can easily cause mismatching. Therefore, a simple strategy is adopted: flip the target P to be detected to obtain shape PF, match shapes P and PF with shape Q respectively, and take the minimum matching distance between the two as the final matching result of shapes P and Q.

[0111] like Figure 5 As shown in the figure, the centroid height increment feature extraction effect of dissimilar contour sampling points is given, where Figure 5 (a) and (b) show the uniform sampling of the heart-shaped contour and bat contour, with three contour points A, B, and C marked respectively; Figure 5 (c), (e), and (g) are the centroid height increment features corresponding to the three points A, B, and C of the heart-shaped contour, respectively. Figure 5 (d), (f), and (h) are the centroid height increment features corresponding to the three points A, B, and C of the bat outline. Figure 5 It can be seen that the centroid height increment features of different sampling points on the contour are unique and can be used to describe the contour information.

[0112] like Figure 6 As shown in FIG, some target matching results of the present invention on the MPEG-7 test set are given, wherein the first column is the target to be tested, and the second to ninth columns are the matching results and the corresponding shape distance values. The shape distance values ​​of the 1st to 8th targets to be tested are arranged from small to large, indicating recognition results similar to the 1st to 8th ones. It can be seen that the present invention can better realize the recognition of target shape.

[0113] It is easy for those skilled in the art to understand that, under the premise of no conflict, the above-mentioned advantageous methods can be freely combined and superimposed.

Claims

1. A target recognition method based on contour centroid height increment feature, characterized in that: The method comprises the following steps: S1: Image preprocessing and contour extraction: Preprocess the target image and several template images and use the contour extraction algorithm to extract their respective peripheral contours; the target image is an image of an uncertain object, and the template image is an image of a certain object; S2: Uniformly sample the contour and extract the centroid: extract the outer contour of the target to be measured, select N sampling points on the outer contour, and extract the contour centroid of the N sampling points; S3: Taking the contour centroid as the reference point, establish a centroid height increment descriptor based on the height relationship of other points compared to this point: calculate the distance between each sampling point selected in S2 and the centroid and the centroid height increment; S4: Normalize and smooth the centroid height increment feature: reduce the dimension of the centroid height increment feature obtained in S3 and make it translation and rotation invariant; S5: Calculate the characteristic distance between the two contours using a dynamic programming algorithm: Apply the processed centroid height increment feature obtained in S4 to calculate the matching cost and then calculate the characteristic distance between the contours; S6: Filter out the final result by combining the complexity analysis of the contour features: filter out the final result by changing the distance formula parameter settings; S2 specifically includes the following steps: S2.1: Extract N valid feature points on the outer contour of the image; S2.2: Calculate the contour centroid according to the algorithm; In S3, the following steps are specifically included: S3.1: Calculate the distance between the sampling point and the centroid, i.e. the centroid height; S3.2: Determination of the centroid height increment sequence; S3.3: Determination of the centroid height increment matrix; S4 specifically includes the following steps: S4.1: Normalize the centroid height increment features of the contour sampling points; S4.2: Smoothing the centroid height increment features of the contour sampling points; Smoothness processing in S4.2 includes: For p i The centroid height increment of a point can be expressed as: The sequence contains N elements, corresponding to the centroid height increments of N sampling points relative to the point. A positive integer coefficient k (1 < k < N) is added to divide the sequence into M non-overlapping subsequences [1, k], [k+1, 2k], ..., where M = [N / k]. The average centroid height increment of each sequence is calculated: Where, t = 1, 2, ... M; Arrange the M mean data in order and get point p i The smoothed feature sequence G i , that is: G i =(g i,1 ,g i,2 ,....g i,M-1 ,g i,M ) T , arrange the smoothed descriptors of all sampling points in order, and obtain the centroid height increment feature matrix E(P) of the contour P: E(P)=(G1,G2,...,G N-1 ,G N ); S5 specifically includes the following steps: S5.1: Calculate the matching cost between the sampling points on the two shapes: that is, calculate the distance between the centroid height increment feature of each sampling point on the two shapes, design the weight coefficient, and obtain the matching cost matrix between the two contours; S5.2: Use a dynamic programming algorithm to match the contour point sets and determine the corresponding relationship so that the sum of the matching costs of each pair of contour points between the contours is minimized, thereby obtaining the optimal matching cost between the two contour point set sequences; The matching cost in S5.1 includes: Preset sampling point p i and q j Belong to shapes P and Q respectively, set the matching cost to p i ,q j The centroid height increment feature G corresponding to the two points i and G j the distance between them; Set the weight coefficient w t The local features of the highlighted contour are calculated as follows: Based on the weight coefficient, the matching cost c(p i ,q j ) is calculated as follows: Among them, d(g i,t ,g j,t ) indicates p i ,q j The data difference between two points on the tth component of their centroid height increment; The determination of the optimal matching cost in S5.2 includes: After obtaining the matching cost of any two points, the contour point sets are matched and the dynamic programming algorithm is used to determine the corresponding relationship so that the sum of the matching cost of each pair of contour points between the contours is minimized. Suppose the sampling point p of shape P is i and the sampling point τ(p i ) match, then the distance difference between the two shapes is defined as: Among them, c(p i ,τ(p i )) is the sampling point p i and τ(p i ) matching cost between them; In S6, shape complexity is introduced to further improve the matching effect of contours. The following methods are used to further improve the matching effect of contours: Set the complexity of the shape outline to: Among them, std represents standard deviation; By introducing shape complexity, we can get the distance S(P,Q) between two shapes: Where C(P) and C(Q) are the complexities of shapes P and Q respectively, and η is a parameter that adjusts the size of the denominator; The target P to be detected is flipped to obtain the shape PF, and the shapes P and PF are matched with the shape Q respectively. The minimum distance between the two is taken as the final matching result of the shapes P and Q.

2. The target recognition method based on the contour centroid height increment feature according to claim 1 is characterized in that: The database in S1 specifically includes the geometric transformation features of the image and the complete image features.

3. The target recognition method based on the contour centroid height increment feature according to claim 1 is characterized in that: Contour extraction in S1 specifically includes the following steps: S1.1: Convert the image from three-channel to single-channel image; S1.2: Perform thresholding noise reduction on the image; S1.3: Use the Canny differential operator to extract the edge of the image; S1.4: Use image morphological operations to dilate small edges and fill holes to form a complete outer contour; S1.5: The Canny differential operator is used again to accurately extract the outer contour.

4. The target recognition method based on the contour centroid height increment feature according to claim 1 is characterized in that: In S2.1, N valid feature points are extracted from the outer contour of the image by sampling at equal intervals and selecting a certain number of contour points. This includes the following steps: extracting a complete contour point set from the image contour, selecting the number of contour points N as N, dividing the total number of contour points m by the required number of points N to obtain the contour sampling distance m / N. The starting point of the contour points is randomly selected. It can be concluded that the larger the number of sampling points N, the more accurate the shape described. S2.2 uses the contour point set obtained in S2.1 and records it as P = {p i }(i=1,2,...,N), where N is the number of sampling points, p i is the i-th sampling point of the contour, and the sampling point p i (x i ,y i ), the calculation formula of the contour centroid W(x0,y0) is as follows:

5. The target recognition method based on the contour centroid height increment feature according to claim 1 is characterized in that: Extracting the centroid height increment feature of the target image in S3.1 specifically includes the following steps: S3.1: Determination of the height value of the contour centroid: The obtained height value represents the position of the sampling point on the contour. For the sampling point p i (x i ,y i ), set the center of mass height g i is the Euclidean distance between the point and the centroid W(x0,y0), that is: S3.2.1: Determination of centroid height increment: According to the centroid height value of N sampling points of the contour, set any sampling point p j (j=1,2,...N) and the current sampling point p i The difference in the center of mass height is the center of mass height increment h i,j , that is: h i,j =g j -g i (j=1,2,...N); S3.2.2: To obtain the centroid height increment sequence: All sampling points are relative to point p i The centroid height increments are arranged in the order of contour points to obtain the sampling point p i The center of mass height increment sequence H i ,Right now: S3.3: Obtaining the centroid height increment matrix: The centroid height increment sequence H corresponding to each point on the shape contour P i Arrange the contour points in order and get a matrix of size N×N: L(P)=(H1,H2,...,H N-1 ,H N ).

6. The target recognition method based on the contour centroid height increment feature according to claim 1 is characterized in that: The normalization process in S4.1 makes the centroid height increment feature of the contour sampling point scale invariant, and normalizes each row of the matrix: Among them, ||h t,j ||| is the modulus of the centroid height increment data.