An intelligent visual inspection system and method for non-standard automated production lines

Through the intelligent vision detection system of the non-standard automated production line, the image processing and defect recognition are used using OpenCV-Python and CNN models, the problem of low manual inspection efficiency in automotive tire production is solved, and automated and efficient detection effects are achieved.

CN119599994BActive Publication Date: 2025-09-02JIANGSU VOCATION & TECHNICAL COLLEGE OF FINANCE & ECONOMICS
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411672474.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-21
Publication Date
2025-09-02
Estimated Expiration
2044-11-21

AI Technical Summary

Technical Problem

There are problems in the production of existing automobile tires that are low in manual inspection efficiency and high intensity, making it difficult to meet production needs.

Method used

An intelligent vision detection system using a non-standard automated production line is used to perform image enhancement and edge detection using the OpenCV-Python vision algorithm library, defect recognition is combined with the CNN model, and the detection system is optimized through the performance evaluation module.

Benefits of technology

It improves the inspection efficiency of the production line, reduces the work intensity of the operator, realizes automatic inspection, and improves the inspection accuracy and reliability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119599994B_ABST
    Figure CN119599994B_ABST
Patent Text Reader

Abstract

The present invention discloses an intelligent visual inspection system and method for a non-standard automated production line, relating to the technical field of intelligent visual inspection, comprising: enhancing a sample image to be inspected, normalizing the image, performing edge detection on the image using a Canny algorithm, indirectly evaluating the effect of image enhancement based on the image peak signal-to-noise ratio and the number of edges, and analyzing and adjusting the image enhancement effect of a threshold value for limiting contrast based on the indirect evaluation effect; obtaining the number of known defect samples, calculating the missed detection rate, precision rate, and false detection rate in the inspection process based on the number of defect samples, evaluating visual inspection performance based on a machine learning algorithm, and determining whether to optimize the inspection system based on the evaluation results; solving the problems of inaccurate manual inspection and poor inspection effect in the prior art, and improving the working efficiency and inspection accuracy of the non-standard automated production line.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of intelligent detection technology, and more specifically, to an intelligent visual detection system and method for a non-standard automated production line. Background Art

[0002] Non-standard automated production lines are customized automated production systems based on specific product or production requirements, often not conforming to the design of traditional standardized equipment. These lines offer high flexibility, meeting diverse and personalized production requirements, and are widely used across various fields. With the rapid development of computer technology and artificial intelligence, machine vision, which detects defects by capturing surface images of objects, has gained widespread application in industrial product inspection.

[0003] Deficiencies in existing technologies:

[0004] In the current automotive tire production process, manual inspection and handling are commonly performed by human operators. This is inefficient, labor-intensive, and increasingly unable to meet production needs. Therefore, it is necessary to replace the existing manual operations with automated equipment and improve production line efficiency through intelligent visual inspection.

[0005] In view of the above problems, the present invention proposes a solution. Summary of the Invention

[0006] In order to overcome the above-mentioned defects of the prior art, an embodiment of the present invention provides an intelligent visual inspection system and method for a non-standard automated production line, which solves the problems raised in the above-mentioned background technology through intelligent visual inspection of the production line.

[0007] To achieve the above object, the present invention provides the following technical solutions:

[0008] An intelligent visual inspection system for non-standard automated production lines comprises: an image acquisition module, for simulating the automated production line inspection process, performing image acquisition on known samples to be inspected, and obtaining images of the samples to be inspected; an image processing module, for enhancing the images of the samples to be inspected according to the OpenCV-Python visual algorithm library, normalizing the images, performing edge detection on the images using the Canny algorithm, indirectly evaluating the image enhancement effect according to the image peak signal-to-noise ratio and the number of edges, and analyzing and adjusting the image enhancement effect of the threshold value for limiting contrast in the OpenCV-Python visual algorithm based on the indirect evaluation effect; an image recognition module, for performing end-to-end defect recognition on the images according to a CNN model, and obtaining the number of defect samples; and a performance evaluation module, for obtaining the number of known defect samples, calculating the missed detection rate, precision rate, and false detection rate during the inspection process based on the number of defect samples, evaluating the visual inspection performance based on a machine learning algorithm, and determining whether the inspection system should be optimized based on the evaluation results.

[0009] In a preferred embodiment, the enhancing of the sample image to be detected according to the OpenCV-Python visual algorithm library includes enhancing the image according to adaptive histogram equalization, gamma transformation, median filtering and multi-scale Retinex algorithm.

[0010] In a preferred embodiment, the specific process of image enhancement by the multi-scale Retinex algorithm is as follows: the input image is divided into an incident component and a reflected component; the input image is processed according to the single-scale Retinex algorithm, the incident component in the input image is filtered out using a Gaussian low-pass filter, and the reflected component is extracted; the input image is processed using the single-scale Retinex algorithm at multiple scales to obtain reflected components of different scales, and the reflected components of different scales are weightedly fused to obtain an output image enhanced by the multi-scale Retinex algorithm.

[0011] In a preferred embodiment, the steps of performing edge detection on an image using the Canny algorithm are as follows: performing Gaussian filtering on the image to remove noise; performing edge detection on the image using the Sobel operator to calculate the gradients of the image in the horizontal and vertical directions to obtain the gradient strength and direction of each pixel; checking the values ​​of two neighboring pixels along the gradient direction of each pixel based on the gradient direction, and if the gradient amplitude of the current pixel is greater than the values ​​of the two neighboring pixels, retaining the pixel, otherwise suppressing it; using a high threshold and a low threshold to determine the strength of the edge, pixels stronger than the high threshold are considered to be "definite edges", pixels lower than the low threshold are considered to be "non-edge pixels", and pixels between the two need to be further judged through a connection step; confirming whether the pixel marked as "possible edge" belongs to the actual edge through edge connection, if it is connected to a "definite edge" pixel, it is retained as an edge pixel, otherwise it is suppressed.

[0012] In a preferred embodiment, the specific steps of adjusting the threshold value for limiting contrast are as follows: defining the number of edges and the image peak signal-to-noise ratio as input variables and dividing them into different fuzzy sets respectively; defining whether to adjust the threshold value for limiting contrast as an output variable and dividing them into fuzzy sets; formulating fuzzy rules to describe the influence of the number of edges and the image peak signal-to-noise ratio on the adjustment of the threshold value for limiting contrast; and performing fuzzy reasoning based on the fuzzy rules to determine whether to adjust the threshold value for limiting contrast.

[0013] In a preferred embodiment, the specific process of performing end-to-end defect recognition on an image based on a CNN model to obtain the number of defect samples is as follows: performing data enhancement on the image data to avoid overfitting; extracting local features of the image layer by layer according to the convolution layer, and gradually reducing the size of the feature map through the pooling layer to extract more abstract features; using a fully connected layer to map the features extracted by the convolution layer to the final layer, and outputting whether the defect exists in the final layer; and calculating the number of defect samples based on the output result of the final layer.

[0014] In a preferred embodiment, the process of determining whether to optimize the detection system based on the evaluation results is as follows: comparing and analyzing the detection evaluation coefficient with a preset evaluation threshold; if the detection evaluation coefficient is greater than the preset evaluation threshold, the system's visual detection performance is good and the detection system does not need to be optimized; if the detection evaluation coefficient is less than the preset evaluation threshold, the system's visual detection performance is poor and the detection system needs to be optimized.

[0015] An intelligent visual inspection method for a non-standard automated production line comprises: simulating an automated production line inspection process, capturing images of known samples to be inspected, and obtaining images of the samples to be inspected; enhancing the images of the samples to be inspected according to an OpenCV-Python visual algorithm library, normalizing the images, performing edge detection on the images using a Canny algorithm, indirectly evaluating an image enhancement effect according to an image peak signal-to-noise ratio and the number of edges, and analyzing and adjusting an image enhancement effect of a contrast-limiting threshold in the OpenCV-Python visual algorithm based on the indirect evaluation effect; performing end-to-end defect recognition on the images according to a CNN model, and obtaining the number of defect samples; obtaining the number of known defect samples, calculating a missed detection rate, a precision rate, and a false detection rate during the inspection process based on the number of defect samples, evaluating visual inspection performance based on a machine learning algorithm, and determining whether to optimize the inspection system based on the evaluation results. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 The figure is a structural schematic diagram of an intelligent visual inspection system for a non-standard automated production line according to the present invention.

[0017] Figure 2 This is a structural schematic diagram of an intelligent visual inspection method for a non-standard automated production line according to the present invention. DETAILED DESCRIPTION

[0018] The following will provide a clear and complete description of the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.

[0019] Example 1, Figure 1 The present invention provides an intelligent visual inspection system for a non-standard automated production line.

[0020] The image acquisition module is used to simulate the detection process of the automated production line, collect images of known samples to be detected, and obtain images of the samples to be detected;

[0021] The automated production line inspection system consists of multiple components working together, including conveyor belts, camera systems, light sources, processing units, etc.; its main goal is to use machine vision technology to perform online inspection, defect detection, dimensional measurement, etc. of products on the production line.

[0022] Production line: Conveyor belts move products from one location to another, usually at a steady speed;

[0023] Camera system: fixedly installed at an appropriate location on the production line to capture product images in real time;

[0024] Light source: Provide sufficient and uniform lighting conditions to ensure the quality of image acquisition;

[0025] Processing unit: Analyzes images through image processing algorithms, such as edge detection, object recognition, defect detection, etc.

[0026] The first step in image acquisition is to select a suitable camera device. Usually, you can choose an industrial camera or a high-resolution camera. The following aspects should be considered:

[0027] Resolution: You need to choose the appropriate resolution based on the size and detail requirements of the product. High-resolution cameras help capture even the smallest defects of the product more precisely.

[0028] Frame rate: On high-speed production lines, it is crucial to select a camera with a sufficient frame rate to ensure that images can be captured synchronously and do not affect the line speed;

[0029] Lens: Based on the inspection requirements, select a lens with appropriate focal length and field of view (FOV) to ensure that the entire product image can be clearly captured;

[0030] Interface and compatibility: Consider the compatibility of the camera with other systems (such as computers and image acquisition cards) to ensure stable data transmission;

[0031] The camera should be installed on the production line and maintain an appropriate relative position to the conveyor belt to ensure that it can clearly capture the image of the sample to be tested. The position and angle of the camera need to be adjusted to ensure that the key parts of the product can be captured in all directions to avoid image quality being affected by incorrect angles or obstructions;

[0032] Fixed installation location: The camera is usually installed above, on the side, or below the production line. The specific location needs to be determined according to the size and appearance characteristics of the product.

[0033] Multi-camera collaboration: If the product has a complex shape, multiple cameras may be required to simultaneously shoot from different angles to obtain images from multiple perspectives;

[0034] Synchronous acquisition: Image acquisition from multiple cameras needs to be synchronized to ensure that image data is collected at the same time point to avoid image distortion due to time differences;

[0035] Appropriate lighting is key to image acquisition. The choice and position of the light source directly affect the image quality. Common light source configurations include:

[0036] Uniform lighting: Ensure that the entire surface of the product is evenly illuminated to avoid shadows or highlights;

[0037] Directional lighting: Depending on the inspection requirements, it may be necessary to use directional light sources such as side lighting or backlighting to highlight specific features of the product, such as surface defects, contours, etc.

[0038] Avoid reflections: On products made of certain materials (such as metal and glass), special attention should be paid to the angle of the light source to avoid image distortion caused by reflections.

[0039] The images captured by the image acquisition device are transmitted to a computer or processing unit via a digital interface (such as USB, Ethernet, Camera Link, etc.). The captured images are usually processed through the following steps:

[0040] Image preprocessing: including denoising, white balance adjustment, image enhancement, etc., to ensure that the image quality meets the analysis requirements;

[0041] Image storage and transmission: Images can be directly transferred to a computer for real-time processing, or stored on a local disk or in a database for subsequent analysis.

[0042] The image processing module is used to enhance the sample image to be detected according to the OpenCV-Python visual algorithm library, normalize the image, use the Canny algorithm to detect the edge of the image, and indirectly evaluate the effect of image enhancement based on the image peak signal-to-noise ratio and the number of edges. Based on the indirect evaluation effect, the contrast-limiting threshold in the OpenCV-Python visual algorithm is analyzed and adjusted to determine the image enhancement effect.

[0043] The image enhancement of the sample to be detected according to the OpenCV-Python visual algorithm library includes adaptive histogram equalization, gamma transformation, median filtering and multi-scale Retinex algorithm to enhance the image;

[0044] The adaptive histogram equalization divides the image into multiple rectangular blocks and processes them separately. For each rectangular block image, the corresponding histogram distribution function is statistically calculated. Then, by adding a threshold to limit the contrast, the linear interpolation and bilinear interpolation methods are used to optimize the transition between the rectangular blocks. In this way, the noise amplification problem can be reduced, making the image look more coordinated and reasonable.

[0045] In adaptive histogram equalization, limiting the contrast threshold, i.e., contrast-limited adaptive histogram equalization, can help control the image enhancement effect and avoid excessive enhancement leading to noise amplification or excessive pseudo-colorization of the image. In order to achieve better image enhancement effects, it is very important to adjust the contrast threshold.

[0046] The gamma transform is a nonlinear operation on the grayscale value of the input image, which makes the grayscale value of the output image exponentially related to the grayscale value of the input image to achieve image enhancement. The basic form of the function is:

[0047] S=c*r a

[0048] Where S is the grayscale value after the change, c is the grayscale scaling coefficient, r is the grayscale value of the original pixel, and a is the transformation coefficient;

[0049] When a is less than 1, it can enhance the brightness of the image, quickly amplify the pixels with smaller grayscale values, and brighten the dark areas of the image; when a is greater than 1, it can sharply increase the pixels with larger grayscale values, enhance the contrast of the image, and suppress the highlight parts of the image.

[0050] The median filter is a statistical sorting filter, and its main method is to select a neighborhood template, such as 3×3, 5×5, etc., with each pixel of the input image as the center, sort the pixels in the template according to the size of the pixel value, and use the pixel value in the middle position as the pixel value of the current pixel.

[0051] The specific process of multi-scale Retinex algorithm image enhancement is as follows:

[0052] First, the input image is divided into two parts: the incident component and the reflected component, which can be expressed as: S(x,y) = R(x,y)*L(x,y); where S(x,y) represents the input image, R(x,y) represents the reflected component, and L(x,y) represents the incident component.

[0053] The input image is processed using the single-scale Retinex algorithm, which involves filtering out the incident component L(x,y) in the input image using a Gaussian low-pass filter, thereby extracting the reflected component R(x,y). The specific formula is as follows: logR(x,y) = logS(x,y) - log[G(x,y)*S(x,y)]; where R(x,y) represents the reflected component, S(x,y) represents the input image, * is the convolution symbol, and G(x,y) is the center-surround function.

[0054] Among them, the center surround function G(x,y) needs to meet the following conditions, the specific formula is: Where c is the Gaussian surround scale, λ is the central surround constant;

[0055] After processing the output image using the single-scale Retinex algorithm at multiple scales, the reflection components of different scales are obtained, and the reflection components of different scales are weighted fused to obtain the output image enhanced by the multi-scale Retinex algorithm. The specific formula is as follows: Where r(x,y) is the output function;

[0056] The normalization scales the image pixel values ​​to a specific range for subsequent processing, usually scaling the pixel values ​​to the range of [0, 1] or [0, 255].

[0057] The Canny algorithm is used to detect the edge of the image. The following steps are mainly used to detect the edge of the image:

[0058] First, perform Gaussian filtering on the image to remove noise; noise can cause false edge detection, so denoising is necessary;

[0059] Use the Sobel operator to perform edge detection on the image, calculate the horizontal and vertical gradients of the image, and obtain the gradient intensity and direction of the pixel points; the gradient intensity calculation formula is as follows: Where q is the gradient strength, q x is the gradient in the horizontal direction, q y is the gradient in the vertical direction;

[0060] Based on the gradient direction, for each pixel, check the values ​​of the two neighboring pixels along the gradient direction. If the gradient magnitude of the current pixel is greater than the values ​​of the two neighboring pixels, then retain the pixel, otherwise suppress it;

[0061] Two thresholds (high threshold and low threshold) are used to determine the strength of the edge. Pixels stronger than the high threshold are considered "definite edges", pixels lower than the low threshold are considered "non-edge pixels", and pixels between the two may be part of the edge and need to be further judged through the connection step;

[0062] Through edge connection, we confirm whether the pixels marked as "possible edges" belong to actual edges. If these pixels are connected to "determined edge" pixels, they are retained as edge pixels, otherwise they are suppressed; and the number of edges formed by edge connection is calculated;

[0063] If the number of edges increases significantly after enhancement, it means that the enhancement operation has over-enhanced the details, resulting in increased edge noise;

[0064] The image peak signal-to-noise ratio (PSNR) is a commonly used indicator in image quality assessment. It is used to measure the difference between an enhanced image and the original image. It is particularly used to evaluate the effects of compression, denoising, image enhancement, and other processing. A higher PSNR value indicates a better image enhancement effect and less distortion.

[0065] The PSNR is the ratio between the maximum value of the signal (image) and the noise (image distortion), and the specific calculation formula is as follows: PSNR is the peak signal-to-noise ratio of the image, S(j,k) is the pixel value of the jth row and kth column in the input image, r(j,k) is the pixel value of the jth row and kth column in the output function, MAX is the maximum pixel value, M and N are the height and width of the image respectively;

[0066] PSNR is an objective evaluation metric that is often used to evaluate image enhancement effects. By comparing the PSNR values ​​of the original image and the enhanced image, the effectiveness of the enhancement method can be concluded:

[0067] A higher PSNR value usually means that the enhancement method has less damage to the image quality and retains more original information. A lower PSNR value means that the enhancement method introduces greater distortion or noise, resulting in a decrease in image quality.

[0068] The effect of image enhancement is indirectly evaluated based on the image peak signal-to-noise ratio and the number of edges, and the threshold value for limiting contrast is determined based on the evaluation results. The specific steps are as follows:

[0069] In step C1, the number of edges and the peak signal-to-noise ratio of the image are defined as input variables, and they are divided into different fuzzy sets respectively.

[0070] For example, "Few", "Right", "Many" for the number of edges, and "Low", "Medium", "High" for the image peak signal-to-noise ratio.

[0071] In step C2, whether to adjust the threshold value for limiting the contrast is defined as an output variable, and the output variable is divided into fuzzy sets, for example, "No", "Yes", for whether to adjust the threshold value for limiting the contrast.

[0072] Step C3: Develop a set of fuzzy rules to describe the impact of different input variables on the output variables. The definition of rules can be based on professional knowledge or obtained through data analysis and experiments. For example:

[0073] Mark the number of edges as B, the image peak signal-to-noise ratio as D, and whether to adjust the threshold size of the contrast limit as P, then you can define

[0074] Rule 1:IF(B is Few)AND(D is High)THEN(P is No)

[0075] Rule 2:IF(B is Many)AND(D is Low)THEN(P is Yes) ...

[0077] Step C4: Perform fuzzy reasoning according to the fuzzy rules to determine whether to adjust the threshold value for limiting the contrast.

[0078] It should be noted that the division of fuzzy sets can be adjusted according to actual conditions. For example, although this embodiment takes three fuzzy sets as an example, in fact, the image peak signal-to-noise ratio and the number of edges and whether the threshold size for limiting contrast is adjusted can be divided into more than three sets to facilitate better and more precise adjustment.

[0079] Furthermore, for the judgment of whether to adjust the threshold value of limiting contrast, the threshold can be set according to the actual situation. For example, when the peak signal-to-noise ratio of the image exceeds 40 decibels, it is marked as "High", and when the number of edges is greater than 10, it is marked as "Many", etc., which will not be elaborated here.

[0080] Lower clip limit (smaller value): When a lower clip limit is set, the contrast enhancement effect will be more restricted, the image details may be more suppressed, and the enhancement effect will be more conservative. At this time, the image noise gain is less, and the overall effect may be smoother. It is suitable for scenes with more noise or low requirements for details.

[0081] Higher clip limit (larger value): A larger clip limit allows for greater contrast enhancement in local areas, making image details and structure more prominent, but it may also cause noise to be excessively amplified, especially in low-contrast or noisy areas. A wide range of clip limits can significantly enhance image contrast, but should be used with caution to avoid introducing unnecessary artifacts or noise.

[0082] Moderate clip limit: By gradually adjusting the clip limit value, you can find a moderate clip limit value that can make the image contrast enhancement obvious without excessively amplifying the noise. Generally speaking, the clip limit can be adjusted between 0.01 and 0.05, depending on the characteristics of the image and the noise level.

[0083] The image recognition module is used to perform end-to-end defect recognition on images based on the CNN model to obtain the number of defect samples;

[0084] End-to-end image defect recognition based on convolutional neural networks (CNNs) is a deep learning technique that identifies defects in images by automatically extracting image features and applying these features to classification tasks. The end-to-end process means that no manual feature engineering or additional intermediate steps are required from the input image to the output results (such as defect classification or location). The entire process includes data preprocessing, CNN model training, and output of defect recognition results. The specific steps are as follows:

[0085] First, it is necessary to collect image data containing defects and normal samples;

[0086] In order to enhance the robustness of the model and avoid overfitting, data augmentation is performed on the training image data;

[0087] Use convolutional layers to automatically extract local features of the image, such as edges, textures, and shapes, extract local features in the image layer by layer, and gradually reduce the size of the feature map through pooling layers;

[0088] Use the pooling layer to reduce the size of the feature map, reduce the amount of calculation, and extract more abstract features;

[0089] Use a fully connected layer to map the features extracted by the convolutional layer to the output space, usually in the last layer of the network for classification tasks, and output whether the defect exists in the final layer;

[0090] Calculate the number of defect samples based on the final layer output results.

[0091] The performance evaluation module is used to obtain the number of known defect samples and calculate the missed detection rate, precision rate and false detection rate during the inspection process based on the number of defect samples; evaluate the visual inspection performance based on the machine learning algorithm, and determine whether to optimize the inspection system based on the evaluation results.

[0092] Calculate the missed detection rate, precision rate, and false detection rate in the test based on the number of known defect samples and the number of defect samples;

[0093] The missed detection rate represents the percentage of undetected defect samples to the actual number of defect samples. It is an extremely important indicator in industrial surface defect detection. Missed detections can directly lead to defective products being sold to end customers, which can have a serious impact on the company's image and customer satisfaction. Therefore, reducing the missed detection rate is of great significance to the company.

[0094] The precision rate indicates the percentage of the number of detected defect samples to the actual number of defect samples;

[0095] The false detection rate refers to the percentage of qualified samples detected as defective samples to the actual number of qualified samples. False detection will have a direct negative impact on the production efficiency of industrial enterprises.

[0096] An evaluation model is constructed based on the machine learning algorithm according to the missed detection rate, precision rate, and false detection rate to generate a detection evaluation coefficient. The specific calculation formula is as follows: Where α is the missed detection rate, μ1 is the missed detection rate weight coefficient, β is the precision rate, μ2 is the precision rate weight coefficient, γ is the false detection rate, and μ3 is the false detection rate weight coefficient.

[0097] The detection evaluation coefficient is compared and analyzed with the preset evaluation threshold. If the detection evaluation coefficient is greater than the preset evaluation threshold, the system visual detection performance is good and the detection system does not need to be optimized; if the detection evaluation coefficient is less than the preset evaluation threshold, the system visual detection performance is poor and the detection system needs to be optimized.

[0098] Example 2, Figure 2 This is a structural schematic diagram of an intelligent visual inspection method for a non-standard automated production line according to the present invention.

[0099] Simulate the automated production line inspection process, collect images of known samples to be inspected, and obtain images of the samples to be inspected;

[0100] The sample images to be tested are enhanced and normalized using the OpenCV-Python visual algorithm library. The Canny algorithm is used to detect edges of the images. The image peak signal-to-noise ratio and the number of edges are used to indirectly evaluate the effect of image enhancement. Based on the indirect evaluation results, the contrast threshold value in the OpenCV-Python visual algorithm is analyzed and adjusted for its effect on image enhancement.

[0101] Perform end-to-end defect recognition on the image based on the CNN model to obtain the number of defect samples;

[0102] Obtain the number of known defect samples, and calculate the missed detection rate, precision rate, and false detection rate during the inspection process based on the number of defect samples. Evaluate the visual inspection performance based on the machine learning algorithm, and determine whether to optimize the inspection system based on the evaluation results.

[0103] The above formulas are all dimensionless and numerical calculations. The formulas are obtained by collecting a large amount of data and performing software simulation to obtain the most recent real situation. The preset parameters in the formulas are set by technicians in this field according to actual conditions.

[0104] The above embodiments may be implemented in whole or in part through software, hardware, firmware, or any other combination thereof. When implemented using software, the above embodiments may be implemented in whole or in part in the form of a computer program product.

[0105] Those skilled in the art will appreciate that the modules and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0106] In addition, each functional module in each embodiment of the present application may be integrated into one processing module, or each module may exist physically separately, or two or more modules may be integrated into one module.

[0107] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.

[0108] Finally: The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.

Claims

1. An intelligent visual inspection system for non-standard automated production lines, characterized in that: include: The image acquisition module is used to simulate the detection process of the automated production line, collect images of known samples to be detected, and obtain images of the samples to be detected; The image processing module is used to enhance the sample image to be detected according to the OpenCV-Python visual algorithm library, normalize the image, use the Canny algorithm to detect the edge of the image, and indirectly evaluate the effect of image enhancement based on the image peak signal-to-noise ratio and the number of edges. Based on the indirect evaluation results, the contrast threshold value in the OpenCV-Python visual algorithm is analyzed and adjusted to determine the image enhancement effect. The image recognition module is used to perform end-to-end defect recognition on images based on the CNN model to obtain the number of defect samples; The performance evaluation module is used to obtain the number of known defect samples, calculate the missed detection rate, precision rate, and false detection rate during the inspection process based on the number of defect samples, evaluate the visual inspection performance based on the machine learning algorithm, and determine whether to optimize the inspection system based on the evaluation results; The specific steps for adjusting the threshold value for limiting contrast are as follows: The number of edges and image peak signal-to-noise ratio are defined as input variables and divided into different fuzzy sets respectively; Whether to adjust the threshold value of limiting contrast is defined as the output variable, and it is divided into fuzzy sets; Formulate fuzzy rules to describe the influence of edge number and image peak signal-to-noise ratio on the threshold value for limiting contrast; Fuzzy reasoning is performed according to fuzzy rules to determine whether the threshold value for limiting contrast should be adjusted.

2. The intelligent visual inspection system for non-standard automated production lines according to claim 1, characterized in that: The enhancing of the sample image to be detected according to the OpenCV-Python visual algorithm library includes enhancing the image according to adaptive histogram equalization, gamma transformation, median filtering and multi-scale Retinex algorithm.

3. The intelligent visual inspection system for non-standard automated production lines according to claim 2, characterized in that: The specific process of image enhancement by the multi-scale Retinex algorithm is as follows: The input image is divided into incident and reflected components; The input image is processed according to the single-scale Retinex algorithm, and the incident component in the input image is filtered out using a Gaussian low-pass filter to extract the reflected component; The input image is processed using a single-scale Retinex algorithm at multiple scales to obtain reflection components of different scales, and the reflection components of different scales are weightedly fused to obtain the output image enhanced by the multi-scale Retinex algorithm.

4. The intelligent visual inspection system for non-standard automated production lines according to claim 3, characterized in that: The steps of using the Canny algorithm to perform edge detection on an image are as follows: Perform Gaussian filtering on the image to remove noise; Use the Sobel operator to detect edges of the image, calculate the horizontal and vertical gradients of the image, and obtain the gradient intensity and direction of each pixel; Based on the gradient direction, the two neighboring pixel values ​​of each pixel along the gradient direction are checked. If the gradient magnitude of the current pixel is greater than the values ​​of the two neighboring pixels, the pixel is retained, otherwise it is suppressed. Use high and low thresholds to determine the strength of the edge. Pixels stronger than the high threshold are considered "definite edges", pixels lower than the low threshold are considered "non-edge pixels", and pixels between the two need to be further judged through the connection step; Edge connection is used to confirm whether the pixel marked as "possible edge" belongs to the actual edge. If it is connected to the "confirmed edge" pixel, it is retained as an edge pixel, otherwise it is suppressed.

5. The intelligent visual inspection system for non-standard automated production lines according to claim 1, characterized in that: The specific process of performing end-to-end defect recognition on an image based on the CNN model and obtaining the number of defect samples is as follows: Perform data enhancement on image data to avoid overfitting; The convolutional layer extracts local features of the image layer by layer, and the pooling layer gradually reduces the size of the feature map to extract more abstract features; Use the fully connected layer to map the features extracted by the convolutional layer to the final layer, and output whether the defect exists in the final layer; Calculate the number of defect samples based on the final layer output results.

6. The intelligent visual inspection system for non-standard automated production lines according to claim 5, characterized in that: The process of determining whether to optimize the detection system based on the evaluation results is as follows: An evaluation model is constructed based on the machine learning algorithm according to the missed detection rate, precision rate, and false detection rate to generate a detection evaluation coefficient. The specific calculation formula is as follows: Where α is the missed detection rate, μ1 is the missed detection rate weight coefficient, β is the precision rate, μ2 is the precision rate weight coefficient, γ is the false detection rate, and μ3 is the false detection rate weight coefficient; Compare and analyze the detection evaluation coefficient with the preset evaluation threshold. If the detection evaluation coefficient is greater than the preset evaluation threshold, the system's visual detection performance is good and there is no need to optimize the detection system. If the detection evaluation coefficient is less than the preset evaluation threshold, the system's visual detection performance is poor and the detection system needs to be optimized.

7. The intelligent visual inspection system for non-standard automated production lines according to claim 3, characterized in that: The specific formula for the output image after enhancement by the multi-scale Retinex algorithm is as follows: Where r(x,y) represents the output image, S(x,y) represents the input image, * is the convolution symbol, and G(x,y) is the center-surround function.

8. The intelligent visual inspection system for non-standard automated production lines according to claim 7, characterized in that: The specific calculation formula of the image peak signal-to-noise ratio is as follows: PSNR is the peak signal-to-noise ratio of the image, S(j,k) is the pixel value of the jth row and kth column in the input image, r(j,k) is the pixel value of the jth row and kth column in the output function, MAX is the maximum pixel value, and M and N are the height and width of the image respectively.

9. An intelligent visual inspection method for non-standard automated production lines, characterized in that: include: Simulate the automated production line inspection process, collect images of known samples to be inspected, and obtain images of the samples to be inspected; The sample images to be tested are enhanced and normalized using the OpenCV-Python visual algorithm library. The Canny algorithm is used to detect edges of the images. The image peak signal-to-noise ratio and the number of edges are used to indirectly evaluate the effect of image enhancement. Based on the indirect evaluation results, the contrast threshold value in the OpenCV-Python visual algorithm is analyzed and adjusted for its effect on image enhancement. Perform end-to-end defect recognition on the image based on the CNN model to obtain the number of defect samples; Obtain the number of known defect samples, calculate the missed detection rate, precision rate, and false detection rate during the inspection process based on the number of defect samples, evaluate the visual inspection performance based on the machine learning algorithm, and determine whether to optimize the inspection system based on the evaluation results; The specific steps for adjusting the threshold value for limiting contrast are as follows: The number of edges and image peak signal-to-noise ratio are defined as input variables and divided into different fuzzy sets respectively; Whether to adjust the threshold value of limiting contrast is defined as the output variable, and it is divided into fuzzy sets; Formulate fuzzy rules to describe the influence of edge number and image peak signal-to-noise ratio on the threshold value for limiting contrast; Fuzzy reasoning is performed according to fuzzy rules to determine whether the threshold value for limiting contrast should be adjusted.

Citation Information

Patent Citations

  • Intelligent defect detection system for anode copper plate production

    CN118864428A

  • Recursive adaptive color correction method for underwater light source image

    CN118918028A