Method and system for visually detecting yield of automobile air bags
Automatically detect the qualification of car airbags through image recognition technology, solving the waste of labor and cost problems caused by manual detection, and achieving automation and accuracy of airbag detection.
Patent Information
- Application Number
- CN202411429603.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-14
- Publication Date
- 2025-02-28
AI Technical Summary
The reliance on manual testing on the automotive airbag production line leads to wasting labor and increasing costs.
Image recognition technology is used to automatically detect whether the airbag is qualified, and images are collected through the camera, pre-processing, grayscale processing, noise reduction processing and binarization processing are performed, the installation angle and distance of the bolts are calculated, and whether the airbag meets the predetermined range.
The airbag detection is automated, the cost of manual detection is reduced, the production efficiency is improved, and the yield of the airbag is accurately judged.
Smart Images

Figure 00000000_0000_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image recognition, and more specifically, to a method and system for visually detecting the yield rate of automobile airbags. Background Art
[0002] Image recognition refers to the technology of using computers to process, analyze and understand images. Currently, this technology is widely used in industry and face recognition. The traditional recognition process of image recognition is divided into four steps: image acquisition → image preprocessing → feature extraction → image recognition.
[0003] Currently, airbag inspection on automobile airbag production lines relies on manual inspection. Workers manually determine whether the airbags are qualified and remove the unqualified airbags. Therefore, multiple people are required to conduct inspections on one line, which wastes manpower. Therefore, it is necessary to design a method to identify whether the airbags are qualified through images to reduce costs. Summary of the invention
[0004] The present invention provides a method and system for visually inspecting the yield rate of automobile airbags in order to overcome the problem that the airbag inspection on the current automobile airbag production line is all done manually, which wastes manpower.
[0005] In order to solve the above technical problems, the technical solution of the present invention is as follows:
[0006] A method for visually inspecting the yield rate of automobile airbags comprises the following steps:
[0007] A1: Pre-processing: place the samples to be tested on the feeding conveyor mechanism in sequence and adjust the initial working state of the camera;
[0008] A2: Image acquisition. After starting the machine, the samples pass through the image acquisition module in sequence, and the camera takes pictures of the samples and stores them;
[0009] A3: Detection surface identification, identify whether the detection surface of the sample to be identified is facing upwards. If yes, proceed to the next step. If not, use the flipping mechanism to turn the surface over and set the side with the bolts as the detection surface;
[0010] A4: Automated image processing, including:
[0011] A31: Process the photo in grayscale to obtain a grayscale image to ensure uniform lighting;
[0012] A32: Apply median filtering or Gaussian filtering for noise reduction;
[0013] A33: Scale the image to reduce the computational burden;
[0014] A34: Binarize the image using a fixed threshold;
[0015] A5: Use the algorithm to calculate the installation angles of the four bolts on the detection surface and the distances between the bolts;
[0016] A6: Determine whether the sample is qualified, including condition one, whether the angles of the four bolts on the detection surface are within the predetermined range, and condition two, whether the distance between the two points of the four bolts is within the predetermined range. If both conditions one and two are met, the sample enters the discharge conveying mechanism, otherwise it enters the defective product conveying mechanism.
[0017] Preferably, the adjusting the initial working state of the camera in step A1 comprises the following steps:
[0018] A11: Camera calibration, using the chessboard calibration method, taking multiple chessboard patterns, and using tools such as OpenCV to calculate the camera's internal and external parameters to ensure that the camera's distortion is corrected, and obtain the camera's internal parameter matrix K and distortion coefficient D;
[0019] A12: Adjust the focal length. According to the required field of view and the size of the target object, set the appropriate focal length f to ensure that the sample to be inspected is located in the center of the camera's field of view to obtain the best imaging;
[0020] A13: Calculate the resolution, set the number of pixels X corresponding to each millimeter, and calculate X.
[0021] Preferably, the step A32 adopts the following algorithm:
[0022] filtered_image(i,j)=median(image(i+m,j+n));
[0023] Among them, m, n are the window sizes of the filter.
[0024] Preferably, in step A33, the image is scaled to 50%, specifically,
[0025]
[0026] Preferably, in step A34, a fixed threshold T is used to binarize the image, specifically,
[0027]
[0028] Preferably, the specific steps of step A5 are:
[0029] A51: Define the core, set the bolt diameter to L, and calculate the core width and height K n ,in,
[0030]
[0031] Define the kernel K[i,j]:
[0032]
[0033] This kernel is used to preserve the area that matches the size of the bolt;
[0034] A52: Convolution operation, convolution of bin_image with kernel K, and obtain the convolution result conv_reAult, where:
[0035] Select the convolution maximum value point and store its position in array ca;
[0036] A53: De-duplicate processing, chronological group ca, retain the points that satisfy the distance greater than L, specifically,
[0037] Get the deduplicated array ca';
[0038] A54: Set the four bolt points to S1, S2, S3, S4, and calculate the distances between the four bolt points S1, S2, S3, S4. Specifically,
[0039]
[0040] Preferably, in step A6, the specific steps of condition 1 are:
[0041] Enumerate all four-point combinations from ca' (ca'[u1], ca'[u2], ca'[u3], ca'[u4]) and check whether the conditions are met:
[0042] θ=∠(ca′[u i ],ca′[u (i+1)%4 ],ca′[u (i+2)%4 ]);
[0043] Make sure that each angle meets:
[0044] 90-D≤θ≤90+D.
[0045] Preferably, between step A51 and step A52, kernel K is moved into GPU memory, and CUDA framework is used for parallel computing to speed up the convolution operation.
[0046] The present invention also provides a system for visually inspecting the yield rate of automobile airbags, which can execute any of the above-mentioned methods for visually inspecting the yield rate of automobile airbags, including a feeding conveying mechanism, an image acquisition module, a flipping mechanism, a discharging conveying mechanism, and a defective product conveying mechanism. The image acquisition module includes a camera, a CPU, and a memory for storing image automatic processing and judgment algorithms.
[0047] Compared with the prior art, the technical solution of the present invention has the following beneficial effects:
[0048] The present invention provides a method and system for visually inspecting the yield rate of automobile airbags, which automatically inspects whether the airbags are qualified in an assembly line manner. Specifically, the two sides of the airbag are first distinguished through image recognition, and after finding the side to be inspected, an image is taken and automatically processed. After a series of preparations such as image grayscale processing, noise reduction processing using median filtering or Gaussian filtering, and binarization processing, the system calculates whether the angles of four bolts and the distances between the four bolt lines are within a preset range. The system determines whether the airbag product is qualified and distinguishes between qualified products and defective products. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0050] Figure 1 A schematic diagram of a system flow of a method for visually inspecting the yield rate of automobile airbags according to the present invention;
[0051] Figure 2 A schematic diagram of the front view of an airbag detected in a method for visually detecting the yield rate of an automobile airbag according to the present invention;
[0052] Figure 3 A schematic diagram of an airbag surface to be inspected in a method for visually inspecting the yield rate of an automobile airbag according to the present invention;
[0053] Figure 4 A schematic diagram of a process flow of a system for visually inspecting the yield rate of automobile airbags according to the present invention;
[0054] Figure 5 The present invention is a schematic diagram of the structure of an image acquisition module of a system for visually inspecting the yield rate of automobile airbags. DETAILED DESCRIPTION
[0055] In order to better understand the purpose, structure and function of the present invention, the technical solution of the present invention is further described in detail below in conjunction with the accompanying drawings and specific preferred embodiments.
[0056] Embodiment 1:
[0057] See also Figure 1 The present invention provides a method for visually inspecting the yield rate of automobile airbags, comprising the following steps:
[0058] Step 1: Pre-processing: Place the samples to be tested on the feeding conveyor mechanism in sequence and adjust the initial working state of the camera. The initial working state of the camera is as follows:
[0059] Camera calibration, using the chessboard calibration method, taking multiple chessboard patterns, using OpenCV and other tools to calculate the camera's internal and external parameters to ensure that the camera's distortion is corrected, and obtain the camera's internal parameter matrix K and distortion coefficient D;
[0060] Adjust the focal length. According to the required field of view and the size of the target object, set the appropriate focal length f to ensure that the sample to be inspected is located in the center of the camera's field of view to obtain the best imaging;
[0061] Calculate the resolution and set the number of pixels X corresponding to each millimeter. For example, in the case of 1920x1080 pixels and the actual scene width is 100 mm, X=1920 / 100=19.2 pixels / mm.
[0062] Step 2: Image acquisition. After starting the machine, the samples pass through the image acquisition module in sequence, and the camera takes pictures of the samples and stores them.
[0063] Step 3: Test surface identification, identify whether the test surface of the sample to be identified is facing upwards. If so, proceed to the next step. If not, use the flipping mechanism to turn it over and set the side with the bolts as the test surface.
[0064] like Figure 2 As shown, it should be noted that the front of the airbag is also the front of the installation. In the traditional airbag inspection process, workers check whether the front opening size and position are correct to ensure that the airbag can pop out correctly. The convex hull method can be used to quickly detect whether the front is open.
[0065] Step 4: Automated image processing, including:
[0066] Process the photo in grayscale to obtain a grayscale image while ensuring uniform light;
[0067] Median filtering or Gaussian filtering is used for noise reduction. This application uses the following algorithm:
[0068] filtered_image(i,j)=median(image(i+m,j+n)),
[0069] Among them, m, n are the window sizes of the filter.
[0070] Scale the image to reduce the computational burden. Specifically, scale the image to 50% by the following steps:
[0071]
[0072] Use a fixed threshold to binarize the image. The algorithm for binarizing the image with a fixed threshold T in this application is:
[0073]
[0074] Step 5: Use the algorithm to calculate the installation angles of the four bolts on the detection surface and the distances between the bolts.
[0075] like Figure 3 As shown, the airbag detection surface provided by the present application has four bolts. When calculating the installation angles of the four bolts on the detection surface and the distance between the bolts, the core is first defined, and the bolt diameter is set to L, and the width and height of the core K are calculated. n ,in,
[0076]
[0077] Define the kernel K[i,j]:
[0078]
[0079] This kernel is used to preserve the area that matches the size of the bolt.
[0080] Perform a convolution operation, apply kernel K to bin_image, and obtain the convolution result conv_reAult, where:
[0081] Select the convolution maximum value point and store its position in array ca;
[0082] De-duplicate processing, chronological group ca, retain the points that satisfy the distance greater than L, specifically,
[0083] Get the deduplicated array ca′;
[0084] Set the four bolt points as S1, S2, S3, S4, and calculate the distances between the four bolt points S1, S2, S3, S4 found, specifically,
[0085]
[0086] Step 6: Determine whether the sample is qualified, including condition one, whether the angles of the four bolts on the test surface are within the predetermined range, and condition two, whether the distance between the two points of the four bolts is within the predetermined range. If both conditions one and two are met, the sample enters the discharge conveying mechanism, otherwise it enters the defective product conveying mechanism.
[0087] The specific steps of the above condition 1 are:
[0088] Enumerate all four-point combinations from ca′ (ca′[u1], ca′[u2], ca′[u3], ca′[u4]) and check whether the conditions are met:
[0089] θ=∠(ca′[u i ],ca′[u (i+1)%4 ],ca′[u (i+2)%4 ]);
[0090] Make sure that each angle meets:
[0091] 90-D≤θ≤90+D.
[0092] In actual operation, D is usually selected as 5°, that is, the range of each angle is greater than or equal to 85° and less than or equal to 95°.
[0093] Between step A51 and step A52, kernel K is moved into GPU memory and parallel computing is performed using the CUDA framework to speed up the convolution operation.
[0094] In the specific judgment, there are four bolts set in fixed positions on the surface to be inspected, that is, the side with bolts. The function of the bolts is for subsequent installation. When judging, it is necessary to detect whether the installation angle of the bolts and the position of the bolts deviate from the preset ones. In condition one, the error range of the installation angle of the bolts cannot be greater than 5°, and the connection distance between the bolt installation points also needs to be preset according to different models of airbags. In image recognition, the connection distance between different installation points needs to be within the preset range, and the product can be judged as qualified and enter the next step.
[0095] Embodiment 2:
[0096] See also Figure 4-5 The present invention also provides a system for visually inspecting the yield rate of automobile airbags, which can execute the method for visually inspecting the yield rate of automobile airbags in Example 1, including a feeding conveying mechanism, an image acquisition module, a flipping mechanism, a discharging conveying mechanism, and a defective product conveying mechanism. The image acquisition module includes a camera, a CPU, and a memory for storing image automatic processing and judgment algorithms.
[0097] The specific working process of the system is as follows: Figure 5 As shown, the feeding conveyor transports airbags into the system one by one. When the airbag enters the photo station, the camera takes a photo and transmits the picture to the image acquisition module. The computer performs the automatic picture recognition process. When both sides of the airbag are judged to be qualified, the walking flip gripper grabs the airbag and enters the discharging station, and is taken out by the discharging conveyor. If it is judged to be unqualified, the walking flip gripper will put the defective product into the station, and the defective products will be finally collected through the discharging slope.
[0098] Obviously, the above embodiments of the present invention are merely examples for clearly illustrating the present invention, and are not intended to limit the embodiments of the present invention. For those skilled in the art, other different forms of changes or modifications can be made based on the above description. It is not necessary and impossible to list all the embodiments here. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the claims of the present invention.
Claims
1. A method for visually inspecting the yield rate of automobile airbags, characterized in that: The following steps are included: A1: Pre-processing: place the samples to be tested on the feeding conveyor mechanism in sequence and adjust the initial working state of the camera; A2: Image acquisition. After starting the machine, the samples pass through the image acquisition module in sequence, and the camera takes pictures of the samples and stores them; A3: Detection surface identification, identify whether the detection surface of the sample to be identified is facing upwards. If yes, proceed to the next step. If not, use the flipping mechanism to turn the surface over and set the side with the bolts as the detection surface; A4: Automated image processing, including: A31: Process the photo in grayscale to obtain a grayscale image to ensure uniform lighting; A32: Apply median filtering or Gaussian filtering for noise reduction; A33: Scale the image to reduce the computational burden; A34: Binarize the image using a fixed threshold; A5: Use the algorithm to calculate the installation angles of the four bolts on the detection surface and the distances between the bolts; A6: Determine whether the sample is qualified, including condition one, whether the angles of the four bolts on the detection surface are within the predetermined range, and condition two, whether the distance between the two points of the four bolts is within the predetermined range. If both conditions one and two are met, the sample enters the discharge conveying mechanism, otherwise it enters the defective product conveying mechanism.
2. The method for visually inspecting the yield rate of automobile airbags according to claim 1, characterized in that: The adjusting of the initial working state of the camera in step A1 comprises the following steps: A11: Camera calibration, using the chessboard calibration method, taking multiple chessboard patterns, and using tools such as OpenCV to calculate the camera's internal and external parameters to ensure that the camera's distortion is corrected, and obtain the camera's internal parameter matrix K and distortion coefficient D; A12: Adjust the focal length. According to the required field of view and the size of the target object, set the appropriate focal length f to ensure that the sample to be inspected is located in the center of the camera's field of view to obtain the best imaging; A13: Calculate the resolution, set the number of pixels X corresponding to each millimeter, and calculate X.
3. The method for visually inspecting the yield rate of automobile airbags according to claim 2, characterized in that: The step A32 adopts the following algorithm: filtered_image(i,j)=median(image(i+m,j+n)); Among them, m, n are the window sizes of the filter.
4. The method for visually inspecting the yield rate of automobile airbags according to claim 3 is characterized in that: In step A33, the image is scaled to 50%, specifically, 5. The method for visually inspecting the yield rate of automobile airbags according to claim 4, characterized in that: In step A34, a fixed threshold T is used to binarize the image, specifically, 6. The method for visually inspecting the yield rate of automobile airbags according to claim 5, characterized in that: The specific steps of step A5 are: A51: Define the core, set the bolt diameter to L, and calculate the core width and height K n ,in, Define the kernel K[i,j]: This kernel is used to preserve the area that matches the size of the bolt; A52: Convolution operation, convolution of bin_image with kernel K, and obtain the convolution result conv_reAult, where: Select the convolution maximum value point and store its position in array ca; A53: De-duplicate processing, chronological group ca, retain the points that satisfy the distance greater than L, specifically, Get the deduplicated array ca′; A54: Set the four bolt points to S1, S2, S3, S4, and calculate the distances between the four bolt points S1, S2, S3, S4. Specifically, 7. The method for visually inspecting the yield rate of automobile airbags according to claim 6, characterized in that: In step A6, the specific steps of condition 1 are: Enumerate all four-point combinations from ca′ (ca′[u1], ca′[u2], ca′[u3], ca′[u4]) and check whether the conditions are met: θ=∠(ca′[u i ],ca′[u (i+1)%4 ],ca′[u (i+2)%4 ]); Make sure that each angle meets: 90-D≤θ≤90+L).
8. The method for visually inspecting the yield rate of automobile airbags according to claim 7, characterized in that: Between step A51 and step A52, kernel K is moved into GPU memory, and parallel computing is performed using the CUDA framework to speed up the convolution operation.
9. A system for visually inspecting the yield rate of automobile airbags, comprising the method for visually inspecting the yield rate of automobile airbags according to any one of claims 1 to 8, characterized in that: It includes a feeding conveying mechanism, an image acquisition module, a flipping mechanism, a discharging conveying mechanism, and a defective product conveying mechanism. The image acquisition module includes a camera, a CPU, and a memory for storing image automatic processing and judgment algorithms.