Machine vision inspection system and method for engine pistons

By combining external cameras and internal laser reflection intensity detection with a deep learning model, the problem of incomplete detection of internal and external defects in engine pistons has been solved, achieving high-precision detection with low false positives and false negatives.

CN120609829BActive Publication Date: 2025-12-30SHANDONG ZHENTING JINGGONG PISTON
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202510869751.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-06-26
Publication Date
2025-12-30
Estimated Expiration
2045-06-26

AI Technical Summary

Technical Problem

Existing technologies are insufficient for fully detecting internal and external defects in engine pistons, especially since external visual images are insufficient to detect internal defects.

Method used

The detection is performed by combining an external detection unit and an internal detection unit with a deep learning model. The external detection unit captures external images using a multi-angle camera, while the internal detection unit obtains the reflection intensity of the inner wall using a laser emission component and an intensity detection component. The defect area is then analyzed using a deep learning model.

Benefits of technology

It enables comprehensive, multi-angle inspection of the outer surface and inner wall of engine pistons, improving inspection accuracy and reliability, reducing false positives and false negatives, and adapting to complex production environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120609829B_ABST
    Figure CN120609829B_ABST
Patent Text Reader

Abstract

The application discloses a kind of machine vision detection system and method of engine piston, belong to machine vision technical field, this method includes: external detection unit includes detection camera, internal detection unit includes laser emission component and intensity detection component;Based on the appearance image of detection camera shooting engine piston outer surface;Through laser emission component and intensity detection component, the intensity distribution image of engine piston inner wall is acquired;Analysis unit splits appearance image and intensity distribution image into multiple sub-images, based on the defect image of defect area existing in the location of deep learning model;Optimization unit is based on the high-frequency occurrence area of defect area adjusts default splitting scheme, obtains optimization splitting scheme;Analysis unit splits again with optimization splitting scheme appearance image and intensity distribution image obtained, and continue to carry out analysis.The application realizes the all-around detection to engine piston.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of machine vision technology, specifically relating to a machine vision inspection system and method for engine pistons. Background Technology

[0002] During manufacturing and assembly, engine pistons are prone to various defects, including surface scratches, cracks, burrs, dimensional deviations, uneven coatings, and exceeding dimensional and positional tolerances. If these defects are not detected and eliminated in a timely manner, they may cause abnormal wear of the piston during engine operation, which can have a significant impact on product quality and safety.

[0003] Currently, with the development of visual inspection technology, various visual inspection techniques are available for the quality inspection of engine pistons. For example, Chinese patent document CN112184648A discloses a method and system for detecting piston surface defects based on deep learning. This method uses a grayscale image processing algorithm for defect detection on the smooth surface of the piston, and an improved FASTER-RCNN deep learning neural network for defect detection on the cast surface. By simultaneously using multiple cameras and light sources at different angles and wavelengths to acquire images at different image acquisition stations, optimal image acquisition results are achieved. Another example is Chinese patent document CN113160163A, which discloses a machine vision-based algorithm for detecting engine cylinder block appearance defects. This algorithm first uses a standard correlation matching algorithm to extract the ROI image from the image acquired by the CCD. Second, it performs pixel-by-pixel subtraction between the ROI image and the template image, and takes the absolute value of each pixel to highlight the surface defect features of the casting. Third, it uses median filtering to remove surface noise from the image, and processes the obtained image through morphological opening and closing operations and image binarization to further remove noise while increasing the proportion of defective parts in the image. Finally, a contour extraction algorithm is used to identify and locate the defects.

[0004] In the aforementioned prior art, engine piston defect detection mainly relies on external visual images, making it difficult to detect internal defects, thus resulting in incomplete detection. Summary of the Invention

[0005] To address the aforementioned problems, this invention provides a machine vision inspection system and method for engine pistons, thereby resolving the issues present in the background art.

[0006] To achieve the aforementioned objective, this invention proposes a machine vision inspection method for engine pistons, comprising:

[0007] The system includes an external detection unit and an internal detection unit. The external detection unit includes detection cameras deployed at multiple angles, and the internal detection unit includes a laser emission component and an intensity detection component.

[0008] The external detection unit captures an image of the engine piston's outer surface based on the detection camera.

[0009] The internal detection unit extends into the engine piston, emits laser light onto the inner wall of the engine piston through the laser emitting assembly, and continuously adjusts the irradiated position area. The intensity detection assembly obtains the laser reflection intensity of each position area, and generates an intensity distribution image of the inner wall of the engine piston based on the laser reflection intensity.

[0010] The analysis unit splits the appearance image and the intensity distribution image into multiple sub-images using a default splitting scheme, analyzes and locates the sub-images containing defective regions based on a deep learning model, and defines them as defective images;

[0011] The optimization unit identifies high-frequency occurrence areas of defective regions and adjusts the default splitting scheme based on these high-frequency occurrence areas to obtain an optimized splitting scheme.

[0012] The analysis unit splits the subsequently obtained appearance image and intensity distribution image using the optimized splitting scheme, and continues the analysis based on the deep learning model.

[0013] Furthermore, generating the intensity distribution image of the engine piston inner wall based on the laser reflection intensity includes the following steps:

[0014] The laser emitting component emits a first laser beam and a second laser beam of different wavelengths toward the inner wall of the engine piston. The first laser beam and the second laser beam traverse and illuminate each position area in a concentric manner. The intensity detection component obtains the laser reflection intensity of each position area and generates a first distribution map corresponding to the reflection intensity of the first laser beam and a second distribution map corresponding to the reflection intensity of the second laser beam based on the laser reflection intensity. The first distribution map and the second distribution map are fused together, and the fused image is defined as the intensity distribution image.

[0015] Furthermore, analyzing and locating the defective region in the sub-image based on the deep learning model includes the following steps:

[0016] The sub-image corresponding to the appearance image is defined as the first image, and the sub-image corresponding to the intensity distribution image is defined as the second image. The deep learning model includes an image recognition model and a sequence analysis model. The first image is analyzed based on the image recognition model, and the second image is analyzed based on the sequence analysis model to determine the sub-image with a defective region.

[0017] Furthermore, analyzing the first image based on the image recognition model includes the following steps:

[0018] The image recognition model includes a filtering layer and a judgment layer. The filtering layer includes first convolutional kernels of multiple sizes. The first image is input into the image recognition model, and the image recognition model performs convolution on the first image based on each first convolutional kernel to obtain multiple first feature maps.

[0019] The average pixel brightness of each first feature map is calculated, and the first feature maps with an average pixel brightness greater than a first threshold are selected as second feature maps. The judgment layer includes multiple convolutional layers, and each convolutional layer includes multiple second convolutional kernels. After each second feature map passes through the convolutional layer, a third feature map is obtained. The third feature map is pooled to obtain a fourth feature map. The fourth feature map is divided into multiple actual image blocks, and a standard image block corresponding to each actual image block is obtained. The first deviation between the actual image block and the standard image block is calculated, and the first deviation is weighted and summed to obtain a second deviation. Based on the second deviation, the defective region of the sub-image is determined.

[0020] Further, calculating the first deviation between the actual image patch and the standard image patch, and then performing a weighted summation on the first deviation to obtain the second deviation includes the following steps:

[0021] Image features of the actual image block and the standard image block are obtained. The image features include the covariance and average value of pixel brightness. The Mahalanobis distance of the image features of the actual image block and the standard image block is used as the first deviation. A corresponding weight is set for the actual image block. The closer the actual image block is to the edge of the fourth feature map, the smaller its corresponding weight. The first deviation is weighted and summed based on the weight of the actual image block to obtain the second deviation.

[0022] Further, analyzing the second image based on the sequence analysis model includes the following steps:

[0023] A third convolution kernel is set, and spatial features of the second image are extracted based on the third convolution kernel. The spatial features are converted into a numerical sequence, and the sequence analysis model analyzes whether there are defective regions in the second image based on the numerical sequence.

[0024] Furthermore, the external detection unit captures the appearance image of the outer surface of the engine piston based on the detection camera, including the following steps:

[0025] The detection camera includes a first camera, a second camera, and a third camera. Multiple lighting conditions are set based on the reflectivity of different detection areas on the engine piston surface. When the engine piston reaches the position of the first camera, it rotates around itself, with each rotation having a preset angle. After each rotation, different lighting conditions are sequentially switched for illumination. The first camera captures multiple local images of the engine piston under each lighting condition. Based on the detection area corresponding to the lighting condition, the local images are split into multiple regional images. The regional images are stitched together based on a preset angle to obtain a side image of the engine piston. The second camera captures top and bottom images of the engine piston, and the third camera captures images of the hole wall of the engine piston's through-hole. The side image, top image, bottom image, and hole wall image are used as the overall appearance image.

[0026] Furthermore, surface point cloud data of the engine piston is obtained based on the local images from multiple angles. Based on the laser reflection intensity and laser emission parameters, the intensity distribution image is converted into point cloud data of the inner wall of the engine piston. The surface point cloud data and the inner wall point cloud data are fused to obtain a comprehensive three-dimensional point cloud of the engine piston. Based on the comprehensive three-dimensional point cloud, the orifice regions of the two through holes of the engine piston are extracted, and the through hole axes are located. The included angle of the two through hole axes and the farthest distance within the piston coverage area are calculated. When both the included angle and the farthest distance meet the preset conditions, it is determined that the through holes of the engine piston are defect-free.

[0027] A machine vision inspection system for engine pistons, used to implement the above-described method, the system comprising:

[0028] An external detection unit includes detection cameras deployed at multiple angles, which capture images of the exterior surface of the engine piston based on the detection cameras;

[0029] An internal detection unit includes a laser emitting component and an intensity detection component. The internal detection unit extends into the engine piston. The laser emitting component emits a laser to the inner wall of the engine piston and continuously adjusts the irradiated position area. The intensity detection component obtains the laser reflection intensity of each position area and generates an intensity distribution image of the inner wall of the engine piston based on the laser reflection intensity.

[0030] The analysis unit splits the appearance image and the intensity distribution image into multiple sub-images using a default splitting scheme, analyzes and locates the sub-images containing defective regions based on a deep learning model, and defines them as defective images.

[0031] The optimization unit statistically analyzes the high-frequency occurrence areas of the defect region, adjusts the default splitting scheme based on the high-frequency occurrence areas to obtain an optimized splitting scheme, and the analysis unit splits the subsequently obtained appearance image and intensity distribution image according to the optimized splitting scheme, and continues to perform analysis based on the deep learning model.

[0032] Beneficial Effects: This invention uses multiple cameras to photograph the outer surface of the piston, combined with a laser emission assembly and a light intensity sensor to accurately measure the internal laser reflection intensity, achieving comprehensive, multi-angle detection of the engine piston's outer surface and inner wall. Defect detection using laser reflection intensity effectively overcomes the imaging difficulties caused by the limited internal space and insufficient lighting conditions of traditional cameras, improving the accuracy and reliability of inner wall detection. Furthermore, this invention dynamically optimizes the image segmentation scheme through statistical analysis of high-frequency defect areas in the initial detection results. This refines high-frequency defect areas into smaller sub-images for focused analysis. This adaptive segmentation strategy not only improves the analysis efficiency of the deep learning model but also reduces the false positive and false negative rates, adapting to the needs of complex and ever-changing production environments. Attached Figure Description

[0033] Figure 1 This is a flowchart illustrating the steps of a machine vision inspection method for engine pistons according to the present invention.

[0034] Figure 2 This is a schematic diagram of the structure of a machine vision inspection system for engine pistons according to the present invention. Detailed Implementation

[0035] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.

[0036] It is understood that the terms "first," "second," etc., used in this application may be used herein to describe various elements, but unless otherwise specified, these elements are not limited by these terms. These terms are used only to distinguish one element from another. For example, without departing from the scope of this application, a first script may be referred to as a second script, and similarly, a second script may be referred to as a first script.

[0037] like Figure 1 As shown, a machine vision inspection method for engine pistons includes:

[0038] S1: Set up an external detection unit and an internal detection unit. The external detection unit includes detection cameras deployed at multiple angles, and the internal detection unit includes a laser emission component and an intensity detection component.

[0039] Specifically, the external inspection unit includes multiple industrial CCD inspection cameras installed on the production line, located on the top and sides of the engine piston, respectively, thus covering the entire outer surface of the piston; the internal inspection unit consists of a set of laser emitting devices and high-sensitivity light intensity sensors. The laser emitting components can extend into the piston cylinder and adjust the laser irradiation angle and position.

[0040] S2: The external detection unit captures an image of the engine piston's outer surface based on a detection camera.

[0041] S3: The internal detection unit extends into the engine piston, emits laser light onto the inner wall of the engine piston through the laser emitting component, and continuously adjusts the irradiated position area. The intensity detection component obtains the laser reflection intensity of each position area, and generates an intensity distribution image of the inner wall of the engine piston based on the laser reflection intensity.

[0042] After the engine piston reaches the position of the external detection unit along the conveyor belt, an image of the engine piston's outer surface is captured by a detection camera. However, if the camera is inserted into the piston's interior for imaging, the small size of the piston and the darkness inside make it difficult to guarantee the image clarity of a small-sized camera. Therefore, this invention proposes the following detection method: An internal detection unit is set up, including a laser emitting assembly. The laser emitting assembly includes a hollow rod that can move back and forth and rotate. A high-sensitivity light intensity sensor is installed at end A of the hollow rod. By inserting end A of the hollow rod into the engine piston, the laser emitting device emits a laser beam. Multiple refraction devices are installed inside the hollow rod, reflecting the laser beam from end B back to end A, thereby irradiating the inner wall of the engine piston. The laser reflection intensity of the irradiated area is obtained through an intensity detection assembly, and then an intensity distribution image of the engine piston's inner wall is obtained based on the laser reflection intensity of each area.

[0043] S4: The analysis unit splits the appearance image and intensity distribution image into multiple sub-images using the default splitting scheme, analyzes and locates the sub-images containing defective regions based on a deep learning model, and defines them as defective images.

[0044] The default approach divides the appearance image and intensity distribution image into a grid, with each grid representing a sub-image, and each grid having the same size. For example, the appearance image is split into nine sub-images of the same size. By dividing the original image into multiple sub-images, the image size is reduced, thus improving the analysis speed of subsequent models.

[0045] The deep learning model includes an improved convolutional neural network model and a sequence analysis model. The convolutional neural network identifies sub-images segmented from the external image to determine defective areas containing scratches or cracks. For intensity distribution images, when laser light shines on a defective inner wall, such as a scratch, the scratch affects laser reflection, thus influencing the monitored reflection intensity. Therefore, by detecting changes in emission intensity using the sequence analysis model, it is possible to determine whether defects exist on the inner wall of the engine piston.

[0046] The above technical solution enables the detection of both the outer and inner walls of the piston, thereby ensuring the comprehensiveness of piston quality inspection.

[0047] S5: Optimize the high-frequency occurrence areas of the defective area in the unit statistics, and adjust the default splitting scheme based on the high-frequency occurrence areas to obtain an optimized splitting scheme.

[0048] S6: The analysis unit splits the subsequently obtained appearance image and intensity distribution image using an optimized splitting scheme, and continues the analysis based on a deep learning model.

[0049] After a period of testing, high-frequency areas are identified by statistically analyzing the frequency of defective regions at various locations on the piston. For example, the piston's outer and inner walls are divided into smaller grids of varying sizes using different meshing methods, such as 4x4 and 5x5. The frequency of defective regions within each grid is then counted. If, after statistical analysis, the frequency of defective regions in grid region A (size 10) is greater than a preset value, and the frequency of defective regions in grid region B (size 2) is also greater than the preset value, and grid regions A and B do not overlap, then grid regions A and B are considered high-frequency areas. The remaining sub-grids that are not high-frequency areas are merged.

[0050] In the subsequent segmentation, grid region A and grid region B will be divided as a sub-image. Grid regions A and B have smaller sizes, making it easier for the analysis model to analyze the defective areas, thereby improving the accuracy of the analysis.

[0051] This invention utilizes multiple cameras to image the outer surface of the piston, combined with a laser emission assembly and a high-sensitivity light intensity sensor to accurately measure the internal laser reflection intensity, achieving comprehensive, multi-angle detection of the engine piston's outer surface and inner wall. Defect detection via laser reflection intensity effectively overcomes the imaging difficulties caused by the limited internal space and insufficient lighting conditions of traditional cameras, improving the accuracy and reliability of inner wall detection. Furthermore, this invention dynamically optimizes the image segmentation scheme through statistical analysis of high-frequency defect areas in the initial detection results. This refines high-frequency defect areas into smaller sub-images for focused analysis. This adaptive segmentation strategy not only improves the analysis efficiency of the deep learning model but also reduces the false positive and false negative rates, adapting to the demands of complex and ever-changing production environments.

[0052] In this embodiment, generating an intensity distribution image of the engine piston inner wall based on laser reflection intensity includes the following steps:

[0053] The laser emitting component emits a first laser beam and a second laser beam of different wavelengths toward the inner wall of the engine piston. The first laser beam and the second laser beam traverse and illuminate each position area in a concentric manner. The intensity detection component obtains the laser reflection intensity of each position area and generates a first distribution map corresponding to the reflection intensity of the first laser beam and a second distribution map corresponding to the reflection intensity of the second laser beam based on the laser reflection intensity. The first distribution map and the second distribution map are fused and the fused image is defined as the intensity distribution image.

[0054] The first laser beam has a wavelength of 532 nm, and the second laser beam has a wavelength of 650 nm. Due to the different wavelengths, the spot sizes are also different. The laser emitting component emits the 532 nm laser beam and the 650 nm laser beam sequentially from the same center point, gradually adjusting the angle and depth to achieve point-by-point irradiation of the inner wall surface of the engine piston. The intensity detection component collects the laser reflection intensity of the first and second laser beams at each location, obtaining the first wavelength laser reflection intensity data set and the second wavelength laser reflection intensity data set. The laser reflection intensity is then marked on the corresponding irradiation position to obtain the first distribution map and the second distribution map.

[0055] The imaging spot diameter of a 650nm wavelength laser on the piston's inner wall is approximately 0.4 mm; the spot diameter of a 532nm wavelength laser is approximately 0.8 mm. While the smaller spot diameter allows for the detection of minute imperfections and scratches, it also exhibits high sensitivity to surface roughness, making false detections more likely. Therefore, a second laser beam is used to illuminate the area previously illuminated by the first laser beam in a concentric pattern. Finally, a sequence analysis algorithm is employed to simultaneously analyze both the first and second distribution maps, analyzing the changes in reflection intensity at different locations under different wavelengths to determine the presence of defects. Specific analysis methods will be described later.

[0056] In this embodiment, analyzing and locating sub-images with defective regions based on deep learning models includes the following steps:

[0057] The first image is defined as the sub-image corresponding to the appearance image, and the second image is defined as the sub-image corresponding to the intensity distribution image. The deep learning model includes an image recognition model and a sequence analysis model. The first image is analyzed based on the image recognition model, and the second image is analyzed based on the sequence analysis model to determine the sub-images with defective regions.

[0058] Analyzing the first image based on an image recognition model includes the following steps:

[0059] The image recognition model includes a filtering layer and a judgment layer. The filtering layer includes first convolutional kernels of multiple sizes. The first image is input into the image recognition model, and the image recognition model performs convolution on the first image based on each first convolutional kernel to obtain multiple first feature maps.

[0060] The average pixel brightness of each first feature map is calculated, and the first feature maps with an average pixel brightness greater than a first threshold are selected as second feature maps. The judgment layer includes multiple convolutional layers, and each convolutional layer includes multiple second convolutional kernels. After each second feature map passes through the convolutional layer, a third feature map is obtained. The third feature map is pooled to obtain a fourth feature map. The fourth feature map is divided into multiple actual image blocks, and a standard image block corresponding to each actual image block is obtained. The first deviation between the actual image block and the standard image block is calculated, and the first deviation is weighted and summed to obtain a second deviation. Based on the second deviation, the defective region of the sub-image is determined.

[0061] The sub-image segmented from the appearance image is defined as the first image, and the sub-image segmented from the intensity distribution image is defined as the second image. The deep learning model includes an image recognition model for recognizing the first image and a sequence analysis model for recognizing the second image. If a defect is identified in either the first or second image, the corresponding first or second image is taken as the defect image.

[0062] The image recognition model includes a filtering layer and a decision layer. The size of the convolutional kernel in the filtering layer can be, for example, 3*3 or 5*5. Different convolutional kernels correspond to different defect features, and those skilled in the art can set the size according to their needs. When recognizing the first image, the image recognition model first performs a convolution operation on the first image through the filtering layer. The first image is convolved through convolutional kernels of different sizes to obtain the corresponding first feature map. The purpose of this convolution is to enhance the pixel brightness of the defective region in the first image. Therefore, if the average pixel brightness of the first feature map is greater than a first threshold, it indicates that the features of the defective part are greatly enhanced in this feature map, and it may be easier for the subsequent decision layer to analyze and recognize it. Therefore, this feature map is used as the second feature map.

[0063] After the second feature map enters the judgment layer, it passes through multiple convolutional layers. Each convolutional layer is configured with multiple sets of second convolutional kernels of different sizes to extract defect features at different scales and orientations. After convolution, max pooling is performed on the resulting third feature map to obtain a reduced-size fourth feature map. The fourth feature map is divided into multiple actual image blocks, each with a size set, for example, 16×16 pixels. Each actual image block corresponds to a pre-defined standard image block, such as a defect-free normal image block. By calculating the difference between the actual image block and the standard image block, a first deviation is obtained. The larger the first deviation, the greater the difference between the two, indicating a higher probability of a defect in the actual image block. The first deviations of all actual image blocks are weighted and summed using pre-defined weights for each actual image block to obtain the overall second deviation. If the second deviation is greater than a second threshold, a defective region is determined. In other embodiments, to determine the defect type, the actual image block can be compared with a standard image block corresponding to the defect type. In this case, the smaller the deviation, the higher the probability of the corresponding defect. Specifically, the values ​​of the first and second thresholds are determined based on the specific dimensions of the grid division.

[0064] Traditional CNN networks typically use the outputs of all convolutional layers in subsequent calculations, resulting in high computational cost and susceptibility to noise interference. This method calculates the average pixel brightness of each first feature map, filtering out feature maps with low average brightness and retaining only those with high response values ​​for the decision layer, significantly accelerating the decision-making process. Furthermore, this method divides the pooled feature maps into actual image blocks and compares their pixel deviations with standard defect-free image blocks, replacing the traditional fully connected neural network's decision-making method. This further accelerates the model's processing speed and enhances its interpretability.

[0065] In this embodiment, calculating the first deviation between the actual image patch and the standard image patch, and then performing a weighted summation on the first deviation to obtain the second deviation includes the following steps:

[0066] The image features of the actual image patch and the standard image patch are obtained. The image features include the covariance and average value of pixel brightness. The Mahalanobis distance between the image features of the actual image patch and the standard image patch is used as the first deviation. A corresponding weight is set for the actual image patch. The closer the actual image patch is to the edge in the fourth feature map, the smaller its corresponding weight. The first deviation is weighted and summed based on the weight of the actual image patch to obtain the second deviation.

[0067] In some embodiments, image features may also include variance, standard deviation, etc., and the first deviation may also be Euclidean distance. The larger the first deviation value, the greater the difference between the two image patches. In addition, when setting the weights of image patches, the closer the image patch is to the edge of the fourth feature map, the smaller its weight. This is because, under normal circumstances, image patches located in the middle are not affected by boundary effects, while standard patches located at the edges are prone to information loss or feature distortion during convolution processing.

[0068] In this embodiment, analyzing the second image based on the sequence analysis model includes the following steps:

[0069] A third convolution kernel is set, and spatial features of the second image are extracted based on the third convolution kernel. The spatial features are then converted into a numerical sequence, and the sequence analysis model analyzes whether there are defective regions in the second image based on the numerical sequence.

[0070] As previously described, the intensity distribution image includes a first distribution map and a second distribution map. A first matrix is ​​generated based on the first distribution map, and a second matrix is ​​generated based on the second distribution map. The combination of the first and second matrices contains spatial information, so it is necessary to extract the spatial information through a convolution kernel. For example, a 3*2 convolution kernel can be used to extract the spatial information of the first and second distribution maps. Then, the matrices are convolved with a stride of 2 to obtain a numerical sequence containing spatial information. The sequence analysis model is, for example, an LSTTM model. The numerical sequence is input into the sequence analysis model to determine whether there are defective regions in the second image.

[0071] In this embodiment, the detection camera includes a first camera, a second camera, and a third camera. Multiple lighting conditions are set based on the reflectivity of different detection areas on the engine piston surface. When the engine piston reaches the position of the first camera, it rotates around itself, with each rotation having a preset angle. After each rotation, different lighting conditions are sequentially switched for illumination. The first camera captures multiple local images of the engine piston under each lighting condition. Based on the detection area corresponding to the lighting condition, the local images are split into multiple regional images. The regional images are stitched together based on a preset angle to obtain a side image of the engine piston. The second camera captures top and bottom images of the engine piston, and the third camera captures images of the hole wall of the engine piston's through-hole. The side image, top image, bottom image, and hole wall image are used as the appearance image.

[0072] Due to variations in piston surface processing techniques, uneven reflection may occur in different areas under the same lighting conditions, leading to differences in imaging effects. Therefore, multiple lighting conditions are set to accommodate the varying reflectivity of different detection areas on the engine piston surface. Specifically, for example, three different areas are set on the piston surface: area A, area B, and area C. Areas A, B, and C exhibit optimal imaging effects under lighting conditions 1, 2, and 3, respectively. When the first camera is capturing images, it first captures an image under lighting condition 1, obtaining partial image 1, and then extracts an image from area A within partial image 1 as area image 1. Then, it switches to lighting condition 2, capturing an image under lighting condition 2, obtaining partial image 2, and extracts an image from area B within partial image 2 as area image 2. Similarly, it captures a partial image 3 under lighting condition 3, and extracts an image from area C within partial image 3 as area image 3. Area images 1, 2, and 3 are then stitched together to obtain a side view image at that angle. Finally, based on the rotation angle, side views from different angles are stitched together to obtain an image of the entire side of the piston.

[0073] In particular, the present invention also includes a third camera, which captures images of the bore wall of the engine piston through hole to determine the integrity of the bore wall.

[0074] The surface point cloud data of the engine piston is obtained by acquiring local images from multiple angles. Based on the laser reflection intensity and laser emission parameters, the intensity distribution image is converted into the inner wall point cloud data of the engine piston. The surface point cloud data and the inner wall point cloud data are fused to obtain the comprehensive three-dimensional point cloud of the engine piston. Based on the comprehensive three-dimensional point cloud, the orifice regions of the two through holes of the engine piston are extracted, and the axis of the through holes is located. The included angle of the two through hole axes and the farthest distance within the piston coverage area are calculated. When the included angle and the farthest distance both meet the preset conditions, it is determined that the through holes of the engine piston are defect-free.

[0075] The engine piston has two aligned through holes at the front and rear. Based on the aforementioned technical solution, this invention further determines the alignment of these through holes using the following method: Since multi-angle images of the piston have been obtained, a multi-view point cloud registration algorithm is used to fuse the local point cloud data collected from various angles to obtain complete surface point cloud data of the engine piston. Based on the spot size, scanning angle, and laser reflection intensity obtained during laser scanning, the relative position of each point on the inner wall relative to the laser emitting component is calculated mathematically, thereby reconstructing the point cloud data of the engine piston's inner wall. The surface point cloud data and the inner wall point cloud data are registered using an iterative nearest-point method to finally obtain comprehensive three-dimensional point cloud data of the engine piston.

[0076] Next, based on the comprehensive 3D point cloud, the positions of four orifices (two through holes and four in total) on the engine piston are extracted. Shape fitting is then performed on the orifice positions to determine their center coordinates. Connecting the centers of two orifices belonging to the same through hole yields two through-hole axes. Finally, the included angle and the farthest distance between the two axes within the active coverage area are calculated. The specific calculation method is based on fundamental mathematical knowledge in this field and will not be described here. If the included angle and the shortest distance between the two axes both meet preset conditions, such as an included angle less than 5° and a maximum distance less than 10mm, then the orifices are considered aligned.

[0077] like Figure 2 As shown, a machine vision inspection system for engine pistons is used to implement the method described above. The system includes:

[0078] The external inspection unit includes inspection cameras positioned at multiple angles, which capture images of the exterior surface of the engine piston.

[0079] The internal detection unit includes a laser emitting component and an intensity detection component. The internal detection unit extends into the engine piston. The laser emitting component emits a laser onto the inner wall of the engine piston and continuously adjusts the irradiated position area. The intensity detection component obtains the laser reflection intensity of each position area and generates an intensity distribution image of the inner wall of the engine piston based on the laser reflection intensity.

[0080] The analysis unit uses the default splitting scheme to split the appearance image and intensity distribution image into multiple sub-images. It analyzes and locates the sub-images containing defective regions based on a deep learning model and defines them as defective images.

[0081] The optimization unit identifies high-frequency areas of the defect region, adjusts the default segmentation scheme based on these high-frequency areas to obtain an optimized segmentation scheme, and then uses the optimized segmentation scheme to segment the subsequently obtained appearance and intensity distribution images, and continues the analysis based on a deep learning model.

[0082] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0083] The above embodiments merely illustrate several implementation methods of the present invention, and their descriptions are relatively specific and detailed, but they should not be construed as limiting the scope of the present invention. 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 patent should be determined by the appended claims.

[0084] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A method of machine vision inspection of an engine piston, characterized by, The method comprises the following steps: An external detection unit and an internal detection unit are arranged, the external detection unit comprises detection cameras arranged at multiple angles, and the internal detection unit comprises a laser emission assembly and an intensity detection assembly; The external detection unit captures appearance images of the outer surface of the engine piston based on the detection cameras; The internal detection unit extends into the engine piston, emits laser to the inner wall of the engine piston through the laser emission assembly, continuously adjusts the position area of the irradiation, acquires the laser reflection intensity of each position area through the intensity detection assembly, and generates an intensity distribution image of the inner wall of the engine piston based on the laser reflection intensity; An analysis unit splits the appearance images and the intensity distribution images into multiple sub-images according to a default splitting scheme, analyzes and locates the sub-images with defect areas based on a deep learning model, and defines the sub-images as defect images; An optimization unit counts high-frequency occurrence areas of the defect areas, adjusts the default splitting scheme based on the high-frequency occurrence areas, and obtains an optimized splitting scheme; The analysis unit splits the appearance images and the intensity distribution images obtained subsequently according to the optimized splitting scheme, and continues the analysis based on the deep learning model; The method further comprises the following steps: The laser emission assembly emits first laser beams and second laser beams of different wavelengths to the inner wall of the engine piston, the first laser beams and the second laser beams traverse each position area in the same way with the same center, the intensity detection assembly acquires the laser reflection intensity of each position area, generates a first distribution image corresponding to the reflection intensity of the first laser beams and a second distribution image corresponding to the reflection intensity of the second laser beams based on the laser reflection intensity, fuses the first distribution image and the second distribution image, and defines the fused image as the intensity distribution image; 2. The method of claim 1, wherein, The method further comprises the following steps: The deep learning model comprises an image recognition model and a sequence analysis model, the image recognition model is used to analyze the first images, and the sequence analysis model is used to analyze the second images to determine the sub-images with defect areas. The method further comprises the following steps: The image recognition model comprises a filtering layer and a judgment layer, the filtering layer comprises multiple first convolution kernels of different sizes, the first images are input into the image recognition model, the image recognition model convolves the first images based on each first convolution kernel to obtain multiple first feature maps, and the judgment layer comprises multiple second convolution kernels of different sizes, the first feature maps are input into the judgment layer, the judgment layer convolves the first feature maps based on each second convolution kernel to obtain multiple second feature maps, and the second feature maps are used to determine the sub-images with defect areas. The pixel brightness mean value of each first feature map is calculated, and the first feature map with a pixel brightness mean value greater than a first threshold value is screened as a second feature map. The judgment layer includes a plurality of convolution layers, each convolution layer includes a plurality of second convolution kernels, and a third feature map is obtained after the second feature map passes through each convolution layer. A pooling operation is performed on the third feature map to obtain a fourth feature map. The fourth feature map is divided into a plurality of actual image blocks, and a standard image block corresponding to each actual image block is obtained. A first deviation between the actual image block and the standard image block is calculated, a weighted sum of the first deviation is obtained to obtain a second deviation, and the presence of a defective area in the sub-image is determined based on the second deviation.

3. The method of claim 2, wherein, The first deviation between the actual image block and the standard image block is calculated, and a weighted sum of the first deviation is obtained to obtain the second deviation, including the following steps: Image features of the actual image block and the standard image block are obtained, the image features include covariance and mean value of pixel brightness, the Mahalanobis distance of the image features of the actual image block and the standard image block is taken as the first deviation, a corresponding weight is set for the actual image block, the closer the actual image block is to the edge in the fourth feature map, the smaller the corresponding weight is, and a weighted sum of the first deviation is obtained based on the weight of the actual image block to obtain the second deviation.

4. The method of claim 3, wherein, The sequence analysis model is used to analyze the second image, including the following steps: A third convolution kernel is set, and spatial features of the second image are extracted based on the third convolution kernel. The spatial features are converted into a numerical sequence, and the sequence analysis model is used to analyze whether the second image has a defective area based on the numerical sequence.

5. The method of claim 1, wherein, The external detection unit captures the appearance image of the outer surface of the engine piston based on the detection camera, including the following steps: The detection camera includes a first camera, a second camera, and a third camera. A plurality of illumination conditions are set based on the reflectivity of different detection areas of the engine piston surface. When the engine piston reaches the position of the first camera, the engine piston rotates around its own center by a preset angle each time. After each rotation, the illumination conditions are switched in sequence to illuminate. The first camera captures a plurality of local images of the engine piston under each illumination condition. Based on the detection area corresponding to the illumination condition, the local images are split into a plurality of area images. Based on the preset angle, the area images are spliced to obtain a side view image of the engine piston. The second camera captures a top view image and a bottom view image of the engine piston. The third camera captures a hole wall image of the through hole of the engine piston. The side view image, the top view image, the bottom view image, and the hole wall image are taken as the appearance image.

6. The method of claim 5, wherein, Based on the multi-angle local image acquisition, surface point cloud data of the engine piston is obtained, based on the laser reflection intensity and laser emission parameters, the intensity distribution image is converted into inner wall point cloud data of the engine piston, the surface point cloud data and the inner wall point cloud data are fused to obtain comprehensive three-dimensional point cloud of the engine piston, based on the comprehensive three-dimensional point cloud, the orifice area of the two through holes of the engine piston is extracted, and the through hole axis is positioned, the included angle of the two through hole axes and the farthest distance in the piston coverage range are calculated, and when the included angle and the farthest distance both satisfy the preset condition, it is determined that the through hole of the engine piston is defect-free.

7. A machine vision inspection system for an engine piston for implementing the method of any one of claims 1-6, characterized by The system comprises: An external detection unit comprising detection cameras arranged at multiple angles, based on which appearance images of the outer surface of the engine piston are captured; An internal detection unit comprising a laser emission assembly and an intensity detection assembly, the internal detection unit extends into the engine piston, the laser emission assembly emits laser to the inner wall of the engine piston and continuously adjusts the position area of the irradiation, the intensity detection assembly obtains the laser reflection intensity of each position area, and based on the laser reflection intensity, an intensity distribution image of the inner wall of the engine piston is generated; An analysis unit that splits the appearance images and the intensity distribution images into multiple sub-images according to a default splitting scheme, analyzes and locates the sub-images with defect areas based on a deep learning model, and defines them as defect images; An optimization unit that counts high-frequency occurrence areas of the defect areas, adjusts the default splitting scheme based on the high-frequency occurrence areas, obtains an optimized splitting scheme, and the analysis unit splits the appearance images and the intensity distribution images obtained subsequently according to the optimized splitting scheme, and continues the analysis based on the deep learning model.

Citation Information

Patent Citations

  • Piston surface defect detection method and system based on deep learning

    CN112184648A

  • Engine cylinder appearance defect detection algorithm based on machine vision

    CN113160163A

  • Laser welding planning method, device and equipment based on automatic positioning

    CN118875491A

  • Tower drum detection method and device, electronic equipment and storage medium

    CN119941681A