Machine vision-based precision machining part online laser detection system and method

CN123015452APending Publication Date: 2026-10-30CHENAN (TIANJIN) PRECISION MACHINERY TECHNOLOGY CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202611192932.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-07
Publication Date
2026-10-30

AI Technical Summary

Technical Problem

然而,上述方案缺少针对高亮区域空间覆盖范围和区域代表性的有效评价机制,难以准确识别真正能够反映整体光照特征的目标区域,进而影响大气光成分估计的准确性

Benefits of technology

本发明能够有效提升精密机加工零件在线检测过程中图像质量和缺陷识别能力,降低激光照射产生的强反光、局部过曝以及复杂工业环境中散射光干扰对检测结果造成的不利影响,提高图像增强处理的准确性和稳定性。通过对亮度信息、空间分布特征以及区域连续特征进行综合分析,能够更加准确地识别具有代表性的关键区域,提高光照信息提取的可靠性,使图像对比度、边缘清晰度以及细节表现能力得到显著增强。与此同时,能够有效抑制局部异常亮点、随机噪声以及非目标高亮区域对处理结果的影响,提高关键区域筛选的准确性和稳定性,使图像增强结果更加符合实际成像情况。经增强处理后的图像能够更加完整地保留零件表面的纹理信息、轮廓信息以及微小缺陷特征,使划痕、裂纹、毛刺、缺口、凹坑等瑕疵更加清晰地呈现出来,提高边缘检测对缺陷特征的提取能力和识别能力,降低误检率和漏检率。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123015452A_ABST
    Figure CN123015452A_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of image data processing, in particular to a precision machining part online laser detection system and method based on machine vision, comprising: acquiring an image of a precision machining part to be detected; calculating the normalized value of the weighted sum of the gray values of each pixel point in the target region in the image, and the weight in the weighted sum process is the normalized value of the highlight degree of each pixel point in the target region; the target region is the region with the maximum distribution range; after processing the image using an improved dark channel prior dehazing algorithm and performing edge detection, if the number of detected edge contours is greater than a set threshold, it is determined that the precision machining part has defects; wherein the improved dark channel prior dehazing algorithm includes an atmospheric light component, and the atmospheric light component is the normalized value of the weighted sum of the gray values of each pixel point in the target region. The present application solves the problem of unstable edge detection results, false detection and missed detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image data processing technology. More specifically, this invention relates to an online laser inspection system and method for precision machined parts based on machine vision. Background Technology

[0002] With the rapid development of industries such as high-end equipment manufacturing, aerospace, automotive parts, precision molds, and electronic devices, the requirements for machining accuracy and surface quality of precision machined parts are constantly increasing. During the manufacturing processes of precision machined parts, including turning, milling, grinding, drilling, and laser processing, defects such as scratches, cracks, burrs, chipping, pits, machining residues, and surface ablation are easily generated. These defects not only affect the appearance quality of the parts but may also reduce their dimensional accuracy, assembly accuracy, fatigue strength, and service life, and in severe cases, even lead to the failure of the entire machine. Therefore, rapid, accurate, and stable online inspection of the surface quality of parts during production has become an important technical means to ensure product quality and improve production efficiency.

[0003] With the development of machine vision technology, more and more manufacturing enterprises are adopting vision inspection technology based on industrial cameras to conduct online inspection of precision machined parts. By acquiring images of the parts and extracting features such as edges, textures, and contours, defect identification is achieved, thereby improving inspection efficiency and automation levels. To further enhance the identifiability of defect features, existing technologies typically use laser illumination to irradiate the parts to be inspected. The laser light source increases the brightness and contrast of the part surface, making even subtle defects more clearly visible in the image.

[0004] Patent application CN120672669A discloses a machine vision-based method and system for wind turbine defect detection. The patent application includes: acquiring historically captured images of wind turbine blades, generating a training dataset, establishing a deep learning network architecture based on a convolutional neural network, building a wind turbine blade motion recognition model, performing computational processing using a dark channel prior algorithm, obtaining dynamically adjusted weights, and performing AOD (Advanced Defect Detection) based on the dynamically adjusted weights. The Net model is used to train and establish a wind turbine blade blur correction model. Real-time images of the wind turbine blades are captured, and a wind turbine blade motion recognition model is used for motion recognition correction. The same model is used for dust and fog removal. A defect detection model is then established and used for defect detection. This approach enables accurate identification of even high-speed moving wind turbine blades, ensuring clear blade contour details. During defect detection, the blade condition can be analyzed promptly and accurately, improving the wind turbine blade's performance. However, this approach lacks an effective evaluation mechanism for the spatial coverage and representativeness of high-brightness areas, making it difficult to accurately identify target areas that truly reflect the overall illumination characteristics. This, in turn, affects the accuracy of atmospheric light composition estimation. When the atmospheric light estimation results are inaccurate, the image enhancement process is prone to over-enhancement, under-enhancement, or insufficient detail recovery, preventing defect features from being fully revealed. Ultimately, this leads to unstable edge detection results, resulting in false positives and false negatives. Summary of the Invention

[0005] To address the issues of unstable edge detection results, resulting in false detections and missed detections, as mentioned in the background art, this invention provides solutions in the following aspects.

[0006] In a first aspect, the present invention provides an online laser inspection method for precision machined parts based on machine vision, comprising: acquiring an image of the precision machined part to be inspected; The normalized value of the weighted sum of the gray values ​​of each pixel in the target region of the image is calculated, and the weights in the weighted summation process are the normalized values ​​of the brightness of each pixel in the target region. The target region is the region with the largest distribution breadth. Specifically, the distribution breadth of the region corresponding to the target pixel is the product of the range of the horizontal coordinates, the range of the vertical coordinates, and the proportion of the number of pixels in the target pixel region to the total number of pixels in the image. The target pixel is any pixel within the target gray level range. After processing the image using an improved dark channel prior dehazing algorithm and performing edge detection, if the number of detected edge contours is greater than a set threshold, it is determined that the precision machined part has defects. The improved dark channel prior dehazing algorithm includes atmospheric light components, which are the normalized values ​​of the weighted sum of the gray values ​​of each pixel in the target region.

[0007] The aforementioned technical solution improves the accuracy and stability of illumination information estimation, making the image enhancement results more consistent with actual imaging conditions. It avoids image distortion caused by interference from abnormally bright local areas, thereby enhancing the difference between defective and normal areas and improving the integrity and continuity of defect edge contours. The enhanced image can more clearly reveal minor imperfections such as scratches, cracks, burrs, notches, and pits, improving the ability of edge detection to extract defect features and reducing the probability of missed and false detections.

[0008] Furthermore, the target gray level segment is the gray level segment with the highest brightness, and the brightness is the product of the normalized value of the difference between the largest and smallest gray level in each gray level segment, the normalized value of the average gray value of the corresponding pixels of all gray levels in each gray level segment, and the proportion of the number of corresponding pixels of all gray levels in each gray level segment to the total number of pixels in the image.

[0009] The aforementioned technical solution, by comprehensively considering the brightness variation range of the grayscale interval, the overall brightness level, and the pixel distribution scale, can more accurately identify representative bright areas, avoiding biases caused by judging based solely on a single brightness feature. This method helps reduce the impact of local strong reflections, isolated bright spots, and random noise on the bright area selection results, improving the accuracy and stability of bright area identification, and making the selected areas more reflective of the image's true lighting characteristics.

[0010] Furthermore, the target pixel corresponding region is specifically defined as follows: all target pixels within a set neighborhood centered on the target pixel are merged into one region to obtain the target pixel corresponding region.

[0011] The above technical solution merges spatially adjacent target pixels with similar brightness characteristics to form a continuous and complete region structure. This reduces the impact of isolated pixels and scattered bright spots on subsequent processing results, improving the completeness and stability of the region extraction results. This approach enhances the continuity and representativeness of the target region, reduces interference from random noise and local abnormal brightness changes, and makes the obtained region more consistent with the actual distribution in the image.

[0012] Further, the gray level segment specifically involves: obtaining the number of pixels corresponding to each gray level in the dark channel image of the image, calculating the average number of pixels corresponding to all gray levels other than gray level 0, taking gray levels greater than the average as pre-selected gray levels, merging gray levels with non-zero pixel counts corresponding to the gray levels on the left and right sides of any pre-selected gray level into a gray level segment, until all preset gray levels are covered, to obtain multiple gray level segments.

[0013] The above technical solution constructs multiple gray-level intervals based on the actual distribution of each gray level in the dark channel image. This makes the gray-level segmentation results more closely match the true brightness distribution characteristics of the image, avoiding the problems of fragmented or mixed brightness information caused by fixed segmentation methods. This approach helps to highlight the more representative brightness areas in the image, reduce the impact of sparse gray-level distribution and random noise on the region segmentation results, and improve the rationality and stability of brightness information organization.

[0014] Furthermore, it also includes correcting the brightness level to obtain a corrected brightness level, specifically by: obtaining the range of gray values ​​of all pixels within a set neighborhood centered on each pixel, and using the ratio of the brightness level to the range as the corrected brightness level.

[0015] The aforementioned technical solution corrects the brightness level by combining the grayscale changes within the neighborhood of a pixel, effectively reflecting the brightness stability and continuity of the bright area and reducing misjudgments caused by evaluating solely based on brightness magnitude. This method helps reduce the impact of local strong reflections, random noise, and isolated bright spots on the bright area identification results, improving the accuracy and reliability of bright area selection and making the final bright area more consistent with the actual illumination distribution of the image.

[0016] Furthermore, it also includes performing grayscale processing on the image.

[0017] Furthermore, the edge detection is Sobel edge detection or Canny edge detection.

[0018] In a second aspect, the present invention provides an online laser inspection system for precision machined parts based on machine vision, comprising a memory and a processor, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, the online laser inspection method for precision machined parts based on machine vision described above is implemented.

[0019] The beneficial effects of this invention are as follows: This invention effectively improves image quality and defect recognition capabilities during online inspection of precision machined parts, reducing the adverse effects of strong reflections from laser irradiation, local overexposure, and scattered light interference in complex industrial environments on inspection results, thus enhancing the accuracy and stability of image enhancement processing. By comprehensively analyzing brightness information, spatial distribution characteristics, and regional continuity features, it can more accurately identify representative key areas, improving the reliability of illumination information extraction and significantly enhancing image contrast, edge sharpness, and detail representation. Simultaneously, it effectively suppresses the influence of local abnormal bright spots, random noise, and non-target bright areas on the processing results, improving the accuracy and stability of key area selection and making the image enhancement results more consistent with actual imaging conditions. The enhanced image can more completely preserve the texture information, contour information, and minor defect features of the part surface, making scratches, cracks, burrs, notches, dents, and other defects more clearly presented, improving the ability of edge detection to extract and recognize defect features, and reducing false positive and false negative rates. Attached Figure Description

[0020] Figure 1 This is a flowchart illustrating an online laser inspection method for precision machined parts based on machine vision according to an embodiment of the present invention; Figure 2 This is a schematic block diagram illustrating the structure of an online laser inspection system for precision machined parts based on machine vision, according to an embodiment of the present invention. Detailed Implementation

[0021] Example of an online laser inspection method for precision machined parts based on machine vision.

[0022] like Figure 1 As shown in the flowchart, the online laser inspection method for precision machined parts based on machine vision according to an embodiment of the present invention includes the following steps: S1: Acquire an image of the precision machined part to be inspected.

[0023] In a preferred embodiment, a CCD camera or a CMOS camera can be used to acquire images of the precision machined parts to be inspected online. CCD cameras offer advantages such as low imaging noise, high sensitivity, and good image consistency, making them suitable for applications requiring high inspection accuracy. CMOS cameras offer advantages such as fast acquisition speed, low power consumption, and high integration, making them suitable for high-speed online inspection scenarios. In practical applications, the choice between a CCD camera and a CMOS camera can be flexibly made based on factors such as production line operating speed, inspection accuracy requirements, and hardware costs. By using industrial-grade image acquisition equipment, the acquired images can be guaranteed to have high resolution, clarity, and stability, thus providing a reliable data foundation for subsequent image enhancement processing and defect detection, which is beneficial for improving the accuracy and consistency of the overall inspection results.

[0024] Furthermore, after acquiring the image, the method further includes grayscale processing to obtain a corresponding grayscale image. Specifically, the color information in the original image is converted into brightness information, so that each pixel in the image corresponds to a unique grayscale value, thereby forming a grayscale image containing only brightness information. In this embodiment, grayscale processing can effectively preserve the texture features, edge features, and brightness distribution features of the part surface, while removing color information with low correlation to defect detection, reducing the data dimensionality and computational complexity in subsequent image processing.

[0025] Converting images to grayscale simplifies the image data structure, reduces the computational burden during multi-channel image processing, and improves the efficiency of subsequent image enhancement and edge detection algorithms, meeting the real-time online inspection needs of industrial production lines. Furthermore, since dark channel prior dehazing, atmospheric light estimation, and edge contour extraction all rely heavily on image brightness distribution features, using grayscale images for analysis avoids interference from differences between color channels, improving the stability and consistency of feature parameter calculations.

[0026] Furthermore, precision machined parts are typically made of metal, which is prone to localized bright reflections, specular reflections, and uneven illumination under laser irradiation. Grayscale processing can uniformly map complex color changes to brightness changes, making the light and dark relationships in the image more prominent. This facilitates subsequent accurate identification of bright areas, estimation of atmospheric light composition, and recovery of details affected by scattered light. Consequently, it improves the accuracy of image enhancement processing, resulting in enhanced images with higher contrast and clearer details.

[0027] S2: The image is enhanced using an improved dark channel prior dehazing algorithm.

[0028] In a preferred embodiment, the improved dark channel prior dehazing algorithm includes an atmospheric light component, which is a normalized value obtained by weighted summation of the grayscale values ​​of each pixel within the target area, and the weights in the weighted summation process are normalized values ​​of the brightness of each pixel within the target area. For example, the atmospheric light component... for: , For the first in the target area The grayscale value of each pixel To adjust the highlight level of the target area, This represents the total number of pixels within the target area. These are the preset hyperparameters.

[0029] The above scheme uses the selected target region as a basis for calculating atmospheric light composition. It combines the high-brightness features of the target region with weighted fusion of the grayscale information of each pixel within that region. This ensures that the atmospheric light estimation result not only reflects the brightness level of the pixels but also the contribution of the target region to the overall lighting environment. The logic is to introduce regionalized statistics and weighted calculation mechanisms into the traditional method of estimating atmospheric light based on a single extremely bright pixel or a small number of candidate pixels. By utilizing a highly representative target region for overall evaluation, it avoids excessive influence from local strong reflections, isolated bright spots, and random noise on the atmospheric light estimation results. Simultaneously, normalization ensures the stability and consistency of the calculation results, making the atmospheric light composition obtained under different image conditions more comparable. This approach improves the accuracy and robustness of atmospheric light estimation, making it more consistent with the lighting distribution characteristics of the actual imaging environment. This enhances the rationality of lighting compensation during dehazing, improves image contrast and detail recovery, and makes the edge contours, texture information, and minute defect features of the part surface clearer, further improving the accuracy and stability of online inspection of precision machined parts.

[0030] The target region is the region with the largest distribution breadth. The distribution breadth of the region corresponding to the target pixel is calculated as the product of the range of the x-coordinates and the range of the y-coordinates of all pixels within the target pixel region, and the proportion of the number of pixels within the target pixel region to the total number of pixels in the image. For example, the distribution breadth of the region corresponding to the target pixel... for: , , These represent the ranges of the horizontal and vertical coordinates of pixels within the region corresponding to the target pixel. This represents the number of pixels within the region corresponding to the target pixel. The number of pixels in the image.

[0031] By comprehensively considering the horizontal and vertical coverage of each region and the proportion of pixels within that region to the entire image, the spatial distribution of each candidate region is evaluated, and the region with the widest distribution, largest coverage area, and most pixels is identified as the target region. This approach not only focuses on the brightness characteristics of the region but also incorporates its spatial expansion capability and scale characteristics, making the selection of target regions more consistent with the actual distribution of major bright areas in the image. It avoids misidentifying small, scattered, or locally reflected areas as target regions. This method effectively improves the accuracy and representativeness of target region selection, reduces the impact of local abnormal bright spots and random noise on subsequent processing results, and ensures that the identified target regions better reflect the overall illumination information of the image, providing a more reliable data source for atmospheric light estimation, thereby improving the stability and accuracy of image enhancement processing.

[0032] The target pixel is any pixel within the target grayscale range. The region corresponding to the target pixel is specifically defined as follows: all target pixels within a defined neighborhood centered on the target pixel are merged into one region to obtain the region corresponding to the target pixel.

[0033] By using pixels within the target grayscale range as the base object, and aggregating pixels with similar attributes within a predetermined range around each pixel, spatially adjacent pixels with similar brightness characteristics are merged to form corresponding regions. This fully utilizes the continuous spatial distribution of target pixels, transforming originally discrete pixel information into region information with complete structural features, thus more realistically reflecting the actual distribution of bright areas in the image. This approach effectively reduces the impact of isolated bright spots, random noise, and local abnormal pixels on subsequent processing results, improving the completeness and stability of region extraction, and making the obtained regions more representative and reliable.

[0034] The target grayscale segment is the grayscale segment with the highest brightness. The brightness level is the product of the normalized value of the difference between the highest and lowest grayscale levels in each grayscale segment, the normalized value of the average grayscale value of all corresponding pixels in each grayscale segment, and the proportion of the total number of pixels corresponding to all grayscale levels in the image. For example, the brightness level... for, , , The first The maximum and minimum gray levels in a grayscale range. For the first The average gray value of the pixels corresponding to all gray levels in a gray level range. For the first The sum of the number of pixels corresponding to all gray levels in each gray level range The number of pixels in the image.

[0035] The aforementioned scheme comprehensively considers three aspects across multiple grayscale intervals: the range of brightness variation, the overall brightness level, and the pixel distribution scale. It evaluates the high-brightness characteristics of each grayscale interval and identifies the grayscale interval with a large brightness span, high average brightness, and high pixel proportion as the target grayscale interval. It not only focuses on the brightness intensity of a region but also considers the richness of the brightness distribution and the representativeness of the region, avoiding bias caused by judging solely based on a single brightness extreme value or a small number of high-brightness pixels. This method effectively suppresses interference from abnormally bright regions such as local reflections and random bright spots, more accurately selecting the main high-brightness regions that reflect the overall illumination characteristics of the image. This improves the reliability and stability of key region identification, providing a more accurate reference for subsequent image enhancement processing. Consequently, it enhances image detail recovery and contrast enhancement, making defect features clearer and more prominent, and improving the accuracy and stability of online inspection of precision machined parts.

[0036] The gray level segment is specifically defined as follows: obtaining the number of pixels corresponding to each gray level in the dark channel image of the image, calculating the average number of pixels corresponding to all gray levels other than gray level 0, taking gray levels greater than the average as pre-selected gray levels, merging gray levels with non-zero pixel counts on the left and right sides of any pre-selected gray level into a gray level segment, until all preset gray levels are covered, so as to obtain multiple gray level segments.

[0037] The aforementioned scheme counts the number of pixels corresponding to each gray level in the dark channel image, using the gray levels with more concentrated pixel distribution as the dividing criteria. It also combines the continuous characteristics of gray level distribution to merge adjacent gray levels with corresponding pixel distributions, forming multiple gray level intervals. This allows the resulting gray level intervals to more accurately reflect the actual distribution of different brightness areas in the image. Compared to fixed gray level division, this method effectively reduces the interference of scattered gray values ​​and random noise on the region division results, improving the accuracy and stability of brightness information extraction. Furthermore, by forming representative gray level intervals, it helps to highlight the main brightness areas in the image, improving the reliability of subsequent key region selection and providing more reasonable data support for atmospheric light estimation.

[0038] In another preferred embodiment, the method further includes correcting the brightness level to obtain a corrected brightness level. Specifically, this involves obtaining the range of grayscale values ​​of all pixels within a defined neighborhood centered on each pixel, and using the ratio of the brightness level to the range as the corrected brightness level. This scheme, based on the original brightness level evaluation, further introduces the grayscale variation within the pixel's neighborhood as a correction criterion. By combining the brightness level with the neighborhood grayscale distribution characteristics, the authenticity and stability of the bright area are further evaluated.

[0039] This method not only considers the brightness characteristics of a region itself but also examines the drastic changes in brightness around the region. When a region has high brightness but its neighboring grayscale fluctuates significantly, its evaluation result will be lower; conversely, when a region maintains high brightness while its neighboring grayscale changes relatively smoothly, a higher evaluation result can be obtained. This approach effectively distinguishes between large, stable, bright regions and abnormally bright regions formed by localized reflections, random noise, or isolated bright spots, reducing the latter's interference with subsequent target region selection and improving the accuracy and reliability of bright region identification. Furthermore, by introducing grayscale consistency information within the spatial neighborhood, the evaluation results enhance the characterization of regional continuity and stability, making the final selected regions more consistent with the actual illumination distribution of the image. This provides a more reliable data source for subsequent atmospheric light estimation, thereby improving the accuracy and robustness of image enhancement processing.

[0040] S3: Perform edge detection on the processed image. If the number of detected edge contours is greater than a set threshold, it is determined that the precision machined part has defects.

[0041] In a preferred embodiment, during the actual production of precision machined parts, normal areas typically have continuous, regular, and stable surface structures with relatively few edge contours and a strong distribution pattern. However, when cracks, scratches, pits, burrs, chipping, indentations, machining residues, wear defects, or corrosion defects appear on the part surface, additional gray-scale abrupt change areas are formed in local areas, resulting in new edge structures. These defect edges usually have high contrast after image enhancement, forming obvious edge contours during edge detection. Therefore, by statistically analyzing the number of edge contours in the enhanced image, the complexity of abnormal structures on the part surface can be effectively reflected, and the number of edge contours can be used as a defect judgment criterion to achieve rapid identification of surface defects. Specifically, after obtaining the enhanced image, edge detection processing is performed on the enhanced image to extract edge contours from the image. The extracted edge contours are then filtered to remove invalid edge contours with lengths below a preset length threshold, areas below a preset area threshold, or insufficient continuity, thereby reducing the impact of image noise and local texture fluctuations on the detection results.

[0042] Furthermore, statistical analysis is performed on the filtered edge contours to obtain the total number of valid edge contours in the enhanced image. The total number of valid edge contours is compared with a preset edge contour quantity threshold. When the total number of valid edge contours is greater than the edge contour quantity threshold, it is determined that the surface of the precision machined part has abnormal structural features, that is, the precision machined part has defects. When the total number of valid edge contours is less than or equal to the edge contour quantity threshold, it is determined that the surface of the precision machined part does not have obvious abnormal structural features, that is, the precision machined part is a qualified product.

[0043] The solution of this invention can effectively improve the image quality and defect feature recognition of precision machined parts, reduce the impact of strong reflection, local overexposure, scattered light, and random noise on the detection results under laser irradiation, and improve the accuracy and stability of illumination information extraction. By comprehensively analyzing the image brightness distribution characteristics, spatial distribution characteristics, and regional continuity characteristics, representative key areas can be identified more accurately, making the image enhancement process more consistent with the actual imaging situation and avoiding interference from local abnormal brightness areas on the processing results. The enhanced image can better retain the texture information, edge information, and detail information of the part surface, making the micro-defect features such as scratches, cracks, burrs, notches, and pits more clearly presented, improving the integrity and continuity of the defect edge contour, and enhancing the difference between defect areas and normal areas. At the same time, this solution can improve the consistency and reliability of defect detection results under different lighting conditions, different surface conditions, and different production environments, reduce the false detection rate and false negative rate, and improve the stability, accuracy, and automation level of online detection, thereby achieving high-precision, high-efficiency, and high-reliability detection of the surface quality of precision machined parts.

[0044] Example of an online laser inspection system for precision machined parts based on machine vision: like Figure 2 As shown in the diagram, the structural block diagram of the online laser inspection system for precision machined parts based on machine vision according to an embodiment of the present invention includes a processor and a memory. The memory stores computer program instructions, which, when executed by the processor, implement the online laser inspection method for precision machined parts based on machine vision according to the present invention.

[0045] The machine vision-based online laser inspection system for precision machined parts also includes other components well-known to those skilled in the art, such as communication interfaces. Their settings and functions are known in the art and will not be described in detail here.

[0046] While this specification has shown and described numerous embodiments of the invention, it will be apparent to those skilled in the art that such embodiments are provided by way of example only. Many modifications, alterations, and alternatives will occur to those skilled in the art without departing from the spirit and essence of the invention. It should be understood that various alternatives to the embodiments of the invention described herein may be employed in the practice of this invention.

Claims

1. A machine vision-based online laser inspection method for precision machined parts, characterized in that, include: Acquire images of the precision machined parts to be inspected; Calculate the normalized value of the weighted sum of the gray values ​​of each pixel in the target region of the image, where the weights in the weighted summation process are the normalized values ​​of the highlight level of each pixel in the target region; the target region is the region with the largest distribution breadth, wherein the distribution breadth of the region corresponding to the target pixel is specifically defined as the product of the range of the horizontal coordinates of each pixel in the region corresponding to the target pixel, the range of the vertical coordinates, and the proportion of the number of pixels in the region corresponding to the target pixel in the image, where the target pixel is any pixel within the target gray level range; After processing the image using an improved dark channel prior dehazing algorithm and performing edge detection, if the number of detected edge contours is greater than a set threshold, it is determined that the precision machined part has defects. The improved dark channel prior dehazing algorithm includes atmospheric light components, which are the normalized values ​​of the weighted sum of the gray values ​​of each pixel in the target area.

2. The online laser inspection method for precision machined parts based on machine vision according to claim 1, characterized in that, The target gray level segment is the gray level segment with the highest brightness. The brightness is the product of the normalized value of the difference between the maximum and minimum gray level in each gray level segment, the normalized value of the mean gray value of the corresponding pixels of all gray levels in each gray level segment, and the proportion of the number of corresponding pixels of all gray levels in each gray level segment in the total number of pixels in the image.

3. The online laser inspection method for precision machined parts based on machine vision according to claim 1, characterized in that, Specifically, the target pixel corresponding region is obtained by merging all target pixels within a defined neighborhood centered on the target pixel into one region.

4. The online laser inspection method for precision machined parts based on machine vision according to claim 2, characterized in that, The grayscale ranges are specifically as follows: Obtain the number of pixels corresponding to each gray level in the dark channel image of the image, calculate the average number of pixels corresponding to all gray levels other than gray level 0, take the gray levels that are greater than the average as pre-selected gray levels, merge the gray levels with non-zero number of pixels corresponding to the gray levels on the left and right sides of any pre-selected gray level into a gray level segment, until all preset gray levels are covered, so as to obtain multiple gray level segments.

5. The online laser inspection method for precision machined parts based on machine vision according to claim 1, characterized in that, It also includes correcting the brightness level to obtain a corrected brightness level, specifically by: obtaining the range of gray values ​​of all pixels within a set neighborhood centered on each pixel, and using the ratio of the brightness level to the range as the corrected brightness level.

6. The online laser inspection method for precision machined parts based on machine vision according to claim 1, characterized in that, It also includes performing grayscale processing on the image.

7. The online laser inspection method for precision machined parts based on machine vision according to claim 1, characterized in that, The edge detection is either Sobel edge detection or Canny edge detection.

8. An online laser inspection system for precision machined parts based on machine vision, characterized in that, It includes a memory and a processor, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, the online laser inspection method for precision machined parts based on machine vision as described in any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Fan defect detection method and system based on machine vision

    CN120672669A