UHPC decorative plate pressing quality detection method based on vision
Through Zhang Zhengyou calibration method and affine transformation, the band coordinates of the multi-spectral camera are aligned and the lighting parameters are adjusted, and the band geometric deviation and lighting inhomogeneity problems in UHPC decorative panel detection are solved, and the defect recognition accuracy is improved.
Patent Information
- Application Number
- CN202510635501.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-16
- Publication Date
- 2025-07-29
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In the prior art, multispectral imaging has problems of large band geometric deviations and uneven light in UHPC decorative panel detection, resulting in insufficient defect recognition accuracy.
The Zhang Zhengyou calibration method is used to perform internal parameter calibration of multi-spectral cameras. The detection pixel coordinates of the ultraviolet and near-infrared bands are aligned through affine transformation, and the LED array inclination angle and exposure time are adjusted to ensure light uniformity, and defect categories are generated in combination with the support vector machine.
Cross-band geometric correction of multi-spectral images is realized, the accuracy of defect recognition is improved, misjudgment caused by light inhomogeneity is reduced, and small defects can be accurately captured.
Smart Images

Figure CN120385683A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of material detection, and particularly to a vision-based method for detecting the pressing quality of UHPC decorative panels. Background Art
[0002] UHPC (Ultra-High Performance Concrete) decorative panels have been widely used in the fields of architecture, bridges, and military industry due to their excellent mechanical properties, durability, and aesthetic value. The pressing quality of UHPC directly affects the structural integrity and lifespan of the material, so the reliability of the detection technology is crucial. Traditional detection methods mainly include manual visual inspection, contact mechanical tests (such as compressive and tensile tests), and X-ray non-destructive testing. Manual visual inspection, with the advantages of low cost and convenient operation, is commonly used for the preliminary screening of surface defects; contact mechanical tests can provide mechanical property data but require specimen destruction; X-ray detection can analyze the internal structure of materials with its penetration ability, but the equipment cost is high and there is a radiation risk, and its quantitative analysis ability for interface bonding strength and micro-defects is limited.
[0003] In recent years, computer vision and multi-spectral imaging technologies have gradually been applied to the field of material detection. Multi-spectral imaging can reveal the defect characteristics on the surface and subsurface of materials by fusing spectral information in the visible light band, near-infrared band, and ultraviolet band. For example, the camera internal parameter calibration method based on Zhang Zhengyou calibration method provides a basis for the geometric correction of multi-spectral images, and machine learning algorithms such as Support Vector Machine (SVM) are used for defect classification. However, there are still limitations: First, the band alignment of multi-spectral cameras depends on manual experience, and the geometric deviations of pixel coordinates in the ultraviolet band and near-infrared band from the visible light band are not fully corrected, resulting in insufficient spectral consistency of the fused images; Second, traditional lighting control mostly uses fixed angles and exposure times, which are difficult to adapt to the complex texture and reflection characteristics of the UHPC surface, easily causing lighting non-uniformity and resulting in calculation errors of the normalized reflectance. Summary of the Invention
[0004] In view of the above existing problems, the present invention is proposed.
[0005] Therefore, the present invention provides a vision-based method for detecting the pressing quality of UHPC decorative panels to solve the problem of insufficient defect recognition accuracy caused by large cross-band geometric deviations and uneven lighting in multi-spectral images.
[0006] To solve the above technical problems, the present invention provides the following technical solutions:
[0007] In a first aspect, the present invention provides a vision-based method for detecting the pressing quality of UHPC decorative panels, which includes,
[0008] Calibrate the internal parameters of the multispectral camera using the Zhang-Zhengyou calibration method, improve the accuracy of the calibration plate corner coordinates, generate the detected pixel coordinates, and align the detected pixel coordinates in the ultraviolet and near-infrared bands to the detected pixel coordinates in the visible light band through affine transformation. The internal parameter calibration includes detecting the calibration plate corner coordinates;
[0009] Judge the lighting uniformity and adjust the tilt angle and exposure time of the LED array;
[0010] Collect multispectral images, including visible light images, near-infrared images, and ultraviolet images;
[0011] Calculate the normalized reflectance based on the detected pixel coordinates, screen out the candidate defect areas, and generate a fused multispectral image based on the normalized reflectance;
[0012] Linearly map the normalized reflectance to gray values, set the segmentation threshold, and generate a binary image, and screen out the final defect areas according to the binary image;
[0013] Generate a reflectance-wavelength curve based on the normalized reflectance, record the wavelength value and position with the lowest normalized reflectance, define the final defect feature vector, use a support vector machine to generate the defect category, determine the defect level, and record the inspection report.
[0014] As a preferred solution of the vision-based UHPC decorative board pressing quality detection method of the present invention, wherein: the judgment of the lighting uniformity and the adjustment of the tilt angle and exposure time of the LED array refer to calculating the average illumination intensity, standard deviation, and gradient variance, judging the lighting uniformity, and adjusting the tilt angle and exposure time of the LED array through a PID controller according to the average illumination intensity, standard deviation, and gradient variance.
[0015] As a preferred solution of the vision-based UHPC decorative board pressing quality detection method of the present invention, wherein: the specific steps of generating the fused multispectral image based on the normalized reflectance are as follows:
[0016] Calculate the difference between the mean value of the normalized reflectance of the candidate defect area in the visible light band and the mean value of the normalized reflectance of the substrate in the visible light band;
[0017] Calculate the difference between the mean value of the normalized reflectance of the candidate defect area in the near-infrared band and the mean value of the normalized reflectance of the substrate in the near-infrared band;
[0018] Calculate the difference between the mean value of the normalized reflectance of the candidate defect area in the ultraviolet band and the mean value of the normalized reflectance of the substrate in the ultraviolet band;
[0019] The main band is selected according to the difference of the calculated normalized reflectance mean, the weight of the main band and the weight of the visible light band are calculated, and the normalized reflectance of the image corresponding to the main band and the normalized reflectance of the visible light image are weighted and summed to generate a fused multispectral image.
[0020] As a preferred embodiment of the vision-based UHPC decorative panel pressing quality inspection method of the present invention, generating a reflectivity-wavelength curve based on the normalized reflectivity refers to calculating the average value of the normalized reflectivity of the final defect area in the visible light band, near-infrared band, and ultraviolet band to generate a reflectivity-wavelength curve.
[0021] As a preferred solution of the vision-based UHPC decorative panel pressing quality inspection method described in the present invention, the use of a support vector machine to generate defect categories refers to inputting the final defect feature vector into the support vector machine, which uses a radial basis function kernel to calculate the distance between the feature vector and the hyperplane and adopts the Platt probability calibration method to output the defect category.
[0022] As a preferred solution of the vision-based UHPC decorative panel pressing quality detection method of the present invention, the detection pixel coordinates of the ultraviolet band and the near-infrared band are aligned to the detection pixel coordinates of the visible light band through affine transformation, and the specific steps are as follows:
[0023] Calculate the affine transformation matrix from the detection pixel coordinates of the ultraviolet band and the near-infrared band to the detection pixel coordinates of the visible light band;
[0024] The detection pixel coordinates of the ultraviolet band and the near-infrared band are expanded into homogeneous coordinate form, and combined with the affine transformation matrix, the detection pixel coordinates of the ultraviolet band and the near-infrared band are aligned to the detection pixel coordinates of the visible light band.
[0025] As a preferred embodiment of the vision-based UHPC decorative panel pressing quality inspection method of the present invention, the method of calculating the normalized reflectance based on the detected pixel coordinates comprises extracting the grayscale value of the white area of the calibration plate based on the detected pixel coordinates, removing the maximum and minimum values of the grayscale value of the white area of the calibration plate, and calculating the average of the grayscale values. The normalized reflectance is calculated based on the average of the grayscale values.
[0026] As a preferred solution of the vision-based UHPC decorative panel pressing quality detection method of the present invention, wherein: the segmentation threshold is set and the binary image is generated, the specific steps are:
[0027] Set preselected segmentation thresholds and mark preselected defects and preselected base materials;
[0028] Calculate the between-class variance of pre-selected defects and pre-selected substrates;
[0029] Set the segmentation threshold according to the preselected segmentation threshold and the between-class variance of the preselected defects and the preselected substrate;
[0030] Mark the finely screened defects and the finely screened substrate according to the segmentation threshold and assign values to form a binary image.
[0031] In a second aspect, the present invention provides a computer device, including a memory and a processor, where the memory stores a computer program, and: when the computer program is executed by the processor, any step of the vision-based UHPC decorative board pressing quality detection method described in the first aspect of the present invention is implemented.
[0032] In a third aspect, the present invention provides a computer-readable storage medium, on which a computer program is stored, and: when the computer program is executed by the processor, any step of the vision-based UHPC decorative board pressing quality detection method described in the first aspect of the present invention is implemented.
[0033] The beneficial effects of the present invention are as follows: through the calculation of the affine transformation matrix, the corner coordinates in the ultraviolet band and the near-infrared band are extended to homogeneous coordinate form and then multiplied to achieve cross-band geometric correction, which can accurately capture the cross-band characteristics of micro-defects, avoid misjudgment caused by coordinate deviation, control the coordinate alignment error between the ultraviolet band and the near-infrared band at the sub-pixel level, and solve the problem of large cross-band geometric deviation of multi-spectral images; by calculating the average light intensity, standard deviation and gradient variance to judge the light uniformity, and then using a PID controller to dynamically adjust the tilt angle and exposure time of the LED array, the situation of uneven light is reduced. After light compensation, the reflectance characteristics of micro-cracks or interface delamination defects (such as the sudden drop in the ultraviolet band) can be more accurately captured, avoiding misjudgment or missed detection caused by uneven light. Description of the Drawings
[0034] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the following drawings are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0035] Figure 1 It is a flowchart of the vision-based UHPC decorative board pressing quality detection method.
[0036] Figure 2 It is a schematic diagram of the alignment between the ultraviolet band and the near-infrared band.
[0037] Figure 3 It is a schematic diagram of the generation of the fused multi-spectral image.
[0038] Figure 4 It is a schematic diagram of defect categories and defect grading. Detailed implementation manners
[0039] To make the above objects, features, and advantages of the present invention more obvious and understandable, the following will describe the detailed implementation manners of the present invention with reference to the accompanying drawings of the specification.
[0040] In the following description, many specific details are set forth to facilitate a thorough understanding of the present invention. However, the present invention may be implemented in other ways different from those described herein. Those skilled in the art can make similar generalizations without departing from the connotation of the present invention. Therefore, the present invention is not limited by the specific embodiments disclosed below.
[0041] Secondly, the so-called "one embodiment" or "embodiment" herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation manner of the present invention. The phrase "in one embodiment" appearing in different places in this specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment that excludes other embodiments.
[0042] Refer to Figure 1 、 Figure 2 、 Figure 3 and Figure 4 , this embodiment provides a vision-based method for detecting the pressing quality of UHPC decorative panels, including the following steps:
[0043] S1: Calibrate the internal parameters of the multispectral camera using the Zhang-Zhengyou calibration method, improve the accuracy of the corner point coordinates of the calibration board, generate detection pixel coordinates, and align the detection pixel coordinates in the ultraviolet and near-infrared bands to the detection pixel coordinates in the visible light band through affine transformation. The internal parameter calibration includes detecting the corner point coordinates of the calibration board.
[0044] The specific steps are as follows.
[0045] Install a multispectral camera on the mechanical bracket to collect multispectral images (for example, the wavelength band covers 300 - 1000 nm, including visible light, near-infrared light, and ultraviolet light), and connect it to the industrial computer through a USB3.0 interface.
[0046] Configure a ring-shaped LED array, collect light source control parameters, including brightness value (PWM duty cycle), angular position (tilt angle of the light source array), and spectral power distribution (light intensity output in each band), and implement brightness and angle control through a PWM controller.
[0047] Integrate a Light-to-Digital Converter at the top of the camera bracket to collect ambient light data, including the total light intensity of visible light and infrared light, the light intensity of infrared light, and the visible light ratio (the ratio of the light intensity of visible light to the total light intensity of visible light and infrared light).
[0048] Install a photoelectric sensor at the entrance of the detection area to collect trigger signals (digital signals). When the UHPC decorative panel enters the detection area, it outputs a digital signal (such as TTL level), and records the trigger timestamp and position coordinates.
[0049] Use Zhang Zhengyou calibration method to calibrate the internal parameters of the multispectral camera through the calibrateCamera function of OpenCV (Open Source Computer Vision Library): Control the filter wheel to switch to each band in turn (for example, 400nm, 550nm, 700nm, 850nm, 350nm). Collect 10 calibration board images at each band, a total of 50 groups (5 bands × 10 poses). Use the findChessboardCorners function of OpenCV to detect the corner coordinates of the calibration board. The number of rows and columns of the detected calibration board corners is 24×24. Set the flag parameters of the findChessboardCorners function to adaptive binaryzation, image pixel normalization, and quadrilateral filtering; if the number of detected calibration board corners recognized is less than 529 (the internal intersection points of the checkerboard are 23×23 = 529 corner points), it is determined that the detection of the calibration board corners fails. Adjust the CLAHE contrast enhancement parameters for the ultraviolet band (for example, clipLimit is 2.0, tileGridSize is (8,8)), and adjust the Gaussian filtering parameters for the near-infrared band (for example, kernel size 5×5, standard deviation σ is 1.5). After successful detection, use the sub-pixel optimization function (cv2.cornerSubPix) to improve the coordinate accuracy and set the optimization parameters. For example, the optimization parameters are set to a maximum iteration error threshold of 0.01 pixel, a search window size of 11×11, and output the detected pixel coordinates, including the detected pixel coordinates of the ultraviolet band, near-infrared band, and visible light band. Each band of each group of images contains 24×24 = 576 corner points; Align the detected pixel coordinates of the ultraviolet band and near-infrared band to the detected pixel coordinates of the visible light band through affine transformation (Affine Transform): Extract the detected pixel coordinates of the visible light band from the detected pixel coordinates. Use the cv2.estimateAffine2D function of OpenCV to calculate the affine transformation matrices from the detected pixel coordinates of the ultraviolet band and near-infrared band to the detected pixel coordinates of the visible light band respectively. Include using the detected pixel coordinates of the ultraviolet band and near-infrared band as the source point sets respectively, and the detected pixel coordinates of the visible light band as the target point set. Use the random sample consensus algorithm to calculate the affine transformation matrices from the detected pixel coordinates of the ultraviolet band and near-infrared band to the detected pixel coordinates of the visible light band coordinates (the reprojection error threshold is usually set to 0.5 pixel). Eliminate the parallax between different bands of the multispectral camera. Expand the detected pixel coordinates of the ultraviolet band and near-infrared band into homogeneous coordinate form (that is, add the value 1 after the detected pixel coordinates), and multiply them by the affine transformation matrices from the detected pixel coordinates of the ultraviolet band and near-infrared band to the detected pixel coordinates of the visible light band coordinates respectively, to align the detected pixel coordinates of the ultraviolet band and near-infrared band to the detected pixel coordinates of the visible light band.
[0050] It should also be noted that: the internal parameters of the multispectral camera are calibrated by the Zhang-Zhengyou calibration method, and the detection pixel coordinates of the ultraviolet band and the near-infrared band are aligned to the visible light band by affine transformation, which can eliminate the cross-band imaging distortion. The affine transformation matrix is calculated by the Random Sample Consensus algorithm (RANSAC), and the reprojection error threshold is set to ensure that the geometric deviation between the ultraviolet band and the near-infrared band and the visible light band is controlled at the sub-pixel level (for example, the geometric deviation ≤ 0.5 pixels), improving the accuracy of multispectral image fusion and avoiding the defect location error caused by the parallax between bands.
[0051] S2: Judge the illumination uniformity and adjust the tilt angle and exposure time of the LED array.
[0052] The specific steps are as follows.
[0053] Judge the illumination uniformity: Arrange a grid in the detection area (for example, a 5×5 grid with a spacing of 50 mm), record the illumination intensity of each grid point, calculate the average illumination intensity and standard deviation of the grid points, sum the squares of the differences in illumination intensity between each non-edge grid point and its adjacent grid points to obtain the gradient variance. If the ratio of the square of the standard deviation to the square of the average illumination intensity exceeds 0.1 or the gradient variance exceeds 1000 lux 2 , it is judged that the illumination is uneven and dynamic adjustment is triggered. Initially adjust the tilt angle and exposure time of the annular LED array according to the over-limit type: If only the ratio of the square of the standard deviation to the square of the average illumination intensity exceeds the limit, adjust the tilt angle of the annular LED array and set the step size, for example, the step size is set to 0.2°, giving priority to improving the global uniformity; If only the gradient variance exceeds the limit, adjust the tilt angle of the annular LED array and set the step size, for example, the step size is set to 0.3°, focusing on smoothing local mutations; If both the ratio of the square of the standard deviation to the square of the average illumination intensity and the gradient variance exceed the limit, adjust the tilt angle of the annular LED array and set the step size, for example, the step size is set to 0.5°, and at the same time adjust the exposure time.
[0054] Use a PID controller to further adjust the tilt angle and exposure time of the annular LED array: When the gradient variance exceeds the limit, increase the differential gain of the PID controller (for example, from 0.1 to 0.15) to accelerate the suppression of local mutations; Calculate the proportional term value: Divide the current error (the difference between the target illumination intensity and the average illumination intensity) by the target illumination intensity and then input it into the hyperbolic tangent function to obtain the proportional term value; Calculate the integral term value: Divide the cumulative value of the historical error by the ratio of the maximum allowable adjustment angle to the integral gain to obtain the relative error ratio, and input it into the standard Logistic function to obtain the integral term value.
[0055] Adjust the tilt angle of the annular LED array. The tilt angle adjustment amount is obtained by weighted summation of the differential gain, proportional term value, and integral term value. The weight coefficients of the differential gain, proportional term value, and integral term value are determined by the step response method. For example, the weight coefficient of the differential gain is 0.15, the weight coefficient of the proportional term value is 0.5, and the weight coefficient of the integral term value is 0.2;
[0056] Use the log1p function to smooth the relative error ratio, multiply the smoothed relative error ratio by a scale factor (such as 0.1), and then add 1 to obtain the exposure time adjustment coefficient; multiply the reference exposure time (such as 10 milliseconds) by the exposure time adjustment coefficient to obtain the updated exposure time. If the updated exposure time is less than 0.5 times the reference exposure time (such as 5 milliseconds), the updated exposure time is forced to be set to 0.5 times the reference exposure time. If the updated exposure time is greater than 2 times the reference exposure time, the updated exposure time is forced to be set to 2 times the reference exposure time.
[0057] It should also be noted that: the tilt angle and exposure time of the annular LED array are dynamically adjusted through a PID controller, and the weight coefficients of the differential gain, proportional term value, and integral term value are determined by the step response method. For example, the differential gain weight coefficient is 0.15, the proportional term value weight coefficient is 0.5, and the integral term value weight coefficient is 0.2, which can optimize the light uniformity. When the gradient variance exceeds the limit, increase the differential gain to 0.15 to accelerate the suppression of local light mutations; after the exposure time adjustment coefficient is smoothed by the log1p function, it is limited within the range of 0.5 - 2 times the reference exposure time to ensure that the light intensity fluctuation is controlled within a certain range and reduce the error of the normalized reflectance calculation.
[0058] S3: Collect multi-spectral images, where the multi-spectral images include visible light images, near-infrared images, and ultraviolet images.
[0059] The specific steps are as follows,
[0060] Use an FPGA (Field Programmable Gate Array) to synchronously distribute the trigger signal to the multispectral camera and the filter wheel controller; the preset band switching sequence of the filter wheel controller is visible light, near-infrared, ultraviolet, and the corresponding filter wheel rotation angles are 0°, 45°, 90°. The switching sequence is controlled by FPGA hard coding. Set the time consumption for each switching. For example, the time consumption for each switching ≤ 50 milliseconds. The filter wheel is driven by a closed-loop stepper motor, and the rotation angle is feedback calibrated by a Hall sensor. After the filter wheel switching is completed, the filter wheel controller sends a "ready" signal to the multispectral camera; after receiving the "ready" signal, the multispectral camera delays the start of exposure (for example, delays for 10 microseconds) to avoid image blurring caused by mechanical vibration. The filter wheel rotates to 0°, the multispectral camera triggers exposure to collect visible light images, sends a 45° rotation instruction, and the closed-loop stepper motor drives the filter wheel to 45° to collect near-infrared images, sends a 90° rotation instruction, and the closed-loop stepper motor drives the filter wheel to 90° to collect ultraviolet images; the exposure time is the updated exposure time.
[0061] It should also be noted that: the rotation angle of the filter wheel (0°, 45°, 90°) is controlled by FPGA hard coding, and a closed-loop stepper motor is used for driving, which reduces the positioning error and can accurately switch between the visible light band, near-infrared band, and ultraviolet band. Set the time consumption for filter wheel switching, and cooperate with the multispectral camera to delay exposure to avoid image blurring caused by mechanical vibration and ensure the synchronization and timing accuracy of multispectral image acquisition.
[0062] S4: Calculate the normalized reflectance based on the detected pixel coordinates, screen out the candidate defect areas, and generate a fused multispectral image based on the normalized reflectance.
[0063] The specific steps are as follows.
[0064] Extract the X-axis displacement (such as 500 mm) and Y-axis speed (such as 50 mm / s) of the UHPC decorative board, and establish the conversion relationship from the physical coordinates to pixel coordinates of the multispectral image in combination with the camera focal length (such as 6 mm). For example, the pixel coordinate offset corresponding to an X-axis displacement of 500 mm is (500 mm × pixel density) / focal length; based on the visible light image, use the least squares method to fit the translation matrix (such as 2 pixels offset in the X direction and 1 pixel offset in the Y direction) and rotation matrix (such as rotating 0.005° around the center point) of the near-infrared image and the ultraviolet image; perform pixel resampling on the near-infrared image and the ultraviolet image using bilinear interpolation to fill the blank areas after registration (for example, the width of the zero-padding area at the edge of the ultraviolet image ≤ 5 pixels).
[0065] Calculate the center coordinates of the white area based on the detected pixel coordinates (such as the corner pixel coordinates (2000, 1000) in the 5th row and 5th column), and extract the gray values of the white area in the calibration board (for example, 5×5 pixels centered on the center coordinates of the white area); exclude the pixel values of the maximum and minimum 5% of the gray values of the white area in the calibration board (such as the gray value range in the visible light band is 1800 - 2200, and 1840 - 2160 is retained after exclusion), and use the mean value of the excluded gray values as the reference reflectivity (such as 2000 in the visible light band); divide each gray value by the reference reflectivity of the corresponding band to obtain the normalized reflectivity.
[0066] Statistically analyze the distribution of the normalized reflectivity of historical substrates, and set the substrate threshold interval. In the normalized image in the visible light band, mark the pixels with normalized reflectivity within the substrate threshold interval as substrates (for example, the normalized values 0.95 - 1.05 correspond to gray values 1900 - 2100), and assign a value of 1, and assign a value of 0 to the pixels not within the threshold interval to generate a binary mask; perform a closing operation on the binary mask using a 5×5 rectangular kernel, first dilate and then erode to fill the internal holes of the substrate area (for example, fill the holes with a diameter < 3 pixels); calculate the difference in the normalized reflectivity between the near-infrared band and the ultraviolet band for each pixel (the normalized reflectivity value in the near-infrared band minus the normalized reflectivity value in the ultraviolet band). For example, if the normalized reflectivity value of a pixel in the near-infrared band is 1.2 and the normalized reflectivity value in the ultraviolet band is 0.5, then the difference in the normalized reflectivity of the pixel is 0.7. Mark the pixels with a difference in the normalized reflectivity ≥ 0.3 as candidate defects, perform an 8-neighborhood connectivity labeling on the pixels with a difference in the normalized reflectivity ≥ 0.3, and count the area of each connected region (i.e., the candidate defect region). Exclude the regions with an area less than 10 pixel². For example, if the area of the connected region is 8 pixel² (size 2×4), it is excluded because the area of the connected region < 10 pixel², and the regions with an area ≥ 10 pixel² are retained.
[0067] Calculate the average normalized reflectance of the substrate in the visible light band, near-infrared band, and ultraviolet band respectively, calculate the average normalized reflectance of the candidate defect area in the visible light band, near-infrared band, and ultraviolet band respectively, and calculate the differences between the normalized reflectances of the candidate defect area in the visible light band, near-infrared band, and ultraviolet band and the average normalized reflectances of the substrate in the visible light band, near-infrared band, and ultraviolet band; take the band with the largest difference in average normalized reflectance as the main band, and except for the main band, take the band with the largest difference in average normalized reflectance as the secondary band; if the main band is not the visible light band, calculate the weight of the main band and the weight of the visible light band, divide the difference in average normalized reflectance of the main band by the sum of the difference in average normalized reflectance of the main band and the difference in average normalized reflectance of the secondary band to obtain the weight of the main band, and subtract the weight of the main band from 1 to obtain the weight of the visible light band. Based on the visible light image, perform weighted fusion on a pixel-by-pixel basis for the normalized reflectance of the image corresponding to the main band (such as if the main band is the near-infrared band, corresponding to the near-infrared image) and the normalized reflectance of the visible light image (using the weights corresponding to the weight of the main band and the weight of the visible light band. If the main band is the ultraviolet band, multiply the normalized reflectance of the main band by 1.5 to compensate for its low reflectance characteristic), and generate a fused multi-spectral image; if the main band is the visible light band, calculate the weight of the main band and the weight of the secondary band, divide the difference in average normalized reflectance of the main band by the sum of the difference in average normalized reflectance of the main band and the difference in average normalized reflectance of the secondary band to obtain the weight of the main band, and subtract the weight of the main band from 1 to obtain the weight of the secondary band. Based on the visible light image, perform weighted fusion on a pixel-by-pixel basis for the normalized reflectance of the visible light image and the normalized reflectance of the image corresponding to the secondary band (such as if the secondary band is the ultraviolet band, corresponding to the ultraviolet image) (using the weights corresponding to the weight of the main band and the weight of the visible light band), and generate a fused multi-spectral image.
[0068] It should also be noted that: by calculating the differences in average normalized reflectance between the substrate and the candidate defect area in the visible light band, near-infrared band, and ultraviolet band, selecting the band with the largest difference as the main band and performing weighted fusion, the spectral characteristics of the defect can be highlighted. For example, the ultraviolet band is sensitive to interface delamination (the normalized reflectance drops suddenly), and its weight is calculated by the ratio of the difference between the main band and the secondary band, compensating for the low reflectance characteristic (such as multiplying by 1.5), and the contrast of the generated fused multi-spectral image is improved, enhancing the visibility of the defect area.
[0069] S5: Linearly map the normalized reflectance to grayscale values, set a segmentation threshold, and generate a binary image, and screen out the final defect area according to the binary image.
[0070] The specific steps are as follows.
[0071] The fused multispectral image is divided into grids (e.g., 8×8 grids), and the grayscale values in each grid are histogram equalized, limiting the contrast increase to no more than 2 times. The normalized reflectance range of the fused multispectral image is linearly mapped to a grayscale value of 0-255: the minimum value (corresponding to the dark area of the substrate) and the maximum value (corresponding to the bright area of the defect) of the normalized reflectance in the fused multispectral image are extracted, and the difference between the maximum normalized reflectance and the minimum normalized reflectance is divided by 255 to obtain the grayscale stretching factor. The difference between the minimum normalized reflectance is multiplied by the grayscale stretching factor and the negative is taken to obtain the grayscale offset. The normalized reflectance of each pixel is multiplied by the grayscale stretching factor and then added to the grayscale offset to obtain the grayscale value of each pixel.
[0072] The grayscale histogram of the fused multispectral image after linear mapping is calculated, with an interval of 0-255 and a step size of 1. For example, the number of pixels with a grayscale value of 85 is 5000, and the number of pixels with a grayscale value of 255 is 100. A preselected segmentation threshold is set (the preselected segmentation threshold is any value between 0 and 255), and pixels greater than or equal to the preselected segmentation threshold are marked as preselected defects, and pixels less than the preselected segmentation threshold are marked as preselected base materials.
[0073] Calculate the inter-class variance of the pre-selected defect and the pre-selected substrate: divide the number of pixels of the pre-selected defect by the total number of pixels of the fused multispectral image to obtain the pixel ratio of the pre-selected defect, and subtract the pixel ratio of the pre-selected defect from 1 to obtain the pixel ratio of the pre-selected substrate; divide the sum of the grayscale values of the pixels of the pre-selected defect by the number of pixels of the pre-selected defect to obtain the average grayscale of the pre-selected defect; divide the sum of the grayscale values of the pixels of the pre-selected substrate by the number of pixels of the pre-selected substrate to obtain the average grayscale of the pre-selected substrate; multiply the pixel ratio of the pre-selected defect by the pixel ratio of the pre-selected substrate by the square of the difference between the average grayscale of the pre-selected defect and the average grayscale of the pre-selected substrate to obtain the inter-class variance of the pre-selected defect and the pre-selected substrate;
[0074] The preselected segmentation threshold with the largest inter-class variance between the preselected defects and the preselected base material is selected as the segmentation threshold. All pixels in the fused multispectral image with grayscale values greater than or equal to the segmentation threshold are marked as fine screening defects (assigned 1), and pixels with grayscale values less than the segmentation threshold are marked as fine screening base materials (assigned 0) to form a binary image. A 3×3 rectangular kernel is used to perform a morphological opening operation on the binary image to remove isolated noise points (e.g., areas with an area of less than 5 pixels2).
[0075] Perform 8-neighborhood connectivity marking on the binary image, calculate the area (number of pixels) of each connected domain, eliminate connected domains with an area less than 10 pixels2, retain the area ≥ 10 pixels2 as the final defect area, record the coordinates of the circumscribed rectangle of the final defect area (for example, the upper left corner (100, 200), the lower right corner (115, 215)), multiply the pixel area of the final defect area by the pixel density to obtain the physical area of the final defect area.
[0076] It should also be noted that through histogram equalization of the grid (contrast increase ≤ 2 times), combined with linear mapping of gray values (0 - 255), the offset of gray distribution caused by local uneven illumination can be eliminated. The segmentation threshold is selected by maximizing the between-class variance, and is combined with an opening operation using a 3×3 rectangular kernel (removing noise of < 5 pixels²) to reduce the misjudgment rate of the final defect area, and connected regions of ≥ 10 pixels² are retained to improve the detection rate of tiny defects (such as 0.1mm 2 ).
[0077] S6: Generate a reflectivity - wavelength curve based on the normalized reflectivity, record the wavelength value and position with the lowest normalized reflectivity, define the final defect feature vector, use a support vector machine to generate the defect category, determine the defect grade, and record the inspection report.
[0078] The specific steps are as follows.
[0079] Extract the normalized reflectivity of the final defect area in the visible light band, near-infrared band, and ultraviolet band, and calculate the average value of the normalized reflectivity of the final defect area in the visible light band, near-infrared band, and ultraviolet band. In the wavelength range of 350 - 850 nm for the final defect area, statistically interval the average value of the normalized reflectivity of the final defect area in the visible light band, near-infrared band, and ultraviolet band (for example, at 10 nm intervals) to generate a reflectivity - wavelength curve, and record the wavelength value and position with the lowest normalized reflectivity. For example, the lowest point of the normalized reflectivity in the ultraviolet band is at 350 nm, and the lowest point of the normalized reflectivity in the near-infrared band is at 850 nm.
[0080] Calculate the differences between the average values of the normalized reflectances in the visible light band and the near-infrared band, the visible light band and the ultraviolet band, and the near-infrared band and the ultraviolet band respectively. Combine the differences between the average values of the normalized reflectances in the visible light band and the near-infrared band, the differences between the average values of the normalized reflectances in the visible light band and the ultraviolet band, the differences between the average values of the normalized reflectances in the near-infrared band and the ultraviolet band, the position of the absorption peak in the ultraviolet band (the position of the lowest point of the normalized reflectance in the ultraviolet band), the position of the absorption peak in the near-infrared band (the position of the lowest point of the normalized reflectance in the near-infrared band), the physical area of the final defect region, and the central coordinates of the final defect region into the final defect feature vector. Input the final defect feature vector into the support vector machine. The support vector machine uses the radial basis function kernel for non-linear spatial mapping, calculates the geometric distance between the final defect feature vector and the decision hyperplane, adopts the one-versus-one multi-classification strategy, and constructs binary classifiers for bubble-delamination, bubble-surface scratch, bubble-crack, delamination-surface scratch, delamination-crack, and surface scratch-crack respectively. Determine the defect category through the voting mechanism. The output layer uses the Platt probability calibration method to convert the classification confidence into a probability value, and outputs the defect category with the highest probability (the defect categories include bubble, delamination, surface scratch, and crack).
[0081] Determine the defect grade: Determine the defects with the physical area of the final defect region > 5 square millimeters, the distance between the central coordinates of the final defect region and the edge of the decorative board < 10 millimeters, or the defect category being "delamination" as serious defects; determine the defects with the physical area of the final defect region between 1 - 5 square millimeters, the distance between the central coordinates of the final defect region and the edge of the decorative board ≥ 10 millimeters, or the classification result being "crack" or "bubble" as general defects; determine the defects with the physical area of the final defect region less than 1 square millimeter or the classification result being "surface scratch" as minor defects.
[0082] Record the defect category, the central coordinates of the final defect region, the physical area of the final defect region, and the defect grading result ("serious defect", "general defect", and "minor defect") as the inspection report.
[0083] It should also be noted that: Extract the positions of the absorption peaks in the ultraviolet band (350nm) and the near-infrared band (850nm) through the reflectance-wavelength curve, and combine the physical area and the central coordinates to construct the final defect feature vector. The support vector machine adopts the radial basis function kernel (RBF kernel) and the Platt probability calibration, which can improve the defect classification accuracy. The combination of the defect grading standard (such as area > 5mm 2 judged as a serious defect) and the coordinate positioning (such as the central coordinates being < 10mm away from the edge) realizes the quantification of the defect position and the degree of harm.
[0084] This embodiment also provides a computer device, which is applicable to the case of the vision-based UHPC decorative panel pressing quality detection method, including: a memory and a processor; the memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions to implement the vision-based UHPC decorative panel pressing quality detection method proposed in the above embodiment.
[0085] The computer device may be a terminal. The computer device includes a processor, a memory, a communication interface, a display screen, and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner. The wireless manner can be implemented through WIFI, a carrier network, NFC (Near Field Communication), or other technologies. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen. The input device of the computer device can be a touch layer covering the display screen, or a button, a trackball, or a touchpad provided on the outer shell of the computer device. It can also be an external keyboard, a touchpad, or a mouse, etc.
[0086] This embodiment also provides a storage medium, on which a computer program is stored. When the program is executed by a processor, it implements the vision-based UHPC decorative panel pressing quality detection method proposed in the above embodiment; the storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM for short), Electrically Erasable Programmable Read-Only Memory (EEPROM for short), Erasable Programmable Read Only Memory (EPROM for short), Programmable Read-Only Memory (PROM for short), Read-Only Memory (ROM for short), magnetic memory, flash memory, a magnetic disk, or an optical disc.
[0087] In summary, the present invention achieves cross-band geometric correction by calculating the affine transformation matrix, multiplying the corner coordinates in the ultraviolet band and the near-infrared band after expanding them into homogeneous coordinate forms, which can accurately capture the cross-band characteristics of minute defects, avoid misjudgment caused by coordinate deviation, control the coordinate alignment error between the ultraviolet band and the near-infrared band at the sub-pixel level, and solve the problem of large cross-band geometric deviation in multi-spectral images. By calculating the average illumination intensity, standard deviation, and gradient variance to judge the illumination uniformity, and then using a PID controller to dynamically adjust the tilt angle and exposure time of the LED array, the situation of uneven illumination is reduced. After illumination compensation, the reflectivity characteristics of minute cracks or interface delamination defects (such as the sudden drop in the ultraviolet band) can be captured more accurately, avoiding misjudgment or missed detection caused by uneven illumination.
[0088] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them. Although the present invention has been described in detail with reference to the preferred embodiments, those of ordinary skill in the art should understand that the technical solutions of the present invention can be modified or equivalently replaced without departing from the spirit and scope of the technical solutions of the present invention, and they should all be covered by the scope of the claims of the present invention.
Claims
1. A vision-based method for detecting the pressing quality of UHPC decorative panels, characterized in that: Including Calibrate the internal parameters of the multispectral camera using the Zhang Zhengyou calibration method, improve the accuracy of the corner coordinates of the calibration board, generate the detected pixel coordinates, and align the detected pixel coordinates in the ultraviolet and near-infrared bands to the detected pixel coordinates in the visible light band through affine transformation. The internal parameter calibration includes detecting the corner coordinates of the calibration board; Judge the illumination uniformity and adjust the tilt angle and exposure time of the LED array; Collect multispectral images, which include visible light images, near-infrared images, and ultraviolet images; Calculate the normalized reflectance based on the detected pixel coordinates, screen out the candidate defect areas, and generate a fused multispectral image based on the normalized reflectance; Linearly map the normalized reflectance to gray values, set the segmentation threshold, and generate a binary image, and screen out the final defect areas according to the binary image; Generate a reflectance-wavelength curve based on the normalized reflectance, record the wavelength value and position with the lowest normalized reflectance, define the final defect feature vector, use a support vector machine to generate the defect category, determine the defect level, and record the inspection report.
2. The vision-based UHPC decorative panel pressing quality detection method according to claim 1, characterized in that: The step of judging the illumination uniformity and adjusting the tilt angle and exposure time of the LED array means calculating the average illumination intensity, standard deviation, and gradient variance, judging the illumination uniformity, and adjusting the tilt angle and exposure time of the LED array through a PID controller according to the average illumination intensity, standard deviation, and gradient variance.
3. The vision-based UHPC decorative panel pressing quality detection method according to claim 1, characterized in that: The specific steps for generating the fused multispectral image based on the normalized reflectance are as follows: Calculate the difference between the average normalized reflectance of the candidate defect area in the visible light band and the average normalized reflectance of the substrate in the visible light band; Calculate the difference between the average normalized reflectance of the candidate defect area in the near-infrared band and the average normalized reflectance of the substrate in the near-infrared band; Calculate the difference between the average normalized reflectance of the candidate defect area in the ultraviolet band and the average normalized reflectance of the substrate in the ultraviolet band; Screen out the main band according to the calculated difference in the average normalized reflectance, calculate the weight of the main band and the weight of the visible light band, and perform weighted summation of the normalized reflectance of the image corresponding to the main band and the normalized reflectance of the visible light image to generate a fused multispectral image.
4. The vision-based UHPC decorative panel pressing quality detection method according to claim 1, characterized in that: Generating the reflectance-wavelength curve based on the normalized reflectance means calculating the average value of the normalized reflectance of the final defect area in the visible light band, near-infrared band, and ultraviolet band to generate the reflectance-wavelength curve.
5. The vision-based UHPC decorative panel pressing quality detection method according to claim 1, wherein: Using the support vector machine to generate the defect category means inputting the final defect feature vector into the support vector machine. The support vector machine uses the radial basis function kernel to calculate the distance between the final defect feature vector and the hyperplane, and outputs the defect category using the Platt probability calibration method.
6. The vision-based UHPC decorative panel pressing quality detection method according to claim 1, characterized in that: The specific steps for aligning the detected pixel coordinates in the ultraviolet and near-infrared bands to the detected pixel coordinates in the visible light band through affine transformation are as follows: Calculate the affine transformation matrix from the detected pixel coordinates in the ultraviolet and near-infrared bands to the detected pixel coordinates in the visible light band; Expand the detected pixel coordinates in the ultraviolet and near-infrared bands into homogeneous coordinate form, combine with the affine transformation matrix, and align the detected pixel coordinates in the ultraviolet and near-infrared bands to the detected pixel coordinates in the visible light band.
7. The vision-based UHPC decorative panel pressing quality detection method according to claim 1, wherein: The calculation of the normalized reflectivity according to the detected pixel coordinates refers to extracting the grayscale value of the white area of the calibration plate according to the detected pixel coordinates, calculating the average of the grayscale values after removing the maximum and minimum values of the grayscale values of the white area of the calibration plate, and calculating the normalized reflectivity according to the average of the grayscale values.
8. The vision-based UHPC decorative panel pressing quality detection method according to claim 1, wherein: The specific steps of setting the segmentation threshold and generating a binary image are as follows: Set preselected segmentation thresholds and mark preselected defects and preselected base materials; Calculate the between-class variance of pre-selected defects and pre-selected substrates; Setting a segmentation threshold based on a preselected segmentation threshold and the between-class variance of preselected defects and preselected substrates; The fine screening defects and the fine screening substrate are marked according to the segmentation threshold and assigned values to form a binary image.
9. A computer device, comprising a memory and a processor, the memory storing a computer program, characterized in that: When the processor executes the computer program, the steps of the vision-based UHPC decorative panel pressing quality detection method according to any one of claims 1 to 8 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the vision-based UHPC decorative panel pressing quality detection method according to any one of claims 1 to 8 are implemented.
Citation Information
Patent Citations
Method for detecting defected components of printed circuit boards (PCBs)
CN108982544A
Multispectral imaging system and method
CN111426382A
Palm print image processing method, electronic equipment and storage medium
CN116311400A
Aircraft skin gluing quality defect detection method based on neural network
CN116402821A
Intelligent cloth inspection detection method, system, equipment and medium
CN118583802A
Cited By
Defect detection method for thermosetting resin adhesive
CN121190440A
A method for detecting defects in a thermosetting resin glue
CN121190440B
Filling opening anti-leakage monitoring system and method based on machine vision
CN121746366A