A method and device for extracting target contour features based on feature point classification
By combining the eight-neighborhood tracking method and the Douglas-Pook algorithm, the target contour feature points are extracted and classified into line and arc feature points, the problem of large applicability and error of target contour feature extraction in the prior art is solved, and the target contour recovery with higher precision is achieved.
Patent Information
- Application Number
- CN202311070715.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-23
- Publication Date
- 2025-08-29
- Estimated Expiration
- 2043-08-23
AI Technical Summary
In the prior art, the target profile feature extraction method is insufficient in applicability and has large errors, making it difficult to accurately restore the target profile.
Using a method based on the combination of eight-neighborhood tracking method and Douglas-Pook algorithm, the target contour feature points are extracted and classified as straight line and arc feature points through edge detection, segmentation recognition and feature point classification.
Improve the accuracy of target profile recovery, reduce errors, and achieve more accurate target profile recovery.
Smart Images

Figure CN117132782B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of image processing, and in particular relates to a method and device for extracting target contour features based on feature point classification. Background Art
[0002] Computers typically store images using a raster image format, recording the pixel values at each pixel location in each image. This storage method consumes a large amount of memory. If only the shape of the target in the image needs to be transmitted in real time, such as the changes in the target's contour at the moment of rocket launch or target disintegration, it is desirable to record and transmit this information using a smaller amount of data. In this case, the target's contour features can be extracted from the image, allowing the storage and transmission of the target's contour information to be achieved by simply storing and transmitting the contour features. This also facilitates subsequent vector recovery of the target's contour based on the contour features. This approach is also known as image contour edge curve compression.
[0003] In the prior art, the target contour features extracted from images are mainly the feature points of the target's outer edges. Among them, there are currently three main approaches to extracting feature points from contour curves:
[0004] The first method is to calculate the curvature of each point on the curve. Currently, there are algorithms for extracting feature points based on curvature, and most of them use the method of local maximum curvature. There are two methods for calculating curvature in a curve. The first method is to find a point m on the curve. i , and then find two points m that are k distances before and after it i+k and point m i-k , respectively with m i Connect to form two vectors, find the cosine of the angle between these two vectors. The larger the cosine value, the greater the point m. i Another similar method of calculating curvature is to estimate the curvature by comparing the chord lengths: Similarly, find the point m i , click m i+k and dot m i-k Three dots, dot m i+k and dot m i-k Form a chord, compare point m i The ratio of the distance to the line to the chord length. The larger the ratio, the greater the m i However, when using curvature to determine which points on the contour need to be marked as feature points, different distance thresholds k should be selected for different curvatures. The determination of k value and the selection of curvature threshold are uncertain, the calculation is cumbersome and the accuracy is low.
[0005] The second method is to use the Harris operator. The Harris algorithm moves a window along the image, determines the grayscale change before and after the movement, and combines the autocorrelation function theory to determine whether there are feature points in the window. However, this method generally detects corner points. If the image edge is a relatively smooth curve, it is difficult to detect the existence of corner points. Therefore, the Harris algorithm also has certain limitations.
[0006] The third method is to use the classic Douglas - Peucker (DP) algorithm to extract the feature points of the target contour. The basic idea of this method is as follows: there is an unclosed curve. First, a virtual line is connected between the first and last points of this curve to form a straight line. Calculate the distances from all points between the curve to this straight line, and find the maximum distance d max , and compare d max with the threshold T: If d max < T, all the intermediate points on this curve will be discarded. If d max >= T, retain the coordinate points corresponding to d max , and take this point as the boundary to divide the curve into two parts. Repeat this method for these two parts. Stop the loop until the distances from all edge points to the corresponding line segments are less than the threshold. However, in practice, it is found that when using the feature points obtained by the Douglas - Peucker algorithm to connect points to form a graph to achieve the vector recovery of the target contour, there is still a certain deviation between the recovered target contour and the true target contour.
[0007] In summary, there is an urgent need for a target contour feature extraction method with strong applicability and small error. Summary of the Invention
[0008] To solve the above problems existing in the prior art, the present invention provides a target contour recovery method and device based on feature point extraction and classification.
[0009] The technical problems to be solved by the present invention are realized through the following technical solutions:
[0010] A target contour feature extraction method based on feature point classification includes:
[0011] Obtain the external contour map of the target in the image;
[0012] Based on the eight - neighborhood tracking method, perform edge detection on the external contour map to obtain the target edge contour; the target edge contour includes a set of ordered edge contour points;
[0013] Segment the target edge contour, and use the Douglas - Peucker algorithm to identify the feature points of each segmented curve respectively to obtain a set of ordered contour feature points;
[0014] The ordered set of contour feature points is subjected to feature point classification to obtain classification results that each contour feature point is a straight line feature point or an arc feature point, and the set of contour feature points and the classification results are used as the extracted target contour features.
[0015] In one embodiment, edge detection is performed on the contour image based on an eight-neighborhood tracking method to obtain a target edge contour, including:
[0016] Detecting straight line segments in the outline graph using Hough transform;
[0017] A straight line segment is randomly selected from the detected straight lines, and the contour feature points of the outline image are detected in sequence using the eight-neighborhood tracking method starting from any point on the straight line segment to obtain the target edge contour.
[0018] In one embodiment, the target edge contour is segmented, and the Douglas-Peucker algorithm is used to identify the feature points of each segment curve, thereby obtaining a set of ordered contour feature points, including:
[0019] Divide the target edge contour into two segments to obtain two curves;
[0020] The Douglas-Peucker algorithm is used to identify the characteristic points of the two curve segments respectively, and a set of ordered contour characteristic points is obtained.
[0021] In one embodiment, the set of ordered contour feature points is subjected to feature point classification to obtain a classification result that each contour feature point is a straight line feature point or an arc feature point, including:
[0022] Randomly select a contour feature point from the group of ordered contour feature points, and traverse the group of contour feature points in order starting from the contour feature point, with each group of three contour feature points as a group. During the traversal process, a circle is determined using each group of contour feature points, and the center and radius of the circle are calculated to correspond to the group of contour feature points;
[0023] Classify each group of contour feature points as belonging to a straight line or an arc based on the calculated center and radius;
[0024] According to the classification result of each group of contour feature points belonging to a straight line or an arc, the group of contour feature points is determined to be a straight line feature point or an arc feature point.
[0025] In one embodiment, the classification of each group of contour feature points as a straight line or an arc is performed based on the calculated center and radius, including:
[0026] If the deviation of the center coordinates corresponding to several consecutive groups of contour feature points is within the first threshold range, and the deviation of the radius corresponding to the several consecutive groups of contour feature points is within the second threshold range, then it is determined that the several consecutive groups of contour feature points belong to a circular arc; otherwise, it is determined that the several consecutive groups of contour feature points belong to a straight line.
[0027] In one embodiment, the method further comprises:
[0028] The vector of the target contour is restored based on the group of ordered contour feature points and the classification results thereof.
[0029] The present invention also provides a target contour feature extraction device based on feature point classification, comprising:
[0030] An acquisition module is used to obtain the outline of the target in the image;
[0031] A detection module is used to perform edge detection on the contour image based on an eight-neighborhood sorting algorithm to obtain a target edge contour; the target edge contour includes a set of ordered edge contour points;
[0032] A segmentation recognition module is used to segment the target edge contour and use the Douglas-Peucker algorithm to identify the feature points of each segment curve to obtain a set of ordered contour feature points;
[0033] The classification module is used to classify the set of ordered contour feature points to obtain a classification result that each contour feature point is a straight line feature point or an arc feature point, and use the set of contour feature points and their classification results as the extracted target contour features.
[0034] In one embodiment, the detection module is specifically configured to:
[0035] Detecting straight line segments in the outline graph using Hough transform;
[0036] A straight line segment is randomly selected from the detected straight line segments, and the contour feature points of the outline image are detected in sequence using an eight-neighborhood sorting algorithm starting from any point on the straight line segment to obtain the target edge contour.
[0037] In one embodiment, the classification module includes: a traversal submodule and a classification submodule;
[0038] The traversal submodule is used to select any contour feature point from the group of ordered contour feature points, and start from the contour feature point to traverse the group of contour feature points in order with each group of three contour feature points. During the traversal process, a circle is determined using each group of contour feature points, and the center and radius of the circle are calculated to correspond to the group of contour feature points.
[0039] The classification submodule is used to classify each group of contour feature points as belonging to a straight line or an arc according to the calculated center and radius of the circle, and determine whether the group of contour feature points belongs to a straight line or an arc according to the classification result of each group of contour feature points belonging to a straight line or an arc.
[0040] In one embodiment, the classification submodule classifies each group of contour feature points as belonging to a straight line or an arc according to the calculated center and radius, including:
[0041] If the deviation of the center coordinates corresponding to several consecutive groups of contour feature points is within the first threshold range, and the deviation of the radius corresponding to the several consecutive groups of contour feature points is within the second threshold range, then it is determined that the several consecutive groups of contour feature points belong to a circular arc; otherwise, it is determined that the several consecutive groups of contour feature points belong to a straight line.
[0042] The target contour feature extraction method based on feature point classification provided by the present invention extracts and classifies the feature points of the target contour into two categories: straight line feature points and circular arc feature points. The contour feature points and their classification results are used together as the extracted target contour features. Compared with the existing technology that does not classify feature points, the target contour features extracted by the present invention include the feature points and their classification. Therefore, when the target contour is subsequently restored based on the target contour features, the local contour of the target can be restored using a straight line segment connection method or different curve fitting methods based on the different categories of feature points. This allows for more accurate restoration of the target contour, reduces restoration errors, and improves the accuracy of target contour restoration.
[0043] The present invention will be further described in detail below with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] Figure 1 This is a flow chart of a method for extracting target contour features based on feature point classification provided by the present invention;
[0045] Figure 2 This is the principle diagram of the eight-neighborhood tracking method;
[0046] Figure 3 A schematic diagram of a group of ordered edge contour points obtained by the eight-neighborhood tracking method of the present invention;
[0047] Figure 4 is an image to be used for target contour feature extraction;
[0048] Figure 5 The present invention adopts Hough transform to Figure 4 The result of straight line segment detection;
[0049] Figure 6 The present invention uses the eight-neighborhood tracking method to Figure 4 The target edge contour is obtained by edge detection of the image shown;
[0050] Figure 7 The present invention uses the Douglas-Peucker algorithm to Figure 6 A set of ordered contour feature points identified from the target edge contour shown;
[0051] Figure 8 For the present invention Figure 7 The result of classification of contour feature points. DETAILED DESCRIPTION
[0052] The present invention will be further described in detail below with reference to specific examples, but the embodiments of the present invention are not limited thereto.
[0053] In order to realize a target contour feature extraction method with strong applicability and small error, the embodiment of the present invention provides a target contour feature extraction method based on feature point classification, such as Figure 1 As shown, the method includes the following steps:
[0054] S10: Obtain an outline image of the target in the image.
[0055] Specifically, the image is first grayscaled and binarized to obtain a black and white binary image with pixel values of only 0 and 1. The grayscale conversion can use the Otsu threshold method, but is not limited to this. Then, an edge extraction operator is used to extract the edges of the black and white binary image to obtain the outline of the target.
[0056] S20: performing edge detection on the contour image based on an eight-neighborhood tracking method to obtain a target edge contour; the target edge contour includes a set of ordered edge contour points.
[0057] Specifically, step S20 includes:
[0058] (1) Use Hough transform to detect straight lines in the contour image.
[0059] It can be understood that the Hough transform uses the point-line duality to map discrete pixel points on a straight line in the image space into curves in the Hough space through a parametric equation, and uses the intersection of multiple curves in the Hough space as parameters of the line equation to map them into straight lines in the image space. According to the voting mechanism, in the parameter space, when several straight lines intersect at a point and the number of straight lines is greater than a set threshold, it can be considered that the intersection corresponds to a line in the image space. Therefore, the embodiment of the present invention uses the Hough transform to detect straight lines in the contour image.
[0060] In practical applications, after detecting the straight line segments in the contour image using Hough transform, the coordinates of the first and last endpoints of each straight line segment can be recorded respectively to facilitate the subsequent determination of the arrangement order of the edge contour points.
[0061] (2) Select any straight line from the detected straight lines, and start from any point on the straight line to detect the contour feature points of the outline image in sequence using the eight-neighborhood tracking method to obtain the target edge contour.
[0062] Specifically, we randomly select a straight line from the detected straight lines and select an edge contour point on the straight line. Starting from this point, we traverse the eight neighborhoods of each edge contour point in the order of the edge contour points in the target edge contour, and then we can find the next edge contour point to be tracked. Figure 2 As shown in the figure, starting from the initial point a, traversing the eight-neighborhood of a, the next edge point b can be found in the 2-tracking direction of a, and b is recorded as the second edge point. Then, with b as the center point, eight-neighborhood tracking is performed, and the direction from a to b is set as the new initial tracking direction to quickly track to c. Each time a point is tracked, the count is increased by one for sorting. The edge points that have been traversed are marked to indicate that they have been sorted, avoiding repeated errors in the subsequent tracking process. And so on. Finally, when there are no unmarked edge points within the eight-neighborhood range of a certain point, the tracking ends, and a set of ordered edge contour points can be obtained. Figure 3 exemplarily shows a target edge contour consisting of a group of ordered edge contour points, where 1 is the first tracked edge contour point and 36 is the last tracked edge contour point.
[0063] S30: Segment the target edge contour, and use the Douglas-Peucker algorithm to identify the feature points of each segment curve, thereby obtaining a set of ordered contour feature points.
[0064] Here, the target edge contour can be divided into two ends or even multiple curve segments, which is all possible.
[0065] Exemplarily, segmenting the target edge contour and using the Douglas-Peucker algorithm to identify the feature points of each segmented edge contour to obtain a set of ordered contour feature points can include: dividing the target edge contour into two segments to obtain two curves; using the Douglas-Peucker algorithm to identify the feature points of the two curves to obtain a set of ordered contour feature points.
[0066] It's understandable that the classic DP algorithm compresses a curve, but the target edge contour in the embodiments of the present invention is a closed curve. Therefore, the closed target edge contour is first divided into two segments. The end point of the first segment is used as the starting point of the second curve, and the end point of the second curve is used as the starting point of the first curve. This avoids the generation of redundant points. After identifying feature points for each curve segment using the Douglas-Peucker algorithm, the order of these feature points in the target edge contour can be determined based on their order in the curve, resulting in a set of ordered contour feature points.
[0067] S40: performing feature point classification on the above-mentioned group of ordered contour feature points to obtain classification results that each contour feature point is a straight line feature point or an arc feature point, and using the group of contour feature points and the classification results as the extracted target contour features.
[0068] Specifically, in step S40, a set of ordered contour feature points are classified to obtain a classification result that each contour feature point is a straight line feature point or an arc feature point, which may include:
[0069] (1) Randomly select a contour feature point from the group of ordered contour feature points, and start from the contour feature point to traverse the group of contour feature points in order with three contour feature points as a group. During the traversal process, a circle is determined for each group of contour feature points, and the center and radius of the circle are calculated to correspond to the group of contour feature points.
[0070] (2) classifying each group of contour feature points as belonging to a straight line or an arc based on the calculated center and radius;
[0071] (3) According to the classification result of each group of contour feature points belonging to a straight line or an arc, the group of contour feature points is determined to be a straight line feature point or an arc feature point.
[0072] It is understandable that a circle can be determined for every three points. Therefore, in the embodiment of the present invention, the corresponding center and radius of each group of three ordered contour feature points obtained in step 30 are calculated, and this is used as the basis for identifying whether the local edge contour on the target edge contour is a straight line or an arc. If the deviation of the center coordinates corresponding to several consecutive groups of contour feature points is within the first threshold range, and the deviation of the radius corresponding to these groups of contour feature points is within the second threshold range, then it is considered that these groups of contour feature points can be fitted into the same arc, that is, it is determined that these groups of contour feature points belong to the arc, and correspondingly, all contour feature points in these groups of contour feature points can be marked as arc feature points; otherwise, the groups of contour feature points that do not meet the above criteria are determined to belong to a straight line, and accordingly, these contour feature points are marked as straight line feature points.
[0073] In addition, after preliminarily marking the type of feature points, in order to facilitate the subsequent connection of points into a graph, since the feature points at the junction of the arc segment and the straight line segment are both on the arc and on the straight line, and these points are also the starting point and end point of the arc, these points can actually be marked as special points.
[0074] In summary, the target contour feature extraction method based on feature point classification provided by the embodiment of the present invention extracts the feature points of the target contour and classifies the feature points into two categories: straight line feature points and arc feature points. The contour feature characteristics and their classification results are used together as the target contour features. Compared with the existing technology that does not classify feature points, the target contour features extracted by the embodiment of the present invention include feature points and their classification. In this way, when the target contour is subsequently restored based on the target contour features, the local contour of the target can be restored using a straight line segment connection method or different curve fitting methods according to the different categories of feature points. This can more accurately restore the target contour, reduce the restoration error, and improve the accuracy of the target contour restoration.
[0075] In one embodiment, the target contour feature extraction method based on feature point classification provided by an embodiment of the present invention may further include: performing vector recovery of the target contour based on a set of ordered contour feature points obtained in step S30 and the classification results of each contour feature point obtained in step S40.
[0076] For example, for two adjacent straight feature points, the straight line segment connection method is used to connect them. For two adjacent arc feature points, the curve fitting method is used to fit a curve between them. The specific fitting method is not limited in this embodiment of the present invention. In addition, if two adjacent feature points are a straight feature point and a special point, the straight line segment connection method is used to connect them. If two adjacent feature points are a circular feature point and a special point, the curve fitting method is used to fit a curve between them.
[0077] It is understandable that the feature points extracted using the Douglas-Peucker algorithm may be located on a straight line or on an arc. If the feature points are directly and uniformly connected with straight line segments, then for two feature points located on an arc, directly connecting the feature points with straight line segments will result in a discrepancy with the actual arc. In order to make the target edge contour line appear smooth, you can also choose to fit the curve between the feature points using methods such as cubic Bezier curve fitting or polynomial fitting curve; however, for two feature points located on a straight line, the curve fitting result will also be inconsistent with the actual straight line. Therefore, the embodiment of the present invention classifies the feature points extracted using the Douglas-Peucker algorithm, so that when performing vector restoration of the target contour, you can specifically select a suitable connection method to connect the feature points into a graph, thereby reducing the restoration error and improving the accuracy of the target contour restoration.
[0078] The following simulation experiment is used to further illustrate the beneficial effects of the embodiments of the present invention, and the simulation is implemented in MATLAB simulation software.
[0079] Figure 4 An image to be subjected to target contour extraction is shown, in which the target is an airplane. First, Hough transform is used to extract the target contour. Figure 4 Perform straight line segment detection, the result is as follows Figure 5 Then, based on the eight-neighborhood tracking method, Figure 4 The edge detection is performed on the outline image shown in the figure, and a set of ordered edge contour points are obtained as the target edge contour. The result is as follows Figure 6 Then, the target edge contour is divided into two parts, and the feature points are detected by using the two curves obtained by the Douglas-Peucker algorithm. The distance threshold is set to 2 pixels during the detection process. Several ordered feature points are detected as follows Figure 7 As shown in FIG, it can be seen that the nose of the aircraft is in an arc shape, so the feature points processed by the DP algorithm are relatively dense. Then, the classification method in the above step S40 is used to classify the Figure 7 The feature points in are classified, and the classification results are as follows Figure 8 As shown, the yellow feature points are straight line feature points, and the red feature points are arc feature points. Figure 8 It can also be seen in Figure 1 that after the classification results based on feature points are connected into a graph, the target contour obtained is very similar to the true contour of the target, with a small error.
[0080] The method provided in the embodiments of the present invention can be applied to electronic devices. Specifically, the electronic devices can be desktop computers, portable computers, smart mobile terminals, servers, etc. This is not limited here; any electronic device that can implement the present invention falls within the scope of protection of the present invention.
[0081] Based on the same inventive concept, an embodiment of the present invention further provides a target contour feature extraction device based on feature point classification, comprising:
[0082] An acquisition module is used to obtain the outline of the target in the image;
[0083] A detection module is used to perform edge detection on the contour image based on an eight-neighborhood sorting algorithm to obtain a target edge contour; the target edge contour includes a set of ordered edge contour points;
[0084] A segmentation recognition module is used to segment the target edge contour and use the Douglas-Peucker algorithm to identify the feature points of each segment curve to obtain a set of ordered contour feature points;
[0085] The classification module is used to classify the set of ordered contour feature points to obtain a classification result that each contour feature point is a straight line feature point or an arc feature point, and use the set of contour feature points and their classification results as the extracted target contour features.
[0086] Optionally, the detection module is specifically configured to:
[0087] Detecting straight line segments in the outline graph using Hough transform;
[0088] A straight line segment is randomly selected from the detected straight line segments, and the contour feature points of the outline image are detected in sequence using an eight-neighborhood sorting algorithm starting from any point on the straight line segment to obtain the target edge contour.
[0089] Optionally, the classification module includes: a traversal submodule and a classification submodule;
[0090] The traversal submodule is used to select any contour feature point from the group of ordered contour feature points, and traverse the group of contour feature points in order starting from the contour feature point, with each group of three contour feature points forming a group. During the traversal process, each group of contour feature points determines a circle, and calculates the center and radius of the circle to correspond to the group of contour feature points;
[0091] The classification submodule is used to classify each group of contour feature points as belonging to a straight line or an arc according to the calculated center and radius of the circle, and determine whether the group of contour feature points belongs to a straight line or an arc according to the classification result of each group of contour feature points belonging to a straight line or an arc.
[0092] Optionally, the classification submodule classifies each group of contour feature points as belonging to a straight line or an arc according to the calculated center and radius, including:
[0093] If the deviation of the center coordinates corresponding to several consecutive groups of contour feature points is within the first threshold range, and the deviation of the radius corresponding to the several consecutive groups of contour feature points is within the second threshold range, then it is determined that the several consecutive groups of contour feature points belong to a circular arc; otherwise, it is determined that the several consecutive groups of contour feature points belong to a straight line.
[0094] It should be noted that, for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0095] It should be noted that the terms "first," "second," and the like are used to distinguish similar objects and are not necessarily used to describe a specific order or precedence. It should be understood that the terms used in this manner are interchangeable where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure.
[0096] In the description of this specification, the reference terms "one embodiment," "some embodiments," "example," "specific example," or "some examples" mean that the specific features or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features or characteristics described can be combined in any suitable manner in one or more embodiments or examples. In addition, those skilled in the art can combine and combine different embodiments or examples described in this specification.
[0097] Although the present application is described herein in conjunction with various embodiments, in the process of implementing the claimed application, those skilled in the art may understand and implement other variations of the disclosed embodiments by reviewing the drawings and the disclosed content. In the description of the present invention, the word "comprising" does not exclude other components or steps, "one" or "a" does not exclude multiple situations, and "multiple" means two or more, unless otherwise clearly and specifically limited. In addition, certain measures are recorded in different embodiments, but this does not mean that these measures cannot be combined to produce good results.
[0098] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, devices (equipment), or computer program products. Therefore, the application can adopt the form of complete hardware embodiment, complete software embodiment, or the embodiment in combination with software and hardware, which are all collectively referred to as "module" or "system" herein. Moreover, the application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code. The computer program is stored / distributed in a suitable medium, provided together with other hardware or as a part of hardware, or other distribution forms can be adopted, such as by the Internet or other wired or wireless telecommunication systems.
[0099] The present application is described with reference to the flowcharts and / or block diagrams of the methods, apparatus (devices) and computer program products of the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0100] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.
[0101] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0102] The above is a further detailed description of the present invention in conjunction with specific preferred embodiments, and the specific implementation of the present invention should not be considered to be limited to these descriptions. For those skilled in the art of the present invention, without departing from the concept of the present invention, several simple deductions or substitutions can be made, which should be considered to fall within the scope of protection of the present invention.
Claims
1. A method for extracting target contour features based on feature point classification, characterized in that: include: Obtaining the outline of the target in the image; Performing edge detection on the outline image based on an eight-neighborhood tracking method to obtain a target edge contour; the target edge contour includes a set of ordered edge contour points; Segmenting the target edge contour, and using the Douglas-Peucker algorithm to identify the feature points of each segmented curve, to obtain a set of ordered contour feature points; Performing feature point classification on the set of ordered contour feature points to obtain classification results of each contour feature point being a straight line feature point or an arc feature point, and using the set of contour feature points and the classification results as the extracted target contour features; The target edge contour is segmented, and the Douglas-Peucker algorithm is used to identify the feature points of each segment curve to obtain a set of ordered contour feature points, including: Divide the target edge contour into two segments to obtain two curves; Using the Douglas-Peucker algorithm to identify the characteristic points of the two curve segments respectively, and obtain a set of ordered contour characteristic points; The step of performing feature point classification on the set of ordered contour feature points to obtain a classification result that each contour feature point is a straight line feature point or an arc feature point includes: Randomly select a contour feature point from the group of ordered contour feature points, and traverse the group of contour feature points in order starting from the contour feature point, with each group of three contour feature points as a group. During the traversal process, a circle is determined using each group of contour feature points, and the center and radius of the circle are calculated to correspond to the group of contour feature points; Classify each group of contour feature points as belonging to a straight line or an arc based on the calculated center and radius; Determine whether each group of contour feature points belongs to a straight line or an arc according to the classification result of the group of contour feature points; The classifying of each group of contour feature points as a straight line or an arc according to the calculated center and radius includes: If the deviation of the center coordinates corresponding to several consecutive groups of contour feature points is within the first threshold range, and the deviation of the radius corresponding to the several consecutive groups of contour feature points is within the second threshold range, then it is determined that the several consecutive groups of contour feature points belong to a circular arc; otherwise, it is determined that the several consecutive groups of contour feature points belong to a straight line.
2. The target contour feature extraction method based on feature point classification according to claim 1 is characterized in that: Performing edge detection on the outline image based on an eight-neighborhood tracking method to obtain a target edge contour includes: Detecting straight line segments in the outline graph using Hough transform; A straight line segment is randomly selected from the detected straight lines, and the contour feature points of the outline image are detected in sequence using the eight-neighborhood tracking method starting from any point on the straight line segment to obtain the target edge contour.
3. The target contour feature extraction method based on feature point classification according to claim 1 or 2, characterized in that: Also includes: The vector of the target contour is restored based on the group of ordered contour feature points and the classification results thereof.
4. A target contour feature extraction device based on feature point classification, characterized in that: include: An acquisition module is used to obtain the outline of the target in the image; A detection module is used to perform edge detection on the contour image based on an eight-neighborhood sorting algorithm to obtain a target edge contour; the target edge contour includes a set of ordered edge contour points; a segmentation recognition module, configured to segment the target edge contour and respectively identify the characteristic points of each segment curve using the Douglas-Peucker algorithm to obtain a set of ordered contour feature points; said segmenting the target edge contour and respectively identifying the characteristic points of each segment curve using the Douglas-Peucker algorithm to obtain a set of ordered contour feature points, comprising: dividing the target edge contour into two segments to obtain two curve segments; and respectively identifying the characteristic points of the two curve segments using the Douglas-Peucker algorithm to obtain a set of ordered contour feature points; a classification module, configured to classify the set of ordered contour feature points, obtain a classification result that each contour feature point is a straight line feature point or an arc feature point, and use the set of contour feature points and the classification result as the extracted target contour features; The classification module includes: a traversal submodule and a classification submodule; The traversal submodule is used to select any contour feature point from the group of ordered contour feature points, and start from the contour feature point to traverse the group of contour feature points in order with each group of three contour feature points. During the traversal process, a circle is determined using each group of contour feature points, and the center and radius of the circle are calculated to correspond to the group of contour feature points. The classification submodule is used to classify each group of contour feature points as belonging to a straight line or an arc according to the calculated center and radius of the circle, and determine whether the group of contour feature points belongs to a straight line or an arc according to the classification result of each group of contour feature points belonging to a straight line or an arc. The classification submodule classifies each group of contour feature points as belonging to a straight line or an arc according to the calculated center and radius, including: if the deviation of the center coordinates corresponding to several consecutive groups of contour feature points is within a first threshold range, and the deviation of the radius corresponding to the several consecutive groups of contour feature points is within a second threshold range, then it is determined that the several consecutive groups of contour feature points belong to an arc; otherwise, it is determined that the several consecutive groups of contour feature points belong to a straight line.
5. The target contour feature extraction device based on feature point classification according to claim 4 is characterized in that: The detection module is specifically used to: Detecting straight line segments in the outline graph using Hough transform; A straight line segment is randomly selected from the detected straight line segments, and the contour feature points of the outline image are detected in sequence using an eight-neighborhood sorting algorithm starting from any point on the straight line segment to obtain the target edge contour.
Citation Information
Patent Citations
Two-dimensional image edge straightening method and device based on corner detection
CN108898147A
Space target three-dimensional attitude reconstruction method based on distance and instantaneous speed
CN113640791A