Key contour point extraction method based on key edge points and Blob analysis

Through the method based on key edge point and Blob analysis, combined with gradient information and connected area marking algorithm, key contour points are screened and optimized, and the problems of inaccurate and inefficient contour point extraction in the existing technology are solved, achieving higher accuracy and robustness to meet real-time processing needs.

CN119131073APending Publication Date: 2024-12-13ZHUHAI BOTAO TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411176065.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-26
Publication Date
2024-12-13

AI Technical Summary

Technical Problem

The existing critical contour point extraction methods are not accurate when dealing with complex shapes and tiny defects, are easily affected by noise, and are inefficient, so they cannot effectively deal with complex shapes and objects with rich details.

Method used

Using a method based on key edge point and blob analysis, the threshold value and the Feature filtering, filter out potential key contour points and perform post-processing optimization.

Benefits of technology

Improve the accuracy and accuracy of key contour point extraction, enhance the robustness to noise, meet the real-time processing requirements, and can accurately extract key contour points in images with noise, providing reliable basic defect judgment and product quality Evaluate.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119131073A_ABST
    Figure CN119131073A_ABST
Patent Text Reader

Abstract

According to the key contour point extraction method based on the key edge points and Blob analysis, the key contour points can be accurately determined from the primarily screened Blob, a reliable basis is provided for subsequent defect judgment and product quality evaluation, the accuracy and precision of key contour point extraction are improved, and the key contour point extraction efficiency is improved. According to the method, the contour features of an object can be described more accurately, in addition, the method has good robustness to noise, reliable key contour points can be extracted from an image with noise, the calculation efficiency is improved, and the requirement for real-time processing can be met; the invention belongs to the technical field of visual detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of visual detection, and in particular relates to a key contour point extraction method based on key edge point and Blob analysis. Background Art

[0002] With the competition among products and the need to ensure that the quality and safety of product appearance meet the standards, product appearance defect detection is an indispensable step in product production. In product appearance detection, the extraction of key contour points is a key step, and its accuracy and efficiency directly affect the detection results.

[0003] Existing key contour point extraction methods mainly include methods based on traditional edge detection algorithms, morphological processing, and deep learning. Traditional edge detection methods can detect the approximate edge information in images, are relatively simple to calculate, and perform well in some simple scenes. Threshold-based segmentation methods are easy to operate and can quickly separate the target area. Deep learning-based methods have strong learning capabilities when processing large-scale data and can extract more accurate contour points.

[0004] With the continuous development of technology and the increasing demand for high-precision image processing in various industries, this key contour point extraction method has a very broad prospect and can be widely used in industrial fields such as 3C, electronic components, medical devices and semiconductors.

[0005] The existing key contour point extraction methods (such as those based on traditional edge detection algorithms, morphological processing, and deep learning) have many limitations. Specifically, the method based on the traditional edge detection operator attempts to obtain edge information by calculating the image gradient, but is easily affected by noise, resulting in discontinuous edges and poor accuracy, especially when dealing with complex shapes and small defects; the method based on threshold segmentation divides the image into regions according to the set grayscale or color threshold to obtain contours, but it is difficult to determine the appropriate threshold when the illumination is uneven or the object material is diverse, and segmentation errors are prone to occur; the method based on morphological operations such as expansion and corrosion processes the image to extract contours, but when facing objects with complex shapes and rich details, key contour information may be lost; the method based on feature extraction extracts contours through feature matching or classification, but such methods are complex in calculation, poor in real-time performance, and have high requirements for feature selection and extraction. Therefore, common contour point extraction methods often have problems such as low accuracy, sensitivity to noise, or inability to effectively process complex shapes and low efficiency. Summary of the invention

[0006] The purpose of the present invention is to provide a key contour point extraction method based on key edge points and Blob analysis to solve the problems of inaccurate and low efficiency of key contour point extraction in appearance defect detection in the prior art.

[0007] The key contour point extraction method based on key edge point and Blob analysis comprises the following steps: S1, image acquisition and preprocessing, which uses high-precision image acquisition equipment to obtain the appearance image of the product, and performs filtering and enhancement preprocessing operations on the appearance image to enhance image quality and reduce noise interference; S2, key edge point detection, which combines the gradient information and local features of the image, sets a threshold according to the strength and gradient amplitude attributes of the edge points, retains edge points with larger strength or gradient amplitude, and accurately detects key edge points with significant features; S3, Blob analysis, which performs binarization on the image containing key edge points, identifies different blobs through the connected component labeling algorithm, and calculates the features of each blob; S4, screening and determination of key contour points, which sets rules to screen potential contour points according to the area or perimeter characteristics of the Blob; S5, post-processing and optimization, which further smoothes, denoises and optimizes the extracted key contour points to improve their accuracy and stability.

[0008] In some embodiments, S2 comprises the following specific steps: S2-1, extract edge features from the preprocessed image, and obtain the edge features of the image by calculating the gradient amplitude and direction of the image. image exist and The gradient in the direction is calculated as ,in and Representing images The pixel coordinates of and Indicated in and The gradient in direction, Calculate the gradient magnitude and the gradient direction for ; S2-2. Setting the threshold , the input image is calculated to obtain a binary edge image, such as ; S2-3. Screen and refine the detected edges and remove those whose length is less than the minimum edge length. , The formula is ,in Neighboring edge pixels representing an edge.

[0009] In some embodiments, S3 includes the following specific steps: S3-1. Adjacent pixels are judged using the definition of 8-connected regions. Pixels with pixel value coordinates less than 1 and connected to each other form a connected region. The judgment is based on the following criteria: ; S3-2, calculate the characteristic value of each Blob, such as ,in represents the area of ​​the i-th Blob, like ,in represents the perimeter of the i-th Blob, like ,in Indicates the circularity of the i-th Blob.

[0010] In some embodiments, S3 includes the following specific steps: S4-1. Combine the key edge points and the results of Blob analysis to determine potential key contour points and calculate key edge points To each Blob Centroid The distance, such as ,in represents the jth key edge point, The i-th Blob centroid, Represents the distance from the jth key edge point to the centroid of the i-th Blob; S4-2. Setting distance threshold , Area Threshold , perimeter threshold , circularity threshold , when the corresponding Blob satisfies , , and When the edge point are potential key point contour points, forming a potential key contour point set P According to the steps, the present invention can achieve the following beneficial effects: Through the above detailed steps, key contour points can be accurately determined from the initially screened Blob, providing a reliable basis for subsequent defect judgment and product quality assessment, thereby improving the accuracy and precision of key contour point extraction and being able to more accurately describe the contour features of objects. In addition, it has good robustness to noise and can extract reliable key contour points in noisy images, thereby improving computational efficiency and meeting the needs of real-time processing. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] In order to more clearly illustrate the specific implementation of the present invention, the following is a brief description of the drawings and reference numerals required to be used in describing the specific implementation.

[0012] Figure 1 is a flow chart of the present invention; Figure 2 It is a schematic diagram of an application example of the present invention. DETAILED DESCRIPTION

[0013] In order to make the purpose, technical solutions and advantages of the present invention more clear, the present invention is further described in detail below in combination with specific implementation methods and with reference to the accompanying drawings.

[0014] like Figure 1 As shown, in the prior art of appearance defect detection, in order to solve the problems of inaccurate and inefficient key contour point extraction, this specific embodiment provides a key contour point extraction method based on key edge points and Blob analysis, which specifically includes the following steps.

[0015] S1. Image acquisition and preprocessing: It uses high-precision image acquisition equipment to obtain the appearance image of the product, and performs filtering and enhancement preprocessing operations on the appearance image to enhance image quality and reduce noise interference.

[0016] S2, key edge point detection: It combines the gradient information and local features of the image, sets a threshold according to the strength, gradient amplitude and other attributes of the edge points, retains edge points with larger strength or gradient amplitude, which are more likely to be located at the key position of the contour, so as to accurately detect key edge points with significant features; it specifically includes the following steps: S2-1, extract edge features from the preprocessed image, and obtain the edge features of the image by calculating the gradient amplitude and direction of the image. image exist and The gradient in the direction is calculated as: , in and Representing images The pixel coordinates of and Indicated in and The gradient in direction, Calculate the gradient magnitude and the gradient direction , ; S2-2. Setting the threshold , calculate the input image to obtain the binary edge image, like ; S2-3. Screen and refine the detected edges and remove those whose length is less than the minimum edge length. , The formula is , in Neighboring edge pixels representing an edge.

[0017] S3, Blob analysis: It performs binary processing on the image containing key edge points, identifies different blobs through the connected region labeling algorithm, and calculates the characteristics of each blob, such as area, perimeter, shape complexity, etc. It specifically includes the following steps: S3-1, judge the adjacent pixels, use the 8-connected region definition, the pixels whose pixel value coordinates are less than 1 and are connected to each other form a connected region, that is, a Blob; Among them, the judgment basis is as follows ; S3-2, calculate the characteristic value of each Blob, such as ,in represents the area of ​​the i-th Blob, like ,in represents the perimeter of the i-th Blob, like ,in Indicates the circularity of the i-th Blob.

[0018] S4, screening and determining key contour points: according to the area or perimeter of the Blob, set rules to screen potential contour points; specifically, the following steps are included: S4-1. Combine the results of key edge points and Blob analysis to determine potential key contour points and calculate key edge points To each Blob Centroid Distance , in represents the jth key edge point, The i-th Blob centroid, Represents the distance from the jth key edge point to the centroid of the i-th Blob; S4-2. Setting distance threshold , Area Threshold , perimeter threshold , circularity threshold , when the corresponding Blob satisfies , , and When the edge point are potential key point contour points, forming a potential key contour point set P.

[0019] S5, post-processing and optimization: further smoothing, denoising and optimization processing are performed on the extracted key contour points to improve their accuracy and stability.

[0020] Finally, output the image and key contours.

[0021] Through the above steps and comprehensive analysis, this specific implementation method can accurately determine the key contour points from the initially screened Blob, providing a reliable basis for subsequent defect judgment and product quality assessment; therefore, the accuracy and precision of key contour point extraction are improved, and the contour features of the object can be described more accurately. In addition, it has good robustness to noise and can extract reliable key contour points in images with noise. At the same time, it improves computing efficiency and can meet the needs of real-time processing.

[0022] In addition, in order to further illustrate the key contour point extraction method, the following application examples are listed.

[0023] The binary approximate image output by the detection method has a pixel value between 0 and 1. In order to enable the human eye to directly observe the significant area, its pixel value is multiplied by 255. The effect is as follows Figure 2 As shown in Figure 2. In the binary image, it can be observed that when the pixel value is greater than 21, it represents the defect area. Therefore, the area can be extracted using a pixel value less than 21. In this example, the pixel value 12 is used as the threshold, and the binary image is binarized to obtain a black and white image, as shown in Figure 2. Then, the polygonal outline surrounding the defect is extracted from the black and white image to achieve defect detection.

Claims

1. A key contour point extraction method based on key edge points and Blob analysis, characterized in that: The following steps are involved: S1, image acquisition and preprocessing, which uses high-precision image acquisition equipment to obtain the appearance image of the product, and performs filtering and enhancement preprocessing operations on the appearance image to enhance image quality and reduce noise interference; S2, key edge point detection, which combines the gradient information and local features of the image, sets a threshold according to the strength and gradient amplitude attributes of the edge points, retains edge points with larger strength or gradient amplitude, and accurately detects key edge points with significant features; S3, Blob analysis, which performs binarization on the image containing key edge points, identifies different blobs through the connected component labeling algorithm, and calculates the features of each blob; S4, screening and determination of key contour points, which sets rules to screen potential contour points according to the area or perimeter characteristics of the Blob; S5, post-processing and optimization, which further smoothes, denoises and optimizes the extracted key contour points to improve their accuracy and stability.

2. The key contour point extraction method based on key edge point and Blob analysis according to claim 1 is characterized in that: The S2 comprises the following specific steps: S2-1, extract edge features from the preprocessed image, and obtain the edge features of the image by calculating the gradient amplitude and direction of the image. image exist and The gradient in the direction is calculated as ,in and Representing images The pixel coordinates of and Indicated in and The gradient in direction, Calculate the gradient magnitude and the gradient direction ,like ; S2-2. Setting the threshold , the input image is calculated to obtain a binary edge image, such as ; S2-3. Screen and refine the detected edges and remove those whose length is less than the minimum edge length. , The formula is ,in Neighboring edge pixels representing an edge.

3. The key contour point extraction method based on key edge point and Blob analysis according to claim 1 is characterized in that: The S3 includes the following specific steps: S3-1. Adjacent pixels are judged using the definition of 8-connected regions. Pixels with pixel value coordinates less than 1 and connected to each other form a connected region. The judgment is based on the following criteria: ; S3-2, calculate the characteristic value of each Blob, such as ,in represents the area of ​​the i-th Blob, such as ,in represents the perimeter of the i-th Blob, like ,in Indicates the circularity of the i-th Blob.

4. The key contour point extraction method based on key edge point and Blob analysis according to claim 1, characterized in that: The S4 comprises the following specific steps: S4-1. Combine the key edge points and the results of Blob analysis to determine potential key contour points and calculate key edge points To each Blob Centroid The distance, such as ,in represents the jth key edge point, The i-th Blob centroid, Represents the distance from the jth key edge point to the centroid of the i-th Blob; S4-2. Setting distance threshold , Area Threshold , perimeter threshold , circularity threshold , when the corresponding Blob satisfies , , and When the edge point are potential key point contour points, forming a potential key contour point set P.

Citation Information

Patent Citations

  • Determination method and device for image detection region

    CN107862679A

  • BGA element identification and positioning method and system based on machine vision, and storage medium

    CN117392226A

  • Edge gradient detection method, stain defect detection method, edge gradient detection device and stain defect detection device

    JP2007172397A

  • Detection of blobs in images

    US20090180663A1