Plastic product surface defect detection method and system based on machine vision

By combining the acquisition and analysis of multi-angle surface images and polarization images with a polarization response model, the reliability of surface defect detection in plastic products in existing technologies has been solved. This enables efficient identification of complex and weakly visible defects, improving the accuracy and reliability of batch testing.

CN121544560APending Publication Date: 2026-02-17DONGTAI KAIPENG PLASTIC CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202511708783.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-20
Publication Date
2026-02-17

AI Technical Summary

Technical Problem

Existing technologies are insufficient to effectively identify complex and subtle defects on the surface of plastic products, resulting in insufficient reliability of batch testing, especially in high-consistency, high-volume production where it is difficult to meet quality control requirements.

Method used

By jointly acquiring and analyzing multi-angle surface images and polarization images, and combining them with a pre-trained polarization response analytical model, defects such as texture fracture and stress-induced optical changes on the surface of plastic products are analyzed, and defects are detected by using surface damage aggregation feature values.

Benefits of technology

It significantly improves the reliability and accuracy of batch inspection, effectively identifying a variety of complex and weakly visible surface defects, and meeting the high reliability inspection requirements in precision manufacturing scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121544560A_ABST
    Figure CN121544560A_ABST
Patent Text Reader

Abstract

The invention discloses a plastic product surface defect detection method and system based on machine vision, and relates to the technical field of surface defect detection. The plastic product surface defect detection method based on machine vision comprises the following steps: acquiring multi-angle surface image data and plastic polarization image data of a set plastic product batch; performing defect appearance analysis on the multi-angle surface image data to obtain a surface defect perception feature set; based on a pre-trained polarization response analysis model, in combination with the plastic polarization image data of the set plastic product batch, analyzing a polarization surface defect feature set of the set plastic product batch, and in combination with the surface defect perception feature set, analyzing a surface damage aggregation feature value of the set plastic product batch; according to the method, defect detection processing is carried out on the set plastic product batch through the surface damage aggregation characteristic value, so that the defect identification precision is effectively improved, and the high-reliability surface quality detection requirement of a precise plastic manufacturing scene on a large batch of products is met.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of surface defect detection technology, specifically to a method and system for detecting surface defects in plastic products based on machine vision. Background Technology

[0002] Plastic products are widely used in the manufacturing of consumer electronics, automotive parts, home appliance housings, and precision structural components. Their surface quality directly affects the appearance consistency and structural reliability of the products. During injection molding, cooling, demolding, and subsequent processing, plastic products are prone to various surface defects, such as flow marks, weld lines, microcracks, stringing, wear, micro-pits, and localized roughening. Traditional manual visual inspection methods rely on the experience of operators, which can lead to fatigue over long periods of work. Furthermore, they have limited ability to identify minor surface damage, slight scratches, or irregular weak defects, and the inspection results are easily affected by subjective judgment, making it difficult to meet the quality control requirements of high consistency and high-volume production.

[0003] With the development of industrial automation, machine vision inspection methods based on two-dimensional images are gradually being applied to the identification of surface defects in plastic products. Existing technologies usually use single-angle visible light images to inspect plastic surfaces. However, plastic materials have certain reflective and anisotropic optical properties. Single-angle visible light images are prone to missing detection when facing areas with weak texture, low-contrast scratches, and microcracks on smooth surfaces. Moreover, many defects are difficult to fully display under normal lighting conditions.

[0004] Existing technology, such as the patent application with publication number CN118762021B, discloses a machine vision-based method and system for detecting surface defects in plastic products, including the following steps: Step 1: Acquiring surface images of plastic products; This invention acquires images of the surface of plastic products, analyzes the images, calculates the proportion of abnormal areas, makes a preliminary judgment on bubbles on the surface of plastic products, generates a pre-defect signal or a defect signal, and based on the generated pre-defect signal, performs a specific analysis on the bubbles on the surface of plastic products, calculates the defect judgment value, and assesses the degree of impact on plastic products based on the defect judgment value. Thus, when inspecting plastic products, the image analysis-based method can efficiently and accurately identify and evaluate the defects of bubbles on the surface of plastic products, improve detection accuracy, and provide real-time feedback on the detection results. This allows for timely adjustments to production processes or improvements to product design, reducing rework and resource waste caused by defective products.

[0005] Based on the above findings, the limitations of existing technologies include at least the following problems: existing technologies are difficult to effectively identify complex non-bubble defects such as texture fractures or directional scratches on the surface of plastic products, resulting in a high rate of missed detection. Furthermore, they lack polarization imaging and polarization feature analysis capabilities, and are only sensitive to changes in brightness. At the same time, some weakly visible defects, such as minor surface damage and stress-induced changes in surface optical properties, have extremely low contrast in ordinary visible light images, but exhibit directional, differential, or anisotropic characteristics in polarization imaging. Without joint analysis of surface and polarization images, it is difficult to effectively identify these weakly visible surface defects, which makes it difficult for existing technologies to meet the high-reliability defect detection requirements for large-volume products in precision manufacturing scenarios of plastic products. Summary of the Invention

[0006] To address the shortcomings of existing technologies, this invention provides a machine vision-based method and system for detecting surface defects in plastic products, which solves the problem that existing technologies struggle to identify complex and weakly visible surface defects, leading to insufficient reliability in batch testing.

[0007] To achieve the above objectives, the present invention provides the following technical solution: a machine vision-based method for detecting surface defects in plastic products, comprising the following steps: acquiring multi-angle surface image data and plastic polarization image data of a specified batch of plastic products; performing defect manifestation analysis on the multi-angle surface image data of the specified batch of plastic products to obtain a surface defect perception feature set for the specified batch of plastic products; analyzing the polarization surface defect feature set of the specified batch of plastic products based on a pre-trained polarization response analytical model and in conjunction with the plastic polarization image data of the specified batch of plastic products, and analyzing the surface damage aggregation feature value of the specified batch of plastic products in conjunction with the surface defect perception feature set; and performing defect detection processing on the specified batch of plastic products based on the surface damage aggregation feature value.

[0008] Furthermore, the multi-angle surface image data includes plastic surface image data for each angle, and the plastic surface image data specifically includes the pixel value and two-dimensional coordinates of each pixel.

[0009] Further, the specific steps for obtaining the surface defect perception feature set of a specified batch of plastic products are as follows: Target detection processing is performed on the surface image data of each angle of the specified batch of plastic products to obtain a set of surface regions for several plastic products in the specified batch at each angle; feature extraction processing is performed on the surface region set of each plastic product in the specified batch at each angle to obtain its corresponding surface defect feature set, including surface texture fracture feature values, surface direction disturbance aggregation feature values, and surface micro-contour disturbance amplitude feature values; based on the surface defect feature set of each plastic product in the specified batch at each angle, the surface defect feature values ​​of the corresponding plastic products are analyzed, and angle fusion processing is performed to extract the surface defect perception feature set of the specified batch of plastic products.

[0010] Furthermore, the specific steps for obtaining the surface defect feature set of each plastic product at each angle of the specified batch of plastic products are as follows: read the surface region set of each plastic product at each angle of the specified batch of plastic products and perform preprocessing; perform defect deconstruction processing on the surface region set of each plastic product at each angle of the specified batch of plastic products after preprocessing to obtain the surface texture fracture feature value, surface direction disturbance aggregation feature value, and surface micro-contour disturbance amplitude feature value of the corresponding plastic product.

[0011] Furthermore, the specific steps of the angle fusion processing are as follows: Based on the surface defect feature values ​​of each plastic product in the set batch at each angle, extract the defect contribution weight value of the corresponding angle; comprehensively analyze the surface defect feature values ​​and defect contribution weight values ​​of each plastic product in the set batch at each angle to obtain the surface defect perception feature set of the set batch of plastic products, including the defect mapping feature value of each plastic product.

[0012] Furthermore, the plastic polarization image data specifically comprises the polarization intensity set of each polarized pixel in the plastic polarization image and the corresponding two-dimensional polarization coordinates, and the polarization response analytical model includes a polarization input layer, a polarization feature decomposition layer, and a polarization output layer.

[0013] Further, the specific steps for analyzing the polarization surface defect feature set of a batch of plastic products are as follows: Based on the plastic polarization image data of the batch of plastic products, extract the surface polarization set of several plastic products in the batch of plastic products; input the surface polarization set of each plastic product in the batch of plastic products into the pre-trained polarization response analytical model, and analyze the polarization anomaly feature set of the corresponding plastic products, including polarization difference feature values, polarization anisotropic diffusion feature values, and polarization contrast collapse feature values; based on the polarization anomaly feature set of each plastic product in the batch of plastic products, analyze the polarization surface defect feature set of the batch of plastic products, including the polarization surface defect feature value of each plastic product.

[0014] Furthermore, the specific steps for analyzing the polarization anomaly feature set of each plastic product in the specified batch of plastic products are as follows: In the polarization input layer of the polarization response analytical model, the surface polarization set of each plastic product in the specified batch of plastic products is received and polarization preprocessing is performed; in the polarization feature decomposition layer of the polarization response analytical model, the surface polarization set of each plastic product in the specified batch of plastic products after polarization preprocessing is subjected to polarization deconstruction processing, and the polarization defect response feature vector of the corresponding plastic product is extracted; in the polarization output layer of the polarization response analytical model, based on the polarization defect response feature vector of each plastic product in the specified batch of plastic products, the polarization anomaly feature set of the corresponding plastic product is output.

[0015] Furthermore, the specific steps for defect detection processing of a set batch of plastic products based on surface damage clustering characteristic values ​​are as follows: The surface damage clustering characteristic values ​​of the set batch of plastic products are compared with a preset surface damage clustering characteristic threshold range; if the surface damage clustering characteristic value of the set batch of plastic products is lower than the lower limit of the preset surface damage clustering characteristic threshold range, the set batch of plastic products is marked as a slightly abnormal batch; if the surface damage clustering characteristic value of the set batch of plastic products is within the preset surface damage clustering characteristic threshold range, the set batch of plastic products is marked as a moderately abnormal batch; if the surface damage clustering characteristic value of the set batch of plastic products is higher than the upper limit of the preset surface damage clustering characteristic threshold range, the set batch of plastic products is marked as a highly abnormal batch.

[0016] A machine vision-based surface defect detection system for plastic products includes: a data acquisition module for acquiring multi-angle surface image data and plastic polarization image data of a specified batch of plastic products; a multi-angle defect display analysis module for performing defect display analysis on the multi-angle surface image data of the specified batch of plastic products to obtain a surface defect perception feature set of the specified batch of plastic products; a polarization defect analysis module for analyzing the polarization surface defect feature set of the specified batch of plastic products based on a pre-trained polarization response analysis model and combined with the plastic polarization image data of the specified batch of plastic products; a defect comprehensive analysis module for analyzing the surface damage aggregation feature value of the specified batch of plastic products based on the surface defect perception feature set and the polarization surface defect feature set of the specified batch of plastic products; and a defect detection feedback module for performing defect detection processing on the specified batch of plastic products based on the surface damage aggregation feature value.

[0017] The present invention has the following beneficial effects: (1) The machine vision-based method for detecting surface defects in plastic products can effectively capture weak defects such as texture fracture and local optical changes caused by stress under different imaging conditions by jointly acquiring and analyzing multi-angle surface images and polarization images. After feature deconstruction, the multi-angle images can extract features reflecting surface defects, so that abnormal areas that are difficult to be stably displayed in a single angle can be enhanced after fusion. Combined with the corresponding features extracted from the polarization images, the optical response difference of the surface under different polarization directions can be significantly enhanced, so that weak abnormalities can obtain higher contrast in polarization imaging. The surface damage aggregation feature value constructed by combining the above features can centrally quantify the abnormal distribution of the entire batch of products, effectively improve the reliability of batch detection, and thus meet the high reliability surface quality detection requirements of large batch products in precision plastic manufacturing scenarios.

[0018] (2) The machine vision-based plastic product surface defect detection method can effectively perceive the surface state of each plastic product from multiple angles by jointly analyzing the multi-angle surface images of a batch of plastic products. After target detection and feature deconstruction, the image of each angle generates surface defect feature values. By combining the defect contribution weight of each angle through angle fusion, the features from different angles present a direction compensation effect during the fusion process. This makes the minor defects that are not obvious at some angles significantly enhanced after fusion, improving the expression intensity of the overall features, thereby comprehensively reflecting the true state of the surface, making the surface defect judgment more accurate, and thus effectively improving the accuracy of batch defect detection.

[0019] (3) The machine vision-based plastic product surface defect detection method constructs a polarization response analytical model and performs in-depth analysis of the surface polarization set to generate a polarization anomaly feature set. This enables the structured characterization of subtle changes such as weakening of the plastic product surface under different polarization directions, thereby effectively improving the identification accuracy of weak defects. Furthermore, the joint analysis of the polarization anomaly feature set shows that the defect detection can exhibit higher anti-interference ability. Especially in complex imaging scenarios such as fine-scale disturbances, it can still maintain a stable response analysis effect. Moreover, the polarization surface defect feature value generated by the model can establish a natural correspondence with the features extracted from the surface image, so that the two types of features complement each other, thereby effectively improving the structural integrity of the overall detection link and thus improving the reliability of defect detection.

[0020] (4) The machine vision-based plastic product surface defect detection system can effectively improve the efficiency of defect detection through the collaborative processing of various modules. The data acquisition module can simultaneously acquire multi-angle surface image data and polarization image data; the multi-angle defect display analysis module combines the feature differences between angles to perform in-depth analysis of the surface details of each plastic product, making the abnormality display at the surface level more complete; the polarization defect analysis module relies on the pre-trained polarization response analysis model to perform structured extraction of response patterns related to polarization direction changes, so that polarization-related subtle abnormalities can be effectively identified; the defect comprehensive analysis module fuses the two types of features to generate surface damage aggregation feature values, realizing the identification of the overall defect status of the batch; finally, the defect detection feedback module transforms the comprehensive analysis results into judgment information that can be directly applied to production line quality inspection, thereby significantly improving the accuracy of defect identification in batch inspection scenarios.

[0021] Of course, any product implementing this invention does not necessarily need to achieve all of the advantages described above at the same time. Attached Figure Description

[0022] Figure 1 This is a flowchart of a machine vision-based method for detecting surface defects in plastic products according to the present invention.

[0023] Figure 2 This is a flowchart illustrating the specific steps involved in obtaining a set of surface defect perception features for a given batch of plastic products in a machine vision-based method for detecting surface defects in plastic products according to the present invention.

[0024] Figure 3 This is a schematic diagram illustrating the set of polarization anomaly feature set data for a batch of plastic products in a machine vision-based method for detecting surface defects in plastic products according to the present invention.

[0025] Figure 4 This is a block diagram of a machine vision-based surface defect detection system for plastic products according to the present invention. Detailed Implementation

[0026] Please see Figure 1This invention provides a technical solution: a machine vision-based method for detecting surface defects in plastic products, comprising the following steps: acquiring multi-angle surface image data and plastic polarization image data of a specified batch of plastic products; performing defect manifestation analysis on the multi-angle surface image data of the specified batch of plastic products to obtain a surface defect perception feature set for the specified batch of plastic products; analyzing the polarization surface defect feature set of the specified batch of plastic products based on a pre-trained polarization response analytical model and combined with the plastic polarization image data of the specified batch of plastic products, and analyzing the surface damage aggregation feature value of the specified batch of plastic products based on the surface defect perception feature set; and performing defect detection processing on the specified batch of plastic products based on the surface damage aggregation feature value.

[0027] The specific steps for analyzing and setting the surface damage aggregation characteristic value of a batch of plastic products are as follows: A comprehensive analysis of the polarization surface defect characteristic value and defect mapping characteristic value of each plastic product in the set batch is performed to obtain the corresponding surface damage characteristic value (used to characterize the overall degree of defects on the surface of the plastic product). The surface damage characteristic value of each plastic product is compared with a preset surface damage characteristic threshold. If the surface damage characteristic value of a certain plastic product is lower than the preset surface damage characteristic threshold, then the plastic product is qualified; otherwise, it is unqualified. The number of unqualified plastic products is counted and compared with the total number of plastic products in the set batch to obtain the surface damage aggregation characteristic value of the set batch of plastic products.

[0028] The specific formula for calculating the surface damage characteristic value of a specific plastic product within a given batch of plastic products is as follows: ;in, To set the surface damage characteristic value of a specific plastic product within a batch of plastic products, To set the polarization surface defect characteristic value of a specific plastic product within a batch of plastic products, The polarization surface adjustment coefficients are stored in the database. To set the defect mapping characteristic value for a specific plastic product within a batch of plastic products, These are the defect mapping adjustment coefficients stored in the database. These are the difference adjustment coefficients stored in the database.

[0029] It should be noted that the polarization surface adjustment coefficients stored in the database Defect mapping adjustment coefficient The acquisition steps are as follows: Read the polarization surface defect feature value and defect mapping feature value of each plastic product in the specified batch of plastic products; extract the mean value of polarization surface defect features and the mean value of defect mapping features, and sum them to obtain the damage sum value; then, ratio the mean value of polarization surface defect features and the mean value of defect mapping features with the damage sum value, and use the corresponding results as the polarization surface adjustment coefficient. Defect mapping adjustment coefficient .

[0030] Difference adjustment coefficients stored in the database The acquisition steps are as follows: Read the polarization surface defect feature value and defect mapping feature value of each plastic product in the specified batch, and extract the correlation coefficient between the two feature values ​​based on the Pearson correlation coefficient, which is then used as the difference adjustment coefficient. .

[0031] The specific steps for defect detection processing of a set batch of plastic products based on surface damage aggregation characteristic values ​​are as follows: The surface damage aggregation characteristic value of the set batch of plastic products is compared with the preset surface damage aggregation characteristic threshold range; if the surface damage aggregation characteristic value of the set batch of plastic products is lower than the lower limit of the preset surface damage aggregation characteristic threshold range, the set batch of plastic products is marked as a batch with a slight abnormality level (indicating that there is a certain proportion of slight surface damage in the batch, but the overall situation is still within an acceptable range); If the surface damage aggregation characteristic value of a batch of plastic products is within the preset surface damage aggregation characteristic threshold range, the batch of plastic products will be marked as a moderately abnormal batch (indicating that there is a relatively obvious surface damage aggregation phenomenon in the batch, and the damage characteristics are moderately concentrated among multiple plastic products); if the surface damage aggregation characteristic value of a batch of plastic products is higher than the upper limit of the preset surface damage aggregation characteristic threshold range, the batch of plastic products will be marked as a highly abnormal batch (indicating that multiple plastic products in the batch have significant damage aggregation phenomena, and should be judged as an unqualified batch).

[0032] Specifically, such as Figure 2 As shown, the multi-angle surface image data includes plastic surface image data from each angle, and the plastic surface image data specifically includes the pixel value and two-dimensional coordinates of each pixel.

[0033] The specific steps to obtain the surface defect perception feature set of a set of plastic products are as follows: Target detection processing is performed on the surface image data of each angle of the set of plastic products to obtain the surface region set of several plastic products in the set of plastic products at each angle; Feature extraction processing is performed on the surface region set of each plastic product in the set of plastic products at each angle to obtain the surface defect feature set of its corresponding angle, including surface texture fracture feature value, surface direction disturbance aggregation feature value, and surface micro-contour disturbance amplitude feature value. Based on the surface defect feature set of each plastic product in a set batch of plastic products at each angle, the surface defect feature values ​​of the corresponding plastic products are analyzed (that is, the surface texture fracture feature value, surface direction disturbance aggregation feature value, and surface micro-contour disturbance amplitude feature value of each plastic product in a set batch of plastic products at each angle are normalized and mapped to between 0 and 1. Based on the normalized surface texture fracture feature value, surface direction disturbance aggregation feature value, and surface micro-contour disturbance amplitude feature value of each plastic product at each angle, a weighted processing is performed to obtain the surface defect feature value of each plastic product at each angle), and angle fusion processing is performed to extract the surface defect perception feature set of the set batch of plastic products.

[0034] It should be noted that in this implementation example, the weight coefficients of each parameter in the weighted processing can be obtained using sample entropy weighting. Taking the weighted processing of surface defect feature values ​​as an example, the surface texture fracture feature value, surface direction disturbance aggregation feature value, and surface micro-contour disturbance amplitude feature value of each angle of the set plastic product batch are read, and their corresponding information entropy values ​​are extracted respectively. Then, their corresponding information entropy values ​​are transformed using the reciprocal suppression mapping function f(x)=1 / (1+x), such as 1 / (1+information entropy value of surface texture fracture feature value), and summed to obtain the information entropy sum value. The corresponding transformed information entropy values ​​are then compared with the information entropy sum value to obtain the weight coefficients corresponding to each parameter.

[0035] The specific steps of the target detection process are as follows: The surface target detection model stored in the database is called (it can be a detection model built based on existing deep learning technology, such as a target detection model based on convolutional neural networks, used to automatically locate plastic product areas in the input image. This model has been trained on a large number of plastic product surface images before deployment, and the network weight parameters obtained from the training are stored in the database for direct use in the detection stage). In the multi-layer convolutional feature extraction structure of this model, the edges, textures, light and dark boundaries, and contour shapes in the image are analyzed layer by layer, and candidate regions are generated. Based on the extracted features, several candidate detection boxes containing location information and confidence scores are generated. Non-maximum suppression processing is performed on the above candidate detection boxes. The overlap ratio between any two candidate boxes is calculated. When the overlap ratio exceeds a preset threshold, the candidate boxes with higher confidence are retained and the candidate boxes with lower confidence are removed, thereby obtaining the final set of detection boxes for the surface area of ​​the plastic product at the current angle (i.e., the plastic product area). The detection box set is mapped to the original surface image data. The pixel area corresponding to each detection box is cropped to obtain the surface area set of each plastic product at each angle of the set batch of plastic products. After completing the target detection processing of surface image data for each angle of the set plastic product batch, in order to ensure that the plastic products identified under different shooting angles can maintain consistency in subsequent analysis, a cross-angle consistency identifier is established for the detection frame of plastic products at each angle. The specific steps are as follows: Read the shooting angle parameters, camera intrinsic parameters, extrinsic parameters and resolution corresponding to the multi-angle surface images stored in the database of the set plastic product batch, and based on the structure of the shooting device using a fixed turntable or a fixed multi-camera array, select 90° as the reference angle, and statistically analyze the geometric mapping transformation relationship between it and images at different angles. To achieve spatial correspondence between multiple angles, for each plastic product detection frame at other angles, the two-dimensional coordinate range of the detection frame is read one by one, and the detection frame is projected onto the coordinate system of the reference angle image according to the cross-angle mapping transformation relationship to obtain the corresponding area position after projection; and the overlap ratio between all detection frames in the reference angle image at other angles is calculated; when it is greater than a preset threshold (e.g., 0.5 or 0.6), it is determined that the detection frame corresponds to the same plastic product as the detection frame at the reference angle; if multiple detection frames meet the conditions, the one with the largest overlap ratio is selected as the final matching object. For each set of successfully matched detection frames (spanning multiple shooting angles), a unified plastic product identification number (ID) is generated to obtain the surface area set of each plastic product area at each angle, that is, the pixel value and two-dimensional coordinates of each pixel point corresponding to each angle of each plastic product area.

[0036] The specific steps to obtain the surface defect feature set of each plastic product from each angle of a specified batch of plastic products are as follows: Read the surface region set of each plastic product from each angle of the specified batch of plastic products and perform preprocessing, such as noise suppression processing of the surface region set of each plastic product. Median filtering or Gaussian filtering methods can be used to remove random noise points introduced by the imaging environment. Brightness equalization processing is performed on the filtered image, using an adaptive histogram equalization method to enhance the detail representation of dark and bright areas of the image. Defect deconstruction processing is then performed on the surface region set of each plastic product from each angle of the specified batch of plastic products to obtain the corresponding surface texture fracture feature value, surface direction perturbation aggregation feature value, and surface micro-contour perturbation amplitude feature value of the plastic product. Specifically: For each plastic product (region) at each angle of a set batch of plastic products, the pixel value of each corresponding pixel is processed in grayscale to obtain the grayscale pixel value of the corresponding pixel. Then, the texture gradient extraction process is performed. The difference operators in the horizontal and vertical directions can be used to calculate the grayscale difference between adjacent pixels to obtain the texture gradient components of each pixel in the two directions. Based on the texture gradient components in the two directions, the texture gradient magnitude and texture gradient direction of the pixel are statistically analyzed. All pixels within each plastic product (area) are spatially sorted according to their two-dimensional coordinates. Based on the principle of four-neighbor or eight-neighbor connectivity, pixels with continuous texture gradient direction changes and similar gradient magnitudes are grouped into the same segment (i.e., when the direction difference between the texture gradient direction of an adjacent pixel and the texture gradient direction of the current pixel is less than a preset direction difference threshold, and the difference in texture gradient magnitude is less than a preset magnitude difference threshold, the two pixels are determined to belong to the same texture continuous region. The added adjacent pixel is used as the new analysis center point, and the search continues to expand to its neighborhood direction. The above direction difference judgment and magnitude difference judgment are repeated until no adjacent pixels satisfying the conditions appear in the pixel set), so as to form several texture continuous segments. For each texture continuous segment, several sliding analysis windows are set at the locations where texture abrupt changes may occur at its boundary or inside. Each sliding analysis window consists of three consecutive adjacent pixels, which are denoted as the previous pixel, the middle pixel, and the next pixel, respectively. For each sliding analysis window, the two-dimensional coordinates of three pixels are interpolated. Specifically, the difference between the two-dimensional coordinates of the previous pixel and the middle pixel, and the difference between the two-dimensional coordinates of the middle pixel and the next pixel are calculated to obtain two texture direction vectors. Then, the change in the angle between these two vectors is calculated using the vector angle formula, and the radian value of this change in angle is obtained using the inverse cosine function. The change in angle of all sliding analysis windows is counted one by one. When the change in angle of a certain sliding analysis window is greater than the preset texture continuity threshold, the middle pixel of that window is marked as a texture break point. The number of texture break points and the total number of pixels in each plastic product (area) are counted and the ratio is processed to obtain the surface texture breakage characteristic value, which reflects whether the texture continuity of the surface area has been damaged. When cracks, scratches, mold texture breaks, or micro-dimples cause abrupt changes in texture, the texture breakage characteristic value will increase significantly. Read the orientation angle value of each pixel, construct a local orientation analysis window of a preset size (e.g., a 5×5 pixel window) with each pixel as the center, statistically analyze the gradient orientation angle distribution of all pixels within the local orientation analysis window, and calculate the orientation variance of the orientation angle within the window; when the orientation variance of a certain window exceeds a preset perturbation threshold, mark the center pixel of the window as an orientation perturbation point to indicate that the local orientation distribution at that location has become significantly disordered. Record the two-dimensional coordinates corresponding to all directional perturbation points, and perform aggregation detection based on a distance threshold. Specifically, for any directional perturbation point, calculate its Euclidean distance to other directional perturbation points. If the distance is less than a preset aggregation threshold, the two perturbation points are determined to belong to the same perturbation aggregation region. Using this perturbation point as the center point, continue expanding outwards, adding perturbation points whose distance meets the threshold condition to the current aggregation region until no new points are added. For each directional perturbation aggregation region, count the number of perturbation points within it and the area of ​​its minimum bounding rectangle (i.e., read the aggregation region). The horizontal and vertical coordinates of each disturbance point are calculated, and the minimum horizontal coordinate value, maximum horizontal coordinate value, minimum vertical coordinate value, and maximum vertical coordinate value are recorded. The width and height of the rectangle are calculated based on these four boundary coordinates, and then the product of the width and height is performed. The ratio of the number of disturbance points to the area of ​​the outer rectangle is used as the disturbance density of the aggregation area. The disturbance density of all disturbance aggregation areas is weighted and averaged to obtain the surface directional disturbance aggregation characteristic value, which is used to reflect whether there is a directional disturbance concentration phenomenon caused by scratches or drag marks in the surface area. A neighborhood analysis window of a preset size (e.g., a 7×7 pixel window) is constructed using each pixel within each plastic product (area) as the center point. All pixels within this window are spatially sorted according to their two-dimensional coordinates. The grayscale values ​​of all pixels in each neighborhood analysis window are read, and the grayscale value of the center pixel is used as the reference value. Grayscale difference processing (absolute value) is then performed on the remaining pixels within the neighborhood analysis window, calculating the difference between the grayscale value of each adjacent pixel and the grayscale value of the center pixel to obtain several local brightness difference values ​​within the neighborhood. Amplitude scaling is then performed. The absolute values ​​of the brightness differences are calculated and extracted. The maximum value of the absolute value of the brightness difference is used as the local micro-contour perturbation amplitude of the neighborhood analysis window. The local micro-contour perturbation amplitudes of all neighborhood analysis windows are used as input to mark the corresponding window center pixels, i.e., the local micro-contour perturbation amplitude of each pixel. The average value is taken as the surface micro-contour perturbation amplitude feature value, which is used to characterize the degree of micro-scale contour perturbation caused by minor defects on the surface of plastic products under single-angle imaging conditions. It can effectively reflect the local brightness change phenomenon caused by slight unevenness, molding ripples or micro-scratches.

[0037] In this implementation scheme, by performing target detection, cross-angle consistency identification, and multi-type feature extraction on surface images of a batch of plastic products at different angles, a comprehensive analysis of the multi-dimensional structural information of the plastic product surface can be achieved. Secondly, the surface defect feature set obtained by feature extraction processing enables the structural details in the surface image to be expressed with higher resolution. Through cross-angle consistency matching, each plastic product can achieve stable correspondence in the region of multiple imaging angles, thereby avoiding information fragmentation caused by differences in viewing angles and enabling the complete aggregation of multi-angle information. Finally, the extracted surface defect perception feature set enables the surface appearance of each plastic product to be uniformly identified, and ensures that batch-level defect detection maintains continuity in the feature scale and judgment logic of each plastic product, thereby improving the reliability of defect identification.

[0038] Specifically, the angle fusion processing steps are as follows: Based on the surface defect feature values ​​of each plastic product in a set batch of plastic products at each angle, extract the defect contribution weight value of the corresponding angle. Specifically, sum the surface defect feature values ​​of each plastic product in a set batch of plastic products at each angle to obtain the surface abnormal defect feature and value of each plastic product in the set batch of plastic products. Ratio the surface defect feature values ​​of each plastic product in a set batch of plastic products at each angle with the surface abnormal defect feature and value of the corresponding plastic product to obtain the defect contribution weight value of the corresponding angle. A comprehensive analysis is performed on the surface defect feature values ​​and defect contribution weight values ​​of each plastic product in a given batch at each angle to obtain the surface defect perception feature set of the given batch of plastic products. This set includes the defect mapping feature value of each plastic product. Specifically, the defect contribution weight value of each plastic product in the given batch at each angle is used as the weight coefficient of the surface defect feature value at the corresponding angle. This weighting process is then performed to obtain the defect mapping feature value of each plastic product in the given batch (used to characterize the degree of surface defects of each plastic product in the batch and reflect the defect distribution of the batch of products under multi-angle imaging conditions).

[0039] In this implementation scheme, by weighting and fusing the surface defect feature values ​​extracted from each plastic product under different imaging angles, the differences in the appearance of the same defect under multiple perspectives can be effectively integrated. This allows the final defect mapping feature value to truly reflect the overall defect degree of the plastic product surface, thereby improving the stability of feature fusion. Furthermore, the defect mapping feature value obtained through weighted synthesis can not only reduce the interference of random noise on single-angle features, but also enhance details that are difficult to fully express in a single perspective. This enables multi-angle visual information to form a unified surface defect description, which is beneficial to improving the accuracy of defect quantitative processing.

[0040] Specifically, the plastic polarization image data consists of the polarization intensity set of each polarized pixel in the plastic polarization image (including the polarization intensity values ​​of the pixel in multiple polarization directions, such as 0°, 45°, 90°, 135°) and the corresponding polarization two-dimensional coordinates. The polarization response analytical model includes a polarization input layer, a polarization feature decomposition layer, and a polarization output layer.

[0041] The specific steps for analyzing the polarization surface defect feature set of a batch of plastic products are as follows: Based on the plastic polarization image data of the batch of plastic products, extract the surface polarization set of several plastic products in the batch; input the surface polarization set of each plastic product in the batch into a pre-trained polarization response analytical model, and analyze the polarization anomaly feature set of the corresponding plastic product, including polarization difference feature value, polarization anisotropic diffusion feature value, and polarization contrast collapse feature value; based on the polarization anomaly feature set of each plastic product in the batch, analyze the polarization surface defect feature set of the batch, including the polarization surface defect feature value of each plastic product.

[0042] The logic for extracting the surface polarization set and surface region set of several plastic products in a given batch of plastic products is consistent. Both can be extracted by calling the surface target detection model stored in the database. The surface polarization set includes the polarization intensity set of each polarized pixel point in the polarized surface region corresponding to each plastic product and the corresponding polarization two-dimensional coordinates. In order to ensure the consistency of the same plastic product identified in the surface image and polarization image in the subsequent feature fusion process, a cross-image consistency identifier is established for the plastic product region in the two types of images. Based on the two-dimensional coordinate mapping and overlap ratio matching mechanism constructed in the aforementioned cross-image consistency identifier establishment step, the plastic product region in the polarization image and the plastic product region in the ordinary surface image are consistently bound. A unified plastic product identifier number (ID) is assigned to the successfully matched region, and this number is synchronously stored in the surface region set and the polarization surface region set.

[0043] The specific formula for calculating the polarization surface defect characteristic value of a specific plastic product within a given batch of plastic products is as follows: ;in, To set the polarization surface defect characteristic value of a specific plastic product within a batch of plastic products, To set the polarization difference characteristic value of a specific plastic product within a batch of plastic products, These are the polarization difference adjustment coefficients stored in the database. To set the polarization anisotropic diffusion characteristic value of a specific plastic product within a batch of plastic products, These are the anisotropic diffusion adjustment coefficients stored in the database. To set the polarization contrast collapse characteristic value of a specific plastic product within a batch of plastic products, The comparison collapse adjustment coefficient is stored in the database. .

[0044] It should be noted that the polarization difference adjustment coefficients stored in the database Anisotropic diffusion adjustment coefficient Comparison of collapse adjustment coefficient The acquisition steps are as follows: Read the polarization difference characteristic value, polarization anisotropic diffusion characteristic value, and polarization contrast collapse characteristic value of each plastic product in the specified batch. Extract the mean value of the polarization difference characteristic, the mean value of the polarization anisotropic diffusion characteristic, and the mean value of the polarization contrast collapse characteristic, and sum them to obtain the polarization defect sum value. Ratio the mean value of the polarization difference characteristic, the mean value of the polarization anisotropic diffusion characteristic, and the mean value of the polarization contrast collapse characteristic with the polarization defect sum value, and use the corresponding results as the polarization difference adjustment coefficient. Anisotropic diffusion adjustment coefficient Comparison of collapse adjustment coefficient .

[0045] The following is a specific implementation example for calculating the polarization surface defect characteristic values ​​of a certain plastic product within a set batch of plastic products. The available data includes the polarization difference characteristic values, polarization anisotropic diffusion characteristic values, and polarization contrast collapse characteristic values ​​of five randomly selected plastic products from the set batch, as detailed in Table 1 and... Figure 3 As shown:

[0046] Polarization difference adjustment coefficients stored in the database Approximately 0.291; Anisotropic diffusion regulation coefficients stored in the database Approximately 0.339; The database stores the contrast collapse adjustment coefficient. Approximately 0.370; Substituting the data from Table 1 and the aforementioned coefficients into the specific formula for calculating the polarization surface defect characteristic value of a certain plastic product in a given batch of plastic products, we obtain: The characteristic value of the polarization surface defect of the first plastic product in a batch is set as 0.291×[exp(0.187)-1]+0.339×√0.238+0.370×0.264≈0.323; The characteristic value of the polarization surface defect of the second plastic product in the batch is set as 0.291×[exp(0.234)-1]+0.339×√0.327+0.370×0.268≈0.370; The characteristic value of the polarization surface defect of the third plastic product in the batch is set as 0.291×[exp(0.428)-1]+0.339×√0.467+0.370×0.512≈0.577; The characteristic value of the polarization surface defect of the fourth plastic product in the batch is set as 0.291×[exp(0.342)-1]+0.339×√0.394+0.370×0.216≈0.411; The polarization surface defect feature value of the fifth plastic product in the batch is set to 0.291×[exp(0.528)-1]+0.339×√0.573+0.370×0.623≈0.690. The specific steps for analyzing the polarization anomaly feature set of each plastic product in the batch are as follows: In the polarization input layer of the polarization response analytical model, the surface polarization set of each plastic product in the batch is received and polarization preprocessing is performed. For example, the polarization intensity value of each polarization pixel is normalized and all polarization intensity values ​​are linearly mapped to the standard interval [0,1] to eliminate the difference in light energy distribution between polarization channels. Noise suppression processing is performed. A local smoothing method based on median filtering can be used. A neighborhood window of a preset size (such as 3×3 or 5×5) is constructed with each polarization pixel as the center. The median of all pixels in the neighborhood is calculated to replace the polarization intensity value of the center pixel to suppress random noise and isolated high-frequency noise. In the polarization feature decomposition layer of the polarization response analytical model, the surface polarization set of each plastic product in the pre-processed batch of plastic products is subjected to polarization deconstruction processing to extract the polarization defect response feature vector of the corresponding plastic product. Specifically, for each polarization pixel, the polarization intensity difference under the 0° polarization and 90° polarization directions is calculated to obtain the orthogonal polarization difference value; the polarization intensity difference under the 45° polarization and 135° polarization directions is calculated to obtain the oblique polarization difference value. The absolute value processing of the orthogonal polarization difference value and the oblique polarization difference value of each polarization pixel is performed and linear normalization is performed to eliminate the amplitude influence caused by the difference in incident light energy in different polarization directions. A neighborhood window is constructed with each polarization pixel as the center, and statistical analysis is performed on all polarization pixels in the window to extract the mean, variance and range of the orthogonal polarization difference value and the oblique polarization difference value. The weighted average processing is performed, and the mean is taken based on the result to extract the polarization difference feature, which is used to comprehensively determine the polarization reflection anomaly under multiple polarization directions of the plastic product. For each polarized pixel in the surface polarization set, the polarization intensity value of the pixel in multiple polarization directions (e.g., 0°, 45°, 90°, 135°) is read. The polarization intensity value of each pixel in each polarization direction is used to form a polarization direction response vector. An analysis window of a preset size (e.g., a 5×5 pixel window) is constructed with the pixel as the center. The polarization intensity values ​​of all pixels in the analysis window in multiple polarization directions are read and a polarization intensity distribution matrix is ​​formed. The corresponding polarization intensity covariance matrix is ​​calculated based on the polarization intensity distribution matrix. Eigenvalue decomposition is performed on the obtained polarization intensity covariance matrix to extract several eigenvectors and their corresponding eigenvalues. The eigenvector with the largest eigenvalue corresponds to the diffusion trend of polarization intensity along the main direction in the analysis window (i.e., the main diffusion direction). The ratio of the largest eigenvalue to the second largest eigenvalue in the covariance matrix is ​​used as the polarization diffusion axis ratio (i.e., the stretching degree of the main diffusion direction). The main diffusion direction angle is analyzed by the proportional relationship between the directional components (i.e., the eigenvector with the largest eigenvalue is the eigenvector corresponding to the main diffusion direction, which has corresponding directional components in the four polarization directions of 0°, 45°, 90°, and 135°; in order to map the components of the above four polarization directions to a single main diffusion direction angle, the directional components of the 0° and 90° polarization directions are subtracted to obtain the horizontal-vertical component value, and the directional components of the 45° and 135° polarization directions are subtracted to obtain the oblique component value, and the main diffusion direction angle is calculated based on the proportional relationship between the two types of component values). Within the analysis window, the polarization intensity component values ​​of all polarized pixels in the main diffusion direction are calculated (i.e., the polarization intensity values ​​at 0°, 45°, 90°, and 135° polarization directions are read, and the polarization intensity values ​​of the pixel in each polarization direction are linearly combined according to the directional components of the feature vector corresponding to the main diffusion direction in the above four polarization directions, i.e., the directional components are used as weights, and the polarization intensity values ​​in the four polarization directions are weighted and summed). All component values ​​are accumulated to obtain the cumulative energy value of polarization intensity in the main diffusion direction within the analysis window. The cumulative energy value is compared with the total energy of all polarization intensity values ​​within the analysis window to obtain the polarization diffusion energy ratio. The polarization diffusion axis ratio, main diffusion direction angle, and polarization diffusion energy ratio obtained in the neighborhood analysis window are weighted and averaged to extract the polarization anisotropic diffusion characteristics, which are used to characterize the polarization directional diffusion caused by surface microstructure anomalies such as injection molding flow marks, directional wear, and microcracks. For each polarized pixel in the surface polarization set, the polarization intensity values ​​of that pixel in multiple polarization directions (e.g., 0°, 45°, 90°, 135°) are read. The maximum and minimum polarization intensity values ​​are extracted from these values, and the difference between them is used as the polarization contrast value of that pixel. A neighborhood window of a preset size (e.g., a 5×5 pixel window) is constructed centered on each polarized pixel. The polarization contrast values ​​of all polarized pixels within the neighborhood window are read, and local statistical analysis is performed on all polarization contrast values. For example, the mean value is processed for all polarization contrast values ​​within the neighborhood window to obtain the local mean of polarization contrast; the variance is processed for the polarization contrast values ​​to obtain the local variance of polarization contrast; the minimum value is extracted for the polarization contrast; and the maximum value is extracted for the polarization contrast. The minimum polarization contrast value and the maximum polarization contrast value are compared (i.e., the minimum polarization contrast value is used as the numerator and the maximum polarization contrast value is used as the denominator) to obtain the polarization collapse ratio. When it approaches zero, it indicates that there is a significant area of ​​reduced polarization reflection in the neighborhood, which usually corresponds to wear areas, rough areas or micro-damage points. The local mean of polarization contrast, local variance of polarization contrast, and ratio of polarization contrast collapse obtained in each neighborhood window are weighted and averaged to extract polarization contrast collapse features, which are used to characterize the phenomenon of polarization reflection intensity collapse caused by fine structural anomalies such as surface roughness, wear, material aging, local degradation, or microcracks. The polarization difference features, polarization anisotropic diffusion features, and polarization contrast collapse features are concatenated into a polarization defect response feature vector. In the polarization output layer of the polarization response analytical model, based on the polarization defect response feature vector of each plastic product in a set batch of plastic products, the polarization anomaly feature set of the corresponding plastic products is output. Specifically, the polarization difference feature, polarization anisotropic diffusion feature, and polarization contrast collapse feature in the polarization defect response feature vector of each plastic product are activated by the Sigmoid function to obtain polarization difference feature value, polarization anisotropic diffusion feature value, and polarization contrast collapse feature value between 0 and 1.

[0047] The pre-training steps for the polarization response analytical model are as follows: A polarization annotation dataset was obtained, consisting of multi-directional polarization image data from several batches of plastic products. The polarization images were acquired by an imaging device with standardized lighting conditions and fixed polarization angles. Each sample in the annotation dataset was manually labeled by quality inspection engineers based on the actual surface appearance, indicating polarization anomalies. The labels included polarization response category information for each polarized pixel or local neighborhood under different polarization directions, ground truth values ​​for polarization difference response, polarization direction diffusion, and polarization contrast change, ensuring that the model could learn the real change patterns under polarization reflection scenarios during the training phase. The labeled data underwent unified preprocessing, such as normalization and brightness correction, and was divided into training, validation, and test sets proportionally, for example, 80% for training, 10% for validation, and 10% for testing.

[0048] The preprocessed polarization data is input into the polarization input layer of the polarization response analytical model. The polarization input layer first learns the differences in basic light intensity distribution between different polarization channels (0°, 45°, 90°, 135°). It then adaptively extracts local polarization energy change features through convolutional kernels to establish a preliminary understanding of the amplitude, direction, and local energy stability of polarization reflection. Subsequently, in the polarization feature decomposition layer, the model learns three modes—polarization difference, directional polarization diffusion, and polarization contrast change—through a convolutional network, local statistical units, and feature decomposition modules. Manually labeled ground truth values ​​are used as supervision signals to enable the model to accurately learn the optical change features of polarization anomaly regions.

[0049] The entire training process employs adaptive optimization algorithms (such as Adam), and dynamically adjusts hyperparameters such as learning rate, number of convolutional kernels, and window size on the validation set to improve the model's generalization ability. After training, the model's performance on unseen polarization images is evaluated using a test set to ensure that the model can stably output polarization difference feature values, polarization anisotropic diffusion feature values, and polarization contrast collapse feature values.

[0050] In this implementation scheme, a polarization response analytical model is introduced to analyze plastic polarization image data, thereby enabling refined analysis of polarization information in the polarization image and structural expression using a polarization anomaly feature set. This allows the subtle differences in reflection of the plastic product surface under different polarization directions to be presented, thus fully recognizing the differences in surface fine structures in polarization imaging and maintaining high local robustness. This ensures that the polarization response can still output stable feature results under complex lighting, material changes, or uneven local energy distribution scenarios. Furthermore, through the joint expression of features such as polarization difference, polarization anisotropic diffusion, and polarization contrast collapse, different types of surface reflection anomalies can be uniformly mapped to polarization surface defect feature values, thereby improving the accuracy of polarization information in identifying subtle surface defects and enhancing the overall reliability of the defect identification link in the batch inspection process.

[0051] Please see Figure 4 This invention provides a technical solution: a machine vision-based surface defect detection system for plastic products, comprising: a data acquisition module for acquiring multi-angle surface image data and plastic polarization image data of a set batch of plastic products; a multi-angle defect display analysis module for performing defect display analysis on the multi-angle surface image data of the set batch of plastic products to obtain a surface defect perception feature set of the set batch of plastic products; a polarization defect analysis module for analyzing the polarization surface defect feature set of the set batch of plastic products based on a pre-trained polarization response analysis model and combined with the plastic polarization image data of the set batch of plastic products; a defect comprehensive analysis module for analyzing the surface damage aggregation feature value of the set batch of plastic products based on the surface defect perception feature set and the polarization surface defect feature set of the set batch of plastic products; and a defect detection feedback module for performing defect detection processing on the set batch of plastic products based on the surface damage aggregation feature value.

[0052] Although preferred embodiments of the invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including both the preferred embodiments and all changes and modifications falling within the scope of the invention.

[0053] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Therefore, if these modifications and variations fall within the scope of the claims of this invention and their equivalents, this invention also intends to include these modifications and variations.

Claims

1. A method for detecting surface defects of a plastic product based on machine vision, characterized in that, The method comprises the following steps: Obtaining multi-angle surface image data and plastic polarization image data of a plastic product batch; Performing defect appearance analysis on the multi-angle surface image data of the plastic product batch to obtain a surface defect perception feature set of the plastic product batch; Based on the pre-trained polarization response analysis model and combined with the plastic polarization image data of the plastic product batch, analyzing the polarization surface defect feature set of the plastic product batch, and combining the surface defect perception feature set, analyzing the surface damage aggregation characteristic value of the plastic product batch; Based on the surface damage aggregation characteristic value, performing defect detection processing on the plastic product batch.

2. The method of claim 1, wherein the method further comprises: The multi-angle surface image data includes plastic surface image data at each angle, and the plastic surface image data is specifically pixel values and two-dimensional coordinates of each pixel point.

3. The method of claim 2, wherein the method further comprises: The specific steps for obtaining the surface defect perception feature set of the plastic product batch are as follows: Performing target detection processing on the surface image data of each angle of the plastic product batch to obtain a surface region set of a plurality of plastic products at each angle of the plastic product batch; Performing feature extraction processing on the surface region set of each plastic product at each angle of the plastic product batch to obtain a surface defect feature set at the corresponding angle, including a surface texture fracture characteristic value, a surface direction disturbance aggregation characteristic value, and a surface micro-profile disturbance amplitude characteristic value; Based on the surface defect feature set of each plastic product at each angle of the plastic product batch, analyzing the surface defect characteristic value of the corresponding plastic product, and performing angle fusion processing to extract the surface defect perception feature set of the plastic product batch.

4. The method of claim 3, wherein the method further comprises: The specific steps for obtaining the surface defect feature set of each plastic product at each angle of the plastic product batch are as follows: Reading the surface region set of each plastic product at each angle of the plastic product batch and performing preprocessing; Performing defect deconstruction processing on the preprocessed surface region set of each plastic product at each angle of the plastic product batch to obtain a surface texture fracture characteristic value, a surface direction disturbance aggregation characteristic value, and a surface micro-profile disturbance amplitude characteristic value of the corresponding plastic product.

5. The method of claim 3, wherein the step of detecting the surface defects of the plastic product comprises the steps of: capturing the image of the plastic product; and detecting the surface defects of the plastic product based on the captured image. The specific steps of angle fusion processing are as follows: Based on the surface defect characteristic value of each plastic product at each angle of the plastic product batch, extracting a defect contribution weight value at the corresponding angle; Performing comprehensive analysis on the surface defect characteristic value and the defect contribution weight value of each plastic product at each angle of the plastic product batch to obtain a surface defect perception feature set of the plastic product batch, including a defect mapping characteristic value of each plastic product.

6. The method of claim 1, wherein the method further comprises: The plastic polarization image data is specifically a polarization intensity set and corresponding polarization two-dimensional coordinates of each polarization pixel point in the plastic polarization image, and the polarization response analysis model includes a polarization input layer, a polarization feature decomposition layer, and a polarization output layer.

7. The machine vision-based surface defect inspection method for plastic products according to claim 6, wherein, The specific steps for analyzing the polarization surface defect feature set of the plastic product batch are as follows: Based on the plastic polarization image data of the plastic product batch, extracting a surface polarization set of a plurality of plastic products of the plastic product batch; The surface polarization set of each plastic product of the set plastic product batch is input into the pre-trained polarization response analysis model to analyze the polarization abnormal feature set of the corresponding plastic product, including polarization difference feature values, polarization anisotropic diffusion feature values, and polarization contrast collapse feature values. Based on the polarization abnormal feature set of each plastic product of the set plastic product batch, the polarization surface defect feature set of the set plastic product batch is analyzed, including the polarization surface defect feature values of each plastic product.

8. The machine vision-based surface defect inspection method for plastic products according to claim 7, wherein, The specific steps of analyzing the polarization abnormal feature set of each plastic product of the set plastic product batch are as follows: In the polarization input layer of the polarization response analysis model, the surface polarization set of each plastic product of the set plastic product batch is received and polarization preprocessing is performed. In the polarization feature decomposition layer of the polarization response analysis model, the surface polarization set of each plastic product of the set plastic product batch after polarization preprocessing is subjected to polarization deconstruction processing to extract the polarization defect response feature vector of the corresponding plastic product. In the polarization output layer of the polarization response analysis model, based on the polarization defect response feature vector of each plastic product of the set plastic product batch, the polarization abnormal feature set of the corresponding plastic product is output.

9. The method of claim 1, wherein the method further comprises: The specific steps of defect detection processing of the set plastic product batch based on the surface damage aggregation feature value are as follows: The surface damage aggregation feature value of the set plastic product batch is compared with the pre-set surface damage aggregation feature threshold interval. If the surface damage aggregation feature value of the set plastic product batch is lower than the lower limit of the pre-set surface damage aggregation feature threshold interval, the set plastic product batch is marked as a batch of mild abnormal grade. If the surface damage aggregation feature value of the set plastic product batch is within the pre-set surface damage aggregation feature threshold interval, the set plastic product batch is marked as a batch of moderate abnormal grade. If the surface damage aggregation feature value of the set plastic product batch is higher than the upper limit of the pre-set surface damage aggregation feature threshold interval, the set plastic product batch is marked as a batch of high abnormal grade.

10. A machine vision based surface defect detection system for plastic products, applying the machine vision based surface defect detection method for plastic products according to any one of claims 1-9, characterized in that, Comprising: A data acquisition module for acquiring multi-angle surface image data and plastic polarization image data of a set plastic product batch; A multi-angle defect appearance analysis module for analyzing the multi-angle surface image data of the set plastic product batch to obtain a surface defect perception feature set of the set plastic product batch; A polarization defect analysis module for analyzing the polarization surface defect feature set of the set plastic product batch based on the pre-trained polarization response analysis model and in combination with the plastic polarization image data of the set plastic product batch; A defect comprehensive analysis module for analyzing the surface damage aggregation feature value of the set plastic product batch based on the surface defect perception feature set and the polarization surface defect feature set of the set plastic product batch; A defect detection feedback module for defect detection processing of the set plastic product batch based on the surface damage aggregation feature value.

Citation Information

Patent Citations

  • A method and system for detecting surface defects of plastic products based on machine vision

    CN118762021B