CN-121280741-B - Rapid contour recognition method under complex background
Abstract
The invention relates to the technical field of contour recognition, in particular to a quick contour recognition method under a complex background, which comprises the steps of performing contour recognition training under the complex background by using a sample image, collecting contour attribute data to determine a plurality of first clear contour segments, determining a standard contour frame based on the performance parameters of the plurality of first clear contour segments, collecting contour attribute data of an image of a target detection area, determining a plurality of second clear contour segments to determine a plurality of contour matching segments, determining whether quick matching is triggered or not based on the duty ratio of the contour matching segments, determining the adjustment amount of contour recognition optimization parameters based on the plurality of second clear contour segments, processing the image of the target detection area by using the adjusted contour recognition optimization parameters, and re-acquiring the plurality of second clear contour segments to determine whether the quick matching is triggered or not. The invention improves the efficiency and the accuracy of rapid contour recognition under a complex background.
Inventors
- LV YONG
- LUO LIYUN
- HUANG RUI
- LI JIAHONG
- MAO JIANMING
- LI DONG
- QIN KE
- Qiu Gaoxue
- ZHENG LIHUA
- Shi Maochun
- GUAN WENFANG
- MAO YANNA
- XU XIAOHUA
Assignees
- 桂林毛嘉工艺品有限公司
- 桂林航天工业学院
Dates
- Publication Date
- 20260508
- Application Date
- 20251122
Claims (9)
- 1. The rapid contour recognition method under the complex background is characterized by comprising the following steps: Performing contour recognition training under a preset complex background condition by using a plurality of sample images, and collecting contour attribute data of the sample images, wherein the contour attribute data comprises edge intensity distribution, texture contrast parameters and reflection interference degree indexes; Generating a plurality of first profile attribute vectors based on the profile attribute data to divide a first profile attribute space; Determining a number of first distinct profile segments based on the high confidence regions in the first profile attribute space; Determining a plurality of clear feature segments based on performance parameters of the plurality of first clear profile segments to determine a corresponding standard profile frame, wherein the performance parameters include a length and a curvature of the profile segments; acquiring contour attribute data of an image of a target detection area in an actual production line, and generating a plurality of second contour attribute vectors so as to divide a second contour attribute space; determining a number of second distinct profile segments based on the high confidence regions of the second profile attribute space; determining a plurality of contour matching sections based on the similarity between each second clear contour section and each clear characteristic section; determining whether to trigger a quick match based on the duty cycle of the profile matching segment, comprising: calculating the ratio of the sum of the lengths of the profile matching sections to the perimeter of the standard profile frame; when the duty ratio exceeds a preset duty ratio threshold value, analyzing the spatial distribution uniformity of the profile matching section; determining triggering quick matching based on the spatial distribution uniformity being greater than a preset spatial distribution uniformity threshold; Under the condition that quick matching cannot be triggered, corresponding profile identification optimization parameters are obtained based on a plurality of second clear profile segments to determine adjustment amounts of the profile identification optimization parameters, wherein the profile identification optimization parameters comprise an edge detection threshold value, a filter kernel size and profile tracking sensitivity; processing the image of the target detection area in the actual production line by using the adjusted profile recognition optimization parameters so as to acquire a plurality of second clear profile sections again; it is determined whether to trigger a quick match based on the re-acquired number of second distinct contour segments.
- 2. The method for rapid contour recognition in a complex background according to claim 1, wherein, Generating a number of first profile-attribute vectors based on the profile-attribute data to divide a first profile-attribute space includes: Performing cluster analysis based on the plurality of first profile attribute vectors; And acquiring a vector set with the confidence coefficient larger than a preset first confidence coefficient threshold value in a first contour attribute vector cluster of the clustering center, and determining the vector set as a first contour attribute space.
- 3. The method for rapid contour recognition in a complex background according to claim 2, wherein, The process of determining a number of first distinct contour segments based on the high confidence regions of the first contour attribute space includes: Inverse mapping is carried out based on each vector in the first contour attribute space, and contour segments in the image space are restored; calculating average gradient strength and continuity indexes of each contour segment; screening a plurality of contour segments based on a first preset condition to determine the contour segments as first clear contour segments; the first preset condition is that the average gradient strength and the continuity index of each contour segment are larger than corresponding preset thresholds.
- 4. A method for rapid contour recognition in a complex background as defined in claim 3, Determining a plurality of distinct feature segments based on the performance parameters of the plurality of first distinct contour segments to determine a corresponding standard contour frame includes: Comparing the length and the curvature of each first clear outline segment with corresponding preset thresholds to determine a plurality of candidate feature segments; Selecting candidate characteristic sections appearing in samples with preset proportions as clear characteristic sections; a standard outline box is determined based on the smallest bounding rectangle of all the distinct feature segments.
- 5. The method for rapid contour recognition in a complex background of claim 4, The process of dividing the second profile-attribute space based on the number of second profile-attribute vectors includes: performing cluster analysis based on the plurality of second profile attribute vectors; And acquiring a vector set with the confidence coefficient larger than a preset second confidence coefficient threshold value in a second contour attribute vector cluster of the clustering center, and determining the vector set as a second contour attribute space.
- 6. The method for rapid contour recognition in complex contexts of claim 5, The process of determining a number of second distinct contour segments based on the high confidence regions of the second contour attribute space includes: inverse mapping is carried out based on each vector in the second contour attribute space, and contour segments in the image space are restored; calculating average gradient strength and continuity indexes of each contour segment; Screening the plurality of contour segments based on a second preset condition to determine the contour segments as second clear contour segments; the second preset condition is that the average gradient strength and the continuity index of each contour segment are larger than corresponding preset thresholds.
- 7. The method for rapid contour recognition in complex contexts of claim 6, The process of determining a plurality of contour matching segments based on the similarity of each second clear contour segment and each clear feature segment comprises: calculating the similarity of the curvature of each second clear outline section and each clear characteristic section and the relative direction; And when the curvature corresponding to each second clear outline section and the similarity of the opposite directions are larger than the corresponding preset threshold value, judging the outline matching section.
- 8. The method for rapid contour recognition in complex contexts of claim 7, And determining the adjustment quantity of the profile identification optimization parameter based on the difference value between the duty ratio of the profile matching section and a preset duty ratio threshold value and the difference value between the spatial distribution uniformity and a preset spatial distribution uniformity threshold value.
- 9. The method for rapid contour recognition in a complex background according to claim 1, wherein, And determining corresponding feature centers according to the second clear contour segments, and calculating the relative positions of the feature centers to match the contour centers and the positive contour directions so as to trigger quick matching.
Description
Rapid contour recognition method under complex background Technical Field The invention relates to the technical field of contour recognition, in particular to a rapid contour recognition method under a complex background. Background Along with the development of the fusion of industrial automation and machine vision technology, the target contour recognition under a complex background plays an increasingly critical role in the fields of product detection, quality control and the like, and the target contour recognition not only needs to deal with challenges such as illumination change, background texture interference and the like, but also needs to meet the dual requirements of instantaneity and accuracy so as to adapt to the rhythm of efficient production. However, the existing contour recognition method depends on fixed parameters and static templates, is difficult to dynamically adapt to real-time change of complex background, often has low efficiency due to the problems of incomplete edge extraction, misrecognition of background interference and the like, lacks a dynamic adjustment mechanism for the difference between a sample and an actual scene, and is difficult to stably play a role in a complex environment. The Chinese patent publication No. CN111626326A discloses a large-area multi-target diatom extraction and identification method under a complex background, which comprises the steps of extracting a background target of an image to be detected, classifying the extracted background target to obtain a complete diatom sample, carrying out external contour boundary identification and internal texture structure identification on the diatom sample to obtain a judgment result of boundary features and a judgment result of texture features in the diatom sample, and calculating the similarity of the diatom sample according to the judgment result of the boundary features, the judgment result of the texture features and preset weight values of all the features. It follows that the prior art has the following problems: Contour recognition under complex background interference does not consider combining sample training with fast and accurate matching of actual images, resulting in low efficiency and accuracy problems. Disclosure of Invention Therefore, the invention provides a rapid contour recognition method under a complex background, which is used for solving the problems of low efficiency and accuracy caused by the fact that contour recognition under the complex background interference is not considered and the combination of sample training and rapid and accurate matching of an actual image is not considered in the prior art. In order to achieve the above object, the present invention provides a method for rapid contour recognition in a complex background, comprising: Performing contour recognition training under a preset complex background condition by using a plurality of sample images, and collecting contour attribute data of the sample images, wherein the contour attribute data comprises edge intensity distribution, texture contrast parameters and reflection interference degree indexes; Generating a plurality of first profile attribute vectors based on the profile attribute data to divide a first profile attribute space; Determining a number of first distinct profile segments based on the high confidence regions in the first round profile attribute space; Determining a plurality of clear feature segments based on performance parameters of the plurality of first clear profile segments to determine a corresponding standard profile frame, wherein the performance parameters include a length and a curvature of the profile segments; acquiring contour attribute data of an image of a target detection area in an actual production line, and generating a plurality of second contour attribute vectors so as to divide a second contour attribute space; determining a number of second distinct profile segments based on the high confidence regions of the second profile attribute space; determining a plurality of contour matching sections based on the similarity between each second clear contour section and each clear characteristic section; Determining whether to trigger a quick match based on the duty cycle of the profile matching segment; Under the condition that quick matching cannot be triggered, corresponding profile identification optimization parameters are obtained based on a plurality of second clear profile segments to determine adjustment amounts of the profile identification optimization parameters, wherein the profile identification optimization parameters comprise an edge detection threshold value, a filter kernel size and profile tracking sensitivity; processing the image of the target detection area in the actual production line by using the adjusted profile recognition optimization parameters so as to acquire a plurality of second clear profile sections again; it is determined whether to trigger a qui