Gas-assisted injection molding defect detection system for automobile spoiler

By integrating hardware-level parallel architecture and hybrid algorithms, the efficiency and accuracy issues in defect detection of air-assisted injection molding spoilers are solved, enabling rapid and accurate defect identification and evaluation, and adapting to efficient detection in industrial production lines.

CN121708004APending Publication Date: 2026-03-20马鞍山盈凯汽车零部件有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-30
Publication Date
2026-03-20

AI Technical Summary

Technical Problem

In existing technologies, the defect detection efficiency of air-assisted injection molding of automotive spoilers is low, the real-time performance is poor, the computing power consumption is high, and the defect identification accuracy is insufficient, making it difficult to meet the high-speed detection requirements of industrial production lines.

Method used

An image preprocessing and initial defect assessment system with a hardware-level parallel architecture, combining a lightweight YOLOv8 and ORB feature matching hybrid algorithm, achieves fast and accurate defect identification and assessment, including the integration of image acquisition, CPLD processing, defect identification and analysis, and communication and host computer interaction units.

Benefits of technology

It significantly improves the real-time performance and anti-interference capability of the detection system, enabling rapid and accurate identification and evaluation of spoiler defects, and making it suitable for efficient detection in industrial environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121708004A_ABST
    Figure CN121708004A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of automobile part detection, in particular to a gas-assisted injection molding defect detection system for an automobile spoiler, which comprises an image acquisition unit, a CPLD (Complex Programmable Logic Device) processing unit, a defect identification and analysis unit and a communication and upper computer interaction unit. According to the method, high-speed and high-efficiency execution of image preprocessing and defect initial judgment is realized through a hardware-level parallel architecture, the real-time performance of the system is greatly improved, the later-stage computing power occupation is reduced, and a lightweight YOLOv8 and ORB feature matching hybrid algorithm and an accurate classification and quantification mechanism are fused, so that rapid and accurate recognition and evaluation of spoiler defects are realized, and the accuracy of spoiler defect recognition and evaluation is improved. And meanwhile, the system has good industrial environment adaptability and anti-interference capability.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application relates to the technical field of automobile part detection, in particular to a gas-assisted injection molding defect detection system for an automobile spoiler. BACKGROUND

[0002] The automobile spoiler, also known as the automobile tail wing, is an aerodynamic device installed at the tail of the automobile (some models are also installed at the roof, front bumper and other positions), and its core function is to change the flow state of the airflow during the driving of the automobile and optimize the aerodynamic characteristics of the automobile body. From the functional essence, the working principle of the automobile spoiler is that when the automobile drives at a high speed, the airflow will form a lifting force on the surface of the automobile body, and the excessive lifting force will lead to the decrease of the adhesion between the wheels and the ground, affecting the control stability of the vehicle (such as turning and drifting, and the brake distance becoming longer). The spoiler guides the airflow to produce a downward pressure on its surface through a special streamline design, thereby offsetting part of the lifting force and improving the adhesion of the wheels and the control and safety during high-speed driving.

[0003] As a key component affecting the aerodynamic performance and driving safety of the whole vehicle, the forming quality of the automobile spoiler is extremely strict. At present, the mainstream production process of the spoiler is gas-assisted injection molding. Although this process can effectively reduce defects such as uneven wall thickness and shrinkage, it is still prone to produce subtle defects such as bubbles, flash and cracks during the forming process. If these defects are not accurately detected and removed, they will directly affect the structural strength and aerodynamic effect of the spoiler, and further cause driving safety hazards. In order to ensure the quality of the spoiler leaving the factory, the defect detection link is essential. However, in the prior art, the traditional spoiler defect detection has the problems of low efficiency, poor real-time performance, high occupation of computing power, insufficient defect recognition accuracy and weak anti-interference ability, which are difficult to adapt to the high-speed detection requirements of the industrial production line.

[0004] Based on this, the application provides a gas-assisted injection molding defect detection system for an automobile spoiler to solve the above-mentioned technical problems. SUMMARY

[0005] The purpose of the application is to provide a gas-assisted injection molding defect detection system for an automobile spoiler. The application realizes high-speed and efficient execution of image preprocessing and defect preliminary judgment through a hardware-level parallel architecture, greatly improves the real-time performance of the system and reduces the occupation of computing power in the later stage, and combines a hybrid algorithm of light-weight YOLOv8 and ORB feature matching and an accurate classification and quantization mechanism, so as to realize rapid and accurate identification and evaluation of the defects of the spoiler, and at the same time, the system has good adaptability to the industrial environment and good anti-interference ability.

[0006] To achieve the above-mentioned purpose, the application provides the following technical scheme:

[0007] The application provides a gas-assisted injection molding defect detection system for an automobile spoiler, which comprises an image acquisition unit, a CPLD processing unit, a defect identification and analysis unit, a communication and host computer interaction unit, wherein:

[0008] The image acquisition unit comprises an industrial camera and a multi-angle programmable light source, which is used for real-time acquisition of images of the surface and structure of the spoiler and performs multi-light source timing control in response to the synchronous trigger signal of the CPLD;

[0009] The CPLD processing unit is used for extracting and preliminarily judging the defect suspiciousness of the collected images by using a programmable logic device through hardware-level parallel processing, and generating preprocessed image data and trigger signals;

[0010] The defect identification and analysis unit is used for receiving the preprocessed image data output by the CPLD processing unit, and accurately positioning, classifying and quantitatively evaluating the defects based on a preset image analysis algorithm;

[0011] The communication and host computer interaction unit is used for uploading the detection results to the host computer through a standard communication interface, and receiving configuration parameters and control instructions from the host computer.

[0012] The industrial camera in the image acquisition unit is a face array CCD camera with a resolution of not less than 2 million pixels and a frame rate of not less than 30 fps; the multi-angle programmable light source comprises a ring light source and a strip light source, which can be continuously adjusted in brightness from 0 to 100% through PWM dimming, and the trigger delay of the light source and the industrial camera is ≤1ms.

[0013] The image acquisition unit comprises an industrial camera module, a multi-angle programmable light source module and a light source trigger control module, wherein:

[0014] The industrial camera module is used for shooting high-definition images of the surface and internal structure of the spoiler, and outputting raw image data;

[0015] The multi-angle programmable light source module is used for adjusting the illumination angle and brightness according to the detection area of the spoiler, and cooperating with the camera to clearly image the defect features;

[0016] The light source trigger control module is used for receiving the secondary acquisition trigger instruction of the CPLD defect suspiciousness preliminary judgment module, and controlling the industrial camera to perform secondary high-resolution acquisition on the high-suspiciousness ROI area.

[0017] The CPLD processing unit comprises a parallel preprocessing module, a dynamic ROI extraction module, a defect suspiciousness preliminary judgment module and a trigger and data output module, wherein:

[0018] The parallel preprocessing module is used for hardware level noise reduction, filtering and edge enhancement on the original image through hardware parallel logic inside the CPLD.

[0019] The dynamic ROI extraction module is used for real-time identification and cropping of the ROI where the potential defects are located based on pixel statistics.

[0020] The defect suspiciousness preliminary judgment module is used for rapid scoring of the ROI according to a preset rule to generate a defect suspiciousness index.

[0021] The trigger and data output module is used for outputting the preprocessed image data and generating a defect recognition trigger signal to drive the algorithm execution module to start feature matching.

[0022] The dynamic ROI extraction module is used for real-time identification and cropping of the ROI where the potential defects are located based on pixel statistics, and the specific operation is as follows:

[0023] A1: The original image is divided into a plurality of sub-blocks according to 8*8 pixel size, and the gray variance of each sub-block is calculated , and the calculation formula is as follows:

[0024] ;

[0025] In the formula, is the gray value of a single pixel in the sub-block, is the average gray value of the sub-block, and n is the total number of pixels in the sub-block;

[0026] A2: The calculated gray variance is compared with a preset threshold , and the abnormal sub-blocks with are screened out;

[0027] A3: A 3*3 neighborhood judgment rule is adopted to fuse adjacent abnormal sub-blocks into continuous regions and eliminate isolated single abnormal sub-blocks;

[0028] A4: The minimum circumscribed rectangle coordinates of the fused continuous regions are extracted ~ , and the original image is cropped based on the coordinates to output the ROI where the potential defects are located.

[0029] The defect suspiciousness preliminary judgment module is used for rapid scoring of the ROI according to a preset rule to generate a defect suspiciousness index, and the specific operation is as follows:

[0030] B1: The difference between the gray mean values of the ROI and the background region , the average gradient E of the edge pixels in the ROI, and the area ratio S of the suspected defect region in the entire ROI are extracted as three core features, and the three features are respectively assigned with preset weights;

[0031] B2: Calculate the defect suspiciousness index Q, and the specific formula is as follows:

[0032] ;

[0033] In the formula, 、 is a preset maximum value of the feature, 、 、 respectively, are preset weights;

[0034] B3: The calculated Q value is output as a defect suspiciousness index, and when Q≥0.6, it is determined as a high-suspiciousness ROI, triggering a secondary acquisition trigger instruction.

[0035] The defect recognition and analysis unit comprises an algorithm execution module, a defect positioning module, a defect classification module, and a quantitative evaluation module, wherein:

[0036] The algorithm execution module is configured to match defect features of the preprocessed image through a preset image analysis algorithm.

[0037] The defect positioning module is configured to calibrate the specific position of the defect on the spoiler through pixel coordinates.

[0038] The defect classification module is configured to classify the identified defects by type and grade.

[0039] The quantitative evaluation module is configured to calculate the size and area parameters of the defect and output the quantitative detection result.

[0040] In the algorithm execution module, the preprocessed image is matched with defect features through a preset image analysis algorithm, and the specific operation is as follows:

[0041] C1: Perform ORB feature point detection on the preprocessed image, and calculate the descriptor of each feature point, with the formula being:

[0042] ;

[0043] In the formula, is the feature point coordinate, is the feature point neighborhood pixel, and f is a binary encoding function.

[0044] C2: Perform target detection on the image through a lightweight YOLOv8 model to generate a suspected defect candidate frame.

[0045] C3: Match the ORB feature descriptor in the candidate frame with the descriptor in the preset defect feature library, and set a matching threshold. If the threshold is lower than the threshold, it is determined as a successful match.

[0046] wherein the Hamming distance formula is:

[0047] ;

[0048] wherein, is an XOR operation;

[0049] C4: The RANSAC algorithm is used to screen the matched feature points, and the mis-matched points are removed, so as to finally confirm the defect feature matching result.

[0050] The identified defects are classified according to types and grades in the defect classification module, and the specific operation is as follows:

[0051] D1: The preset defect types include four types of indentation, bubble, flash and crack, and the types are determined based on the morphological features and characteristic parameters of the defects;

[0052] D2: The similarity between the morphological feature parameters of the defects and the preset type template is calculated, and the similarity formula is:

[0053] ;

[0054] wherein, is the actual characteristic parameter of the defect, is the template characteristic parameter, and when Sim is greater than or equal to 0.7, the corresponding defect type is matched;

[0055] D3: Three grades are divided based on the defect size and position, and the specific operation is as follows:

[0056] I, first-grade defect: the defect area is greater than or equal to 5mm² or located in the key area of the spoiler mounting hole and the windward surface;

[0057] II, second-grade defect: the defect area is 1~5mm² and located in a non-key area;

[0058] III, third-grade defect: the defect area is less than 1mm² and located in a non-key area;

[0059] D4: The type label of the defect and the judgment basis are synchronously output.

[0060] The communication and host computer interaction unit comprises a data transmission module, an instruction receiving module, a data buffer module and a state feedback module, wherein:

[0061] The data transmission module is used for uploading the defect detection result to the host computer through an Ethernet / USB standard interface;

[0062] The instruction receiving module is used for receiving the detection parameter configuration and the control instruction of starting / stoping issued by the host computer;

[0063] The data buffer module is used for temporarily storing detection data and host computer instructions.

[0064] The state feedback module is used for feeding back the running state of each unit of the system to the host computer in real time.

[0065] Compared with the prior art, the beneficial effects of the present application are:

[0066] The present application realizes high-speed and efficient execution of image preprocessing and defect preliminary judgment through a hardware-level parallel architecture, greatly improves the real-time performance of the system and reduces the occupation of the computing power of the later stage, and combines a hybrid algorithm of light-weight YOLOv8 and ORB feature matching and an accurate classification and quantization mechanism, so as to realize rapid and accurate identification and evaluation of spoiler defects, and at the same time, has good industrial environment adaptability and anti-interference ability. BRIEF DESCRIPTION OF DRAWINGS

[0067] Fig. 1 A system diagram of the air-assisted injection molding defect detection system of the automobile spoiler.

[0068] Fig. 2 A defect suspiciousness preliminary judgment and secondary collection triggering flowchart of the air-assisted injection molding defect detection system of the automobile spoiler.

[0069] BRIEF DESCRIPTION OF DRAWINGS:

[0070] 100, image acquisition unit; 101, industrial camera module; 102, multi-angle programmable light source module; 103, light source triggering control module; 200, CPLD processing unit; 201, parallel preprocessing module; 202, dynamic ROI extraction module; 203, defect suspiciousness preliminary judgment module; 204, triggering and data output module; 300, defect identification and analysis unit; 301, algorithm execution module; 302, defect positioning module; 303, defect classification module; 304, quantitative evaluation module; 400, communication and host computer interaction unit; 401, data transmission module; 402, instruction receiving module; 403, data buffer module; 404, state feedback module. DETAILED DESCRIPTION

[0071] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of protection of the present application.

[0072] EMBODIMENT:

[0073] As Figs. 1-2As shown, the embodiment provides a kind of air-assisted injection molding defect detection system of automobile spoiler, including image acquisition unit 100, CPLD processing unit 200, defect identification and analysis unit 300, communication and host computer interaction unit 400, wherein: image acquisition unit 100: including industrial camera and multi-angle programmable light source, for real-time collection spoiler surface and the image of structure, and respond to the synchronous trigger signal of CPLD and carry out multi-light source timing control;CPLD processing unit 200: for using programmable logic device, by hardware level parallel processing, the dynamic region of interest extraction and defect suspiciousness preliminary judgment are carried out to acquisition image, and generate pre-processing image data and trigger signal;Defect identification and analysis unit 300: for receiving the pre-processing image data output by CPLD processing unit 200, based on preset image analysis algorithm, accurately positioning, classification and quantitative evaluation are carried out to defect;Communication and host computer interaction unit 400: for uploading detection result to host computer by standard communication interface, and receiving configuration parameter and control instruction from host computer.

[0074] Wherein, it needs to be explained that image acquisition unit 100 obtains spoiler image under the cooperation of multi-light source in real time, and CPLD processing unit 200 completes region of interest extraction and defect suspiciousness preliminary judgment at high speed in hardware level, and pre-processing result and trigger signal are transmitted to defect identification and analysis unit 300 to carry out accurate positioning, classification and quantitative evaluation, finally, detection result uploading and system parameter closed-loop control are realized through communication and host computer interaction unit 400.

[0075] In the embodiment, it also needs to be explained that the industrial camera in image acquisition unit 100 is face array CCD camera, and resolution is not less than 2 million pixels, and frame rate is not less than 30fps;Multi-angle programmable light source includes ring light source and strip light source, and brightness 0-100% is continuously adjustable by PWM dimming, and trigger delay of light source and industrial camera is ≤1ms.Industrial camera module 101, multi-angle programmable light source module 102 and light source trigger control module 103 are included in image acquisition unit 100, wherein: industrial camera module 101: for shooting high-definition image of spoiler surface and internal structure, and outputting original image data;Multi-angle programmable light source module 102: for adjusting illumination angle and brightness according to spoiler detection area, and cooperating camera to carry out defect feature clear imaging;Light source trigger control module 103: for receiving secondary acquisition trigger instruction of CPLD defect suspiciousness preliminary judgment module 203, and controlling industrial camera to carry out secondary high-resolution acquisition to high-suspiciousness ROI area.

[0076] It should be noted that the industrial camera module 101 combines the multi-angle programmable light source module 102 to provide adjustable angle and brightness cooperative lighting, and receives the secondary acquisition instruction sent by the CPLD defect suspiciousness preliminary judgment module 203 through the light source trigger control module 103, so as to realize the rapid response and high-resolution rephotographing of the high-suspiciousness ROI.

[0077] Further, it should be noted that the annular light source is mainly used to provide uniform front lighting to highlight defects such as surface indentation and scratch related to height; the strip-shaped light source is used to project from a specific angle to generate a shadow effect to highlight edge profile defects such as burr and burr.

[0078] After receiving the secondary acquisition instruction, the light source trigger control module 103 controls the industrial camera to switch to its highest resolution mode (such as 5 million pixels), and controls the electric translation table or zoom lens to make the high-suspiciousness ROI region full of the camera field of view, and then performs local high-resolution imaging.

[0079] In the embodiment, it should also be noted that the CPLD processing unit 200 includes a parallel preprocessing module 201, a dynamic ROI extraction module 202, a defect suspiciousness preliminary judgment module 203, and a trigger and data output module 204, wherein: the parallel preprocessing module 201 is used to perform hardware-level noise reduction, filtering, and edge enhancement on the original image through hardware parallel logic inside the CPLD; the dynamic ROI extraction module 202 is used to identify and crop the ROI where the potential defect is in real time based on pixel statistics; the specific operation is as follows: A1: divide the original image into a plurality of subblocks according to the size of 8x8 pixels, calculate the gray variance of each subblock , and the calculation formula is as follows:

[0080] ;

[0081] In the formula, is the gray value of a single pixel in the subblock, is the average gray value of the subblock, and n is the total number of pixels in the subblock; A2: compare the calculated gray variance with a preset threshold , and screen out the abnormal subblock ; A3: adopt a 3x3 neighborhood judgment rule to fuse adjacent abnormal subblocks into a continuous region, and remove isolated single abnormal subblocks; A4: extract the minimum circumscribed rectangle coordinates ~ of the continuous region after fusion, and crop the original image based on the coordinates to output the ROI where the potential defect is in. The defect suspiciousness preliminary judgment module 203 is used to quickly score the ROI according to a preset rule to generate a defect suspiciousness index; the specific operation is as follows: B1: extract the difference between the gray mean values of the ROI and the background region The three core features are: the average gradient of edge pixels within the ROI (E), the proportion of the area of ​​the suspected defective region within the ROI to the entire ROI (S), and each feature is assigned a preset weight.

[0082] B2: Calculate the defect suspicion index Q, the specific formula is as follows:

[0083] ;

[0084] In the formula, , The preset maximum value of the feature. , , These are preset weights;

[0085] B3: The calculated Q value is output as the defect suspicion index. When Q≥0.6, it is judged as a high suspicion ROI, triggering the secondary acquisition trigger command. Trigger and data output module 204: Used to output the preprocessed image data and generate a defect recognition trigger signal to drive the algorithm execution module 301 to start feature matching.

[0086] It should be noted that after the parallel preprocessing module 201 performs hardware-level noise reduction, filtering, and edge enhancement on the original image, the dynamic ROI extraction module 202 divides the image into sub-blocks in real time based on pixel statistics, identifies abnormal regions, and merges them to generate the minimum bounding rectangle to crop out the region of interest of potential defects. Then, the defect suspicion degree preliminary judgment module 203 performs weighted scoring based on features such as gray level difference, edge strength, and area ratio. When the suspicion degree reaches the threshold, a secondary acquisition command is triggered. Finally, the trigger and data output module 204 synchronously outputs the preprocessed ROI data and the defect identification start signal to drive the subsequent algorithm execution module 301 to carry out fine analysis.

[0087] Furthermore, it should be noted that the hardware parallel logic in the parallel preprocessing module 201 adopts a "pipeline + parallel channel" architecture, executing the three processing stages of noise reduction, filtering, and edge enhancement in parallel through independent hardware logic units, rather than serial processing. Noise reduction uses a median filter hardware circuit (3×3 window, no need to cache the entire frame image, only real-time processing through a sliding window), filtering uses a Gaussian filter parallel computing unit (preset filter kernel σ=1.5, pixel weighted summation is achieved through a hardware multiplier array), and edge enhancement uses a Sobel operator hardware circuit (simultaneously calculates horizontal and vertical gradients, and fuses edge information through OR operation).

[0088] The grayscale value of a single pixel within a sub-block in the dynamic ROI extraction module 202 The value range is 0~255 (standard for 8-bit grayscale images); the average grayscale value of the sub-block The calculation method of the preset gray scale variance threshold value is ; the value of the preset gray scale variance threshold value is . .

[0089] A3 3x3 neighborhood judgment rule: traverse each abnormal sub-block, if there are at least two abnormal sub-blocks in the 8 neighborhoods, it is judged as a continuous region; if there is only a single abnormal sub-block, it is judged as noise and directly removed. The image size after ROI cropping in A4: the output image resolution is consistent with the original ROI, and the data format is 8-bit grayscale image, which is transmitted to the defect suspiciousness preliminary judgment module 203.

[0090] The weight parameter assignment in the defect suspiciousness preliminary judgment module 203 (needs to meet ): (gray scale difference is most sensitive to defects), (edge gradient), (area ratio);

[0091] Feature parameter calculation method: , wherein is the gray scale mean value of the spoiler defect-free area (obtained offline by calibration); E is calculated by using the Sobel operator to calculate the edge gradient mean value of the ROI, (maximum gradient threshold value); , the value range is 0~1.

[0092] B3 contains a double trigger mechanism in the secondary acquisition trigger instruction: hardware trigger (directly control the image acquisition unit 100 through the GPIO interface, the response delay is less than or equal to 1ms) and software confirmation (the instruction is synchronized to the host computer, and the host computer can issue a cancellation instruction within 10ms to avoid invalid secondary acquisition), and the instruction carries the "priority identifier" of the ROI area (high suspiciousness Q≥0.8 is the first priority, and 0.6≤Q<0.8 is the second priority), and the image acquisition unit 100 preferentially processes the secondary acquisition of the first priority area.

[0093] The generated defect recognition trigger signal in the trigger and data output module 204 needs to carry the preprocessed ROI image data, and the data transmission format is RGB565; after receiving the trigger signal, the defect recognition and analysis unit 300 needs to start the algorithm execution module 301 within 5ms to meet the real-time detection requirement.

[0094] It should be noted that in the present embodiment, the defect recognition and analysis unit 300 comprises an algorithm execution module 301, a defect positioning module 302, a defect classification module 303, and a quantitative evaluation module 304, wherein: the algorithm execution module 301 is configured to match the defect features of the preprocessed image by using a preset image analysis algorithm, and the specific operation is as follows: C1: detecting the ORB feature points of the preprocessed image, and calculating the descriptor of each feature point, and the formula is as follows:

[0095] ;

[0096] wherein, is the feature point coordinate, is the feature point neighborhood pixel, and f is a binary encoding function; C2: performing target detection on the image by using a lightweight YOLOv8 model to generate a suspected defect candidate frame; C3: matching the ORB feature descriptor in the candidate frame with the descriptor in the preset defect feature library by using a Hamming distance, and setting a matching threshold, and determining that the matching is successful if the threshold is lower; wherein the Hamming distance formula is as follows:

[0097] ;

[0098] wherein, is the exclusive OR operation; C4: performing RANSAC algorithm screening on the matched feature points to eliminate the mis-matched points, and finally confirming the defect feature matching result. The defect positioning module 302 is configured to calibrate the specific position of the defect on the spoiler by using the pixel coordinates; the defect classification module 303 is configured to divide the recognized defects according to the type and grade, and the specific operation is as follows: D1: the preset defect types include four types of indentation, bubble, flash, and crack, and the type is determined based on the morphological features and feature parameters of the defects; D2: calculating the similarity of the morphological feature parameters of the defects and the preset type template, and the similarity formula is as follows:

[0099] ;

[0100] wherein, is the actual feature parameter of the defect, is the template feature parameter, and when Sim≥0.7, the corresponding defect type is matched; D3: dividing three grades based on the defect size and position, and the specific operation is as follows: I, first-grade defect is severe: the defect area is greater than or equal to 5 mm² or located in the key area of the spoiler mounting hole and the windward surface; II, second-grade defect is moderate: the defect area is 1~5 mm² and located in the non-key area; III, third-grade defect is slight: the defect area is less than 1 mm² and located in the non-key area; D4: synchronously outputting the type label of the defect and the judgment basis. The quantitative evaluation module 304 is configured to calculate the size and area parameters of the defects, and output the quantitative detection result.

[0101] It should be noted that the algorithm execution module 301 realizes the robust feature recognition of the defect area in the preprocessed image output by the CPLD front end by fusing the lightweight YOLOv8 target detection and ORB feature matching, and combining the RANSAC false matching elimination mechanism; then the defect positioning module 302 accurately calibrates the pixel coordinate position of the defect on the spoiler, the defect classification module 303 divides the defect into four categories of indentation, bubble, flash or crack according to the morphological characteristics, template similarity and key area rules and evaluates its severity grade, and the quantitative evaluation module 304 synchronously calculates the size, area and other physical parameters of the defect.

[0102] Further, it should be noted that the detection result data format output by the quantitative evaluation module 304 is JSON, including fields: defect position (physical coordinates), type, level, area, confidence; the communication unit uploads data through the Ethernet interface (TCP / IP protocol), and the transmission rate is ≥100 Mbps.

[0103] In C2, the lightweight YOLOv8 model parameters: the YOLOv8n model is adopted, the input image size is 640x640, the confidence threshold is 0.5, and the non-maximum suppression threshold is 0.45. In C3, the matching threshold is set to 32, and when , it is determined that the feature matching is successful. The lightweight YOLOv8 model is fine-tuned on a data set containing 10,000 spoiler defect samples, and the defect categories include indentation, bubble, flash, and crack; after the model is pruned through the channel and quantized by INT8, it is deployed on an embedded NPU (such as Rockchip RK3588), and the inference delay is ≤40 ms. In C4, the RANSAC algorithm parameters: the number of iterations is 100 times, the inlier distance threshold is 2 pixels, and the matching accuracy after removing false matching points needs to be ≥90%.

[0104] In D3, the specific range of the key area: within the radius of 10 mm of the mounting hole, the area of the windward surface accounting for 30% of the total area of the spoiler, and the defects in the above-mentioned area are determined as first-class defects regardless of their size;

[0105] In D3, the calculation method of the defect area: based on the pixel-physical size mapping relationship (camera calibration is required: before going online, the system needs to calibrate the camera by placing a chessboard calibration plate with known size on the plane of the spoiler, collecting multiple images and applying Zhang Zhengyou's calibration method to solve the intrinsic matrix and distortion coefficient of the camera, and establishing a homography transformation matrix of image pixel coordinates and world coordinates (millimeters). The quantitative evaluation module 304 uses the matrix to convert coordinates and sizes), for example: 100 pixels = 1 mm², defect pixel area x 0.01 = actual physical area.

[0106] In the embodiment, it is also necessary to point out that the communication and host computer interaction unit 400 comprises a data transmission module 401, an instruction receiving module 402, a data buffer module 403, and a state feedback module 404, wherein: the data transmission module 401 is used for uploading the defect detection result to the host computer through an Ethernet / USB standard interface; the instruction receiving module 402 is used for receiving the detection parameter configuration and the start / stop control instruction issued by the host computer; the data buffer module 403 is used for temporarily storing the detection data and the host computer instruction; and the state feedback module 404 is used for feeding back the running state of each unit of the system to the host computer in real time.

[0107] It is necessary to point out that the data transmission module 401 uploads the defect detection result to the host computer, and the instruction receiving module 402 obtains the configuration parameter and the control instruction issued by the host computer, both of which work cooperatively and realize the temporary storage and synchronous scheduling of the detection data and the instruction through the data buffer module 403, and the state feedback module 404 monitors and feeds back the running state of each unit of the system in real time.

[0108] Further, it is necessary to point out that the specific state code to be fed back in the state feedback module 404 is 0 = normal running, 1 = camera acquisition exception, 2 = CPLD preprocessing failure, 3 = no defect recognition result, and 4 = secondary acquisition non-response; the state reporting period is 100 ms. When the state code is 1 (camera acquisition exception), the system automatically attempts to reinitialize the camera driver; if it fails for three times in succession, the system alarms the host computer and suspends the detection process.

[0109] In the description of the present specification, the description of the terms "one embodiment", "example", "specific example" and the like means that the specific features, structures, materials or characteristics described in connection with the embodiment or example are contained in at least one embodiment or example of the present application. In the present specification, the illustrative description of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner.

[0110] The preferred embodiments of the application disclosed above are only used to help explain the application. The preferred embodiments do not describe all the details and limit the application to the specific embodiments. Obviously, according to the content of the present specification, many modifications and changes can be made. The present specification selects and specifically describes these embodiments in order to better explain the principles and practical applications of the application, so that those skilled in the art can well understand and utilize the application. The application is limited by the claims and their entire scope and equivalents.

Claims

1. A defect detection system for air-assisted injection molding of automotive spoilers, characterized in that, It includes an image acquisition unit (100), a CPLD processing unit (200), a defect identification and analysis unit (300), and a communication and host computer interaction unit (400), wherein: The image acquisition unit (100) includes an industrial camera and a multi-angle programmable light source, used to acquire images of the surface and structure of the spoiler in real time, and to perform multi-light source timing control in response to the synchronous trigger signal of the CPLD. The CPLD processing unit (200) is used to perform dynamic region of interest extraction and preliminary defect suspicion assessment on the acquired image through hardware-level parallel processing using a programmable logic device, and to generate preprocessed image data and trigger signals. The defect identification and analysis unit (300) is used to receive preprocessed image data output by the CPLD processing unit (200) and to accurately locate, classify and quantify defects based on a preset image analysis algorithm. The communication and host computer interaction unit (400) is used to upload the detection results to the host computer through a standard communication interface and to receive configuration parameters and control commands from the host computer.

2. The defect detection system for air-assisted injection molding of an automotive spoiler according to claim 1, characterized in that, The industrial camera in the image acquisition unit (100) is an area array CCD camera with a resolution of no less than 2 million pixels and a frame rate of no less than 30fps; the multi-angle programmable light source includes a ring light source and a strip light source, and the brightness is continuously adjustable from 0 to 100% through PWM dimming, and the trigger delay between the light source and the industrial camera is ≤1ms.

3. The defect detection system for air-assisted injection molding of an automotive spoiler according to claim 2, characterized in that, The image acquisition unit (100) includes an industrial camera module (101), a multi-angle programmable light source module (102), and a light source trigger control module (103), wherein: The industrial camera module (101) is used to capture high-definition images of the surface and internal structure of the spoiler and output raw image data. The multi-angle programmable light source module (102) is used to adjust the illumination angle and brightness according to the spoiler detection area, and cooperate with the camera to clearly image the defect features. The light source trigger control module (103) is used to receive the secondary acquisition trigger command from the CPLD defect suspicion degree preliminary judgment module (203) and control the industrial camera to perform secondary high-resolution acquisition of the high suspicion degree ROI area.

4. The defect detection system for air-assisted injection molding of an automotive spoiler according to claim 1, characterized in that, The CPLD processing unit (200) includes a parallel preprocessing module (201), a dynamic ROI extraction module (202), a defect suspicion degree preliminary judgment module (203), and a triggering and data output module (204), wherein: The parallel preprocessing module (201) is used to perform hardware-level noise reduction, filtering and edge enhancement on the original image through hardware parallel logic inside the CPLD. The dynamic ROI extraction module (202) identifies and crops out the region of interest where potential defects are located in real time based on pixel statistics. The defect suspicion degree preliminary judgment module (203) is used to quickly score the ROI according to preset rules and generate a defect suspicion degree index. The triggering and data output module (204) is used to output preprocessed image data and generate a defect recognition trigger signal to drive the algorithm execution module (301) to start feature matching.

5. The defect detection system for air-assisted injection molding of an automotive spoiler according to claim 4, characterized in that, The dynamic ROI extraction module (202) identifies and crops the region of interest where potential defects are located in real time based on pixel statistics. The specific operation is as follows: A1: Divide the original image into several sub-blocks with an 8×8 pixel size, and calculate the grayscale variance of each sub-block. The calculation formula is: ; In the formula, This represents the grayscale value of a single pixel within a sub-block. is the average grayscale value of the sub-block, and n is the total number of pixels in the sub-block; A2: Calculate the grayscale variance With preset threshold Compare and filter Exceptional sub-blocks; A3: Using a 3×3 neighborhood judgment rule, adjacent abnormal sub-blocks are merged into a continuous region, and isolated single abnormal sub-blocks are removed; A4: Extract the coordinates of the minimum bounding rectangle of the merged contiguous region. ~ Based on these coordinates, the original image is cropped, and the region of interest containing the potential defects is output.

6. The defect detection system for air-assisted injection molding of an automotive spoiler according to claim 4, characterized in that, The defect suspicion assessment module (203) quickly scores the ROI according to preset rules and generates a defect suspicion index. The specific operation is as follows: B1: Extract the difference between the ROI and the mean grayscale value of the background area. The three core features are: the average gradient of edge pixels within the ROI (E), the proportion of the area of ​​the suspected defective region within the ROI to the entire ROI (S), and each feature is assigned a preset weight. B2: Calculate the defect suspicion index Q, the specific formula is as follows: ; In the formula, , The preset maximum value of the feature. , , These are preset weights; B3: Output the calculated Q value as the defect suspicion index. When Q≥0.6, it is judged as a high suspicion ROI and a secondary data collection trigger command is triggered.

7. The defect detection system for air-assisted injection molding of an automotive spoiler according to claim 1, characterized in that, The defect identification and analysis unit (300) includes an algorithm execution module (301), a defect location module (302), a defect classification module (303), and a quantitative evaluation module (304), wherein: The algorithm execution module (301) is used to perform defect feature matching on the preprocessed image using a preset image analysis algorithm; The defect location module (302) is used to determine the specific location of the defect on the spoiler by using pixel coordinates; The defect classification module (303) is used to classify the identified defects according to their type and level. The quantitative evaluation module (304) is used to calculate the parameters of the size and area of ​​the defect and output the quantitative detection results.

8. The defect detection system for air-assisted injection molding of an automotive spoiler according to claim 7, characterized in that, The algorithm execution module (301) performs defect feature matching on the preprocessed image using a preset image analysis algorithm. The specific operation is as follows: C1: Perform ORB feature point detection on the preprocessed image and calculate the descriptor for each feature point using the following formula: ; In the formula, The coordinates of the feature point, Let f be the neighborhood pixels of the feature point, and f be the binary encoding function; C2: Perform object detection on the image using a lightweight YOLOv8 model to generate candidate bounding boxes for suspected defects; C3: Match the ORB feature descriptors in the candidate box with the descriptors in the preset defect feature library using Hamming distance, set a matching threshold, and determine that the match is successful if the value is below the threshold. The Hamming distance formula is: ; In the formula, This is an XOR operation; C4: Perform RANSAC algorithm to filter the successfully matched feature points, eliminate false matches, and finally confirm the defect feature matching results.

9. A defect detection system for air-assisted injection molding of an automotive spoiler according to claim 7, characterized in that, The defect classification module (303) categorizes identified defects by type and level, as follows: D1: The preset defect types include four categories: shrinkage marks, bubbles, flash, and cracks. The type is determined based on the morphological characteristics and characteristic parameters of the defects. D2: Calculate the similarity between the morphological feature parameters of the defect and the preset type template. The similarity formula is: ; In the formula, These are the actual characteristic parameters of the defect. The template feature parameter is used to match the corresponding defect type when Sim≥0.7; D3: Based on defect size and location, three levels are defined as follows: I. Level 1 Defect (Severe): Defect area ≥ 5mm² or located in the spoiler mounting hole or critical area on the windward side; II. Level 2 Defects (Moderate): Defect area of ​​1~5mm² and located in non-critical areas; III. Level 3 Defect (Minor): Defect area <1mm² and located in a non-critical area; D4: Output the defect type label and judgment criteria simultaneously.

10. A defect detection system for air-assisted injection molding of an automotive spoiler according to claim 1, characterized in that, The communication and host computer interaction unit (400) includes a data transmission module (401), an instruction receiving module (402), a data buffer module (403), and a status feedback module (404), wherein: The data transmission module (401) is used to upload the defect detection results to the host computer via an Ethernet / USB standard interface; The instruction receiving module (402) is used to receive control instructions for configuring detection parameters and starting / stopping issued by the host computer; The data caching module (403) is used to temporarily store detection data and host computer instructions; The status feedback module (404) is used to provide real-time feedback to the host computer on the operating status of each unit in the system.