Blank defect detection method based on automatic dimming and multi-camera collaborative control technology
Through automatic dimming and multi-camera collaborative control technology, the problem of low manual detection efficiency in vehicle fuel tank production is solved, timely detection and automatic detection of material defects is realized, material waste and labor intensity are reduced, and detection efficiency and effect are improved.
Patent Information
- Application Number
- CN202211061429.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-01
- Publication Date
- 2025-08-12
- Estimated Expiration
- 2042-09-01
AI Technical Summary
In the prior art, defect detection in the production process of vehicle fuel tanks relies on manual observation, resulting in low detection efficiency, low credibility, and high labor intensity. It is impossible to detect impurity defects in the production process of material embryos in a timely manner, resulting in waste of materials and increased costs.
Automatic dimming and multi-camera collaborative control technology are adopted to use strong light on one side of the material blast and multiple cameras take pictures on the other side. The camera's working distance and parameters determine the photo interval, adjust the brightness of the light source in real time, take photos simultaneously and splice pictures, identify defects and notify the production system.
Automatic detection of defects of material blasts is realized, impurities are detected early, material waste is avoided, detection efficiency is improved, manual labor intensity is reduced, and detection effect and credibility are improved.
Smart Images

Figure CN115436390B_ABST
Abstract
Description
Technical Field
[0001] The present invention mainly relates to the technical field related to inspection and detection, and specifically is a method for detecting material defects based on automatic dimming and multi-camera collaborative control technology. Background Art
[0002] During vehicle fuel tank production, fuel tank quality inspection is a crucial step in the manufacturing process. Inspection targets primarily the injection-molded plastic sheets used in the fuel tank molding system. Defects are primarily caused by char impurities, which primarily occur during the blank production process. These defects are visible to the naked eye and are larger than 1 mm in size. Currently, the most commonly used inspection method involves visual inspection of product quality after injection molding and processing. This method presents the following challenges: Since it inspects the fuel tank after molding, it cannot promptly detect impurities introduced during blank production, resulting in material waste and increased manufacturing costs. Furthermore, the long working hours of operators and inspectors, coupled with factors such as factory lighting and the surrounding environment, can easily lead to visual fatigue. Consequently, traditional defect detection methods suffer from significant subjectivity, low efficiency, high labor intensity, low detection reliability, and poor real-time performance. Summary of the Invention
[0003] In order to address the shortcomings of current technology, the present invention combines existing technologies and, based on practical applications, provides a blank defect detection method based on automatic dimming and multi-camera collaborative control technology, which can improve the detection efficiency in the vehicle fuel tank production process and reduce manual labor intensity.
[0004] The technical solutions of the present invention are as follows:
[0005] A blank defect detection method based on automatic dimming and multi-camera collaborative control technology is used for blank defect detection in a vehicle fuel tank production system. The method comprises the following steps:
[0006] S1. After the blank is extruded from a high furnace, it falls at a certain speed. An adjustable light source is used to illuminate one side of the blank, and multiple cameras are used to photograph the other side of the blank. The visual windows of the multiple cameras should fully cover the length direction of the blank.
[0007] S2. Determine the camera shooting time interval based on the camera working distance, camera parameters, and blank height;
[0008] S3. After receiving the start detection signal, start the timer;
[0009] S4, synchronously taking pictures with multiple cameras to obtain multiple test pictures, and determining whether the brightness of the test pictures is appropriate. If not, adjusting the light source voltage to change the light source brightness until a test picture with appropriate brightness is obtained;
[0010] S5. Identify defects in each detected image and mark the defect locations of the detected images with defects.
[0011] S6. Sequentially splice multiple detected images in the length direction and save them in memory.
[0012] S7. Determine whether a stop detection signal is received. If the stop detection signal is not received, wait for the next timer trigger and enter step S4. If the stop detection signal is received, splice the images spliced in length in step S6 in the height direction to make them a complete image and write it to external storage.
[0013] S8. Determine whether the complete image has defects. If there are defects, send an instruction to the production system. If there are no defects, wait for the next detection signal and enter step S3.
[0014] Furthermore, set a group of adjustable light sources for each camera, and adjust them independently between multiple groups of adjustable light sources.
[0015] Furthermore, in step S3, the detection signal is obtained by periodically querying the PLC information.
[0016] Furthermore, in step S4, the specific steps for adjusting the image brightness are as follows:
[0017] S41. Obtain the detected image captured by the current camera.
[0018] S42. Quantify the brightness of the current detected image, and the brightness value of the current detected image is b.
[0019] S43. Judge the brightness of the detected image based on the set image too dark threshold th1 and too bright threshold th2. When b <= th1, it is judged that the brightness of the current detected image is too dark. When b >= th2, it is judged that the current detected image is too bright. When th1 < b < th2, it is judged that the current detected image is a detected image with appropriate brightness, and steps S44 and step 45 are not executed anymore.
[0020] S44. Calculate the light source voltage value to be adjusted based on the difference between the current brightness value b of the image and the too dark threshold th1 or too bright threshold th2.
[0021] S45. Send an instruction to the adjustable light source based on the light source voltage value to be adjusted through the modbus-rtu protocol to adjust the light source brightness, and repeat steps S41 - S45 after adjustment.
[0022] Furthermore, in step S42, the detection image is converted from 24-bit RGB mode to 8-bit grayscale mode. The conversion process uses the RGB3 primary colors to be converted according to fixed weights, and then the grayscale image is statistically analyzed, and the root mean square of each band of the image is used as the brightness value b of the current detection image.
[0023] Furthermore, in step S44, the light source voltage value is adjusted proportionally based on the difference between the current brightness value b of the image and the too dark threshold th1 or the too bright threshold th2.
[0024] Furthermore, in steps S6 and S7, when the detection images are spliced, the overlapping parts are not subjected to the same part fusion processing.
[0025] Furthermore, in step S5, defect recognition uses the Canny edge detection algorithm, which first smoothes the image using Gaussian filtering to remove noise from the image, then calculates the gradient amplitude and angle image, applies non-maximum suppression to the gradient, and finally uses double threshold processing and connectivity analysis to detect edges;
[0026] After the defect is identified, the minimum area rectangle is fitted to the defect position, and the defect size is set on the host computer. When the detected defect size is larger than the set size, it is judged that there is a defect in the detection image.
[0027] Beneficial effects of the present invention:
[0028] 1. The defect detection method provided by the present invention can realize automatic detection of fuel tank blank defects through visual recognition. On the one hand, this method can detect impurities generated during the blank production process early, avoid material waste, and reduce production costs. On the other hand, it can replace traditional manual visual inspection methods, improve detection efficiency and detection results.
[0029] 2. In the present invention, through process analysis, inspection is carried out during the blanking stage of fuel tank production. Strong light is illuminated at the inspection position for machine vision recognition. After defects are detected, the production system is automatically notified to avoid problem blanks from entering subsequent processes, resulting in waste of labor and costs. This is an economical and efficient inspection method.
[0030] 3. In the present invention, in view of the influence of external ambient light and blank thickness on blank detection, an automatic dimming technology is provided to obtain detection images with appropriate brightness. Its dynamic light source adjustment strategy, combined with the contrast adjustment of the image, can obtain higher quality images and improve the effectiveness of defect recognition.
[0031] 4. In the present invention, due to the limitation of the camera's visual window size, it is difficult for a single camera to directly obtain a complete inspection surface image. This technology uses multi-camera collaborative control technology to directly collect inspection images of the complete inspection surface during the falling process of the blank production. Therefore, it can directly realize large-area blank defect detection and improve detection efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] Figure 1 It is a detection principle diagram of the present invention;
[0033] Figure 2 It is a detection flow chart of the present invention;
[0034] Figure 3 This is the automatic dimming flow chart of the present invention;
[0035] Figure 4 It is a defect identification flow chart of the present invention. DETAILED DESCRIPTION
[0036] The present invention will be further described with reference to the accompanying drawings and specific embodiments. It should be understood that these embodiments are intended only to illustrate the present invention and are not intended to limit the scope of the present invention. In addition, it should be understood that after reading the contents of the present invention, those skilled in the art may make various changes or modifications to the present invention, and these equivalent forms also fall within the scope defined by the present application.
[0037] This embodiment provides a method for detecting defects in fuel tank blanks based on automatic dimming and multi-camera collaborative control technology. This method is mainly used to take pictures of fuel tank blanks in a vehicle fuel tank production line, thereby obtaining detection images that can be used for defect identification, such as Figure 1 As shown, the main principle is to illuminate the fuel tank blank with strong light from one side through a light source, and to photograph the fuel tank blank with an optical camera from the other side.
[0038] Due to the limitations of the industrial camera's working distance and fixed lens, the size of the camera's viewing window is also limited. In this embodiment, each camera's viewing window is approximately 30cm by 24cm, varying depending on the camera's viewing distance. In this embodiment, the test material (fuel tank blank) is approximately 86cm wide. Three cameras are required to cover the entire width of the blank horizontally (lengthwise). Therefore, three cameras are required along the length, each with a corresponding set of adjustable light sources. In actual production, the test material is extruded from a high furnace at a speed of 20 mm per second, with a total length of approximately 160cm. To fully capture an image of the entire blank vertically (heightwise), the camera must be used to capture images of the blank at intervals of less than 10 seconds. This interval can be set within a certain range based on on-site production needs.
[0039] Taking a 10-second time interval as an example, a complete inspection process requires a total of 8 acquisitions. Each blank requires 3 cameras to inspect each time, so a complete inspection process for each blank requires taking 3*8=24 pictures. Finally, the 24 pictures are spliced into a complete picture from left to right and from first to last. In other words, each blank corresponds to a complete picture. The picture splicing is simply left-right splicing, and then top-down splicing. The overlapping parts are not fused because they are only used for defect detection. There is no need for fusion processing of the same part, which reduces the computing workload of the industrial computer and the demand for computing costs.
[0040] For this reason, Figure 2 As shown, the detection method provided in this embodiment mainly comprises the following steps:
[0041] S1. After the blank is extruded from a high furnace, it falls at a certain speed (20 mm / s). Three adjustable light sources are used to illuminate one side of the blank, and three cameras are used to take pictures of the other side of the blank. The visual windows of the three cameras can fully cover the length direction of the blank.
[0042] S2. Determine the camera shooting time interval based on the camera working distance, camera parameters, and blank height to ensure that the blank detection surface can be fully sampled;
[0043] S3. After receiving the start detection signal, start the timer. The detection signal can be received in real time through the PLC information set in the system;
[0044] S4, synchronously taking pictures with the three cameras to obtain three test pictures, and determining whether the brightness of the test pictures is appropriate. If not, adjusting the light source voltage to change the light source brightness until a test picture with appropriate brightness is obtained;
[0045] S5. Identify defects in each inspection image and mark the defect locations of inspection images with defects;
[0046] S6, stitching the three detection images in sequence along the length direction and saving them in the memory;
[0047] S7, determine whether a stop detection signal is received. If no stop detection signal is received, wait for the next timer trigger and enter step S4. When a stop detection signal is received, the length-jointed pictures saved in the memory in step S6 are stitched in the height direction to form a complete picture and written to the external memory. Specifically, when the material falls according to the above parameters, 8 pictures need to be collected, so the height-jointed pictures are stitched together;
[0048] S8. Determine whether the stitched complete image has defects. If so, send a command to the production system. If not, wait for the next detection signal and proceed to step S3.
[0049] Since the detection object of this method is the fuel tank injection plastic plate in the automobile fuel tank forming system, most of the defect types are coking impurity defects, which mainly occur in the process of blank production. The fuel tank defect type is coking impurities with a size of more than 1 mm and visible to the naked eye. Because it is an internal defect detection, the light source needs to pass through the blank parts in the production process. The thickness of the blank in the production process is different, resulting in insufficient uniformity of the light source passing through the blank. On the other hand, the influence of ambient light will also cause the collected pictures to be too bright or too gray, not meeting the picture collection requirements and being unfavorable for subsequent picture analysis and processing.
[0050] Therefore, in step S4 of this embodiment, the main design idea of the automatic dimming method is to use an industrial camera with a photosensitive element to regularly and real-time obtain pictures of the current ROI area, and then perform picture analysis and processing on the collected real-time pictures. The picture to be analyzed is converted from the 24-bit RGB mode to the 8-bit grayscale mode. The conversion process uses a fixed weight to convert the three RGB primary colors, and then statistical analysis is performed on the grayscale picture. The root mean square of each band of the image is used as the brightness value of the current picture, so as to realize the quantifiable comparison of the brightness of the image. When the picture brightness is too low or too high, for the defective pictures taken, the contrast between the foreground picture and the background picture is not obvious, and it is not easy to identify the features of the foreground picture from the background picture. In order to facilitate the extraction of defect features, this embodiment adopts a dynamic light source adjustment strategy and combines it with the automatic adjustment of the picture contrast to obtain pictures of higher quality, which can improve the effectiveness of the defect recognition algorithm.
[0051] In the actual operation process, according to the on-site production requirements, a suitable brightness value needs to be selected as the threshold th1 for judging that the picture is too dark, and another suitable brightness value needs to be selected as the threshold th2 for judging that the picture is too bright. Assume that the brightness value of the current detected picture is b. When b <= th1, it is judged that the brightness of the current picture is too dark, and the light source voltage needs to be adjusted to increase the light source brightness. When b >= th2, it is judged that the current picture is too bright, and the light source voltage is lowered to reduce the brightness of the light source; when th1 < b < th2, it is considered that the current light source brightness meets the on-site requirements, and no change is made to the light source voltage. When the light source voltage needs to be adjusted, according to the difference between the picture brightness and the standard brightness, a proportional adjustment of the light source voltage is performed. When the difference is larger, the voltage adjustment amplitude is also larger. When the difference is smaller, the voltage adjustment amplitude is also smaller, so as to achieve large initial adjustments and subsequent small adjustments. Generally, after 1 - 4 adjustments, the light source brightness can be adjusted within a reasonable range.
[0052] The picture brightness adjustment of this embodiment is specifically as Figure 3 shown, including the following steps:
[0053] S41. Obtain the detection picture taken by the current camera;
[0054] S42. Quantize the brightness of the current detected image and calculate the brightness value b of the detected image;
[0055] S43. Judge the brightness of the detected image based on the set dark image threshold th1 and bright image threshold th2. When b <= th1, it is judged that the brightness of the current detected image is too dark. When b >= th2, it is judged that the current detected image is too bright. When th1 < b < th2, it is judged that the current detected image is a detected image with appropriate brightness, and steps S44 and step 45 are not executed anymore;
[0056] S44. Calculate the light source voltage value that needs to be adjusted based on the difference between the current brightness value b of the image and the dark image threshold th1 or the bright image threshold th2;
[0057] S45. Send an instruction to the adjustable light source through the modbus-rtu protocol based on the light source voltage value that needs to be adjusted to adjust the brightness of the light source. After adjustment, repeat steps S41 - S45.
[0058] The automatic dimming algorithm of this embodiment is multi-source non-linear dimming. First, the collected image is subjected to weight conversion for brightness acquisition, and non-linear dimming of multiple groups of light sources is performed according to the difference between the standard brightness and the current brightness. In the most complex case, automatic dimming can also be performed quickly, making the overall quality of the collected image clear and improving the detection efficiency and automatic dimming speed.
[0059] After obtaining a qualified detected image, the obtained image can be subjected to defect detection and determination by the defect recognition detection unit. The defect detection is based on the light transmittance of the defects of the blank plate under backlight illumination. Generally, the defect is darker or brighter than the background in the image. The edge detection is performed on the image by calculating the gradient to extract the image gray difference to identify the defect. As Figure 4 shown, the specific algorithm uses the canny edge detection algorithm. First, the image is smoothed by Gaussian filtering to remove the noise in the image, then the gradient amplitude and angle image are calculated, then non-maximum suppression is applied to the gradient, and finally double-threshold processing and connection analysis are used to detect the edge. After identifying the defect, the minimum area rectangle fitting is performed on the defect position, and then the noise that is likely to cause misidentification is filtered. Then, the defect size screening can be set in the upper computer software. When the detected defect is larger than the set size, it is confirmed that there is a defect in the blank. When the detected defect is smaller than the screening size or no defect is detected, it is considered that the blank is qualified.
Claims
1. A blank defect detection method based on automatic dimming and multi-camera collaborative control technology is used for blank defect detection in vehicle fuel tank production systems, characterized in that: The method includes the following steps: S1. After the blank is extruded from the high-place furnace, it falls at a certain speed. A strong light is projected on one side of the blank through an adjustable light source, and multiple cameras take pictures on the other side of the blank. The visual windows of the multiple cameras should cover the entire length direction of the blank; S2. Determine the camera photographing time interval based on the camera working distance, camera parameters, and blank height; S3. After receiving the start detection signal, start the timer; S4. Make the multiple cameras take pictures synchronously to obtain multiple detection pictures, and judge whether the brightness of the detection pictures is appropriate. If not, adjust the light source voltage to change the light source brightness until detection pictures with appropriate brightness are obtained; S5. Identify defects in each detection picture and mark the defect positions of the detection pictures with defects; S6. Splice the multiple detection pictures in sequence in the length direction and save them in the memory; S7. Judge whether the stop detection signal is received. If the stop detection signal is not received, wait for the next timer trigger and enter step S4. If the stop detection signal is received, splice the pictures spliced in length saved in step S6 in the height direction to make it a complete picture and write it to the external storage; S8. Judge whether the complete picture has defects. If there are defects, send an instruction to the production system. If there are no defects, wait for the next detection signal and enter step S3.
2. The method for detecting blank defects based on automatic dimming and multi-camera collaborative control technology according to claim 1 is characterized in that: Set a group of adjustable light sources for each camera, and adjust them independently between multiple groups of adjustable light sources.
3. The method for detecting blank defects based on automatic dimming and multi-camera collaborative control technology according to claim 1 is characterized in that: In step S3, the detection signal is obtained by periodically querying the PLC information.
4. The method for detecting blank defects based on automatic dimming and multi-camera collaborative control technology according to claim 1 is characterized in that: In step S4, the picture brightness adjustment specifically includes the following steps: S41. Obtain the detection picture taken by the current camera; S42. Quantify the brightness of the current detection picture, and the brightness value b of the current detection picture; S43. Judge the brightness of the detection picture based on the set picture too dark threshold th1 and too bright threshold th2. When b <= th1, it is judged that the brightness of the current detection picture is too dark. When b >= th2, it is judged that the current detection picture is too bright; when th1 < b < th2, it is judged that the current detection picture is a detection picture with appropriate brightness, and steps S44 and step 45 are not executed; S44. Calculate the light source voltage value to be adjusted based on the difference between the current brightness value b of the picture and the too dark threshold th1 or the too bright threshold th2; S45. Send an instruction to the adjustable light source through the modbus-rtu protocol based on the light source voltage value to be adjusted to adjust the light source brightness, and repeat steps S41 - S45 after adjustment.
5. The method for detecting blank defects based on automatic dimming and multi-camera collaborative control technology according to claim 4 is characterized in that: In step S42, convert the detection picture from 24-bit RGB mode to 8-bit grayscale mode. In the conversion process, the three RGB primary colors are converted according to fixed weights, and then statistical analysis is performed on the grayscale image, and the root mean square of each wave band of the image is used as the brightness value b of the current detection picture.
6. The method for detecting blank defects based on automatic dimming and multi-camera collaborative control technology according to claim 4 is characterized in that: In step S44, based on the difference between the current brightness value b of the picture and the too dark threshold th1 or the too bright threshold th2, adjust the light source voltage value in a fixed proportion.
7. The method for detecting blank defects based on automatic dimming and multi-camera coordinated control technology according to claim 1 is characterized in that: In steps S6 and S7, when splicing the detection pictures, do not perform the same part fusion processing on the overlapping parts.
8. The method for detecting blank defects based on automatic dimming and multi-camera coordinated control technology according to claim 1, characterized in that: In step S5, defect recognition uses the Canny edge detection algorithm. First, the detection image is smoothed using Gaussian filtering to remove noise from the image. Then, the gradient amplitude and angle image are calculated. Then, non-maximum suppression is applied to the gradient. Finally, double threshold processing and connectivity analysis are used to detect edges. After the defect is identified, the minimum area rectangle is fitted to the defect position, and the defect size is set on the host computer. When the detected defect size is larger than the set size, it is judged that there is a defect in the detection image.
Citation Information
Patent Citations
KR20220114792A