A workpiece surface defect detection and decision method based on credibility evaluation and intelligent review

CN122243860APending Publication Date: 2026-06-19ANHUI UNIV

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
ANHUI UNIV
Filing Date
2026-01-21
Publication Date
2026-06-19

Smart Images

  • Figure CN122243860A_ABST
    Figure CN122243860A_ABST
Patent Text Reader

Abstract

This invention relates to the field of workpiece surface defect detection technology, specifically to a workpiece surface defect detection and decision-making method based on credibility assessment and intelligent verification. The method employs a hierarchical modular design: an image acquisition module simultaneously acquires workpiece surface images using visible light and polarized light cameras; a data preprocessing module performs image fusion, noise reduction, enhancement, and standardization; a data analysis module extracts features and completes defect classification and quantitative scoring; a judgment and verification module performs credibility assessment and intelligent verification of critical states on the scoring results to improve decision reliability; and a result output module generates a structured report and links with the production line's MES and PLC systems through an interface to achieve automatic alarm and sorting of defective workpieces.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of workpiece surface defect detection technology, and more specifically, to a workpiece surface defect detection and decision-making method based on credibility assessment and intelligent verification. Background Technology

[0002] Currently, machine vision-based workpiece surface defect detection technology is widely used in industry. Existing technologies mainly improve defect recognition rates by optimizing imaging systems and improving deep learning models. However, in precision manufacturing, where stringent quality consistency requirements exist, the reliability of inspection results remains a concern. Existing systems typically output defect types and scores directly, but cannot assess the reliability of these results. Furthermore, when defect scores fall within the critical range between acceptable and unacceptable, even small fluctuations can easily lead to misjudgments, and existing systems lack specific mechanisms for such high-risk scenarios. Additionally, the opaque decision-making process hinders quality traceability. Summary of the Invention

[0003] The purpose of this invention is to provide a workpiece surface defect detection and decision-making method based on credibility assessment and intelligent verification, so as to solve the problems mentioned in the background art.

[0004] To achieve the above objectives, this invention provides a workpiece surface defect detection and decision-making method based on reliability assessment and intelligent verification, specifically including the following steps: S1: Multimodal synchronous acquisition of workpiece surface images through the image acquisition module, combined with dual visual modal acquisition of visible light and polarized light images of the workpiece surface; S2: Perform data preprocessing on the visible light image and polarized light image described in S1 using the data preprocessing module; S3: The data analysis module works sequentially through three sub-units: feature extraction, defect classification, and quantitative evaluation, to obtain the initial data of the defects; S4: The judgment and review module performs the work. This module receives the initial defect data output by the data analysis module, performs critical value judgment and credibility analysis on it, and enters the fine review and scoring process when the conditions for review are met. S5: The result output module generates a judgment result report and uploads the judgment result data. When a defect exceeding the set threshold is detected, the system sends a signal to trigger the alarm and controls the actuator to remove the unqualified workpiece from the production line.

[0005] As a further improvement to this solution, step S1 includes the following steps: S11: Using a visible light industrial camera and a polarized light camera, the matching ring polarized light source and synchronous trigger controller are installed on both sides of the inspection station; S12: The workpiece is transported to the designated inspection station, and the photoelectric sensor on the inspection station triggers the acquisition signal. S13: After receiving the acquisition signal, the synchronous trigger controller sends an exposure command to the camera to obtain the gray intensity of the visible light image at each pixel and the gray intensity of the polarized light image at each pixel.

[0006] As a further improvement to this solution, step S2 includes the following steps: S21: Perform weighted fusion of the registered visible light image and polarized light image; S22: Wavelet transform is used for image denoising; S23: Enhance image contrast; S24: Extract the ROI and normalize the pixel values.

[0007] As a further improvement to this solution, step S3 includes the following steps: S36: Perform multi-dimensional quantitative evaluation of defect parameters. Based on the defect parameters, the quantitative evaluation unit constructs a multi-factor weighted scoring model to quantitatively score the severity of the defect and outputs a defect score value. S37: Classify the level according to the defect score.

[0008] As a further improvement to this solution, step S4 includes the following steps: S41: The judgment and analysis unit judges and analyzes the defect score output by the data analysis module. If it meets the review conditions, it enters the review process; otherwise, it directly outputs the original defect score and other information to the result output module. S42: The review scoring unit uses a more element-rich scoring model to review the defects that need to be reviewed. This model introduces new evaluation parameters for weighted scoring based on the original four parameters.

[0009] As a further improvement to this solution, step S41 includes the following steps: S411: The judgment and analysis unit performs critical value analysis on the defect score. If the defect score is in the range of [0.35, 0.45], it is determined to be in a "critical state" and directly proceeds to the review step S42. S412: For scores that are determined to be non-critical states, the judgment analysis unit calculates a confidence score for them; S416: Calculate the overall credibility score; S417: Credibility judgment. A preset credibility threshold is set. If the credibility score is greater than or equal to the preset credibility threshold, the current score is deemed credible. The original defect score and other information are directly output to the result output module. Otherwise, the review step S42 is entered.

[0010] As a further improvement to this solution, step S42 includes the following steps: S421: Calculate the edge sharpness of defects, calculate the gradient magnitude of the pixels at the edge of defects, and calculate the set of edge pixels; calculate the Sobel gradients in the x and y directions for the enhanced image, calculate the average gradient magnitude of the edge pixels and normalize it. S422: Calculate the coefficient of variation of gray values ​​within the defect area, convert it into a uniformity index, and normalize it; S423: Quantify the difference in texture patterns between the defect area and the surrounding background. Use local binary mode features to expand the range outward from the defect area to obtain the background area. Calculate the rotation-invariant uniform LBP feature histograms of the defect area and the background area respectively. Calculate the chi-square distance between the histograms and normalize it. S424: Divide the workpiece surface into multiple functional areas, with a weight coefficient corresponding to each functional area. For the defect score that needs to be reviewed, query the functional area to which it belongs based on the centroid coordinates of the corresponding defect area to obtain the corresponding weight coefficient. S425: Calculate the consistency of historical scores for similar defects. Retrieve the final scores of more than 10 recent defects of the same category from the system database, calculate their mean and standard deviation, calculate the Z-score of the current score relative to the historical distribution, and calculate the consistency index. If there are fewer than 10 historical data points, use 1.0 as the parameter.

[0011] As a further improvement to this solution, step S42 also includes the following steps: S426: Construct and calculate the review scoring model: The review scoring model is a nine-parameter linear weighted model; S427: Output the review result: Replace the original defect score with the score obtained after review as the final score of the defect and reclassify the defect level.

[0012] As a further improvement to this solution, step S5 includes the following steps: S51: The results output module generates a structured report from the above results; S52: The report is sent to the production line MES system through the communication client. When a defect with a defect level of ≥3 is detected, the system sends a digital output signal to the PLC to trigger the audible and visual alarm and control the robot or push rod to remove the defective workpiece from the production line.

[0013] Compared with the prior art, the beneficial effects of the present invention are as follows: 1. This invention, based on traditional defect detection and scoring, introduces a multi-level credibility assessment and dynamic verification mechanism, significantly improving the reliability, decision-making transparency, and industrial applicability of the detection system. By constructing a comprehensive credibility score, the scoring results are quantitatively evaluated from three dimensions: classification confidence, feature stability, and defect region consistency, greatly enhancing the interpretability and decision-making reference value of the results.

[0014] 2. For high-risk situations where defect scores are at the grade boundary, this invention sets up an automatic threshold-triggered review mechanism. When the score falls into a preset critical range, the system directly enters a more refined review process, avoiding serious quality problems caused by misjudgments due to minor score fluctuations. This is suitable for precision manufacturing fields with stringent requirements for quality consistency. Attached Figure Description

[0015] Figure 1 This is a flowchart of a workpiece surface defect detection and decision-making method based on credibility assessment and intelligent verification proposed in this invention; Figure 2 This is a system architecture diagram of a workpiece surface defect detection and decision-making method based on credibility assessment and intelligent verification proposed in this invention; Figure 3 This is a data analysis module architecture diagram of a workpiece surface defect detection and decision-making method based on credibility assessment and intelligent verification proposed in this invention. Figure 4 This is a diagram of the judgment and verification module architecture of a workpiece surface defect detection and decision-making method based on credibility assessment and intelligent verification proposed in this invention. Figure 5 This is a working logic diagram of the judgment and verification module of a workpiece surface defect detection and decision-making method based on credibility assessment and intelligent verification proposed in this invention. Detailed Implementation

[0016] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0017] Example: This invention discloses a workpiece surface defect detection and decision-making method based on credibility assessment and intelligent verification. The aim is to improve the reliability, decision transparency, and industrial applicability of the detection system through an innovative judgment and verification module. The modules are described in detail below.

[0018] Figure 2The system architecture diagram of the present invention mainly includes: an image acquisition module 100, a data preprocessing module 200, a data analysis module 300, a judgment and verification module 400, and a result output module 500; wherein the data analysis module 300 includes a feature extraction unit 310, a defect classification unit 320, and a quantitative evaluation unit 330; the judgment and verification module 400 includes a judgment analysis unit 410 and a verification scoring unit 420.

[0019] The detection method is executed collaboratively by various modules, and the specific steps are as follows: S1: The image acquisition module synchronously acquires images of the workpiece surface through 100 multi-modal acquisition. Combined with the dual visual modal of visible light and polarized light, the visible light image and polarized light image of the workpiece surface are synchronously acquired at the microsecond level under synchronous trigger control, so as to obtain the original image of the workpiece surface with no noise, low reflectivity and complete feature information.

[0020] S11: Prepare a visible light industrial camera and a polarized light camera, along with a matching ring polarized light source and a synchronous trigger controller, and install them on both sides of the inspection station.

[0021] S12: The workpiece is transported to the designated inspection station by the conveyor belt, and the photoelectric sensor at the fixed position triggers the acquisition signal.

[0022] S13: After receiving the acquisition signal, the synchronous trigger controller simultaneously sends exposure commands to both cameras, achieving microsecond-level synchronous acquisition. The sensor of the visible light industrial camera can directly output visible light images at the pixel level. gray intensity at The polarization camera acquires images in four directions (which can be set to 0°, 45°, 90°, and 135°), and calculates the value of each pixel in the obtained polarization image. The Stokes vector and degree of polarization are used to obtain the polarized light image at each pixel. gray intensity at .

[0023] S14: The electric rotary table rotates the workpiece 90°. Repeat S13 until full coverage photography of all sides of the workpiece is completed.

[0024] S2: The visible light image and polarized light image described in S1 are subjected to adaptive weighted fusion based on local statistical variance by the data preprocessing module (200) to obtain a fused image, and the fused image is then subjected to denoising and enhancement processing. It runs on the NVIDIA Jetson AGX Orin embedded AI platform, utilizing the platform's CUDA cores for parallel computing to ensure real-time performance.

[0025] S21: Image Fusion: Merging the registered visible light images Polarized light image According to the formula Pixel-level weighted blending is performed to suppress reflections while preserving texture details. , ; Let be the grayscale intensity at pixel (x, y) in the fused image. , Let (x, y) be the fusion weight at pixel (x, y). , Let be the variance of image gray levels within a local window centered at (x,y) with a radius of r=3. It is a very small positive number, i.e., 1e-6, to prevent the formula from producing a division-by-zero error.

[0026] S22: Image Denoising: Wavelet transform is used for denoising. First, Symlets 4 wavelet transform is applied to the fused image. Perform multi-level decomposition. , , , ,in, Let n be the approximation coefficient matrix of the nth layer. , , These represent the horizontal, vertical, and diagonal detail coefficient matrices for the nth layer, respectively. H and G are the low-pass and high-pass filter kernels of the Symlets4 wavelet, respectively. Then, a general threshold is applied to the high-frequency subband coefficients for soft thresholding. The threshold calculation formula is as follows: , ,in, This is an estimate of the noise standard deviation of the detail coefficients at the j-th layer. is the median of the absolute values ​​of the detail coefficients in the k-th direction of the j-th layer, and 0.6745 is a correction factor used to estimate the standard deviation from the median of the Laplace distribution. The soft threshold of the j-th layer, Let j be the total number of detail coefficients at the j-th layer. Wavelet soft thresholding denoising formula: ,in The detail coefficients after thresholding. Let be the original detail coefficients at position (x, y) in the j-th layer and k-th direction; then, the processed coefficients are reconstructed layer by layer into a denoised image through a recursive reconstruction function R, wherein the recursive reconstruction function is defined as: The reconstruction process starts from the deepest layer n, and proceeds in the order of n, n-1, n-2, ..., 1 according to the formula: The calculations were performed iteratively, and finally the result was obtained. It effectively removes Gaussian and salt-and-pepper noise.

[0027] S23: Enhance contrast: Employ the CLAHE algorithm. Divide the image into 8x8 non-overlapping slices, perform histogram equalization on each slice, and calculate the local histogram for the k-th sub-block. ,in, For sub-blocks The number of pixels with a gray level of i. This is the Kronecker function; it outputs 1 when the condition is true, and 0 otherwise. Then, according to the formula... , By limiting the contrast and redistributing it, we obtain the limited histogram. , in the formula L represents the total number of pixels in the sub-block, and L represents the total number of gray levels. Contrast limiting factor The range of values ​​is Preferred The best option The preferred range exhibits good robustness on workpieces of different materials; finally, by calculating the mapping function and performing bilinear interpolation, slice boundary artifacts are eliminated, and the visibility of low-contrast defects is enhanced, resulting in an enhanced image. .

[0028] S24: ROI Extraction and Normalization: For Contrast-Enhanced Images Calculate its grayscale histogram Using the Otsu's method, according to the formula Calculate the global threshold, where , This is the pixel ratio between the foreground and background. , This is the average gray level of the foreground and background, and the inter-class variance when the threshold is t. By iterating through all possible thresholds t, we find the value that makes the threshold t equal to the average gray level of the foreground and background. The maximum optimal threshold; using Binarization is performed, and then Canny edge detection is used to find the workpiece contour. The minimum bounding rectangle is extracted as the Region of Interest (ROI). This ROI region is then scaled to 512x512 pixels using bilinear interpolation. Finally, the pixel values ​​are unified from [0, 255] to the [0, 1] range to obtain the desired result. .

[0029] S3: The data analysis module 300 works sequentially through three sub-units: feature extraction, defect classification, and quantitative evaluation. The quantitative evaluation includes: calculating defect parameters, establishing a scoring model, calculating a defect score based on the area of ​​the defect region and the grayscale contrast between the defect region and the background region, the aspect ratio of the bounding rectangle of the defect region, and the equivalent diameter calculated from the fused image, and classifying the defect level according to the defect score. The software model was developed based on the PyTorch framework and deployed on the Jetson platform.

[0030] S31: Multi-scale AI feature extraction work, feature extraction unit 310 from... Robust and rich feature representations are extracted. Each Bottleneck module in stages 3 and 4 of the ResNet-50 network is modified. Stage 3 contains 6 Bottleneck modules, where the 3x3 convolutional layers are replaced with a four-branch PyConv layer. The kernel size of the four branches is... The step size s is 1, and the padding is 1. The number of output channels for each branch is Input feature map The output of the i-th branch is: ,in For learnable weights, C is the number of channels in the feature map, W is the width of the feature map, and H is the height of the feature map; the outputs of the four branches are concatenated along the channel dimension, resulting in: .

[0031] S32: Introducing an attention mechanism: An efficient multi-scale attention module is added after the PyConv layer to the concatenated feature map. This module first groups the feature map, dividing the input feature map Y into G=8 groups, with each group having C / G channels, and then performs global average pooling on each group. The group channel description vector is obtained. Then, a 3×3 depthwise separable convolution is performed on each set of feature maps to extract spatial features: A spatial weighted graph is generated using the Sigmoid function: ,Will Through two fully connected layers (the middle dimension is...) Generate channel weights: ,in , , , Multiply the spatial weights and channel weights element by element and then sum them to the original features: The final output of each Bottleneck module is: The output is after 6 modules. The fourth stage has a similar structure to the third stage, containing three Bottleneck modules; however, it has 512 input channels and 1024 output channels, ultimately outputting... .

[0032] S33: Model Training and Feature Output: The network is initialized using pre-trained weights on the ImageNet dataset. On the self-built training dataset of annotated workpiece defect images, fine-tuning is performed using a stochastic gradient descent optimizer (learning rate lr=0.001, momentum=0.9), trained for 50 epochs, and finally based on... After performing global average pooling, a 1024-dimensional feature vector is output. .

[0033] S34: Two-stage defect classification operation: Defect classification unit 320 receives feature vectors For rapid screening and fine classification, a support vector machine (SVM) initial judgment model is used, implemented using the scikit-learn library. 1024-dimensional feature vectors from multiple normal and defective samples are obtained from a feature extraction network as the training set. The RBF kernel function is selected. The optimal parameters are determined through grid search. Punishment factor For new samples SVM outputs decision values: ,in For the number of support vectors, For support vector coefficients, For bias; if If determined to be a defect, proceed to the next step; if If it is judged to be normal, output "no defects" directly.

[0034] S35: Convolutional Neural Network Fine Classification Model: [The text abruptly ends here, likely due to an in Reconstructed into a 32×32×1 feature map: The convolutional neural network contains three convolutional layers, each with a 3x3 kernel and 64, 128, and 256 channels respectively. Each convolutional layer is followed by a ReLU activation function and a 2x2 max-pooling layer, then flattened and connected to two fully connected layers with 512 and 5 nodes respectively. The convolution formula is as follows: The loss function used is Focal Loss: The output layer uses the Softmax function. The output is the probability distribution of five types of defects: "scratches", "cracks", "dents", "impurities" and "unknown". The category with the highest probability is selected as the final classification result.

[0035] S36: Perform multi-dimensional quantitative evaluation of defect parameters. The quantitative evaluation unit 330 performs quantitative evaluation of defects based on classification results and original image information, and calculates defect parameters. Defect masks are extracted using threshold segmentation. Where T is the adaptive threshold, The average gray level of the background area; the defect area. Grayscale contrast , Aspect Ratio in The length of the longer side of the circumscribed rectangle of the defect area. The length of the shorter side of the circumscribed rectangle of the defect region; equivalent diameter. .

[0036] S37: Establish a scoring model: Preset , , And normalize them all: , , The weighting coefficients are set as follows: , , , ,and The calculated , , R, Substitute into the formula: Defects are classified into levels based on defect scores: Level 1 (minor defect): Score < 0.2; Level 2 (slight defect): 0.2 ≤ Score < 0.4; Level 3 (moderate defect): 0.4 ≤ Score < 0.6; Level 4 (serious defect): 0.6 ≤ Score < 0.8; Level 5 (fatal defect): Score ≥ 0.8.

[0037] S4: Review and Credibility Assessment of Scoring Results The judgment and review module 400 performs the work. This module receives the defect score, defect category, feature vector, defect mask and enhancement image output by the data analysis module 300, performs threshold judgment and credibility analysis on it, and if the conditions for review are met, it enters the fine review and scoring process to ensure the accuracy of the scoring results and the reliability of the decision, making the decision-making process transparent, improving the interpretability of the decision-making process, and supporting quality traceability and auditing.

[0038] S41: Judgment and analysis unit 410 judges and analyzes the defect score output by data analysis module 300. If it meets the review conditions, it enters the review process; otherwise, it directly outputs the original defect score and other information to result output module 500.

[0039] S411: Critical Value Judgment: Judgment and analysis unit 410 performs critical value analysis on the defect score. If the defect score is in the range [0.35, 0.45], it is judged as a "critical state". This range is the boundary area between defect level 2 and level 3. Since a score ≥ 0.4, i.e., defect level ≥ 3, is judged as a non-conforming product, the scoring error in this area may lead to misjudgment or omission. Therefore, it directly proceeds to the review step S42.

[0040] S412: Confidence Analysis: For scores that are determined to be in a non-critical state, the judgment analysis unit 410 calculates a confidence score to assess the reliability of the current score.

[0041] S413: Confidence Component The maximum probability value is directly taken from the output of the Softmax layer of the convolutional neural network fine classification model in defect classification unit 320. S414: Calculate the characteristic stability components This component evaluates the feature vector. The degree of deviation. First, from the historical data of the training phase of the feature extraction network 310, obtain the mean L2 norm of the feature vectors of all training samples under the currently determined defect category. and standard deviation The L2 norm of the current sample feature vector is Calculate its standardized Z-score: The characteristic stability components are calculated as follows: ,when The closer a value is to 1, the closer the feature is to the typical distribution of that category.

[0042] S415: Calculate the consistency component of the defect region This component is used to evaluate the consistency of gray levels within the defect region and its distinction from the background. The defect mask is calculated. Inner pixel In image enhancement Average gray level and standard deviation Calculate the background area And the average grayscale within the workpiece ROI and standard deviation Define two sub-indicators: internal consistency and signal-to-noise ratio Consistency component of defect region .

[0043] S416: Calculate the overall credibility score by linearly weighting and fusing the above three components. ,in These are the corresponding weights of the three variables.

[0044] S417: Confidence Judgment: The preset confidence threshold is 0.7. If Confidence ≥ 0.7, the current score is determined to be credible, the process terminates, and the original defect score and other information are directly output to the result output module 500. Otherwise, the review step S42 is entered.

[0045] S42: Review scoring unit 420 uses a more refined scoring model to review the defects that need to be reviewed. This model introduces five new evaluation parameters on the basis of the original four parameters, and uses a total of nine parameters for weighted scoring.

[0046] S421: Calculate the defect edge sharpness E: Use the Sobel operator to calculate the gradient magnitude of the defect edge pixels, evaluate the sharpness of the defect boundary, and apply this to the defect mask. A 3x3 kernel morphological erosion is performed to obtain the internal region, which is then subtracted from the original mask to obtain the edge pixel set. ;right Calculate the Sobel gradient maps in the x and y directions of the image respectively. Calculate the average gradient magnitude of edge pixels. and normalize it .

[0047] S422: Calculate the uniformity of defect depth distribution; U: Calculate the coefficient of variation of gray values ​​within the defect region. It is then converted into a uniformity index and normalized. .

[0048] S423: Calculate the difference between the defect and the background texture. T: Quantify the difference in texture patterns between the defect region and the surrounding background. Use local binary pattern features, taking the defect region as the center, and expand outwards to obtain the background region. Calculate the rotation-invariant uniform 59-dimensional LBP feature histograms of the defect region and the background region respectively. These are denoted as follows: Calculate the chi-square distance between histograms and normalize it .

[0049] S424: Set the weight L of the defect location: Based on the design drawings, assembly relationship and quality control requirements of the workpiece, its surface is divided into multiple functional areas. Each functional area corresponds to a weight coefficient L. The value of the weight coefficient L follows the principle that "the greater the influence of the functional area on the use of the workpiece, the higher the weight". For the defect score that needs to be reviewed, the corresponding functional area is queried according to the centroid coordinates of the corresponding defect area to obtain the corresponding weight coefficient L.

[0050] S425: Calculate the historical consistency H of scores for similar defects. Retrieve the final scores of the most recent 10 or more defects of the same category from the system database and calculate their average. and standard deviation Calculate the Z-score of the current rating relative to the historical distribution. Calculate the consistency index If there are fewer than 10 historical data entries, then... .

[0051] S426: Construct and calculate the review scoring model: The review scoring model is a nine-parameter linear weighted model. ,in Representing each normalized parameter, The weighting coefficients for each parameter should satisfy the following: .

[0052] S427: Output verification results: using The original score is replaced as the final score for the defect, and the defect level is reclassified.

[0053] S5: The judgment result report output is linked with the production line, including generating judgment result reports and uploading judgment result data. When a defect exceeding the set threshold is detected, the system sends a signal to trigger the alarm and controls the actuator to remove the unqualified workpiece from the production line.

[0054] S51: Judgment Result Report Generation: The result output module 500 generates a structured report in JSON format, which includes the workpiece ID, inspection time, a detailed list of all defects, and the overall judgment result.

[0055] S52: Upload Judgment Result Data: The report is sent to the production line MES system through a communication client based on Socket or RESTful API. When a defect with a severity level of ≥3 is detected, the system sends a digital output signal to the PLC via Ethernet / IP protocol, triggering an audible and visual alarm and controlling the robot or push rod to remove the defective workpiece from the production line.

[0056] This invention, based on traditional defect detection and scoring, introduces a multi-level credibility assessment and dynamic verification mechanism, significantly improving the reliability, decision-making transparency, and industrial applicability of the detection system. By constructing a comprehensive credibility score, the scoring results are quantitatively evaluated from three dimensions: classification confidence, feature stability, and defect region consistency, greatly enhancing the interpretability and decision-making reference value of the results.

[0057] For high-risk situations where defect scores are at the grade boundary, this invention sets up an automatic threshold-triggered review mechanism. When the score falls into a preset critical range, the system directly enters a more refined review process, avoiding serious quality problems caused by misjudgments due to minor score fluctuations. This is suitable for precision manufacturing fields with stringent requirements for quality consistency.

[0058] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely preferred examples and are not intended to limit the invention. Various changes and modifications can be made to the invention without departing from its spirit and scope, and all such changes and modifications fall within the scope of the present invention as claimed. The scope of protection of the present invention is defined by the appended claims and their equivalents.

Claims

1. A method for detecting and making decisions on workpiece surface defects based on credibility assessment and intelligent verification, characterized in that: Includes the following steps: S1: The image acquisition module (100) synchronously acquires images of the workpiece surface in multiple modes, and acquires visible light images and polarized light images of the workpiece surface in a dual visual mode combining visible light and polarized light. S2: The visible light image and polarized light image described in S1 are preprocessed by the data preprocessing module (200); S3: The data analysis module (300) works sequentially through three sub-units: feature extraction, defect classification, and quantitative evaluation, to obtain the initial data of the defects; S4: The judgment and review module (400) performs the work. This module receives the initial defect data output by the data analysis module (300), performs critical value judgment and credibility analysis on it, and enters the fine review and scoring process when the conditions for review are met. S5: The result output module (500) generates a judgment result report and uploads the judgment result data. When a defect exceeding the set threshold is detected, the system sends a signal to trigger the alarm and controls the actuator to remove the unqualified workpiece from the production line.

2. The workpiece surface defect detection and decision-making method based on credibility assessment and intelligent verification according to claim 1, characterized in that: S1 includes the following steps: S11: Using a visible light industrial camera and a polarized light camera, the matching ring polarized light source and synchronous trigger controller are installed on both sides of the inspection station; S12: The workpiece is transported to the designated inspection station, and the photoelectric sensor on the inspection station triggers the acquisition signal. S13: After receiving the acquisition signal, the synchronous trigger controller sends an exposure command to the camera to obtain the gray intensity of the visible light image at each pixel and the gray intensity of the polarized light image at each pixel.

3. The workpiece surface defect detection and decision-making method based on credibility assessment and intelligent verification according to claim 1, characterized in that: S2 includes the following steps: S21: Perform weighted fusion of the registered visible light image and polarized light image; S22: Wavelet transform is used for image denoising; S23: Enhance image contrast; S24: Extract the ROI and normalize the pixel values.

4. The workpiece surface defect detection and decision-making method based on credibility assessment and intelligent verification according to claim 1, characterized in that: S3 includes the following steps: S36: Perform multi-dimensional quantitative evaluation of defect parameters. The quantitative evaluation unit (330) constructs a multi-factor weighted scoring model based on the defect parameters to quantitatively score the severity of the defect and output a defect score value. S37: Classify the level according to the defect score.

5. The workpiece surface defect detection and decision-making method based on credibility assessment and intelligent verification according to claim 1, characterized in that: S4 includes the following steps: S41: Judgment and analysis unit (410) performs judgment and analysis on the defect score output by data analysis module (300). If it meets the review conditions, it enters the review process; otherwise, it outputs the original defect score and other information directly to result output module 500. S42: The review scoring unit (420) uses a more elemental scoring model to review the defects that need to be reviewed. This model introduces new evaluation parameters for weighted scoring based on the original four parameters.

6. The workpiece surface defect detection and decision-making method based on credibility assessment and intelligent verification according to claim 5, characterized in that: S41 includes the following steps: S411: The judgment and analysis unit (410) performs critical value analysis on the defect score. If the defect score is in [0.35, 0.45], it is determined to be in a "critical state" and directly enters the review step S42. S412: For scores that are determined to be non-critical, a confidence score is calculated by the judgment analysis unit (410); S416: Calculate the overall credibility score; S417: Credibility judgment. A preset credibility threshold is set. If the credibility score is greater than or equal to the preset credibility threshold, the current score is determined to be credible. The original defect score and other information are directly output to the result output module (500). Otherwise, the review step S42 is entered.

7. The workpiece surface defect detection and decision-making method based on credibility assessment and intelligent verification according to claim 5, characterized in that: S42 includes the following steps: S421: Calculate the edge sharpness of defects, calculate the gradient magnitude of the pixels at the edge of defects, and calculate the set of edge pixels; calculate the Sobel gradients in the x and y directions for the enhanced image, calculate the average gradient magnitude of the edge pixels and normalize it. S422: Calculate the coefficient of variation of gray values ​​within the defect area, convert it into a uniformity index, and normalize it; S423: Quantify the difference in texture patterns between the defect area and the surrounding background. Use local binary mode features to expand the range outward from the defect area to obtain the background area. Calculate the rotation-invariant uniform LBP feature histograms of the defect area and the background area respectively. Calculate the chi-square distance between the histograms and normalize it. S424: Divide the workpiece surface into multiple functional areas, with a weight coefficient corresponding to each functional area. For the defect score that needs to be reviewed, query the functional area to which it belongs based on the centroid coordinates of the corresponding defect area to obtain the corresponding weight coefficient. S425: Calculate the consistency of historical scores for similar defects. Retrieve the final scores of more than 10 recent defects of the same category from the system database, calculate their mean and standard deviation, calculate the Z-score of the current score relative to the historical distribution, and calculate the consistency index. If there are fewer than 10 historical data points, use 1.0 as the parameter.

8. The workpiece surface defect detection and decision-making method based on credibility assessment and intelligent verification according to claim 5, characterized in that: S42 further includes the following steps: S426: Construct and calculate the review scoring model: The review scoring model is a nine-parameter linear weighted model; S427: Output the review result: Replace the original defect score with the score obtained after review as the final score of the defect and reclassify the defect level.

9. The workpiece surface defect detection and decision-making method based on credibility assessment and intelligent verification according to claim 1, characterized in that: S5 includes the following steps: S51: The results output module (500) generates a structured report from the above results; S52: The report is sent to the production line MES system through the communication client. When a defect with a defect level of ≥3 is detected, the system sends a digital output signal to the PLC to trigger the audible and visual alarm and control the robot or push rod to remove the defective workpiece from the production line.