Image analysis-based online sorting detection method for liquid cooling plate surface polishing
By combining image analysis and multi-angle illumination, the problems of low efficiency and insufficient accuracy in surface roughness detection of liquid cooling plates are solved, and rapid, full-coverage and non-destructive surface defect detection is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- 宜宾纵贯线科技股份有限公司
- Filing Date
- 2026-06-11
- Publication Date
- 2026-07-14
AI Technical Summary
Existing methods for detecting the surface roughness of liquid-cooled plates mainly rely on manual operation, which is inefficient, cannot fully assess the uniformity of the plate surface, and contact testing may damage the surface, making it difficult to effectively identify local defects.
An online sorting and inspection method based on image analysis is adopted. By using directional light sources and industrial cameras at different angles, combined with grayscale processing and texture feature analysis, the method can achieve preliminary screening and re-inspection of light spot and dark area defects on the surface of liquid cooling plates, reducing the amount of computation and improving detection efficiency and accuracy.
It enables rapid, full-coverage inspection of the liquid cooling plate surface, reducing the false positive rate and the risk of surface scratches, and improving the reliability of inspection and production cycle time.
Smart Images

Figure CN122391215A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of surface roughness detection technology for liquid-cooled plates, and in particular to an online sorting and detection method for grinding liquid-cooled plates based on image analysis. Background Technology
[0002] Battery liquid cooling plates are core components of the thermal management system for new energy vehicle batteries. They are typically metal (such as aluminum) sheets with numerous precision flow channels that circulate coolant to dissipate heat from the battery. During the production and processing of aluminum liquid cooling plates, due to their long storage period, their surfaces naturally oxidize. Over time, oil and dust adhere to the surface. The oxide layer on the aluminum alloy surface, along with the adsorbed dust and oil, can prevent the subsequent application of insulating powder, causing it to easily detach. Therefore, before applying insulating powder, the surface of the liquid cooling plate needs to be cleaned and polished to remove the oxide layer and dust. Roughening the surface through polishing improves the adhesion strength of the subsequently applied insulating powder. The current standard roughness (RA) range for grinding the surface of liquid-cooled plates is 3~5μm. If the surface roughness after grinding is too low (below 3μm), the sprayed insulating powder will not adhere stably and will easily detach. If the surface roughness after grinding is too high (greater than 5μm), gaps will appear between the sprayed insulating powder, reducing its insulation performance. Therefore, roughness testing must be performed on the liquid-cooled plates after grinding. Current testing methods mostly use contact roughness testers for manual inspection. Manual positioning, measurement, and recording of single-point data is time-consuming and cannot meet production cycle time. Furthermore, liquid-cooled plates have a large area and many points need to be tested. Manual inspection can only test small areas and discrete points, and cannot assess the uniformity of the entire plate surface. Local defects (such as a small area that is too smooth or too rough) are easily missed. Secondly, the probe of the roughness tester needs to scratch the surface of the liquid-cooled plate. If too much force is applied during manual inspection, it may scratch the cleaned plate surface. To address the aforementioned issues, further improvements are needed in the roughness detection method for liquid cooling plates. Summary of the Invention
[0003] Therefore, it is necessary to provide an online sorting and detection method for liquid-cooled plate surface grinding based on image analysis to address the above problems.
[0004] The online sorting and detection method for grinding liquid-cooled plate surfaces based on image analysis includes the following steps: S1, the workpiece is horizontally input into the positioning fixture of the XY two-dimensional motion platform in the dark box with the grinding surface facing upwards for image analysis. S2, a first directional light source and a second directional light source are arranged inside the dark box to provide tilted illumination for the workpiece. An industrial camera with its optical axis perpendicular to the workpiece grinding surface is installed on the top of the dark box. The incident angle A between the light emitted by the first directional light source and the normal of the workpiece grinding surface is greater than the incident angle B between the light emitted by the second directional light source and the normal of the workpiece grinding surface. The industrial camera is used to receive the first tilt angle image and the second tilt angle image generated by the diffuse reflection of the first directional light source and the second directional light source on the workpiece grinding surface. The first tilt angle image and the second tilt angle image are processed into grayscale. The grayscale images are used to preliminarily determine whether there are dark area defects and light spot defects on the workpiece grinding surface. S3. If it is determined that there are dark area defects and / or light spot defects on the workpiece grinding surface, based on the reference marks provided by the positioning fixture, coordinate system conversion is performed according to the pixel coordinate positions of the dark area defects and light spot defects in the first tilt image and the second tilt image to obtain the physical coordinate positions of the dark area defects and / or light spot defects on the workpiece grinding surface.
[0005] Preferably, the method further includes step S4, using the XY two-dimensional motion platform to move the dark area defects and / or light spot defects on the workpiece grinding surface to directly below the industrial camera, and then using a third directional light source to vertically illuminate the workpiece grinding surface. The industrial camera acquires a third vertical image of the workpiece grinding surface, and uses the surface texture feature information of the dark area defects and / or light spot defects on the workpiece grinding surface fed back by the third vertical image to re-inspect the dark area defects and / or light spot defects.
[0006] Preferably, the method for determining the spot defect is to perform grayscale processing on the second tilt angle image of the workpiece grinding surface acquired by the industrial camera to form a second grayscale image, then divide the second grayscale image into several second image blocks based on pixel coordinates in a uniform grid, calculate the average grayscale value M1 of the pixels in the second image block, retrieve the spot threshold M2 corresponding to the second image block from the standard sample, and count the number M3 of spot pixels in the second image block whose grayscale value is greater than the sum of the average grayscale value M1 and the spot threshold M2. If the number of spot pixels M3 is greater than the preset spot value M4, then it is determined that there is a spot defect in the second image block; otherwise, it is determined that there is no spot defect.
[0007] Preferably, the method for calculating the light spot threshold M2 is as follows: ; M2 is the light spot threshold of the second image patch corresponding to the standard sample; u is the average gray value of all pixels in the second image block corresponding to the standard sample; k is a constant coefficient, taken as 1.5; σ is the pixel standard deviation of the second image patch corresponding to the standard sample.
[0008] Preferably, the method for determining the dark area defect is to perform grayscale processing on the first tilt angle image of the workpiece grinding surface acquired by the industrial camera to form a first grayscale image, and then divide the first grayscale image into several first image blocks in a uniform grid based on pixel coordinates. The average grayscale value N1 and contrast N2 of the pixels in the first image block are calculated. If the average grayscale value N1 of the first image block is less than the average grayscale threshold N3 of the corresponding first image block in the standard sample, and the contrast N2 of the first image block is greater than the contrast threshold N4 of the corresponding first image block in the standard sample, then it is determined that the first image block has a dark area defect; otherwise, it is determined that there is no dark area defect.
[0009] Preferably, in step S4, the method for re-inspecting the dark area defects and / or light spot defects is as follows: S4.1, perform grayscale conversion and noise reduction processing on the third vertical image with light spot defects and / or dark area defects; S4.2, Generate a gray-level co-occurrence matrix based on the image of the light spot defect and / or dark area defect region after grayscale conversion; S4.3, Extract several texture features from the gray-level co-occurrence matrix; S4.4, input several texture features of the light spot defects and dark area defects into the trained light spot RBF discrimination model and dark area RBF discrimination model respectively for re-examination.
[0010] Preferably, the texture features extracted from the gray-level co-occurrence matrix of the light spot defect include contrast, energy, and texture entropy, and the texture features extracted from the gray-level co-occurrence matrix of the dark area defect include contrast, homogeneity, and texture entropy.
[0011] Preferably, the incident angle A ranges from 80° to 85°, and the incident angle B ranges from 10° to 25°.
[0012] Preferably, the first directional light source and the second directional light source are linear light sources.
[0013] Preferably, the first image block and the second image block are 32*32 or 64*64.
[0014] The advantages of this invention are as follows: This technical solution can highlight the light spots and dark area defects on the surface of the workpiece by forming with double tilted light at different angles, which can effectively distinguish between the two types of defects. At the same time, the initial inspection does not require high-precision scanning, which reduces the image processing load and improves the detection efficiency. Secondly, the use of vertical light for re-inspection eliminates the false defect identification caused by reflection interference during the initial inspection with tilted light, thereby improving the reliability of defect judgment. Attached Figure Description
[0015] Figure 1 This is a schematic diagram illustrating the implementation status of an online sorting and detection method for grinding liquid-cooled plate surfaces based on image analysis, as one embodiment. Detailed Implementation
[0016] To make the above-mentioned objects, features, and advantages of the present invention more apparent and understandable, specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. Many specific details are set forth in the following description to provide a thorough understanding of the present invention. However, the present invention can be practiced in many other ways different from those described herein, and those skilled in the art can make similar modifications without departing from the spirit of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.
[0017] It should be noted that when an element is referred to as being "fixed to" or "set on" another element, it can be directly on the other element or there may be an intervening element. When an element is considered to be "connected to" another element, it can be directly connected to the other element or there may be an intervening element. The terms "vertical," "horizontal," "left," "right," and similar expressions used herein are for illustrative purposes only and do not represent the only possible implementation.
[0018] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. The terminology used herein in the description of this invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. The term "and / or" as used herein includes any and all combinations of one or more of the associated listed items.
[0019] like Figure 1 As shown, the online sorting and detection method for grinding liquid-cooled plates based on image analysis includes the following steps: S1, the workpiece is horizontally input into the positioning fixture of the XY two-dimensional motion platform in the dark box with the grinding surface facing upwards for image analysis. Specifically, the workpiece is an aluminum liquid-cooled plate, hollow inside for setting flow channels, with a relatively thin thickness, generally not exceeding 2cm, used for liquid cooling of batteries, and its working surface area is relatively large, mostly more than 1 square meter. After the workpiece surface is cleaned and the dust is blown away by high-pressure cold air, it is horizontally fed into the dark box with the grinding surface (i.e., the working surface) facing upwards to facilitate image analysis. The dark box is used to shield against external light interference. The workpiece can be fed into the dark box manually or by a robotic arm and placed on the positioning fixture of the XY two-dimensional motion platform in the dark box. The XY two-dimensional motion platform moves the positioning fixture and the workpiece on the horizontal plane. The positioning fixture serves to fix the workpiece and prevent relative displacement between the workpiece and the XY two-dimensional motion platform during the movement of the workpiece.
[0020] S2, a first directional light source and a second directional light source are arranged inside the dark box to provide oblique illumination for the workpiece. An industrial camera with its optical axis perpendicular to the workpiece's polished surface is installed on the top of the dark box. The incident angle A between the light emitted by the first directional light source and the normal to the workpiece's polished surface is greater than the incident angle B between the light emitted by the second directional light source and the normal to the workpiece's polished surface. The industrial camera receives the first and second oblique angle images generated by the diffuse reflection of light from the first and second directional light sources on the workpiece's polished surface. The first and second oblique angle images are processed into grayscale. The grayscale images are then used to initially determine whether there are dark area defects and light spot defects on the workpiece's polished surface. Specifically, in this embodiment, after the workpiece is fixed by the positioning fixture, the background controller controls the first and second directional light sources to sequentially emit oblique incident light rays onto the workpiece's polished surface. The light emitted by the first and second directional light sources is time-division multiplexing; that is, when the first directional light source is on, the second directional light source is off, and vice versa. When the industrial camera on the top of the darkroom acquires a first tilted image of the workpiece's polished surface illuminated by the first directional light source, the incident angle A between the light emitted by the first directional light source and the normal to the workpiece's polished surface is relatively large. Therefore, the light rays are almost parallel to the workpiece's polished surface. As the light from the first directional light source "sweeps" across the workpiece's polished surface, tiny pits and protrusions in areas with higher roughness (Ra>5) will cast shadows on each other, preventing areas with roughness exceeding a threshold from being directly illuminated. As is known to those skilled in the art, in the most common 8-bit grayscale images, the grayscale value ranges from 0 to 255, where 0 represents pure black (darkest) and 255 represents pure white (brightest). From 0 to 255, the larger the value, the higher the brightness. The shadows cast by the tiny pits and protrusions will result in large dark areas with low grayscale values on the grayscaled first tilted image, thus defining a dark area defect on the workpiece's polished surface.
[0021] When a second directional light source illuminates the workpiece's polished surface, the incident angle B between the light emitted from the second directional light source and the normal to the workpiece's polished surface is small. If the workpiece's polished surface is polished too smoothly, with a roughness below 3μm or even lower, the polished surface becomes mirror-like. The light emitted from the second directional light source undergoes specular reflection on the workpiece's polished surface. This results in the second tilt image acquired by the industrial camera having a higher grayscale value in the area of specular reflection after grayscale conversion, leading to bright spots, which is defined as a light spot defect on the workpiece's polished surface. Using a first directional light source and a second directional light source with different angles to the normal to the workpiece's polished surface is used for initial inspection to determine whether there are dark area defects and light spot defects on the workpiece's polished surface. The first directional light source has a larger incident angle A, making it sensitive to dark area defects (such as excessive roughness or depressions). Light easily produces shadows and strong diffuse scattering on microscopic pits or rough surfaces, making the defect darker in the image and amplifying the contrast. The second directional light source has a smaller incident angle B, making it sensitive to light spot defects (such as excessively smooth or low-roughness). Light is easily reflected directly onto near-mirror surfaces and enters the industrial camera, making defects abnormally bright in the image and easier to identify. Two tilted directional light sources work in a time-division manner with the second directional light source to achieve full coverage capture of both "overly dark" and "overly bright" surface anomalies on the workpiece's polished surface. Furthermore, without moving the light source or workpiece, the industrial camera acquires two separate images of the workpiece under different lighting conditions, making it suitable for high-speed online inspection and meeting production cycle requirements. Moreover, the purely optical inspection method avoids scratches or contamination to the workpiece surface that can occur with contact measurements.
[0022] S3, if it is determined that there are dark area defects and / or light spot defects on the workpiece grinding surface, based on the reference marks provided by the positioning fixture, coordinate system conversion is performed according to the pixel coordinate positions of the dark area defects and light spot defects in the first tilt image and the second tilt image to obtain the physical coordinate positions of the dark area defects and / or light spot defects on the workpiece grinding surface. Specifically, in this embodiment, the first tilt image and the second tilt image obtained by the tilted first directional light source and the second directional light source include the workpiece grinding surface and the positioning fixture, and the positioning fixture is provided with reference marks. When it is identified that there are dark area defects and / or light spot defects on the workpiece grinding surface, the pixel coordinates of the reference marks in the first tilt image and the second tilt image are identified through the reference marks (at least 3), such as scales, crosshairs, etc., on the positioning fixture. The physical coordinates of each reference mark point in the coordinate system designed by the positioning fixture (i.e., the workpiece physical coordinate system) are known. Upon detecting dark area defects and / or bright spot defects, the pixel coordinates of these defects (typically the pixel coordinates of the defect area's center or outline) are obtained. Their physical coordinates are then calculated using a transformation matrix. Using a reference mark on the positioning fixture as a reference, the pixel coordinates of the dark area defects and / or bright spot defects are converted to their actual physical coordinates. This pixel coordinate conversion is based on existing technology and will only be briefly described here. Once the physical coordinates of dark area defects and / or bright spot defects on the workpiece's grinding surface are obtained, it facilitates subsequent point-to-point re-inspection and secondary grinding repair work, saving time spent on rework.
[0023] In this embodiment, step S4 is also included: using the XY two-dimensional motion platform to move the dark area defects and / or light spot defects on the workpiece grinding surface to directly below the industrial camera; then, a third directional light source is used to vertically illuminate the workpiece grinding surface; the industrial camera acquires a third vertical image of the workpiece grinding surface; and the surface texture feature information of the dark area defects and / or light spot defects fed back from the third vertical image is used to re-inspect the dark area defects and / or light spot defects. Specifically, in this embodiment, judging the dark area defects and / or light spot defects on the workpiece grinding surface using the first tilt angle image and the second tilt angle image is only a preliminary inspection, because the light paths of the first directional light source and the second directional light source are tilted. Tilted light is sensitive to height differences and can highlight textures and defects, making it suitable for discovering problems. The disadvantage is that it can produce shadows due to small protrusions, distorting the real texture, and is not suitable for precise quantification. During inspection, if the workpiece grinding surface has edge lifting, large-area pits or protrusions, etc., it will form false dark areas and shadows, leading to missed detections and false detections, and misjudging dark area defects and light spot defects. Therefore, we further added step S4, using dome light generated by a third directional light source to re-inspect the dark area defects and spot defects in step S3 above. First, we installed a third directional light source at the top of the dark chamber as a dome light. Dome light is a vertical, uniform diffuse reflection light source that can eliminate directional shadows, allowing the surface texture details (i.e., roughness) on the workpiece's polished surface to be realistically presented through subtle grayscale differences. This eliminates the influence of image edge distortion on the measurement, maintains the highest image resolution for analysis, and re-inspects the dark area defects and spot defects detected in step S3, improving the accuracy of judging defects on the workpiece's polished surface. Furthermore, because the workpiece is mounted on the positioning fixture of the XY 2D motion platform, the physical coordinates of dark area defects and / or bright spot defects are obtained through pixel coordinate transformation. Then, the backend controller controls the overall movement of the XY 2D motion platform to move the positioning fixture and the workpiece, sequentially displacing the dark area defects and / or bright spot defects to directly below the industrial camera. With the dark area defects and / or bright spot defects located at the center of the industrial camera's field of view, the industrial camera can use all effective pixels to acquire the dark area defects and / or bright spot defects, obtaining the highest resolution and clearest close-up images of them. This provides the best data source for subsequent roughness calculations during re-inspection. Moreover, with the dark area defects and / or bright spot defects located at the center of the industrial camera's field of view, distortion is minimized, pixel accuracy is highest, background interference is reduced, and the restoration of dark area defects and / or bright spot defects is most realistic. Subsequent extraction of grayscale features is clear, and local reflections and shadows will not occur due to misalignment.This design first uses a first and second directional light source with tilted light paths to screen out the specific locations of spot defects and dark area defects on a large workpiece grinding surface. Then, with the help of an XY two-dimensional motion platform, the dark area defects and / or spot defects are precisely moved to directly below the industrial camera for fixed-point re-inspection. This achieves the goal of first using tilted light for coarse inspection and then using vertical dome light for fine inspection. The tilted light emitted by the first and second directional light sources detects spot and dark area defects by capturing the disappearance of texture, while the vertical dome light of the third directional light source tends to overlook and fail to detect initially smooth spot defects.
[0024] In this embodiment, the determination steps for light spot defects are further refined. The method for determining light spot defects involves converting the second tilt angle image of the workpiece grinding surface acquired by the industrial camera into a second grayscale image. The second grayscale image is then divided into several small second image blocks based on pixel coordinates using a uniform grid. The average grayscale value M1 of the pixels in each small second image block is calculated, and a light spot threshold M2 corresponding to that block is retrieved from a standard sample. The number M3 of light spot pixels in the small second image block whose grayscale value is greater than the sum of the average grayscale value M1 and the light spot threshold M2 is counted. If the number of light spot pixels M3 is greater than a preset light spot value M4, then a light spot defect is determined to exist in that small second image block; otherwise, no light spot defect is determined to exist. Specifically, in this embodiment, because the workpiece grinding surface area is large, after illuminating the workpiece grinding surface with a second directional light source and converting the second tilt angle image into grayscale, the overall brightness is uneven, resulting in uneven background color. Therefore, calculating the average grayscale of the entire second grayscale image is not meaningful, and slight bright spots are not obvious. Therefore, we divide the second grayscale image into several small second image blocks, each with dimensions of 32x32 or 64x64 pixels. After image block processing, the average grayscale of each individual second image block is used as the judgment benchmark, avoiding the problem of inconsistent brightness on the polished surface of a large workpiece and preventing large-area misjudgments. The presence of bright spots in each second image block confirms the presence of light spot defects. Furthermore, dividing the second grayscale image into several small second image blocks reduces computational burden, enabling regional detection and facilitating the precise location of second image blocks with light spot defects. Only the average grayscale value M1 of the current second image block needs to be calculated. The average grayscale value M1 is the sum of the grayscale values of all pixels within the current second image block divided by the total number of pixels. The light spot threshold M2 is an initial setting value, obtained by collecting the average grayscale values of several regions corresponding to a standard sample with the required roughness under the same illumination conditions. Each region is also divided into 32*32 or 64*64 pixels, thus corresponding to a specific second image block on the workpiece. The entire judgment method does not employ complex algorithms, reducing hardware requirements. It sets two judgment constraints: first, it determines whether there are any spot pixels in the second image block whose sum is greater than the average gray value M1 and the spot threshold M2, and counts the number of spot pixels M3. If the number of spot pixels M3 is greater than a preset spot value M4, then a spot defect is judged to exist in the second image block. This combined logic of the two constraints can filter out random noise, dust, and minor grinding interference, exhibiting strong anti-interference capabilities and reducing the false detection rate. Furthermore, dividing the second image block into several smaller blocks for individual inspection adapts to the uneven illumination caused by large grinding surfaces on the workpiece surface, improving detection reliability.Specifically, when the second image patch is 32*32, the preset value M4 of the light spot is set to the range of 20 to 30 pixels; when the second image patch is 64*64, the preset value M4 of the light spot is set to the range of 60 to 90 pixels.
[0025] Furthermore, the method for calculating the light spot threshold M2 is as follows: ; M2 is the light spot threshold of the second image patch corresponding to the standard sample; u is the average gray value of all pixels in the second image block corresponding to the standard sample; k is a constant coefficient, taken as 1.5; σ is the pixel standard deviation of the second image patch corresponding to the standard sample.
[0026] Wherein, the average gray level u is the sum of the gray levels of all pixels in the corresponding second image block in the standard sample divided by the total number of pixels in the current image block; the pixel standard deviation σ = sqrt([Σ(δ-μ)²] / total number of pixels), where δ is the discrete value of the center pixel of the current second image block in the standard sample.
[0027] In this embodiment, the steps for determining dark area defects are further refined. The method for determining dark area defects involves converting the first tilt angle image of the workpiece's polished surface acquired by the industrial camera into a first grayscale image. Then, the first grayscale image is uniformly divided into several small first image blocks based on pixel coordinates. The average grayscale value N1 and contrast N2 of the pixels in each small first image block are calculated. If the average grayscale value N1 of the small first image block is less than the average grayscale threshold N3 of the corresponding small first image block in the standard sample, and the contrast N2 of the small first image block is greater than the contrast threshold N4 of the corresponding small first image block in the standard sample, then the small first image block is determined to have a dark area defect. Otherwise, it is determined that no dark area defect exists. Specifically, in this embodiment, after acquiring the first grayscale image, it is divided into several small first image blocks through gridding. This avoids the problem being difficult to detect in the entire first grayscale image due to the large area of the workpiece's polished surface and uneven overall brightness, which could lead to uneven background color. Segmentation results in higher sensitivity. The first image patch, divided by grid, is 32*32 or 64*64 pixels. The average grayscale of pixels in the first image patch is calculated, and all first image patches on the workpiece correspond one-to-one with the first image patches in the standard sample, making the judgment more accurate and objective. Average grayscale and contrast are used as dual features for dual judgment, avoiding the misjudgment of normal dullness and underexposure as dark area defects by relying solely on grayscale values. Grayscale values determine the brightness and darkness of the second image patch, while contrast determines the texture abrupt changes in the second image patch, matching the essential characteristics of dark area defects and reducing the rate of missed detections and false judgments.
[0028] In this embodiment, the method for re-inspecting the dark area defects and / or light spot defects in step S4 is as follows: S4.1, the third vertical image with light spot defects and / or dark area defects is subjected to grayscale conversion and noise reduction processing. The grayscale conversion process uses a weighted average method to convert the color RGB image to grayscale, transforming the three-dimensional color image into a two-dimensional grayscale image, unifying the grayscale range of image pixels, eliminating color information interference, and simplifying subsequent calculations. For noise reduction, considering the susceptibility to illumination fluctuations during workpiece surface image acquisition, a combination of median filtering and Gaussian filtering is used to prevent the loss of subsequent texture features.
[0029] S4.2, Generate a gray-level co-occurrence matrix (GLCM) based on the grayscaled image of the spot defect and / or dark defect regions. Specifically, the gray-level co-occurrence matrix (GLCM) is a classic statistical tool used in image processing to quantify texture features. Considering the differences in texture distribution between spot defects and dark defects, GLCMs for spot defects and dark defects are constructed separately. These two types of GLCMs characterize the correlation and spatial distribution characteristics of the surface texture features of the corresponding defects, providing data support for subsequent analysis.
[0030] S4.3 Extract several texture features from the gray-level co-occurrence matrix. Specifically, based on the gray-level co-occurrence matrices of spot defects and dark area defects, extract several texture features related to surface roughness to achieve quantitative characterization of spot defects and dark area defects, and remove invalid and redundant texture features to improve the discrimination efficiency of the model in subsequent steps.
[0031] S4.4, several texture features of the spot defects and dark area defects are input into the trained spot RBF discrimination model and dark area RBF discrimination model respectively for re-inspection. Specifically, based on a large amount of sample texture feature data of spot defects and dark area defects on the workpiece surface and the corresponding actual roughness results detected by the roughness detector, the spot RBF discrimination model and dark area RBF discrimination model are trained, verified, and optimized respectively to obtain two independent discrimination models. It is understood that the RBF discrimination model adopts a radial basis function neural network, which has strong nonlinear fitting ability and pattern recognition ability, and can accurately match the texture features and roughness level of the workpiece surface. During the re-inspection, the texture features extracted from the spot defect area are input into the spot RBF discrimination model, and the texture features extracted from the dark area defect area are input into the dark area RBF discrimination model. The two models independently complete the inference operation, and output the roughness judgment structure of the corresponding defect based on the preset roughness judgment threshold, so as to realize the secondary re-inspection of spot defects and dark area defects. In response to the different distributions of texture features in the gray-level co-occurrence matrix of defects with different roughness, the applicant built two RBF models and conducted differentiated re-inspections based on the model. This avoids mutual interference caused by the different texture features and weights of spot defects and dark area defects, thus accurately completing the re-inspection and ensuring the reliability of the judgment results for spot defects and dark area defects on the workpiece.
[0032] In this embodiment, the texture features extracted from the gray-level co-occurrence matrix of the light spot defect include contrast, energy, and texture entropy; the texture features extracted from the gray-level co-occurrence matrix of the dark area defect include contrast, homogeneity, and texture entropy. Contrast reflects the degree of brightness difference in the workpiece surface texture; energy reflects the uniformity of the workpiece surface texture; a larger value indicates a more regular and monotonous texture; homogeneity reflects the local uniformity of the texture; a larger value indicates a finer texture with less variation; and texture entropy reflects the complexity of the texture; a larger value indicates a more chaotic texture. For the light spot defect, the gray-level difference leads to low contrast, while the dark area defect has a large gray-level waveguide, leading to high contrast. Furthermore, the texture of the light spot defect is simple, resulting in low texture entropy, while the texture of the dark area defect is chaotic, resulting in high texture entropy. Therefore, contrast and texture entropy are extracted for both light spot and dark area defects. In addition, energy features are extracted for the light spot defect, and homogeneity features are extracted for the dark area defect.
[0033] In this embodiment, the RBF discrimination model for light spots is:
[0034] In the formula, Output value for spot defects; These are model bias parameters used to adjust the judgment benchmark; the parameters are fixed. These are the neuron weight coefficients, used to characterize the discrimination weights of contrast, energy, and texture entropy in the spot model; The deviation of the contrast, energy, and texture entropy in the detected spot defects from those in the standard sample; For spot sensitivity, the parameters are fixed.
[0035] Dark area RBF discrimination model
[0036] In the formula, Output value for dark area defects; These are model bias parameters used to adjust the judgment benchmark; the parameters are fixed. These are the neuron weight coefficients, used to characterize the discrimination weights of contrast, energy, and texture entropy in the spot model; The deviation of the contrast, energy, and texture entropy in the detected dark area defects from the contrast, homogeneity, and texture entropy in the standard sample. For dark area sensitivity, use fixed parameters.
[0037] according to and The value is used to determine whether there are spot defects or dark area defects.
[0038] In this embodiment, the incident angle A ranges from 80° to 85°, and the incident angle B ranges from 10° to 25°.
[0039] In this embodiment, the first directional light source and the second directional light source are linear light sources.
[0040] The embodiments described above are merely illustrative of several implementations of the present invention, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these all fall within the protection scope of the present invention. Therefore, the protection scope of this invention patent should be determined by the appended claims.
Claims
1. An online sorting and detection method for liquid-cooled plate surface grinding based on image analysis, characterized in that: The process includes the following steps: S1, inputting the workpiece horizontally into the positioning fixture of the XY two-dimensional motion platform in the dark box with the workpiece's polished surface facing upwards for image analysis; S2, a first directional light source and a second directional light source are arranged inside the dark box to provide tilted illumination for the workpiece. An industrial camera with its optical axis perpendicular to the workpiece grinding surface is installed on the top of the dark box. The incident angle A between the light emitted by the first directional light source and the normal of the workpiece grinding surface is greater than the incident angle B between the light emitted by the second directional light source and the normal of the workpiece grinding surface. The industrial camera is used to receive the first tilt angle image and the second tilt angle image generated by the diffuse reflection of the first directional light source and the second directional light source on the workpiece grinding surface. The first tilt angle image and the second tilt angle image are processed into grayscale. The grayscale images are used to preliminarily determine whether there are dark area defects and light spot defects on the workpiece grinding surface. S3. If it is determined that there are dark area defects and / or light spot defects on the workpiece grinding surface, based on the reference marks provided by the positioning fixture, coordinate system conversion is performed according to the pixel coordinate positions of the dark area defects and light spot defects in the first tilt image and the second tilt image to obtain the physical coordinate positions of the dark area defects and / or light spot defects on the workpiece grinding surface.
2. The detection method as described in claim 1, characterized in that: It also includes S4, which uses the XY two-dimensional motion platform to move the dark area defects and / or light spot defects on the workpiece grinding surface to directly below the industrial camera, and then uses a third directional light source to vertically illuminate the workpiece grinding surface. The industrial camera acquires a third vertical image of the workpiece grinding surface, and uses the surface texture feature information of the dark area defects and / or light spot defects on the workpiece grinding surface fed back by the third vertical image to re-inspect the dark area defects and / or light spot defects.
3. The detection method as described in claim 2, characterized in that: The method for determining spot defects involves converting the second tilt angle image of the workpiece grinding surface acquired by the industrial camera into a grayscale image. The second grayscale image is then divided into several small second image blocks based on pixel coordinates using a uniform grid. The average grayscale value M1 of the pixels in each small second image block is calculated, and the spot threshold M2 corresponding to that small second image block is retrieved from a standard sample. The number of spot pixels M3 in the small second image block whose grayscale value is greater than the sum of the average grayscale value M1 and the spot threshold M2 is counted. If the number of spot pixels M3 is greater than a preset spot value M4, then a spot defect is determined to exist in the small second image block; otherwise, no spot defect is determined to exist.
4. The detection method as described in claim 3, characterized in that: The method for calculating the light spot threshold M2 is as follows: ; M2 is the light spot threshold of the second image patch corresponding to the standard sample; u is the average gray value of all pixels in the second image block corresponding to the standard sample; k is a constant coefficient, taken as 1.5; σ is the pixel standard deviation of the second image patch corresponding to the standard sample.
5. The detection method as described in claim 2, characterized in that: The method for determining the dark area defect is to perform grayscale processing on the first tilt angle image of the workpiece grinding surface acquired by the industrial camera to form a first grayscale image, and then divide the first grayscale image into several first image blocks in a uniform grid based on pixel coordinates. The average grayscale value N1 and contrast N2 of the pixels in the first image block are calculated. If the average grayscale value N1 of the first image block is less than the average grayscale threshold N3 of the corresponding first image block in the standard sample, and the contrast N2 of the first image block is greater than the contrast threshold N4 of the corresponding first image block in the standard sample, then it is determined that the first image block has a dark area defect; otherwise, it is determined that there is no dark area defect.
6. The detection method as described in claim 2, characterized in that: In step S4, the method for re-inspecting the dark area defects and / or light spot defects is as follows: S4.1, perform grayscale conversion and noise reduction processing on the third vertical image with light spot defects and / or dark area defects; S4.2, Generate a gray-level co-occurrence matrix based on the image of the light spot defect and / or dark area defect region after grayscale conversion; S4.3, Extract several texture features from the gray-level co-occurrence matrix; S4.4, input several texture features of the light spot defects and dark area defects into the trained light spot RBF discrimination model and dark area RBF discrimination model respectively for re-examination.
7. The detection method as described in claim 6, characterized in that: The texture features extracted from the gray-level co-occurrence matrix of the light spot defect include contrast, energy, and texture entropy; the texture features extracted from the gray-level co-occurrence matrix of the dark area defect include contrast, homogeneity, and texture entropy.
8. The detection method as described in claim 1, characterized in that: The incident angle A ranges from 80° to 85°, and the incident angle B ranges from 10° to 25°.
9. The detection method as described in claim 1, characterized in that: Both the first and second directional light sources are linear light sources.
10. The detection method as described in claim 3 or 5, characterized in that: The first image block and the second image block are 32*32 or 64*64.