Engine as-cast cylinder cover defect detection equipment and method based on machine vision

Through machine vision-based detection methods, a three-dimensional trajectory scanning system and specific image processing algorithms are used to solve the problem of strong subjectivity of manual detection in engine cylinder head casting defect detection, and efficient and accurate defect detection and identification are achieved.

CN119935889APending Publication Date: 2025-05-06HUBEI MALPASS POWER TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510325248.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-19
Publication Date
2025-05-06

AI Technical Summary

Technical Problem

In the prior art, engine cylinder head casting defect detection mainly relies on manual sampling detection, and there are problems such as strong subjectivity, accuracy and efficiency difficult to guarantee.

Method used

Using machine vision-based detection methods, a three-dimensional trajectory scanning system is constructed through a three-dimensional framework, and combined with dynamic exposure compensation algorithm and compression sensing transmission technology, the online detection and identification of casting surface defects is realized. Specific steps include image acquisition, image conversion, image denoising, image segmentation, defect marking and defect recognition.

Benefits of technology

It realizes efficient online detection and identification of surface defects of castings, with the advantages of simple operation, low power consumption and high intelligence, and improves the accuracy and efficiency of detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119935889A_ABST
    Figure CN119935889A_ABST
Patent Text Reader

Abstract

The invention relates to an engine as-cast cylinder cover defect detection device and method based on machine vision, and the method comprises the steps of image acquisition, image conversion, image denoising, image segmentation, defect marking and defect identification, and also comprises a support frame, an image acquisition system, an image processing system, an illumination system, a device control system and a workpiece conveying system. A three-dimensional track scanning system is constructed by utilizing a frame structure and an industrial camera, and a unique algorithm and a recognition system are adopted, so that casting surface defect online detection and defect type recognition and classification based on machine vision are realized, and the system has the advantages of simplicity in operation, low power consumption and high intelligent degree, has relatively high accuracy, and is suitable for popularization and application. And the detection efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of machine vision, and in particular relates to a device and method for detecting defects of an engine cast cylinder head based on machine vision. Background Art

[0002] Casting is a common method for manufacturing engine cylinder heads, and the quality of casting molding is related to the safety and use of the product. During the production process, defects such as cracks, pores, and shrinkage holes will inevitably appear in castings. Efficient defect detection technology is one of the important links to ensure the stability of factory production rhythm and product quality. However, at present, most domestic engine cylinder head castings still use manual sampling inspection for defect detection, relying on the naked eye observation of inspectors and subjective judgment to complete the inspection. This method is heavily dependent on the experience of inspectors, has strong subjectivity, lacks unified evaluation standards, and accuracy and efficiency are difficult to guarantee.

[0003] Machine vision technology uses machines to simulate human vision and measures or judges target objects through deep learning. It has many advantages such as non-contact, robustness and efficiency, and can effectively avoid the problems of manual detection. With the advancement of computer technology and the continuous development of image processing theory, machine vision technology has gradually developed, and its theoretical results have been widely used in military, medical, agricultural, video surveillance, industrial production and other fields. Due to the actual production process, different types of defects may exist on the surface of castings due to materials, processes and other factors. At present, there are few reports on the research of casting surface defect detection based on machine vision.

[0004] In view of the above situation, it is necessary to invent and design a stable and efficient casting defect detection system based on machine vision. Summary of the invention

[0005] In view of the above problems, the present invention proposes an engine cast cylinder head defect detection device and method based on machine vision.

[0006] In order to achieve the above technical objectives and the above technical effects, the present invention is implemented through the following technical solutions:

[0007] A method for detecting defects of an engine cast cylinder head based on machine vision comprises the following steps:

[0008] S1, image acquisition: using a stereoscopic frame to build a three-dimensional trajectory scanning system, using a CCD camera to take pictures of castings and transmit them to a computer; using a dynamic exposure compensation algorithm and compressed sensing transmission technology in the camera;

[0009] S2, image conversion: Use weighted average method to convert color image into grayscale image. The specific implementation steps are as follows:

[0010] Color channel separation: extract the values ​​of the three color channels of red (R), green (G), and blue (B) for each pixel, and the value range of each channel is 0-255;

[0011] Weighted calculation: Differentiated weights are assigned to the three channels based on the biological characteristics of the human eye's sensitivity to different colors;

[0012] Grayscale synthesis: add the weighted three channel values ​​to get the final grayscale value;

[0013] S3, image denoising: Use median filtering to reduce image noise and image interference. The specific implementation steps are as follows:

[0014] Window definition: With the pixel to be processed (m, n) as the center, select its 3×3 neighborhood range (i.e., extending 1 pixel horizontally and vertically) as the processing window. The 9 pixels covered by the window constitute the set S;

[0015] Traversal processing: Starting from the upper left corner of the image, the 3×3 window is traversed pixel by pixel along the row priority order;

[0016] Neighborhood sampling: At each processing position, the grayscale values ​​of all pixels in the window are collected (including 9 values ​​in total for the center pixel), excluding the influence of abnormal noise points;

[0017] Median calculation: Arrange the 9 collected grayscale values ​​in ascending or descending order, and select the value in the middle position (the fifth) after sorting as the new grayscale value of the current pixel;

[0018] Grayscale update: replace the grayscale value g(m,n) of the original center pixel (m,n) with the calculated median value;

[0019] Boundary processing: For image edge pixels (areas that cannot form a complete 3×3 window), boundary supplementation methods such as truncation or mirror extension are used;

[0020] S4, image segmentation: Segment the object to be inspected from the background based on the grayscale matching method, which specifically includes the following four steps: S41, take an image without artifacts under the condition of constant illumination. b S42, capturing an image of a workpiece under constant illumination conditions w ; S43, the image with the workpiece I w With artifact-free image I b Subtract pixel by pixel to obtain a differential image △I; S44, count the pixel values ​​in the differential image △I, if the value is less than the threshold, set it to 0, if the value is greater than the threshold, set it to 1.

[0021] S5, defect marking: the threshold uses the maximum entropy segmentation method to select a suitable threshold to mark the defect area from the image;

[0022] S6, defect recognition: using the morphological processing principle of image topological opening operation, the erosion-then-expansion method is used to trim the boundary burrs to make the defect boundary clearer.

[0023] Furthermore, the grayscale conversion in step S2 adopts a weighted average method, specifically:

[0024] G1=R×0.299+G×0.578+B×0.114

[0025] Where g is the grayscale value, R, G and B are color channels, and the corresponding range is 0-255.

[0026] Furthermore, the image denoising in step S3 adopts the median denoising method, which is specifically:

[0027]

[0028] Where g(m,n) is the grayscale of pixel (m,n); S is the set of pixels in the neighborhood of the pixel, and a 3×3 window pane is used to slide in the image.

[0029] An engine cast cylinder head defect detection device based on machine vision, comprising: a support frame, an image acquisition system, an image processing system, a lighting system, an equipment control system and a workpiece conveying system;

[0030] The support frame includes a metal rod in the shape of a three-dimensional frame, and connecting accessories: a tripod, a connecting piece and a supporting foot; the end of the metal rod is connected through the tripod and fixed by the connecting piece, and the supporting foot is installed at the bottom of the support frame by means of a threaded connection.

[0031] The image acquisition system includes a first guide rail, a first slider, a first support plate, a camera, a second slider, a second support plate, a second guide rail, a third guide rail, and a third slider. The first guide rail is connected to the support frame by bolts, the first slider is mounted on the first guide rail, the first support plate is fixed to the first slider by bolts, the camera is connected to the second support plate by bolts and nuts, the second support plate is welded to the second slider, the second guide rail is mounted on the third slider, the third slider is mounted on the third guide rail, and the third guide rail is mounted on the first support plate.

[0032] The horizontal position of the camera is adjusted by the first slider sliding along the first guide rail, the vertical position of the camera is adjusted by the second slider sliding along the second guide rail, and the longitudinal position of the camera is adjusted by the third slider sliding along the third guide rail.

[0033] Furthermore, the metal rod is made of aluminum alloy profile, and the connecting piece is made of T-shaped bolts and nuts.

[0034] Furthermore, the image processing system includes an HP workstation and a CCD industrial camera, and the pixel of the CCD industrial camera is more than 20 million.

[0035] Furthermore, the lighting system is installed on the support frame and consists of two LED strip light sources.

[0036] Furthermore, the equipment control system controls the workpiece conveying system and the image acquisition system through PLC to operate according to a set program.

[0037] Furthermore, the workpiece conveying system comprises a support and a roller, and the roller is installed on the support.

[0038] The beneficial effect of the present invention is that a three-dimensional trajectory scanning system is constructed by utilizing a frame structure and an industrial camera, and a unique algorithm and recognition system are adopted to realize online detection of casting surface defects and identification and classification of defect types based on machine vision. It has the advantages of simple operation, low power consumption and high intelligence, and has high accuracy, thereby improving the efficiency of detection. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] In order to make the content of the present invention more clearly understood, the present invention is further described in detail below based on specific embodiments and in conjunction with the accompanying drawings, wherein:

[0040] Figure 1 This is a flowchart of a method according to an embodiment of the present invention;

[0041] Figure 2 It is a stereogram of the overall structure of the device according to the embodiment of the present invention;

[0042] Figure 3 A partial diagram of an image acquisition system according to an embodiment of the present invention;

[0043] Figure 4 This is a partial enlarged view of the bottom installation of the support frame according to an embodiment of the present invention;

[0044] in:

[0045] 100-support frame; 200-image acquisition system; 300-image processing system; 400-illumination system; 500-equipment control system; 600-workpiece conveying system; 101-metal rod; 102-tripod; 103-connecting piece; 104-support foot; 201-first guide rail; 202-first slider; 203-first support plate; 204-third guide rail; 205-camera; 206-second support plate; 207-second slider; 208-second guide rail; 209-third slider. DETAILED DESCRIPTION

[0046] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the scope of protection of the present invention.

[0047] The application principle of the present invention is described in detail below in conjunction with the accompanying drawings.

[0048] A method for detecting defects of an engine cast cylinder head based on machine vision comprises the following steps:

[0049] S1, image acquisition: A three-dimensional trajectory scanning system is constructed using a stereoscopic frame, and a CCD camera is used to take pictures of castings and transmit them to a computer; a dynamic exposure compensation algorithm and compressed sensing transmission technology are used in the camera, specifically:

[0050] ① Develop a dynamic exposure compensation algorithm: Based on laser ranging feedback (Keyence LJ-V7000), adjust the camera exposure time in real time (0.1-100ms adaptive);

[0051] ②Build a three-dimensional trajectory scanning system: plan the spiral motion trajectory (speed 0.5m / s±0.05m) through the robotic arm, and cooperate with phase synchronization trigger acquisition;

[0052] ③ Use compressed sensing transmission technology: 5:1 lossless compression is achieved through the built-in FPGA of the JAI Spark SP-50000 camera, and the transmission rate reaches 12Gbps.

[0053] S2, image conversion: the color image is converted into a grayscale image using the weighted average method. The specific implementation steps are as follows: Color channel separation: extract the values ​​of the three color channels of red (R), green (G), and blue (B) for each pixel, and the value range of each channel is 0-255;

[0054] Weighted calculation: According to the biological characteristics of human eye sensitivity to different colors, the three channels are given different weights; the red channel (R) is multiplied by a coefficient of 0.299; the green channel (G) is multiplied by a coefficient of 0.578 (maximum weight); the blue channel (B) is multiplied by a coefficient of 0.114 (minimum weight);

[0055] Grayscale synthesis: Add the weighted three channel values ​​to get the final grayscale value, specifically:

[0056] G1=R×0.299+G×0.578+B×0.114

[0057] Where g is the grayscale value, R, G and B are color channels, and the corresponding range is 0-255.

[0058] S3, image denoising: Use median filtering to reduce image noise and image interference. The specific implementation steps are as follows:

[0059] Window definition: With the pixel to be processed (m, n) as the center, select its 3×3 neighborhood range (i.e., extending 1 pixel horizontally and vertically) as the processing window. The 9 pixels covered by the window constitute the set S;

[0060] Traversal processing: Starting from the upper left corner of the image, the 3×3 window is traversed pixel by pixel along the row priority order;

[0061] Neighborhood sampling: At each processing position, the grayscale values ​​of all pixels in the window are collected (including 9 values ​​in total for the center pixel), excluding the influence of abnormal noise points;

[0062] Median calculation: Arrange the 9 collected grayscale values ​​in ascending or descending order, and select the value in the middle position (the fifth) after sorting as the new grayscale value of the current pixel;

[0063] Grayscale update: replace the grayscale value g(m,n) of the original center pixel (m,n) with the calculated median value;

[0064] Boundary processing: For image edge pixels (areas that cannot form a complete 3×3 window), boundary supplementation methods such as truncation or mirror extension are used;

[0065] Specifically:

[0066]

[0067] Where g(m,n) is the grayscale of pixel (m,n); S is the set of pixels in the neighborhood of the pixel, and a 3×3 window pane is used to slide in the image.

[0068] S4, image segmentation: Segment the object to be inspected from the background based on the grayscale matching method, which specifically includes the following four steps: S41, take an image without artifacts under the condition of constant illumination. b S42, capturing an image of a workpiece under constant illumination conditions w ; S43, the image with the workpiece I w With artifact-free image I b Subtract pixel by pixel to obtain a differential image △I; S44, count the pixel values ​​in the differential image △I, if the value is less than the threshold, set it to 0, if the value is greater than the threshold, set it to 1.

[0069] S5, defect marking: The threshold adopts the maximum entropy segmentation method, and selects a suitable threshold to mark the defect area from the image; specifically, the image is divided into two parts, the foreground (target) and the background, so that the sum of the entropy of the two parts is maximized, ensuring that the two parts retain the most information after segmentation.

[0070] S6, defect recognition: using the morphological processing principle of image topological opening operation, the erosion-then-expansion method is used to trim the boundary burrs to make the defect boundary clearer.

[0071] To perform the above detection method, it is necessary to use the equipment provided in this embodiment, specifically:

[0072] An engine cast cylinder head defect detection device based on machine vision, comprising: a support frame 100, an image acquisition system 200, an image processing system 300, a lighting system 400, an equipment control system 500 and a workpiece conveying system 600;

[0073] The support frame 100 includes a metal rod 101 that is surrounded by a three-dimensional frame shape, and connecting accessories: a tripod 102, a connecting piece 103 and a supporting foot 104; the metal rod 101 is made of aluminum alloy profiles, and the connecting piece 103 is made of T-shaped bolts and nuts; the ends of the metal rod 101 are connected through the tripod 102 and fixed with the connecting piece 103, and the supporting foot 104 is installed at the bottom of the support frame 100 by means of threaded connection.

[0074] The image acquisition system 200 includes a first guide rail 201, a first slider 202, a first support plate 203, a camera 205, a second slider 207, a second support plate 206, a second guide rail 208, a third guide rail 204, and a third slider 209. The first guide rail 201 is connected to the support frame 100 by bolts, the first slider 202 is mounted on the first guide rail 201, the first support plate 203 is fixed on the first slider 202 by bolts, the camera 205 is connected to the second support plate 206 by bolts and nuts, the second support plate 206 is welded to the second slider 207, the second guide rail 208 is mounted on the third slider 209, the third slider 209 is mounted on the third guide rail 204, and the third guide rail 204 is mounted on the first support plate 203.

[0075] The lateral position of the camera 205 is adjusted by the first slider 202 sliding along the first guide rail 201 , the vertical position of the camera 205 is adjusted by the second slider 207 sliding along the second guide rail 208 , and the longitudinal position of the camera 205 is adjusted by the third slider 209 sliding along the third guide rail 204 .

[0076] In this embodiment, the image processing system 300 includes a HP workstation and a CCD industrial camera 205, and the pixel of the camera 205 is more than 20 million. The lighting system 400 is installed on the support frame 100, and is composed of two LED strip light sources.

[0077] In this embodiment, the equipment control system 500 controls the workpiece conveying system 600 and the image acquisition system 200 through PLC to work according to a set program; the workpiece conveying system 600 includes a bracket and a roller, and the roller is installed on the bracket.

[0078] In this embodiment, the specific working process is as follows:

[0079] The cast cylinder head of the engine is transported to the bottom of the image acquisition system 200 by the workpiece conveying system 600, and the camera 205 takes a picture of the workpiece and transmits the image to the image processing system 300 for processing. The image processing system 300 converts the color image into a grayscale image that is easy to process by grayscale weighted averaging, and performs median denoising on all pixels in the image by 3×3 window pane sliding to reduce the interference of the external environment such as dust, stray light, equipment shaking, etc. on the image.

[0080] To create an image template, first take an image without artifacts under constant lighting conditions. b ; Then, take an image I with the workpiece under the condition of constant illumination w ; Next, the image I with the workpiece w With artifact-free image I b Subtract pixel by pixel to obtain the difference image △I; finally, count the pixel values ​​in the difference image △I, if the value is less than the threshold, it is set to 0, if the value is greater than the threshold, it is set to 1.

[0081] After the object to be inspected is separated from the background, the boundary burrs are trimmed by first corroding and then dilating to make the defect boundary clearer. Each surface defect image is cut out separately using the minimum circumscribed rectangle of the defect area, and the number and area of ​​defects are counted to display the results intuitively on the display screen of the image processing system 300. When a defective product is detected, the system sends a defective alarm signal, and records the start and end time and results of each inspection to generate a product inspection log.

[0082] When the casting batch or product model changes, the image template and camera position need to be reset. The horizontal position of the camera 205 is adjusted by the first slider 202 sliding along the first guide rail 201, the vertical position of the camera 205 is adjusted by the second slider 207 sliding along the second guide rail 208, and the longitudinal position of the camera 205 is adjusted by the third slider 209 sliding along the third guide rail 204.

[0083] The above shows and describes the basic principles and main features of the present invention and the advantages of the present invention. The above embodiments and descriptions are only for explaining the principles of the present invention. Without departing from the spirit and scope of the present invention, there will be various changes and improvements, which fall within the scope of the present invention to be protected. The scope of protection of the present invention is defined by the attached claims and their equivalents.

Claims

1. A method for detecting defects in an engine cast cylinder head based on machine vision, characterized in that: The following steps are involved: S1, image acquisition: using a stereoscopic frame to build a three-dimensional trajectory scanning system, using a CCD camera to take pictures of castings and transmit them to a computer; using a dynamic exposure compensation algorithm and compressed sensing transmission technology in the camera; S2, image conversion: Use weighted average method to convert color image into grayscale image. The specific implementation steps are as follows: Color channel separation: extract the values ​​of the three color channels of red (R), green (G), and blue (B) for each pixel, and the value range of each channel is 0-255; Weighted calculation: Differentiated weights are assigned to the three channels based on the biological characteristics of the human eye's sensitivity to different colors; Grayscale synthesis: add the weighted three channel values ​​to get the final grayscale value; S3, image denoising: Use median filtering to reduce image noise and image interference. The specific implementation steps are as follows: Window definition: With the pixel to be processed (m, n) as the center, select its 3×3 neighborhood range, that is, extend 1 pixel horizontally and vertically, as the processing window. The 9 pixels covered by the window constitute the set S; Traversal processing: Starting from the upper left corner of the image, the 3×3 window is traversed pixel by pixel along the row priority order; Neighborhood sampling: At each processing position, the grayscale values ​​of all pixels in the acquisition window are collected, including a total of 9 values ​​of the center pixel, excluding the influence of abnormal noise points; Median calculation: Arrange the 9 collected grayscale values ​​in ascending or descending order, and select the fifth value in the middle position after sorting as the new grayscale value of the current pixel; Grayscale update: replace the grayscale value g(m,n) of the original center pixel (m,n) with the calculated median value; Boundary processing: For image edge pixels that cannot form a complete 3×3 window area, boundary supplementation methods such as truncation or mirror extension are used; S4, image segmentation: Segment the object to be inspected from the background based on the grayscale matching method, which specifically includes the following four steps: S41, take an image without artifacts under the condition of constant illumination. b S42, capturing an image of a workpiece under constant illumination conditions w ; S43, the image with the workpiece I w With artifact-free image I b Subtracting pixel by pixel to obtain a differential image △I; S44, counting the pixel values ​​in the differential image △I, if the value is less than a threshold, it is set to 0, and if the value is greater than the threshold, it is set to 1; S5, defect marking: the threshold uses the maximum entropy segmentation method to select a suitable threshold to mark the defect area from the image; S6, defect recognition: using the morphological processing principle of image topological opening operation, the erosion-then-expansion method is used to trim the boundary burrs to make the defect boundary clearer.

2. The method for detecting defects of an engine cast cylinder head based on machine vision according to claim 1, characterized in that: The grayscale conversion in step S2 adopts the weighted average method, which is specifically: G1=R×0.299+G×0.578+B×0.114 Where g is the grayscale value, R, G and B are color channels, and the corresponding range is 0-255.

3. The method for detecting defects of an engine cast cylinder head based on machine vision according to claim 1, characterized in that: In step S3, the image denoising adopts the median denoising method, which is specifically: Where g(m,n) is the grayscale of pixel (m,n); S is the set of pixels in the neighborhood of the pixel, and a 3×3 window pane is used to slide in the image.

4. An engine cast cylinder head defect detection device based on machine vision, characterized in that: include: Support frame, image acquisition system, image processing system, lighting system, equipment control system and workpiece conveying system; The support frame includes a metal rod in a three-dimensional frame shape, and connecting accessories: a tripod, a connecting piece and a supporting foot; the end of the metal rod is connected through the tripod and fixed by the connecting piece, and the supporting foot is installed at the bottom of the support frame by means of a threaded connection; The image acquisition system comprises a first guide rail, a first slider, a first support plate, a camera, a second slider, a second support plate, a second guide rail, a third guide rail, and a third slider. The first guide rail is connected to the support frame by bolts, the first slider is mounted on the first guide rail, the first support plate is fixed to the first slider by bolts, the camera is connected to the second support plate by bolts and nuts, the second support plate is welded to the second slider, the second guide rail is mounted on the third slider, the third slider is mounted on the third guide rail, and the third guide rail is mounted on the first support plate; The horizontal position of the camera is adjusted by the first slider sliding along the first guide rail, the vertical position of the camera is adjusted by the second slider sliding along the second guide rail, and the longitudinal position of the camera is adjusted by the third slider sliding along the third guide rail.

5. The machine vision-based engine cast cylinder head defect detection device according to claim 4, characterized in that: The metal rod is made of aluminum alloy profile, and the connecting piece is made of T-shaped bolts and nuts.

6. The machine vision-based engine cast cylinder head defect detection device according to claim 4, characterized in that: The image processing system includes an HP workstation and a CCD industrial camera, and the pixel of the CCD industrial camera is more than 20 million.

7. The machine vision-based engine cast cylinder head defect detection device according to claim 4, characterized in that: The lighting system is installed on the support frame and consists of two LED strip light sources.

8. The machine vision-based engine cast cylinder head defect detection device according to claim 4, characterized in that: The equipment control system controls the workpiece conveying system and the image acquisition system through PLC to work according to a set program.

9. The machine vision-based engine cast cylinder head defect detection device according to claim 4, characterized in that: The workpiece conveying system comprises a support and a roller conveyor, wherein the roller conveyor is mounted on the support.