Visual inspection equipment and method
Through rotatable single vision module and automatic focus system, multi-angle image acquisition, combined with image fusion and feature matching algorithms, the problems of low detection accuracy and efficiency in the prior art are solved, and efficient and automated precision terminal surface line pattern detection is achieved.
Patent Information
- Application Number
- CN202510191374.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-20
- Publication Date
- 2025-05-27
AI Technical Summary
The existing precision terminal vision detection technology has high equipment investment, complex system integration, difficult image acquisition synchronization and automatic focus adjustment, and the multi-device configuration leads to differences in image quality and viewing angles, reducing detection accuracy and efficiency.
Multi-angle image acquisition is adopted with a rotatable single vision module, and combined with an automatic focus system, multiple sets of surface images from different viewing angles are obtained. Key features of the line pattern are extracted through image preprocessing, image fusion is performed to generate a comprehensive surface line pattern model, and the feature matching algorithm is used to compare with the standard line pattern, identify defect areas and classify them, and finally calculate the overall quality score.
It realizes multi-dimensional image acquisition and detection, reduces equipment costs, improves detection accuracy, efficiency and reliability, and realizes automatic detection of the entire process from image acquisition to quality evaluation.
Smart Images

Figure CN120044053A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of visual inspection, and particularly to a visual inspection device and method. Background Art
[0002] With the rapid development of microelectronics technology and intelligent manufacturing, precision terminals, as key components connecting electronic devices and circuit boards, play a crucial role in fields such as automotive electronics, communication equipment, and industrial automation. The surface circuit pattern of precision terminals directly affects their conductivity, signal transmission stability, and the overall product performance. Therefore, efficient and precise visual inspection technology has become the core link to ensure product quality. Currently, manufacturers' requirements for inspection equipment are increasing day by day. It is required that the inspection system not only has high resolution and multi-angle observation capabilities but also needs to achieve full-process automated inspection.
[0003] Existing precision terminal visual inspection technologies mainly rely on multiple sets of fixed inspection equipment or multiple vision modules to collect terminal surface images from different angles respectively, and then perform subsequent image stitching and defect comparison. Although this multi-device configuration can achieve multi-dimensional image acquisition to a certain extent, there are problems in the detection process such as high equipment investment, complex system integration, and great difficulties in synchronization and autofocus adjustment between image acquisitions. In addition, due to possible differences in the viewing angles and image quality between the inspection modules, subsequent feature extraction, defect recognition, and quality assessment are easily affected by error accumulation, thereby reducing the overall detection accuracy and efficiency. These defects not only increase production costs but also make it difficult to achieve efficient linkage from image acquisition to quality assessment in the automated inspection process.
[0004] In view of this, it is necessary to improve the visual inspection technology in the prior art to solve the technical problem that it cannot meet the high-precision multi-angle visual inspection requirements of precision terminals. Summary of the Invention
[0005] The purpose of the present invention is to provide a visual inspection device and method to solve the above technical problems.
[0006] To achieve this purpose, the present invention adopts the following technical solutions: A visual inspection method, comprising: Step S1, rotating a rotatable single vision module to perform multi-angle image acquisition on the surface of a precision terminal to obtain multiple sets of surface images with different viewing angles; wherein, after each rotation, the focal length of the vision module is adjusted through an autofocus system; Step S2, preprocessing the multiple sets of surface images with different viewing angles collected, and extracting key features of the circuit pattern in each set of surface images, where the key features include line width, spacing, continuity, and surface texture information; Step S3, based on the extracted key features, fuse the surface images from multiple different perspectives to generate a comprehensive surface circuit pattern model. Through a feature matching algorithm, compare the fused comprehensive surface circuit pattern model with the standard circuit pattern to identify local deviations and defect areas in the pattern. Step S4, according to the characteristic parameters of the standard circuit pattern, calculate the area, shape information, position, and edge gradient change of each defect area, and classify the defect areas through a preset classification rule. Step S5, according to the type, quantity, distribution, and severity of the defect areas, calculate the overall quality score of the surface circuit pattern of the precision terminal, compare the quality score with a preset qualified threshold, and determine whether the precision terminal is qualified.
[0007] Optionally, step S1 specifically includes: Step S11, install a rotatable single vision module at a preset position of the detection device, ensure that its rotation axis is perpendicular to the surface of the precision terminal, and perform initial calibration on the vision module through a calibration tool. Step S12, set the rotation angle sequence of the vision module and determine the corresponding focusing range for each angle. Step S13, place the precision terminal at the loading position of the turntable through a feeding mechanism, make the surface of the terminal parallel to the imaging plane of the vision module, use a positioning sensor to detect the position and angle of the terminal, and adjust the position of the terminal through a fine-tuning mechanism to align its center with the rotation axis of the vision module. Step S14, start the rotation mechanism of the vision module, rotate in sequence according to the preset rotation angle sequence, and after each rotation to the target angle, pause the rotation and start the image acquisition program. Step S15, after each rotation, adjust the focal length of the vision module through an autofocus system for focusing. Step S16, after each rotation and completion of focusing, start the vision camera for image acquisition, store the acquired images in real time, and attach metadata to sequentially obtain multiple groups of surface images from different perspectives. Step S17, after completing a round of multi-angle image acquisition, analyze the quality of each group of surface images through an image quality evaluation algorithm, dynamically adjust the rotation angle sequence according to the evaluation results, and feedback the optimized rotation angle sequence to the control system of the vision module for the next round of image acquisition.
[0008] Optionally, step S15 specifically includes: Step S151, calculate the clarity score of the current image using an image clarity evaluation function. Step S152: Dynamically adjust the focal length of the vision module through a closed-loop control algorithm until the clarity score reaches a preset threshold; Step S153: Record the focal length parameters after each focusing as the initial reference value for subsequent acquisitions at the same angle.
[0009] Optionally, step S2 specifically includes: Step S21: Load multiple groups of surface images collected from different perspectives from the storage system, read the additional metadata, and perform format standardization processing on the image data to uniformly convert it to a high-dynamic range image format; Step S22: Denoise each group of surface images. Use an adaptive filtering algorithm to remove random noise and interference in the images. Then, enhance the contrast of the images through histogram equalization to highlight the detailed features of the circuit patterns; Step S23: Based on the rotation angle information in the metadata, perform preliminary registration on multiple groups of surface images from different perspectives, and use a feature point matching algorithm to align the surface images; Step S24: Use an edge detection algorithm to extract the edges of the circuit patterns in the surface images. Fit the extracted edge points by the least squares method to generate continuous line contours, and record the starting point, ending point, and curvature information of each line contour; Step S25: Quantify the key features from the extracted line contours; Step S26: Store the extracted key features in the feature database and establish an index for each feature data.
[0010] Optionally, step S25 specifically includes: Calculate the width of each line through the edge gradient change to obtain the line width; Calculate the center distance between adjacent lines to obtain the line spacing; Evaluate the continuity of the lines by analyzing the break points and connection points of the lines; Extract the surface texture features through the gray-level co-occurrence matrix or local binary pattern to obtain the surface texture information.
[0011] Optionally, step S3 specifically includes: Step S31: Load the extracted key features from multiple perspectives from the feature database, Perform preprocessing of removing outliers and data normalization on the key features; Step S32: Based on the multi-perspective feature data, use a feature fusion algorithm to generate a comprehensive surface circuit pattern model. During the fusion process, dynamically adjust the weights according to the feature quality scores of different perspectives. Among them, the constructed comprehensive surface circuit pattern model includes the following information: Line contour: the starting point, ending point, curvature, and width of the merged line; Surface texture: the surface roughness and texture direction of the merged surface; Geometric relationship: the spacing, included angle, and connection relationship between lines; Step S33: Load a standard circuit pattern from the standard database. The standard circuit pattern includes standard line contour, surface texture, and geometric relationship information. Align the comprehensive surface circuit pattern model with the standard circuit pattern through a feature point matching algorithm so that they have a consistent reference benchmark in the same coordinate system; Step S34: Use a feature matching algorithm to compare the comprehensive surface circuit pattern model and the standard circuit pattern model; Calculate the local deviation between the two, including: Line position deviation: Calculate the offset of the line center line through the Euclidean distance; Line width deviation: Calculate the difference in line width; Surface texture deviation: Calculate the difference in surface texture through the gray-level co-occurrence matrix; Step S35: Identify the defective area according to the severity of the local deviation, and mark the defective area with the defective type, defective position, and defective size; Step S36: Store the comprehensive surface circuit pattern model, local deviation, and defective area into the storage system.
[0012] Optionally, step S4 specifically includes: Step S41: Load the defective area from the storage system, extract the annotation information of each defective area, calculate the area of the defective area through the pixel counting method, calculate the shape information of the defective area through contour analysis, and determine the position of the defective area on the surface of the precision terminal through coordinate system transformation; the shape information includes aspect ratio, circularity, and convex hull area ratio; Step S42: Calculate the gradient amplitude and direction of the edge of the defective area through edge detection to obtain the edge gradient change; Step S42: Quantify the extracted defective feature parameters, and standardize the quantified feature parameters. The quantification process includes: Area classification: Divide the defective area into three levels: small, medium, and large according to a preset threshold; Shape classification: Divide the defective shape into three categories: linear, circular, and irregular according to the aspect ratio and circularity; Edge gradient classification: Divide the edge gradient change into three levels: low, medium, and high according to the gradient amplitude; Step S43: Classify the defective areas according to the preset classification rules. The defect classification specifically includes: broken wire, short circuit, burr, and stain. Associate the classification results with the defective area data and store them in the database.
[0013] Optionally, step S5 specifically includes: Step S51: Assign weights according to the defect type and severity. Step S52: Score each defective area. The calculation formula is: Defect score = Defect area × Defect type weight × Severity coefficient. The severity coefficient is determined according to the edge gradient change and position distribution. Summarize the scores of all defective areas to obtain the total defect score. Step S53: Calculate the overall quality score of the surface circuit pattern of the precision terminal according to the total defect score and the total area of the circuit pattern. The calculation formula is: Overall quality score = 100 - (Total defect score / Total area of circuit pattern) × 100; Step S54: Compare the overall quality score with the preset qualified threshold. If the score ≥ qualified threshold, determine that the precision terminal is qualified and output the qualified result. If the score < qualified threshold, determine that the precision terminal is unqualified and output the unqualified result and specific defect information. Step S55: Store the overall quality score, qualified determination result, and detailed defect information in the database for quality traceability and analysis. Step S56: Generate process improvement suggestions according to the defect distribution and type.
[0014] The present invention also provides a vision inspection device, which realizes inspection by using the vision inspection method as described above. The vision inspection device includes a turntable assembly, and a feeding mechanism, a vision module, a discharging mechanism, and an NG sorting mechanism are sequentially arranged along its circumferential direction. A plurality of loading positions for positioning precision terminals are arranged on the upper end surface of the turntable assembly. The feeding mechanism includes a feeding manipulator and a feeding tray. The feeding manipulator is used to pick up the precision terminal from the feeding tray and place it at the loading position, and adjust the position of the precision terminal. The vision module is provided with a lifting assembly, and a rotating assembly is arranged at the driving end of the lifting assembly. The driving end of the rotating assembly is connected to the vision module.
[0015] Compared with the prior art, the present invention has the following beneficial effects: This visual detection method uses a rotatable single vision module to collect multi-angle images of the surface of precision terminals, combines an autofocus system to ensure image clarity. After preprocessing the collected multi-group images, key features of the circuit pattern are extracted, and a comprehensive surface circuit pattern model is generated through image fusion technology. Subsequently, a feature matching algorithm is used to compare the fused model with the standard circuit pattern to identify local deviations and defect areas. According to the area, shape information, position, and edge gradient change of the defect area, the defects are classified, and the overall quality score of the circuit pattern on the surface of the precision terminal is calculated. Finally, by comparing with the qualified threshold, it is determined whether the terminal is qualified. This method realizes multi-dimensional image acquisition and detection without multiple sets of detection equipment, which is beneficial to reducing equipment costs. At the same time, the entire process realizes full-process automated detection from image acquisition, feature extraction, defect identification to quality assessment, significantly improving the detection accuracy, efficiency, and reliability of the circuit pattern on the surface of precision terminals. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the following drawings are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.
[0017] The structures, ratios, sizes, etc. shown in the drawings of this specification are only used to cooperate with the content disclosed in the specification for those who are familiar with this technology to understand and read, and are not used to limit the limited conditions under which the present invention can be implemented. Therefore, they do not have technical essence. Any modification of the structure, change of the proportional relationship, or adjustment of the size, without affecting the effects that the present invention can produce and the purposes that can be achieved, should still fall within the scope that can be covered by the technical content disclosed in the present invention.
[0018] Figure 1 It is one of the structural schematic diagrams of the visual detection device for the second embodiment; Figure 2 It is one of the structural schematic diagrams of the visual detection device for the second embodiment; Figure 3 It is the flow schematic diagram of the visual detection method for the first embodiment. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0019] In order to make the object, features, and advantages of the present invention more obvious and understandable, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the embodiments described below are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
[0020] In the description of the present invention, it should be understood that the orientation or positional relationship indicated by the terms "upper", "lower", "top", "bottom", "inner", "outer", etc. is based on the orientation or positional relationship shown in the accompanying drawings, and is only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be construed as a limitation to the present invention. It should be noted that when a component is considered to be "connected" to another component, it can be directly connected to the other component or there may be an intermediate component present at the same time.
[0021] The technical solutions of the present invention will be further described below in conjunction with the accompanying drawings and through specific embodiments.
[0022] Embodiment 1: Combined with Figure 3 As shown, the embodiment of the present invention provides a visual detection method, including: Step S1, rotate a rotatable single vision module 30 to collect multi-angle images of the surface of the precision terminal, and obtain surface images of multiple different perspectives; wherein, after each rotation, the focal length of the vision module 30 is adjusted through an autofocus system; ensure the clarity of each group of images.
[0023] Through multi-angle collection and autofocus technology, the limitations of single-perspective detection are overcome, providing a high-quality data basis for subsequent image processing and analysis.
[0024] Step S2, preprocess the collected surface images of multiple different perspectives, and extract the key features of the circuit pattern in each group of surface images. The key features include line width, spacing, continuity, and surface texture information; the preprocessing includes denoising, contrast enhancement, and edge sharpening; Extract the detailed features that can reflect the quality of the circuit pattern from the original image, providing accurate input data for subsequent image fusion and defect recognition.
[0025] Step S3: Based on the extracted key features, fuse the surface images from multiple different perspectives to generate a comprehensive surface circuit pattern model. Through a feature matching algorithm, compare the fused comprehensive surface circuit pattern model with the standard circuit pattern to identify local deviations and defect areas in the pattern. Through multi - perspective image fusion and feature matching technology, comprehensive detection of the circuit pattern is achieved, and tiny deviations and defects can be accurately identified.
[0026] Step S4: According to the characteristic parameters of the standard circuit pattern, calculate the area, shape information, position, and edge gradient change of each defect area, and classify the defect areas through preset classification rules; the classification includes types such as broken wires, short circuits, burrs, and stains.
[0027] Step S5: According to the type, quantity, distribution, and severity of the defect areas, calculate the overall quality score of the surface circuit pattern of the precision terminal, and compare the quality score with a preset qualified threshold to determine whether the precision terminal is qualified.
[0028] The working principle of the present invention is as follows: This vision detection method performs multi - angle image acquisition on the surface of the precision terminal through a rotatable single vision module 30. Combining with an autofocus system to ensure image clarity, after pre - processing the collected multiple groups of images, extract the key features of the circuit pattern, and generate a comprehensive surface circuit pattern model through image fusion technology; subsequently, use a feature matching algorithm to compare the fused model with the standard circuit pattern to identify local deviations and defect areas; according to the area, shape information, position, and edge gradient change of the defect areas, classify the defects, and calculate the overall quality score of the surface circuit pattern of the precision terminal. Finally, determine whether the terminal is qualified by comparing with the qualified threshold; this method realizes multi - dimensional image acquisition and detection without multiple sets of detection equipment, which is beneficial to reducing equipment costs. At the same time, the entire process realizes full - process automated detection from image acquisition, feature extraction, defect identification to quality assessment, significantly improving the detection accuracy, efficiency, and reliability of the surface circuit pattern of the precision terminal.
[0029] In this embodiment, specifically, step S1 specifically includes: Step S11: Install the rotatable single vision module 30 at a preset position of the detection device, ensure that its rotation axis is perpendicular to the surface of the precision terminal, and perform initial calibration on the vision module 30 through a calibration tool; ensure that the reference positions of its rotation angle and focal length are accurate. After installation, perform initial calibration on the vision module 30 through a calibration tool to ensure that the optical axis of the module is parallel to the terminal surface, and adjust its focal length range to provide the best conditions for subsequent image acquisition.
[0030] Step S12, set the rotation angle sequence of the vision module 30 (such as 0°, 45°, 90°, 135°, 180°), and determine the corresponding focus range for each angle (such as the focal length range of 5mm - 50mm, with an accuracy of ±0.01mm); Determining the corresponding focus range for each angle can avoid image blurring or defocusing caused by angle changes. By setting a reasonable angle sequence and planning the focus range in advance, the system can ensure the clarity of the image at each angle.
[0031] Step S13, place the precision terminal on the loading position 11 of the turntable through the feeding mechanism 20, make the surface of the terminal parallel to the imaging plane of the vision module 30, detect the position and angle of the terminal using the positioning sensor, and adjust the position of the terminal through the fine-tuning mechanism to align its center with the rotation axis of the vision module 30; Detecting the position and angle of the terminal using the positioning sensor can ensure the placement accuracy of the terminal and avoid imaging problems caused by position deviation. Further adjusting the position of the terminal through the fine-tuning mechanism ensures that the center of the terminal is aligned with the rotation axis of the vision module 30.
[0032] Step S14, start the rotation mechanism of the vision module 30, rotate in sequence according to the preset rotation angle sequence, and after each rotation to the target angle, pause the rotation and start the image acquisition program; After rotating to each target angle, pause the rotation and start the image acquisition program to ensure that the image acquisition at each angle is carried out in a stable state, thereby avoiding image blurring due to vibrations during the rotation process.
[0033] Step S15, after each rotation, adjust the focal length of the vision module 30 for focusing through the autofocus system; The purpose of this step is to adjust the focal length of the vision module 30 through the autofocus system after each rotation to ensure the clarity of the image. As the rotation angle changes, the position and focusing requirements of the terminal surface will be different. Therefore, the autofocus system will adjust the focal length in real time to ensure that the image at each viewing angle is at the best focus position.
[0034] Step S16, after each rotation and completion of focusing, start the vision camera for image acquisition, store the acquired images in real time, and attach metadata to sequentially obtain multiple sets of surface images from different perspectives; Metadata such as rotation angle, focal length parameters, timestamp, etc., are convenient for subsequent processing and analysis.
[0035] Step S17, after completing a round of multi-angle image acquisition, analyze the quality of each group of surface images through an image quality assessment algorithm (such as an evaluation method based on edge sharpness), dynamically adjust the rotation angle sequence according to the evaluation results, and feedback the optimized rotation angle sequence to the control system of the vision module 30 for the next round of image acquisition.
[0036] Dynamically adjust, such as increasing the number of acquisitions at specific angles or adjusting the angle interval, to optimize the image coverage and detection accuracy.
[0037] In this embodiment, further description is as follows. Step S15 specifically includes: Step S151, calculate the sharpness score of the current image using an image sharpness evaluation function (such as the Tenengrad function or the Laplacian gradient function).
[0038] Step S152, dynamically adjust the focal length of the vision module 30 through a closed-loop control algorithm (such as PID control) until the sharpness score reaches a preset threshold (such as score ≥ 90%).
[0039] Step S153, record the focal length parameters after each focusing as the initial reference value for subsequent acquisitions at the same angle.
[0040] In this embodiment, specific description is as follows. Step S2 specifically includes: Step S21, load multiple groups of surface images acquired from different perspectives from the storage system, read the additional metadata, and perform format standardization processing on the image data, uniformly converting it to a high-dynamic-range image format (such as 32-bit floating-point TIFF format) to ensure the accuracy of subsequent processing; the HDR format can effectively improve the brightness range and detail performance of the image, enabling the image to maintain rich details and contrast in areas with large brightness differences, providing more accurate visual data for subsequent image processing.
[0041] Step S22, perform denoising processing on each group of surface images, using an adaptive filtering algorithm (such as non-local means filtering or wavelet transform denoising) to remove random noise and interference in the image, and then enhance the contrast of the image through histogram equalization to highlight the detailed features of the circuit pattern; The purpose of this step is to perform denoising processing on each group of surface images to remove random noise generated due to environmental interference or equipment errors during the acquisition process. By using an adaptive filtering algorithm, the filter parameters can be flexibly adjusted according to the local characteristics of the image, effectively removing different noise levels and avoiding detail loss caused by over-smoothing. Subsequently, histogram equalization technology is used to enhance the contrast of the image, improving the visibility of the detailed parts in the image, especially the contour and texture information of the circuit pattern, ensuring better recognition of pattern features in subsequent steps.
[0042] In step S23, based on the rotation angle information in the metadata, perform preliminary registration on multiple sets of surface images from different perspectives, and use a feature point matching algorithm to align the surface images; ensure that the images from different perspectives have a consistent reference benchmark in the same coordinate system; Based on the rotation angle information provided in the metadata, perform preliminary registration of multiple sets of surface images from different perspectives. Match and align the key points in the images through a feature point matching algorithm to ensure the accurate spatial correspondence of each set of images. This step provides a unified image coordinate system for subsequent image fusion and feature extraction by precisely aligning images at different angles. This image registration method ensures the accurate spatial relationship between images from different perspectives and avoids image misalignment in subsequent processing due to rotation angle errors.
[0043] In step S24, use an edge detection algorithm (such as Canny edge detection or Sobel operator) to extract the edges of the circuit patterns in the surface images, fit the extracted edge points by the least squares method to generate continuous line contours, and record the starting point, ending point, and curvature information of each line contour; Through an edge detection algorithm, extract the edge information of the circuit patterns from the surface images. The edge detection algorithm can efficiently find the boundaries with relatively drastic changes in brightness or color in the images. The extracted edge points are fitted by the least squares method to generate continuous line contours, making the contours of the circuit patterns smoother and more continuous. The starting point, ending point, and curvature information of each line contour are recorded, which provides important geometric information for subsequent circuit feature analysis and defect detection.
[0044] In step S25, quantify the key features from the extracted line contours; In step S26, store the extracted key features in the feature database and establish an index for each feature data (such as an index based on the rotation angle and image region).
[0045] In this embodiment, specifically, step S25 specifically includes: Calculate the width of each line through the edge gradient change to obtain the line width; Calculate the center distance between adjacent lines to obtain the line spacing; Evaluate the continuity of the lines by analyzing the break points and connection points of the lines (such as the number of break points ≤ 2); Extract the surface texture features through the gray-level co-occurrence matrix or local binary pattern to obtain the surface texture information.
[0046] In this embodiment, specifically, step S3 specifically includes: In step S31, load the extracted key features of multiple sets of different perspectives from the feature database, Preprocess the key features by removing outliers and normalizing the data; remove outliers (e.g., eliminate outliers by the 3σ principle) and normalize the data (e.g., normalize the line width and spacing to the range of 0-1) to ensure data consistency and comparability.
[0047] Step S32: Based on the multi-view feature data, use a feature fusion algorithm to generate a comprehensive surface circuit pattern model. During the fusion process, dynamically adjust the weights according to the feature quality scores of different views. The constructed comprehensive surface circuit pattern model includes the following information: Line contour: The starting point, ending point, curvature, and width of the fused line; Surface texture: The fused surface roughness and texture direction; Geometric relationship: The spacing, angle, and connection relationship between lines; Use the feature fusion algorithm to integrate the key feature data from different views and generate a comprehensive surface circuit pattern model. This model fuses the line contours (including starting point, ending point, curvature, and width), surface textures (such as roughness and texture direction), and geometric relationships (spacing, angle, and connection relationship between lines) of each view. During the fusion process, dynamically adjust the weights of each view feature in the overall model according to its quality score to ensure that high-quality data contributes more to the final model.
[0048] Step S33: Load the standard circuit pattern from the standard database. The standard circuit pattern includes standard line contour, surface texture, and geometric relationship information. Align the comprehensive surface circuit pattern model with the standard circuit pattern through a feature point matching algorithm to make them have a consistent reference benchmark in the same coordinate system; Align the generated comprehensive surface circuit pattern model with a predefined standard circuit pattern for accurate comparison and analysis. By loading the standard circuit pattern from the standard database, which contains standard line contour, surface texture, and geometric relationship information, and using a feature point matching algorithm to achieve the alignment of the two, the comprehensive model and the standard pattern are in the same coordinate system. This alignment process ensures that subsequent local deviation calculations have a unified reference benchmark and reduces the risk of misjudgment caused by coordinate system deviation.
[0049] Step S34: Use a feature matching algorithm to compare the comprehensive surface circuit pattern model and the standard circuit pattern model; Calculate the local deviation between the two, including: Line position deviation: Calculate the offset of the line centerline through the Euclidean distance; Line width deviation: Calculate the difference in line width; Surface texture deviation: Calculate the difference in surface texture through the gray-level co-occurrence matrix; The aligned comprehensive surface circuit pattern model and the standard circuit pattern model are carefully compared through a feature matching algorithm to accurately calculate the local deviation between the two. Specifically, the Euclidean distance is used to calculate the displacement of the line centerline to obtain the line position deviation, the line width data is compared to determine the width deviation, and the gray-level co-occurrence matrix is used to analyze the difference in surface texture to obtain the texture deviation. This step ensures that the deviation data can accurately reflect the subtle differences between the actual pattern and the standard pattern, providing a quantitative basis for defect detection.
[0050] Step S35: Identify the defect areas according to the severity of the local deviation, and label the defect type, defect position, and defect size of the defect areas. Defect types: such as broken lines, short circuits, burrs, stains, etc. Defect position: Mark the specific position of the defect in the comprehensive surface circuit pattern model. Defect size: Calculate the area, length, and width of the defect area (accuracy ±0.1μm). Based on the local deviation data calculated in step S34, identify the defect areas existing in the surface circuit pattern of the precision terminal. The system will automatically determine the type (such as displacement, abnormal width, or texture distortion), specific position, and size information of the defect according to the severity of the local deviation, and accurately label the defect area. This process can not only quickly locate potential problem areas but also provide intuitive and quantitative data support for subsequent quality assessment and improvement.
[0051] Step S36: Store the comprehensive surface circuit pattern model, local deviation, and defect areas in the storage system.
[0052] In this embodiment, specifically, step S4 specifically includes: Step S41: Load the defect areas from the storage system, extract the annotation information of each defect area, calculate the area of the defect area by pixel counting method, calculate the shape information of the defect area by contour analysis, and determine the position of the defect area on the surface of the precision terminal through coordinate system transformation; the shape information includes aspect ratio, circularity, and convex hull area ratio. Load the data of the defect areas from the storage system and extract the annotation information therein. By the pixel counting method, accurately calculate the area of the defect area to quantify the size of the defect. Using contour analysis technology, further analyze the shape of the defect area to obtain geometric shape features such as aspect ratio, circularity, and convex hull area ratio, which are helpful for identifying the type and form of the defect. Through coordinate system transformation, map the position information of the defect area to the position coordinates on the surface of the precision terminal to ensure that the position of the defect can be accurately compared and analyzed with other features of the terminal.
[0053] In step S42, the gradient magnitude and direction of the edges of the defect area are calculated through edge detection to obtain the edge gradient change. Through the edge detection algorithm, the gradient magnitude and direction of the edges of the defect area are calculated to identify the change characteristics of the edges. The gradient magnitude can reveal the significance of the edges, while the edge direction can reflect the contour trend of the defect boundary. By analyzing the edge gradient, the edge details of the defect area can be extracted, further enhancing the positioning and recognition of the defect area. This step is particularly important for the recognition of small defects and can help the system accurately distinguish some tiny and imperceptible abnormal points.
[0054] In step S42, the extracted defect feature parameters are quantized, and the quantized feature parameters are standardized. The quantization process includes: Area classification: The defect area is divided into three levels of small, medium, and large according to a preset threshold (e.g., small: <0.1 mm², medium: 0.1 mm² - 0.5 mm², large: >0.5 mm²); Shape classification: The defect shape is divided into three categories of linear, circular, and irregular according to the aspect ratio and circularity; Edge gradient classification: The edge gradient change is divided into three levels of low, medium, and high according to the gradient magnitude (e.g., low: <10, medium: 10 - 50, high: >50); Quantizing and standardizing the extracted defect features enables different types and sizes of defects to be compared and analyzed under a unified standard. First, the area of the defect is divided into three levels of small, medium, and large according to a preset threshold for classification processing. Second, the shape of the defect is classified by the aspect ratio and circularity, and the common shape types include linear, circular, and irregular shapes. Finally, the edge gradient change of the defect area is divided into three levels of low, medium, and high according to the magnitude of the gradient magnitude to evaluate the obviousness of the edges.
[0055] In step S43, according to the preset classification rules, the defect area is classified. The defect classification specifically includes: broken wire, short circuit, burr, and stain. The classification result is associated with the defect area data and stored in the database.
[0056] Broken wire: Linear shape, medium area, high edge gradient change; Short circuit: Irregular shape, large area, low edge gradient change; Burr: Small area, high edge gradient change, located at the edge of the line; Stain: Circular or irregular shape, low edge gradient change, located in the non-line area.
[0057] In this embodiment, specifically, step S5 specifically includes: Step S51: Assign weights according to the defect type and severity. For example: Broken wire: weight is 0.5 (severe defect); Short circuit: weight is 0.4 (severe defect); Burr: weight is 0.2 (medium defect); Stain: weight is 0.1 (minor defect); By evaluating the defect type (such as broken wire, short circuit, burr, stain, etc.) and the severity of the defect (such as size, position, and the obviousness of the edge), a weight value is assigned to each defect. Severe defects and defect types with greater impact will receive higher weights, while smaller or minor defects will be given lower weights.
[0058] Step S52: Score each defect area. The calculation formula is: Defect score = Defect area × Defect type weight × Severity coefficient; The severity coefficient is determined according to the edge gradient change and position distribution (for example, the high edge gradient change coefficient is 1.5, and the low edge gradient change coefficient is 1.0). Sum up the scores of all defect areas to obtain the total defect score. Quantitatively score each defect area. The calculation formula combines the area of the defect, the type weight, and the severity coefficient. In this way, the size, type of the defect, and its impact on the overall circuit pattern can be comprehensively evaluated. The severity coefficient is determined according to the edge gradient change (the obviousness of the edge) and the position distribution (the criticality of the position where the defect is located) of the defect. The system will sum up the scores of each defect area and finally obtain the total defect score.
[0059] Step S53: Calculate the overall quality score of the surface circuit pattern of the precision terminal according to the total defect score and the total area of the circuit pattern. The calculation formula is: Overall quality score = 100 - (Total defect score / Total area of the circuit pattern) × 100; Ensure that the range of the overall quality score is 0 - 100. The higher the score, the better the quality.
[0060] Step S54: Compare the overall quality score with a preset qualified threshold (such as ≥90 points is qualified). If the score ≥ qualified threshold, determine that the precision terminal is qualified and output the qualified result; If the score < qualified threshold, determine that the precision terminal is unqualified and output the unqualified result and specific defect information; The calculation formula of the quality score is based on the ratio of the total defect score to the total area of the overall circuit pattern. The lower the percentage value obtained, the better the quality of the circuit pattern. Through this scoring mechanism, the overall quality of the terminal surface circuit can be intuitively evaluated.
[0061] Step S55: Store the overall quality score, the pass / fail judgment result, and the defect details in a database for quality traceability and analysis.
[0062] Step S56: Generate process improvement suggestions based on the defect distribution and types. The system will provide optimization solutions for the production process according to the concentrated location, types, and severity of the defects to reduce similar defects in future production. These improvement suggestions may include production equipment adjustment, process parameter optimization, material selection, or improvement of the operation process.
[0063] Embodiment 2: Combined with Figures 1 to 2 As shown, the present invention also provides a vision inspection device, which implements inspection by using the vision inspection method of Embodiment 1. The vision inspection device includes a turntable assembly 10, and a loading mechanism 20, a vision module 30, a discharging mechanism 40, and an NG sorting mechanism are sequentially arranged along its circumferential direction; a plurality of loading positions 11 for positioning precision terminals are arranged on the upper end surface of the turntable assembly 10; The loading mechanism 20 includes a loading manipulator 21 and a loading tray 22. The loading manipulator 21 is used to pick up the precision terminals from the loading tray 22 and place them at the loading position 11, and adjust the positions of the precision terminals; the vision module 30 is provided with a lifting assembly 60, a rotating assembly 70 is arranged at the driving end of the lifting assembly 60, and the driving end of the rotating assembly 70 is connected to the vision module 30.
[0064] In the working process, a precision terminal is loaded from the loading mechanism 20 to the loading position 11 of the turntable. The turntable starts to drive the precision terminal to pass through the vision inspection mechanism for discharging or NG sorting. Conventional vision inspection devices are relatively simple and have limited detection capabilities for precision terminals, and cannot perform high-end precision inspections on precision terminals. Therefore, this solution improves this inspection device. The improvement idea is: first, improve the core vision inspection mechanism, and also improve the image processing method for obtaining a comprehensive variety of vision images.
[0065] As described above, the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements for some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A visual inspection method, characterized in that: include: Step S1, rotating a rotatable single visual module to collect multi-angle images of the surface of the precision terminal, and obtaining multiple sets of surface images at different viewing angles; wherein, after each rotation, the focal length of the visual module is adjusted by an automatic focusing system; Step S2, preprocessing the collected multiple groups of surface images at different viewing angles, extracting key features of the line pattern in each group of surface images, wherein the key features include line width, spacing, continuity, and surface texture information; Step S3, based on the extracted key features, multiple groups of surface images from different perspectives are fused to generate a comprehensive surface circuit pattern model, and the fused comprehensive surface circuit pattern model is compared with the standard circuit pattern through a feature matching algorithm to identify local deviations and defective areas in the pattern; Step S4, calculating the area, shape information, position and edge gradient change of each defective area according to the characteristic parameters of the standard circuit pattern, and classifying the defective areas according to a preset classification rule; Step S5, calculating the overall quality score of the circuit pattern on the surface of the precision terminal according to the type, quantity, distribution and severity of the defective area, comparing the quality score with a preset qualified threshold, and determining whether the precision terminal is qualified.
2. The visual inspection method according to claim 1, characterized in that: The step S1 specifically includes: Step S11, installing a rotatable single visual module at a preset position of the detection equipment, ensuring that its rotation axis is perpendicular to the surface of the precision terminal, and performing an initial calibration on the visual module using a calibration tool; Step S12, setting a rotation angle sequence of the visual module and determining a focus range corresponding to each angle; Step S13, placing the precision terminal at the loading position of the turntable through the loading mechanism, so that the terminal surface is parallel to the imaging plane of the vision module, using the positioning sensor to detect the position and angle of the terminal, and adjusting the position of the terminal through the fine-tuning mechanism so that its center is aligned with the rotation axis of the vision module; Step S14, starting the rotation mechanism of the visual module, rotating in sequence according to a preset rotation angle sequence, pausing the rotation and starting the image acquisition program after each rotation to the target angle; Step S15, after each rotation, adjusting the focal length of the visual module through the automatic focusing system to focus; Step S16, after each rotation and focusing, start the visual camera to collect images, store the collected images in real time, and add metadata to obtain multiple groups of surface images from different perspectives in sequence; Step S17, after completing a round of multi-angle image acquisition, analyze the quality of each group of surface images through an image quality assessment algorithm, dynamically adjust the rotation angle sequence according to the assessment results, and feed back the optimized rotation angle sequence to the control system of the visual module for the next round of image acquisition.
3. The visual inspection method according to claim 2, characterized in that: The step S15 specifically includes: Step S151, calculating the clarity score of the current image using an image clarity evaluation function; Step S152, dynamically adjusting the focal length of the visual module through a closed-loop control algorithm until the clarity score reaches a preset threshold; Step S153, recording the focal length parameters after each focusing as the initial reference value for subsequent acquisitions at the same angle.
4. The visual inspection method according to claim 2, characterized in that: The step S2 specifically includes: Step S21, loading multiple groups of surface images collected from different perspectives from the storage system, reading the attached metadata, performing format standardization processing on the image data, and uniformly converting them into a high dynamic range image format; Step S22, performing denoising processing on each group of surface images, using an adaptive filtering algorithm to remove random noise and interference in the image, and then enhancing the image contrast through histogram equalization to highlight the detailed features of the line pattern; Step S23, based on the rotation angle information in the metadata, preliminarily registering the plurality of groups of surface images at different viewing angles, and aligning the surface images using a feature point matching algorithm; Step S24, using an edge detection algorithm to extract the line pattern edges in the surface image, fitting the extracted edge points by the least squares method, generating continuous line profiles, and recording the starting point, end point and curvature information of each line profile; Step S25, quantifying key features from the extracted line profiles; Step S26, storing the extracted key features in a feature database, and creating an index for each feature data.
5. The visual inspection method according to claim 4, characterized in that: The step S25 specifically includes: The width of each line is calculated by edge gradient change to obtain the line width; Calculate the center distance between adjacent lines to obtain the line spacing; Assess the continuity of lines by analyzing their breakpoints and joins; Surface texture features are extracted through gray-level co-occurrence matrix or local binary pattern to obtain surface texture information.
6. The visual inspection method according to claim 1, characterized in that: The step S3 specifically includes: Step S31, loading multiple sets of key features from different perspectives extracted from the feature database, Preprocess key features to remove outliers and normalize data; Step S32, based on the multi-view feature data, a feature fusion algorithm is used to generate a comprehensive surface line pattern model. During the fusion process, the weight is dynamically adjusted according to the feature quality scores of different view angles. The constructed comprehensive surface line pattern model includes the following information: Line profile: starting point, end point, curvature and width of the merged line; Surface texture: surface roughness and texture direction after fusion; Geometric relationships: spacing, angles, and connections between lines; Step S33, loading a standard line pattern from a standard database, the standard line pattern including standard line profiles, surface textures and geometric relationship information, aligning the comprehensive surface line pattern model with the standard line pattern through a feature point matching algorithm, so that the two have a consistent reference datum in the same coordinate system; Step S34, using a feature matching algorithm to compare the comprehensive surface circuit pattern model with the standard circuit pattern model; Calculate the local deviation between the two, including: Line position deviation: The offset of the line centerline is calculated by Euclidean distance; Line Width Deviation: Calculates the difference in line width; Surface texture deviation: The difference in surface texture is calculated through the gray-level co-occurrence matrix; Step S35, identifying the defective area according to the severity of the local deviation, and marking the defective area with the defect type, defect location and defect size; Step S36, storing the comprehensive surface circuit pattern model, local deviation and defect area in a storage system.
7. The visual inspection method according to claim 1, characterized in that: The step S4 specifically includes: Step S41, extracting the annotation information of each defective area from the defective areas loaded in the storage system, calculating the area of the defective area by pixel counting method, calculating the shape information of the defective area by contour analysis, and determining the position of the defective area on the surface of the precision terminal by coordinate system conversion; the shape information includes aspect ratio, circularity and convex hull area ratio; Step S42, calculating the gradient amplitude and direction of the edge of the defective area by edge detection to obtain the edge gradient change; Step S42, quantizing the extracted defect characteristic parameters and standardizing the quantized characteristic parameters. The quantization process includes: Area classification: The defect area is classified into three levels: small, medium and large according to the preset threshold; Shape classification: Defect shapes are classified into three categories: linear, circular, and irregular according to aspect ratio and circularity; Edge gradient classification: The edge gradient change is divided into three levels: low, medium and high according to the gradient amplitude; Step S43, classifying the defective area according to the preset classification rules, the defect classification specifically includes: disconnection, short circuit, burr and stain, and associating the classification result with the defective area data and storing it in the database.
8. The visual inspection method according to claim 1, characterized in that: The step S5 specifically includes: Step S51, assigning weights according to defect type and severity; Step S52, scoring each defect area, the calculation formula is: defect score = defect area × defect type weight × severity coefficient; the severity coefficient is determined according to the edge gradient change and position distribution, and the scores of all defect areas are summarized to obtain the total defect score; Step S53, calculating the overall quality score of the circuit pattern on the surface of the precision terminal according to the total defect score and the total area of the circuit pattern, the calculation formula is: Overall quality score = 100 - (total defect score / total circuit pattern area) × 100; Step S54, comparing the overall quality score with a preset qualified threshold; If the score is ≥ the qualified threshold, the precision terminal is judged to be qualified and the qualified result is output; If the score is less than the qualified threshold, the precision terminal is judged as unqualified, and the unqualified result and specific defect information are output; Step S55, storing the overall quality score, qualified judgment results and defect detailed information in a database for quality tracing and analysis; Step S56, generating process improvement suggestions based on defect distribution and type.
9. A visual inspection device, characterized in that: The inspection is implemented by using the visual inspection method according to any one of claims 1 to 8, wherein the visual inspection device comprises a turntable assembly, and a loading mechanism, a visual module, a unloading mechanism and an NG sorting mechanism are sequentially arranged along the circumferential direction thereof; the upper end surface of the turntable assembly is provided with a plurality of loading positions for positioning precision terminals; The feeding mechanism includes a feeding manipulator and a feeding tray, wherein the feeding manipulator is used to clamp the precision terminal from the feeding tray to the loading position and adjust the position of the precision terminal; The visual module is provided with a lifting component, a driving end of the lifting component is provided with a rotating component, and the driving end of the rotating component is connected to the visual module.
Citation Information
Patent Citations
Electric wiring terminal defect detection system based on machine vision
CN109001215A
Insulator defect detection method, device, equipment and medium
CN116012380A
Visual inspection and quality evaluation method for small structural component of airplane
CN119354981A
Cited By
Multi-view vision double-area hole site detection device and method for large-format cutting piece
CN120609827A
Automobile seat quality multi-dimensional detection and identification method based on AI vision
CN120635042A
Permanent magnet defect detection method, device, equipment and medium
CN120741479A
A method, apparatus, device and medium for detecting defects of a permanent magnet
CN120741479B
Hub surface detection method based on machine vision
CN120931619A