A visual inspection system for appearance defects of pressure sensors

By designing a visual detection system for appearance defects of pressure sensors integrated with multi-module, the problems of inefficiency and inaccuracy of traditional manual detection methods are solved, high-precision defect detection and classification are achieved, and production efficiency and product quality reliability are improved.

CN119198754BActive Publication Date: 2025-02-18ZHEJIANG YILI AUTO MOBILE AIR CONDITION CO LTD

Patent Information

Application Number
CN202411708054.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-27
Publication Date
2025-02-18
Estimated Expiration
2044-11-27

AI Technical Summary

Technical Problem

Traditional manual detection methods are inefficient and susceptible to human factors, resulting in inaccurate quality detection of pressure sensors during production, especially when there are changes in lighting conditions and a wide variety of defects, it is difficult to achieve high-precision defect detection.

Method used

A pressure sensor appearance defect visual detection system integrating light source control module, image acquisition module, image preprocessing module, feature extraction module, defect identification module, evaluation grading module, result display module and human-computer interaction module is designed. The system realizes high-precision defect detection and classification by automatically adjusting the lighting environment, image preprocessing, feature extraction and machine learning to identify defects.

Benefits of technology

It improves the accuracy and efficiency of pressure sensor defect detection, reduces manual intervention, and can detect a large number of products in a short time, ensuring the reliability of product quality and improvement of production efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119198754B_ABST
    Figure CN119198754B_ABST
Patent Text Reader

Abstract

The present invention discloses a pressure sensor appearance defect visual detection system, which relates to the field of defect visual detection technology, and includes a light source control module, an image acquisition module, an image preprocessing module, a feature extraction module, a defect recognition module, an evaluation and grading module, a result display module, and a human-computer interaction module integrated on an appearance defect AOI device, wherein electrical signals are connected between the modules. The pressure sensor appearance defect visual detection system can accurately identify tiny defects on the surface of the product through high-precision industrial cameras and advanced image processing technology. Compared with traditional manual detection methods, it has higher detection accuracy and can detect tiny scratches and dents that are difficult for the human eye to detect. At the same time, the automated detection process greatly shortens the detection time and improves production efficiency. The system can detect a large number of products in a short time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of defect visual detection, and in particular to a pressure sensor appearance defect visual detection system. Background Art

[0002] With the rapid development of modern industrial manufacturing technology, the requirements for product quality are getting higher and higher. As a precision device for measuring gas or liquid pressure, the production process of pressure sensor needs to go through multiple processes, including material preparation, processing and forming, welding, patch, packaging and other links. In these links, any tiny defect may cause the sensor performance to degrade or fail. Therefore, how to ensure the quality of pressure sensors in the production process has become an urgent problem to be solved. The traditional manual inspection method is not only inefficient, but also easily affected by human factors, resulting in inaccurate detection results. In order to solve this problem, the visual inspection system for appearance defects of pressure sensors came into being.

[0003] During the image acquisition stage, lighting conditions can easily cause changes in the apparent characteristics of the pressure sensor being inspected, which in turn affects the detection accuracy. In addition, there are many types and forms of appearance defects in pressure sensors, which further increases the difficulty of feature extraction and is prone to missed detection or false detection. Therefore, a visual detection system for pressure sensor appearance defects is proposed. Summary of the invention

[0004] To achieve the above objectives, the present invention is implemented through the following technical solutions: a pressure sensor appearance defect visual inspection system, including a light source control module, an image acquisition module, an image preprocessing module, a feature extraction module, a defect recognition module, an evaluation and grading module, a result display module and a human-computer interaction module integrated on an appearance defect AOI device, wherein the modules are connected by electrical signals;

[0005] The light source control module is equipped with automatic focus and exposure adjustment functions, adjusts the lighting environment, automatically initializes through system startup to read the preset light source settings, including focus, exposure time and light source intensity, sets the best lighting conditions in combination with the material, color and surface characteristics of the pressure sensor to be detected, and automatically adjusts the focus and exposure time based on the built-in ambient light sensor, the reflection characteristics of the pressure sensor to be detected and the detected ambient light changes, performs light source calibration, and provides stable and uniform lighting conditions to reduce the impact of ambient light changes on image acquisition;

[0006] The image acquisition module is used to capture the image data of the pressure sensor and use an industrial camera to take all-round photos of different surfaces of the product;

[0007] The image preprocessing module is used to preprocess the collected pressure sensor image, including denoising, contrast enhancement, and color correction, so as to improve image quality, reduce interference factors in the image, highlight defect features, and provide clear image data for subsequent feature extraction and defect detection;

[0008] The feature extraction module extracts edge, shape, and texture features related to defects from the preprocessed image, converts the image information into quantifiable feature data, and provides a basis for subsequent defect classification and identification;

[0009] The defect recognition module uses a machine learning model to recognize and classify defects based on the extracted feature data, identifies various defects on the pressure sensor, classifies them, and provides high-precision defect detection results;

[0010] The evaluation and grading module quantitatively evaluates the defects and classifies the defects according to the defect detection results;

[0011] The result display module makes OK / NG judgments based on the defect recognition results and controls the subsequent mechanical actions for separating NG products, thereby improving production efficiency and reducing manual intervention;

[0012] The human-computer interaction module provides an operation interface to intuitively display the test results and evaluation and grading results to the user, thereby improving the usability of the system and the convenience of operation.

[0013] Preferably, in the light source control module, the process of adjusting the lighting environment includes:

[0014] The light source control module starts up when the appearance defect AOI equipment is started up and enters the initialization state, and then reads the initial settings of the light source from the system configuration, including focal length, exposure time, and light source intensity, and calibrates the light source according to the preset standard light source conditions to ensure that the initial state of the light source meets the detection requirements;

[0015] The ambient light sensor built into the light source control module detects the light changes in the surrounding environment in real time and sets the optimal lighting conditions including light intensity, angle and color temperature;

[0016] According to the changes in ambient light and the size and appearance of the pressure sensor to be detected, the focal length of the light source is automatically adjusted to ensure that the light can be accurately focused on the surface of the pressure sensor. The focal length is adjusted through a built-in motor to ensure the accuracy and stability of the adjustment. According to the intensity of the ambient light and the reflection characteristics of the pressure sensor, the exposure time of the light source is automatically adjusted to ensure that the collected image has appropriate brightness and contrast. The exposure time is adjusted by adjusting the intensity of the light source;

[0017] When the image acquisition module is ready to shoot, it sends a trigger signal to the light source control module. After receiving the trigger signal, the light source control module makes a final adjustment to the light source according to the preset parameters and the ambient light conditions monitored in real time, so that the shooting action of the light source and the image acquisition module are synchronized. When the light source is stable and the shooting conditions are met, the image acquisition module starts to shoot the image data of the pressure sensor;

[0018] When all the pressure sensors to be tested have completed shooting and testing, the light source control module receives the detection completion signal sent by the system and adjusts the light source to the initial state according to the preset reset parameters to prepare for the next detection. If the system does not perform detection tasks for a long time, the light source control module enters a sleep state to reduce energy consumption and extend service life.

[0019] Preferably, in the image acquisition module, the process of capturing the pressure sensor image data includes:

[0020] According to the size, appearance and inspection requirements of the pressure sensor to be inspected, the parameters of 5 industrial cameras are configured, including resolution, frame rate, exposure time parameters, and the equipment parameters of the appearance defect AOI equipment are adjusted. Among them, the air pressure is 0.3Mpa, the voltage is 220V, and the time beat is 32 seconds / 10 pieces. The appearance defect AOI equipment uses 4040 aluminum profile as the upper frame and 5050 square tube welded sheet metal as the lower frame. The outer shell is made of profile sheet metal and acrylic plate, which has certain seismic resistance.

[0021] Put 10 pressure sensor products to be tested into the fixture, place the production line peripheral jig from the right window of the equipment onto the servo mobile platform, start the appearance defect AOI equipment, trigger the start button, the servo works, the fixture moves to the visual inspection station, and 2 groups of industrial cameras identify product defects respectively;

[0022] An industrial camera is used to shoot the front and side views of the pressure sensor to be inspected. First, the front view of the pressure sensor is photographed to obtain its overall appearance and main features. Then, the side view of the pressure sensor is photographed to capture edge defects and shape changes, so as to obtain more comprehensive image data.

[0023] Preferably, in the image preprocessing module, the process of preprocessing the collected pressure sensor image includes:

[0024] Receive the original image data from the image acquisition module, and perform pre-processing operations of denoising, contrast enhancement and color correction on the original image data;

[0025] Apply a denoising algorithm to denoise the image data to remove noise in the image caused by sensor defects, transmission errors or environmental factors, such as random noise, spots or stripes. Enhance the contrast of the image through the histogram equalization method to adjust the grayscale distribution of the image to make it more uniform, thereby enhancing the contrast and increasing the brightness difference between different areas in the image to make the defect features more obvious. Use a color correction matrix method to apply a 3x3 matrix to transform the RGB values ​​of the image to correct color deviation and eliminate color deviation caused by lighting conditions, equipment differences or color distortion;

[0026] The preprocessed image data is output and transmitted to the feature extraction module for further processing.

[0027] Preferably, in the feature extraction module, the process of extracting defect-related features includes:

[0028] Based on the preprocessed image data, the Canny edge detection algorithm is applied to identify and extract the edge contours in the image, and the image is Gaussian filtered to reduce the impact of noise on edge detection. The Sobel operator is used to calculate the gradient strength and direction of the image. Along the gradient direction, only the pixel points with the largest gradient strength are retained as edge points. A high and low threshold are set. An initial edge map is obtained through the high threshold, and a relatively complete edge map is obtained through the low threshold. The initial edge map is then used to connect the edges in the low threshold edge map, and then an edge feature image is output, which contains the edge contours in the image.

[0029] Based on the edge detection results, the contour is extracted from the edge feature image, and the geometric features of the perimeter, area, aspect ratio, and circularity of the region of interest are calculated. The shape features are quantified using the Hu rectangular descriptor, which can resist the translation, rotation, and scale changes of the image and quantify the number of shape features;

[0030] The texture analysis technology of gray-level co-occurrence matrix is ​​applied to quantify the gray level of the image to reduce the computational complexity, count the frequency of gray value pairs of adjacent pixels (in a specific direction and distance) in the image, calculate the spatial relationship between the gray values ​​of pixels in the image, construct the gray-level co-occurrence matrix, extract the texture features of contrast, energy, homogeneity, and correlation from the gray-level co-occurrence matrix, and quantify the texture feature data;

[0031] The extracted edge, shape and texture features are converted into quantifiable data, and the features are normalized using min-max normalization. The feature data is scaled to a uniform scale range to eliminate the impact of dimensions between different features and make the features comparable. The extracted feature data is then output for use by the defect recognition module.

[0032] Preferably, in the defect recognition module, the defect recognition and classification process includes:

[0033] Collect a large amount of image data of pressure sensors in advance, including OK (qualified) product samples and defective samples. Defective samples include incomplete welding, CM skew, solder joint connection, patch skew, and incomplete welding;

[0034] Annotate the collected image data to clearly indicate the location, type and severity of defects;

[0035] Using the feature extraction method of the feature extraction module to extract feature data of texture, shape, and color, a feature data set is obtained, and the feature data set is divided into a training set and a test set;

[0036] Use the marked feature data in the training set data and the convolutional neural network model to build a defect recognition and classification model. During the training process, the model learns how to identify and classify defects based on feature information, and uses the test set data to verify the performance of the model, evaluate the accuracy and generalization ability of the model, and adjust the model parameters based on the verification results to optimize the model performance;

[0037] The pressure sensor image to be inspected is input into the trained defect recognition and classification model, the defects on the pressure sensor are identified and classified, and the defect recognition and classification model is used to output whether the defect exists and the type of the defect;

[0038] Analyze the results of the defect recognition and classification model output, determine the presence and type of defects, visualize the model output results, mark the defect location and display the defect type.

[0039] Preferably, in the evaluation and grading module, the process of quantifying evaluation defects includes:

[0040] According to the characteristics and use requirements of the pressure sensor, combined with the size, location, type, and quantity evaluation indicators of the defects, the impact of the defects is clarified;

[0041] Set evaluation criteria and thresholds for each evaluation indicator, including acceptable ranges, critical values, and unacceptable values, and classify defects into different defect levels, namely, minor defect level, medium defect level, severe defect level, and fatal defect level. Among them, the minor defect level corresponds to a smaller defect size, a non-critical location, and a defect type that does not affect performance; the medium defect level corresponds to a larger defect size, a defect in a critical location but does not affect safety performance; the severe defect level corresponds to a defect that affects sensor performance but has not yet caused failure; and the fatal defect level corresponds to a defect that directly causes sensor failure or safety hazards;

[0042] Collect the defect detection results from the defect recognition module, including the location, type, size, and quantity of the defects. According to the evaluation criteria and classification rules, quantify and evaluate each evaluation indicator, calculate the evaluation value of each indicator, and classify it into corresponding defect levels according to the set threshold.

[0043] According to the importance of each evaluation index on sensor performance, its weight is determined, and combined with the evaluation value of each evaluation index, the comprehensive defect evaluation coefficient is calculated to analyze the overall severity of the defect and its impact on sensor performance;

[0044] According to the defect assessment coefficient, the defects are divided into corresponding levels to ensure that each defect is correctly classified into its corresponding defect level, and the defect level information is output to the assessment report. The report includes the defect location, type, size, defect assessment coefficient, defect level and subsequent processing suggestions.

[0045] Preferably, the calculation expression of the defect assessment coefficient is:

[0046] ;

[0047] in, is the defect assessment coefficient, It is the size score of the defect. The defect size refers to the defect area. and are the minimum and maximum values ​​of the defect size score, is the number of defects score, and are the minimum and maximum values ​​of the defect quantity score, is the impact factor score of the defect location, is the maximum value score of the defect location impact factor, The value range is between 0 and 1. Close to minimum hour, Close to 1, when the defect count score Close to maximum hour, Close to 0, when the impact factor score of the defect location When increasing, Reduced due to Decrease, causing the value inside the square root to increase.

[0048] Preferably, the plurality of defect levels correspond to a plurality of distinction thresholds based on defect assessment coefficients, wherein the distinction thresholds include an upper threshold and a lower threshold;

[0049] Slight Defect Level: ; Minor defect levels correspond to smaller defect sizes, non-critical locations, and defect types that do not affect performance, indicating that the impact of the defects is small;

[0050] Medium defect level: ; Medium defect level corresponds to defects with larger defect size and critical position but not affecting safety performance, indicating that the impact of the defect is medium;

[0051] Severe defect level: ; The severe defect level corresponds to defects that affect the performance of the sensor but have not yet caused failure, indicating that the impact of the defect is serious;

[0052] Fatal defect level: ; The fatal defect level corresponds to defects that directly lead to sensor failure or safety hazards, indicating that the impact of the defect is fatal;

[0053] in, is the defect assessment coefficient, is the upper threshold of the slight defect level, is the lower threshold corresponding to the slight defect level and the upper threshold corresponding to the medium defect level, is the lower threshold corresponding to the medium defect level and the upper threshold corresponding to the severe defect level, is the lower threshold corresponding to the severe defect level and the upper threshold corresponding to the fatal defect level, , , , .

[0054] Preferably, in the result display module, the specific process of OK / NG judgment includes:

[0055] Receive output results on the presence and type of defects from the defect recognition module, and set OK (qualified) / NG (unqualified) judgment criteria based on the output of the evaluation and grading module, set pressure sensors with slight defect levels and medium defect levels as OK (qualified) products, and set pressure sensors with severe defect levels and fatal defect levels as NG (unqualified) products;

[0056] According to the set standards, each pressure sensor is judged as OK (qualified) or NG (unqualified). The NG unloading fool-proofing mechanism of the appearance defect AOI equipment is combined with the visual inspection results to extend the cylinder to block the OK products to prevent them from being removed by mistake.

[0057] Workers take out NG products according to the displayed test results and put them into the NG unloading chute. Workers take out the fixture containing the remaining OK products. At the same time, the result display module automatically records the test results of each time, including detailed information of OK and NG products, and the execution status of the corresponding mechanical actions.

[0058] The present invention provides a visual inspection system for appearance defects of pressure sensors. It has the following beneficial effects:

[0059] 1. The pressure sensor appearance defect visual inspection system uses high-precision industrial cameras and advanced image processing technology to accurately identify tiny defects on the product surface. Compared with traditional manual inspection methods, it has higher inspection accuracy and can detect subtle scratches and dents that are difficult for the human eye to detect. At the same time, the automated inspection process greatly shortens the inspection time and improves production efficiency. The system can inspect a large number of products in a short period of time.

[0060] 2. The visual inspection system for appearance defects of pressure sensors can automatically classify products according to preset qualification standards and distinguish qualified products from unqualified products. It not only reduces the tediousness of manual classification, but also avoids misjudgment and missed judgment caused by human factors, further improving the accuracy and reliability of detection. It can adapt to the detection needs of sensors of different sizes, appearances and types through feature extraction and defect recognition algorithms, and can adjust the light source and camera parameters according to the characteristics and detection requirements of the actual products to adapt to different detection tasks. BRIEF DESCRIPTION OF THE DRAWINGS

[0061] Figure 1 A module structure diagram of a visual inspection system for appearance defects of a pressure sensor according to the present invention;

[0062] Figure 2 A flow chart for identifying and classifying defects of the present invention;

[0063] Figure 3 Flowchart for quantitatively evaluating defects for the present invention. DETAILED DESCRIPTION

[0064] The present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments. The embodiments of the present invention are provided for the purpose of illustration and description, and are not intended to be exhaustive or to limit the present invention to the disclosed forms. Many modifications and variations will be apparent to those of ordinary skill in the art. The embodiments are selected and described in order to better illustrate the principles and practical applications of the present invention, and to enable those of ordinary skill in the art to understand the present invention and thereby design various embodiments with various modifications suitable for specific uses.

[0065] The first embodiment, as Figure 1 , Figure 2As shown, the present invention provides a technical solution: a pressure sensor appearance defect visual inspection system, including a light source control module, an image acquisition module, an image preprocessing module, a feature extraction module, a defect recognition module, an evaluation and grading module, a result display module and a human-computer interaction module integrated on an appearance defect AOI device, wherein the modules are connected by electrical signals;

[0066] The light source control module is equipped with automatic focus and exposure adjustment functions to adjust the lighting environment. It automatically initializes through system startup to read the preset light source settings, including focus, exposure time and light source intensity. It sets the best lighting conditions in combination with the material, color and surface characteristics of the pressure sensor to be detected. It automatically adjusts the focus and exposure time based on the built-in ambient light sensor, the reflection characteristics of the pressure sensor to be detected and the changes in the detected ambient light, and performs light source calibration to provide stable and uniform lighting conditions to reduce the impact of ambient light changes on image acquisition, improve image contrast and clarity, make defect features more obvious, and help improve detection accuracy. The light source control module is started when the appearance defect AOI equipment is started, and enters Initialization state, and then read the initial settings of the light source from the system configuration, including focal length, exposure time, and light source intensity, and calibrate the light source according to the preset standard light source conditions. The preset standard focal length parameter is 8 mm to ensure that the entire surface of the sensor is within the camera's field of view and the image is clear. For focal length calibration, the camera lens is automatically adjusted until the best field of view and clarity are obtained to achieve the calibration process. The preset standard exposure time is 1 / 1000 second (s) to avoid overexposure. For exposure time calibration, the exposure time is adjusted according to the ambient light and sensor reflection characteristics to obtain the best image brightness and contrast. The preset standard light source intensity is 50% to avoid excessive reflection. For light source intensity calibration The calibration process is completed by adjusting the brightness of the light source until the sensor surface in the image is evenly illuminated and the defect features are obvious. Ensure that the initial state of the light source meets the detection requirements. The ambient light sensor built into the light source control module detects the light changes in the surrounding environment in real time. The optimal lighting conditions include light intensity, angle and color temperature. For the pressure sensor, medium-intensity light is required to ensure sufficient reflection without overexposure. The optimal light intensity is set to 2000 lux, which is a brightness level suitable for detailed visual inspection. According to the reflective characteristics of the sensor surface, if the sensor surface is more reflective, the light intensity needs to be reduced to avoid highlights and reflections. If the sensor surface absorbs light, the light intensity needs to be increased to improve the image. Image clarity. For detecting edge and surface defects, side light or back light is required to highlight highlights and shadows. The best light source angle is set to 45° to capture subtle changes in the surface. Depending on the type and location of the defect, the angle is adjusted to maximize the visibility of the defect. Side light helps to highlight surface unevenness, and back light helps to detect scratches and dents on the surface. For pressure sensors, a color temperature close to natural light is required to ensure true color reproduction. The best color temperature is set to 5500K, which is close to the color temperature of daylight, which helps to accurately identify the color and surface details of the material. According to changes in ambient light and the size and appearance of the pressure sensor to be detected, the focus of the light source is automatically adjusted to ensure that the light can be accurately focused on the surface of the pressure sensor.The focal length is adjusted by a built-in motor to ensure the accuracy and stability of the adjustment. According to the intensity of the ambient light and the reflection characteristics of the pressure sensor, the exposure time of the light source is automatically adjusted to ensure that the collected image has appropriate brightness and contrast. The exposure time is adjusted by adjusting the intensity of the light source. When the image acquisition module is ready to shoot, it sends a trigger signal to the light source control module. After receiving the trigger signal, the light source control module makes a final adjustment to the light source according to the preset parameters and the real-time monitored ambient light conditions, so that the light source and the image acquisition module can shoot synchronously. When the light source is stable and meets the shooting conditions, the image acquisition module starts to shoot the image data of the pressure sensor. When all the pressure sensors to be tested have completed shooting and testing, the light source control module receives the detection completion signal sent by the system, and adjusts the light source to the initial state according to the preset reset parameters to prepare for the next test. If the system does not perform a detection task for a long time, the light source control module enters a dormant state to reduce energy consumption and extend service life.

[0067] The image acquisition module is used to capture the image data of the pressure sensor. The industrial camera is used to take all-round photos of different surfaces of the product to obtain clear image data and ensure the image clarity to adapt to pressure sensors of different sizes and appearances. According to the size, appearance and detection requirements of the pressure sensor to be detected, the parameters of 5 industrial cameras are configured, including resolution, frame rate, exposure time parameters, and the equipment parameters of the appearance defect AOI equipment are adjusted. Among them, the air pressure is 0.3Mpa, the voltage is 220V, and the time beat is 32 seconds / 10 pieces. The appearance defect AOI equipment uses 4040 aluminum profiles as the upper frame and 5050 square tube welded sheet metal as the lower frame. The frame and shell are made of profile sheet metal and acrylic plate, which have certain anti-seismic performance. Put 10 pressure sensor products to be tested into the fixture, place the production line peripheral transfer fixture from the right window of the equipment to the servo mobile platform, start the appearance defect AOI equipment, trigger the start button, the servo works, and the fixture moves to the visual inspection station. Two groups of industrial cameras identify product defects respectively. The industrial camera is used to shoot the front and side of the pressure sensor to be tested. First, shoot the front of the pressure sensor to obtain its overall appearance and main features, and then shoot the side of the pressure sensor to capture edge defects and shape changes to obtain more comprehensive image data;

[0068] An image preprocessing module is used to preprocess the collected pressure sensor image, including denoising, contrast enhancement, and color correction, so as to improve the image quality, reduce interference factors in the image, highlight defect features, and provide clear image data for subsequent feature extraction and defect detection. The module receives the original image data from the image acquisition module, and performs denoising, contrast enhancement, and color correction preprocessing operations on the original image data. The module applies a denoising algorithm to denoise the image data to remove noise in the image caused by sensor defects, transmission errors, or environmental factors, such as random noise, spots, or stripes. The module enhances the image contrast by using a histogram equalization method, adjusts the grayscale distribution of the image to make it more uniform, thereby enhancing the contrast, and improving the brightness difference between different areas in the image, so as to make the defect features more obvious. The module uses a color correction matrix method to apply a 3x3 matrix to convert the RGB value of the image to correct the color deviation, eliminate the color deviation caused by lighting conditions, equipment differences, or color distortion, and outputs the preprocessed image data to the feature extraction module for further processing.

[0069] The feature extraction module extracts the edge, shape, and texture features related to the defects from the preprocessed image, and converts the image information into quantifiable feature data to provide a basis for subsequent defect classification and identification. Based on the preprocessed image data, the Canny edge detection algorithm is applied to identify and extract the edge contour in the image, and the image is Gaussian filtered to reduce the impact of noise on edge detection. The Sobel operator is used to calculate the gradient strength and direction of the image. Along the gradient direction, only the pixel points with the largest gradient strength are retained as edge points. A high and low threshold are set, and an initial edge map is obtained through the high threshold, and a relatively complete edge map is obtained through the low threshold. The initial edge map is then used to connect the edges in the low threshold edge map, and then an edge feature image is output, which contains the edge contour in the image. Based on the edge detection results, the contour is extracted from the edge feature image, and the perimeter, area, length and width of the region of interest are calculated. The geometric features of ratio and circularity are used to quantify the shape features using Hu rectangular descriptors. The descriptors can resist the translation, rotation and scale changes of the image and quantify the number of shape features. The texture analysis technology of the gray level co-occurrence matrix is ​​used to quantify the gray level of the image to reduce the computational complexity. The frequency of gray value pairs of adjacent pixels (in a specific direction and distance) in the image is counted, and the spatial relationship between the gray values ​​of pixels in the image is calculated. The gray level co-occurrence matrix is ​​constructed, and the texture features of contrast, energy, homogeneity and correlation are extracted from the gray level co-occurrence matrix. The quantified texture feature data, the extracted edge, shape and texture features are converted into quantifiable data, and the features are normalized using min-max normalization. The feature data is scaled to a unified scale range to eliminate the impact of the dimensions between different features, making the features comparable, and then the extracted feature data is output for use by the defect recognition module;

[0070] The defect recognition module uses a machine learning model to identify and classify defects based on the extracted feature data, identifies various defects on the pressure sensor, and classifies them, providing high-precision defect detection results, providing a reliable basis for subsequent evaluation and grading. A large amount of image data of pressure sensors is collected in advance, including OK (qualified) product samples and defect samples. Among them, defect samples include incomplete welding, CM skew, solder joint connection, patch skew, and incomplete welding. The collected image data is annotated to clearly indicate the location, type, and severity of the defects. For incomplete welding defects, they mainly appear at the edge or inside of the welded joint, involving the entire length or part of the weld. The defects are classified into different areas, which are internal defects or external defects of the weld, depending on the degree of incompleteness. If there are unfused or incomplete welds inside the weld, it is an internal defect. If there are obvious gaps or unfilled parts on the weld surface, it is an external defect. The severity is determined by the size, position and number of the unwelded parts. Smaller unwelded parts may only affect the appearance, while larger unwelded parts may seriously affect the strength and sealing of the weld. For the defect of CM skew, it mainly occurs when CM fails to maintain the correct position or direction during welding. It is a structural defect or a process defect, depending on the cause and consequence of CM skew. If CM skew causes the weld joint to fail to meet the requirements, it is a structural defect or a process defect. If the force distribution is uneven or affects the performance of the sensor, it is a structural defect. If the CM skew is only caused by improper operation during welding, it is a process defect. The severity is determined by the angle, direction and impact range of the CM skew. A slight skew may only affect the appearance of the sensor, while a severe skew may cause the sensor to fail or degrade in performance. For defects in the connection of solder joints, they mainly occur between solder joints and involve the connection quality and strength of solder joints. They are external defects or internal defects of the weld. If the connection between solder joints is not firm or there are defects such as cracks and slag inclusions, it is an external defect. If there are unfused or incompletely welded parts in the connection between solder joints, it is an internal defect. The severity is determined by the welding process. It is judged by the connection quality, strength and severity of defects between solder joints. A good solder joint connection should ensure that the connection between solder joints is firm and free of defects such as cracks and slag inclusions. For the defect of patch skew, it mainly occurs when the patch fails to maintain the correct position or direction during the welding process. It is a process defect or a structural defect. If the patch skew causes the performance of the sensor to deteriorate or fail, it is a structural defect. If the patch skew is only caused by improper operation during the welding process, it is a process defect. The severity is determined by the angle, direction and impact range of the patch skew. Slight skew may only affect the appearance and assembly accuracy of the sensor, while severe skew may cause the sensor to fail or deteriorate in performance.Incomplete welding defects are similar to incomplete welding. They may appear in the entire length or part of the weld, and may even affect the strength and sealing of the entire weld joint. They are internal or external defects of the weld. If there are unfused or incomplete parts inside the weld, it is an internal defect. If there are obvious gaps, cracks or unfilled parts on the weld surface, it is an external defect. The severity is determined by the size, location and number of the unwelded parts and their impact on the sensor performance. Incomplete welding may significantly reduce the strength and sealing of the weld, thereby affecting the reliability and service life of the sensor. The feature extraction method of the feature extraction module is used to extract the feature data of texture, shape, and color to obtain a feature data set, and the feature data set is divided into a training set and a training set. Test set, using the marked feature data in the training set data, combined with the convolutional neural network model to build a defect recognition and classification model. During the training process, the model learns how to identify and classify defects based on feature information, and uses the test set data to verify the performance of the model, evaluate the accuracy and generalization ability of the model, adjust the model parameters according to the verification results to optimize the model performance, input the pressure sensor image to be tested into the trained defect recognition and classification model, identify and classify the defects on the pressure sensor, use the defect recognition and classification model to output the existence and type of defects, analyze the results output by the defect recognition and classification model, determine the existence and type of defects, and visualize the results output by the model, mark the defect location and display the defect type;

[0071] The evaluation and grading module quantitatively evaluates defects and classifies them into grades based on the results of defect detection. It also formulates clear evaluation standards and grading rules to ensure the objectivity and accuracy of the evaluation results and provide a scientific basis for subsequent quality control and improvement measures.

[0072] The result display module makes OK / NG judgments based on the defect recognition results and controls the mechanical actions for subsequent NG product separation, thus improving production efficiency and reducing manual intervention;

[0073] The human-computer interaction module provides an operation interface to intuitively display the test results and evaluation and grading results to the user, improving the system's usability and ease of operation, and enabling operators to respond to changes in system status in a timely manner.

[0074] The second embodiment is based on the first embodiment. Figure 3 As shown in the evaluation and grading module, the process of quantitative evaluation defects includes:

[0075] According to the characteristics and use requirements of the pressure sensor, combined with the size, location, type, and quantity evaluation indicators of the defects, the impact of the defects is clarified, and the evaluation standards and thresholds are set for each evaluation indicator, including the acceptable range, critical value, and unacceptable value. The defects are divided into different defect levels, namely, slight defect level, medium defect level, severe defect level, and fatal defect level. Among them, the slight defect level corresponds to a smaller defect size, a non-critical location, and a defect type that does not affect the performance. The medium defect level corresponds to a larger defect size, a defect in a critical location but does not affect the safety performance. The severe defect level corresponds to defects that affect the sensor performance but have not yet caused failure. The fatal defect level corresponds to defects that directly cause sensor failure or safety hazards. Collect defect detection results, including defect location, type, size, and quantity, and quantitatively evaluate each evaluation indicator according to evaluation standards and grading rules, calculate the evaluation value of each indicator, and divide it into corresponding defect levels according to the set threshold. Determine the weight of each evaluation indicator according to its importance to sensor performance, calculate the comprehensive defect evaluation coefficient based on the evaluation value of each evaluation indicator, analyze the overall severity of the defect and its impact on sensor performance, and divide the defects into corresponding levels according to the defect evaluation coefficient to ensure that each defect is correctly classified into its corresponding defect level. Output the defect level information to the evaluation report, which includes the defect location, type, size, defect evaluation coefficient, defect level, and subsequent processing suggestion information;

[0076] Furthermore, the calculation expression of the defect assessment coefficient is:

[0077] ;

[0078] in, is the defect assessment coefficient, It is the size score of the defect. The defect size refers to the defect area. and are the minimum and maximum values ​​of the defect size score, is the number of defects score, and are the minimum and maximum values ​​of the defect quantity score, is the impact factor score of the defect location, is the maximum value score of the defect location impact factor, The value range is between 0 and 1. Close to minimum hour, Close to 1, when the defect count score Close to maximum hour, Close to 0, when the impact factor score of the defect location When increasing, Reduced due to Decrease, so that the value inside the square root increases;

[0079] Furthermore, the plurality of defect levels correspond to a plurality of distinguishing thresholds based on defect assessment coefficients, wherein the distinguishing thresholds include an upper threshold and a lower threshold;

[0080] Slight Defect Level: ; Minor defect levels correspond to smaller defect sizes, non-critical locations, and defect types that do not affect performance, indicating that the impact of the defects is small;

[0081] Medium defect level: ; Medium defect level corresponds to defects with larger defect size and critical position but not affecting safety performance, indicating that the impact of the defect is medium;

[0082] Severe defect level: ; The severe defect level corresponds to defects that affect the performance of the sensor but have not yet caused failure, indicating that the impact of the defect is serious;

[0083] Fatal defect level: ; The fatal defect level corresponds to defects that directly lead to sensor failure or safety hazards, indicating that the impact of the defect is fatal;

[0084] in, is the defect assessment coefficient, is the upper threshold of the slight defect level, is the lower threshold corresponding to the slight defect level and the upper threshold corresponding to the medium defect level, is the lower threshold corresponding to the medium defect level and the upper threshold corresponding to the severe defect level, is the lower threshold corresponding to the severe defect level and the upper threshold corresponding to the fatal defect level, , , , ;

[0085] In the result display module, the specific process of OK / NG judgment includes:

[0086] Receive the output results about the existence and type of defects from the defect recognition module, and set the OK (qualified) / NG (unqualified) judgment criteria based on the output of the evaluation and grading module. Set the pressure sensors with slight defect levels and medium defect levels as OK (qualified) products, and set the pressure sensors with serious defect levels and fatal defect levels as NG (unqualified) products. According to the set standards, make OK (qualified) or NG (unqualified) judgments for each pressure sensor. Utilize the NG unloading anti-fool mechanism of the appearance defect AOI equipment combined with the visual inspection results, extend the cylinder to block the OK products to prevent them from being removed by mistake. Workers take out the NG products according to the displayed inspection results and put them in the NG unloading chute. Workers take out the fixture containing the remaining OK products. At the same time, the result display module automatically records the results of each inspection, including detailed information of OK and NG products, and the execution of the corresponding mechanical actions.

[0087] Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field and related fields without creative work should fall within the scope of protection of the present invention. The structures, devices and operating methods not specifically described and explained in the present invention are implemented according to the conventional means in the field unless otherwise specified and limited.

Claims

1. A visual inspection system for appearance defects of pressure sensors, characterized in that: It includes a light source control module, an image acquisition module, an image preprocessing module, a feature extraction module, a defect recognition module, an evaluation and grading module, a result display module and a human-computer interaction module integrated on the appearance defect AOI equipment, wherein the electrical signals between the modules are connected; The light source control module is equipped with automatic focus and exposure adjustment functions to adjust the lighting environment. It automatically initializes through system startup to read the preset light source settings, including focus, exposure time and light source intensity, and sets the best lighting conditions in combination with the material, color and surface characteristics of the pressure sensor to be detected. It also automatically adjusts the focus and exposure time based on the built-in ambient light sensor, the reflective characteristics of the pressure sensor to be detected and the changes in the detected ambient light, and performs light source calibration; The image acquisition module is used to capture image data of the pressure sensor; The image preprocessing module is used to preprocess the collected pressure sensor image; The feature extraction module extracts edge, shape, and texture features related to defects from the preprocessed image, and converts the image information into quantifiable feature data. In the feature extraction module, the defect-related feature extraction process includes: Based on the preprocessed image data, the Canny edge detection algorithm is applied to identify and extract the edge contours in the image, the image is Gaussian filtered, and the Sobel operator is used to calculate the gradient strength and direction of the image. Along the gradient direction, only the pixel points with the largest gradient strength are retained as edge points. A high and a low threshold are set. An initial edge map is obtained through the high threshold, and a relatively complete edge map is obtained through the low threshold. The initial edge map is then used to connect the edges in the low threshold edge map, and then an edge feature image is output, which contains the edge contours in the image. Based on the edge detection results, the contour is extracted from the edge feature image, the geometric features of the perimeter, area, aspect ratio, and circularity of the region of interest are calculated, the shape features are quantified using the Hu rectangular descriptor, and the number of shape features is quantified; The texture analysis technology of gray-level co-occurrence matrix is ​​applied to quantify the gray level of the image, count the frequency of gray value pairs of adjacent pixels in the image, calculate the spatial relationship between the gray values ​​of pixels in the image, construct the gray-level co-occurrence matrix, extract the texture features of contrast, energy, homogeneity, and correlation from the gray-level co-occurrence matrix, and quantify the texture feature data; The extracted edge, shape and texture features are converted into quantifiable data, and the features are normalized using min-max normalization, and then the extracted feature data is output for use by the defect recognition module; The defect recognition module uses a machine learning model to recognize and classify defects based on the extracted feature data, recognizes various defects on the pressure sensor, and classifies them; The evaluation and grading module quantitatively evaluates defects and classifies them into grades. In the evaluation and grading module, the process of quantitatively evaluating defects includes: According to the characteristics and use requirements of the pressure sensor, combined with the size, location, type, and quantity evaluation indicators of the defects, the impact of the defects is clarified; Set evaluation criteria and thresholds for each evaluation indicator, including acceptable range, critical value and unacceptable value, and classify defects into different defect levels, namely, minor defect level, medium defect level, severe defect level and fatal defect level; Collect the defect detection results from the defect recognition module, including the location, type, size, and quantity of the defects. According to the evaluation criteria and classification rules, quantify and evaluate each evaluation indicator, calculate the evaluation value of each indicator, and classify it into corresponding defect levels according to the set threshold. According to the importance of each evaluation index on sensor performance, its weight is determined, and combined with the evaluation value of each evaluation index, the comprehensive defect evaluation coefficient is calculated to analyze the overall severity of the defect and its impact on sensor performance; According to the defect assessment coefficient, the defects are divided into corresponding levels, and the defect level information is output to the assessment report. The calculation expression of the defect assessment coefficient is: ; in, is the defect assessment coefficient, It is the size score of the defect. The defect size refers to the defect area. and are the minimum and maximum values ​​of the defect size score, is the number of defects score, and are the minimum and maximum values ​​of the defect quantity score, is the impact factor score of the defect location, is the maximum value score of the defect location impact factor, The value range is between 0 and 1; The plurality of defect levels correspond to a plurality of distinguishing thresholds based on defect assessment coefficients, wherein the distinguishing thresholds include an upper threshold and a lower threshold; Slight Defect Level: ; Medium defect level: ; Severe defect level: ; Fatal defect level: ; in, is the defect assessment coefficient, is the upper threshold of the slight defect level, is the lower threshold corresponding to the slight defect level and the upper threshold corresponding to the medium defect level, is the lower threshold corresponding to the medium defect level and the upper threshold corresponding to the severe defect level, is the lower threshold corresponding to the severe defect level and the upper threshold corresponding to the fatal defect level, , , , ; The result display module makes an OK / NG judgment based on the defect recognition result and controls the subsequent mechanical action of separating NG products; The human-computer interaction module provides an operation interface to intuitively display the detection results and evaluation and grading results to the user.

2. A pressure sensor appearance defect visual inspection system according to claim 1, characterized in that: In the light source control module, the process of adjusting the lighting environment includes: The light source control module starts up when the appearance defect AOI equipment is started up and enters the initialization state, and then reads the initial settings of the light source from the system configuration, including focal length, exposure time, and light source intensity, and calibrates the light source according to the preset standard light source conditions; The ambient light sensor built into the light source control module detects the light changes in the surrounding environment in real time and sets the optimal lighting conditions including light intensity, angle and color temperature; Automatically adjust the focal length of the light source according to the changes in ambient light and the size and appearance of the pressure sensor to be detected, and automatically adjust the exposure time of the light source according to the intensity of the ambient light and the reflection characteristics of the pressure sensor; When the image acquisition module is ready to shoot, it sends a trigger signal to the light source control module. After receiving the trigger signal, the light source control module makes a final adjustment to the light source according to the preset parameters and the ambient light conditions monitored in real time, so that the shooting action of the light source and the image acquisition module are synchronized. When the light source is stable and the shooting conditions are met, the image acquisition module starts to shoot the image data of the pressure sensor; When all the pressure sensors to be tested have completed shooting and testing, the light source control module receives the detection completion signal sent by the system, and adjusts the light source to the initial state according to the preset reset parameters to prepare for the next detection. If the system does not perform a detection task for a long time, the light source control module enters a sleep state.

3. A pressure sensor appearance defect visual inspection system according to claim 2, characterized in that: In the image acquisition module, the process of capturing the pressure sensor image data includes: According to the size, appearance and inspection requirements of the pressure sensor to be inspected, the parameters of 5 industrial cameras are configured, including resolution, frame rate, exposure time parameters, and the equipment parameters of the appearance defect AOI equipment are adjusted, among which the air pressure is 0.3Mpa, the voltage is 220V, and the time beat is 32 seconds / 10 pieces; Put 10 pressure sensor products to be tested into the fixture, place the production line peripheral jig from the right window of the equipment onto the servo mobile platform, start the appearance defect AOI equipment, trigger the start button, the servo works, the fixture moves to the visual inspection station, and 2 groups of industrial cameras identify product defects respectively; An industrial camera is used to shoot the front and side views of the pressure sensor to be inspected. First, the front view of the pressure sensor is photographed to obtain its overall appearance and main features. Then, the side view of the pressure sensor is photographed to capture edge defects and shape changes.

4. A pressure sensor appearance defect visual inspection system according to claim 3, characterized in that: In the image preprocessing module, the process of preprocessing the collected pressure sensor image includes: Receive the original image data from the image acquisition module, and perform pre-processing operations of denoising, contrast enhancement and color correction on the original image data; Apply denoising algorithm to denoise image data, enhance image contrast through histogram equalization method, adjust image grayscale distribution, use color correction matrix method, apply a 3x3 matrix to transform image RGB value to correct color deviation; The preprocessed image data is output and transmitted to the feature extraction module for further processing.

5. A pressure sensor appearance defect visual inspection system according to claim 4, characterized in that: In the defect identification module, the defect identification and classification process includes: Collect a large amount of image data of pressure sensors in advance, including OK product samples and defective samples. Defective samples include incomplete welding, CM skew, solder joint connection, patch skew, and incomplete welding; Annotate the collected image data to clearly indicate the location, type and severity of defects; Using the feature extraction method of the feature extraction module to extract feature data of texture, shape, and color, a feature data set is obtained, and the feature data set is divided into a training set and a test set; Use the marked feature data in the training set data and combine it with the convolutional neural network model to build a defect recognition and classification model. During the training process, the model learns how to identify and classify defects based on feature information, and uses the data in the test set to verify the performance of the model. According to the verification results, adjust the model parameters to optimize the model performance. The pressure sensor image to be inspected is input into the trained defect recognition and classification model, the defects on the pressure sensor are identified and classified, and the defect recognition and classification model is used to output whether the defect exists and the type of the defect; Analyze the results of the defect recognition and classification model output, determine the presence and type of defects, visualize the model output results, mark the defect location and display the defect type.

6. A pressure sensor appearance defect visual inspection system according to claim 5, characterized in that: In the result display module, the specific process of OK / NG judgment includes: Receive output results on the presence and type of defects from the defect recognition module, and set OK / NG judgment criteria based on the output of the evaluation and grading module, setting pressure sensors with slight defect levels and medium defect levels as OK products, and setting pressure sensors with severe defect levels and fatal defect levels as NG products; According to the set standards, each pressure sensor is judged as OK or NG. The NG unloading fool-proofing mechanism of the appearance defect AOI equipment is combined with the visual inspection results to extend the cylinder to seal the OK products. Workers take out NG products according to the displayed test results and put them into the NG unloading chute. Workers take out the fixture containing the remaining OK products. At the same time, the result display module automatically records the test results of each time, including detailed information of OK and NG products, and the execution status of the corresponding mechanical actions.

Citation Information

Patent Citations

  • Defect inspection apparatus and defect inspection method

    US20120212605A1

  • Defect detection method and apparatus based on structured light field video stream

    WO2022252698A1

Cited By

  • High-precision automatic detection device for sensor

    CN120381993A