Stamping part appearance defect detection system based on multi-camera-area light source cooperative positioning
The detection system, which uses a multi-camera-surface light source for collaborative positioning, automatically identifies the model of stamped parts and controls illumination and shading. Combined with multi-angle image acquisition and multi-channel convolutional network for defect identification, it achieves efficient and accurate detection of appearance defects in stamped parts. It adapts to the structural differences and high reflectivity of various workpiece models, thus improving detection efficiency and accuracy.
Patent Information
- Application Number
- CN202610066095.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-19
- Publication Date
- 2026-04-07
AI Technical Summary
Existing technologies for detecting appearance defects in stamped parts suffer from low detection efficiency, low accuracy, and difficulty in adapting to structural differences and surface reflective characteristics of various workpiece models. In particular, in functional areas such as coding areas where surface quality requirements are high, the system is insufficient in defect location and area determination.
The detection system employs a multi-camera-surface light source collaborative positioning method. It automatically identifies the model through QR code reading and structural recognition cameras. Combined with multiple sets of controllable surface light sources and mechanical shading mechanisms, it performs illumination and shading control. Five fixed industrial cameras are used to acquire images from multiple angles. Combined with a multi-channel convolutional network, it identifies defects, determines the region, and outputs the defect type and location.
It achieves high-precision and rapid appearance defect detection for multiple types of stamped parts, adapts to high-cycle production, improves the stability and interpretability of detection, and solves the problems of unstable identification, inaccurate positioning, and misjudgment of areas in existing technologies.
Smart Images

Figure CN121805148A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of defect detection, specifically to a stamping part appearance defect detection system based on multi-camera-surface light source collaborative positioning. Background Technology
[0002] In modern automobile manufacturing, the appearance quality of structural stamped parts directly affects the reliability, assembly precision, and brand image of the entire vehicle. This is especially true for metal structural parts exposed in critical locations such as the engine compartment, where surface defects are easily detected by end users upon vehicle delivery. Currently, most stamped parts are still inspected manually. However, in production scenarios with multiple models, batches, and high-speed cycles, this method suffers from common problems such as strong subjectivity, low efficiency, and easy omissions in the coding area. Some companies have attempted to introduce camera-based vision inspection systems, but their effectiveness in actual working conditions is limited, mainly in three aspects: First, stamped parts are uncoated bare metal with strong surface reflection and complex shapes, easily causing defect features in the image to be obscured, affecting image clarity and recognition reliability; second, the large differences in geometric structures between different workpiece models result in inconsistent spatial distribution of the coding area, making it difficult to uniformly adapt to a universal image processing model, leading to detection area drift and unstable accuracy; third, defect judgment criteria and lighting strategies usually require manual setting, and the system cannot automatically switch parameters when changing workpiece models, making it difficult to adapt to the actual production line speed. Especially in functional areas such as the coding area where surface quality requirements are extremely high, the system's shortcomings in defect location and area determination become even more prominent. Therefore, there is an urgent need for a stamping part appearance defect detection solution that can adapt to the structural differences and surface reflectivity of various stamping parts, and possesses high precision, fast switching, and low latency. Summary of the Invention
[0003] The purpose of this invention is to provide a stamping part appearance defect detection system based on multi-camera-surface light source collaborative positioning, so as to solve the problems mentioned in the background art.
[0004] This invention provides a stamping part appearance defect detection system based on multi-camera-surface light source collaborative positioning, including an acquisition module, an illumination control module, a defect recognition module, and a judgment module;
[0005] The acquisition module is used to obtain the model number of the stamped part and obtain the structural configuration file based on the model number;
[0006] The lighting control module is used to control the lighting and shading of stamped parts according to the structural configuration file.
[0007] The defect identification module is used to acquire a set of image frames of the stamped part, and to identify each frame to obtain a defect set;
[0008] The judgment module is used to determine the pass / fail status of stamped parts based on the defect set and obtain the judgment result.
[0009] Preferably, the acquisition module includes a QR code reader and a structure recognition camera.
[0010] The QR code reader is used to identify the QR code label on the stamped part and obtain the model number of the stamped part;
[0011] The structural camera recognition device is used to acquire an image of the stamped part from above the detection position when the QR code reader fails to recognize the QR code label, and to obtain the model number of the stamped part based on the acquired image.
[0012] Preferably, the model number of the stamped part is obtained based on the acquired image, including:
[0013] S10, perform edge detection and median filtering on the obtained image in sequence to obtain the edge contour image;
[0014] S11, calculate the comprehensive score between the edge contour image and each standard contour image in the model library respectively;
[0015] S12, take the model number of the stamping part corresponding to the standard contour image with the highest comprehensive score as the model number of the stamping part currently located at the detection position.
[0016] Preferably, the structural configuration file includes a coding area, a detection area mask, a highly reflective area, an illumination scheme number, defect judgment rules, and a light-shielding template.
[0017] Preferably, the stamped parts are subject to illumination control and shading control according to the structural configuration file, including:
[0018] S20, based on the lighting scheme number, obtain the incident angle of the surface light source and the target brightness level from the local strategy library;
[0019] S21, illumination control is performed based on the incident angle of the light source and the target brightness level;
[0020] S22, control the shading according to the shading template.
[0021] Preferably, the set of image frames of the stamped part is acquired, including:
[0022] When the stamped part enters the inspection position, an industrial camera is used to simultaneously capture images of the stamped part from multiple angles to obtain a set of image frames.
[0023] Preferably, each frame of the image is identified separately to obtain a defect set, including:
[0024] S30, cropping is performed on the image using a detection region mask to obtain a cropped image;
[0025] S31, Input the cropped image into the defect recognition model for recognition to obtain the type and location of the defect;
[0026] S32, after the recognition is completed, retain the response points in the image whose predicted values are greater than the set recognition threshold, and combine all the response points into a defect result item. The defect result item includes the defect type number of each response point and the position of the defect in the image coordinate system.
[0027] S33, Summarize the defect results obtained from identifying all images in the image frame set to obtain the defect set.
[0028] Preferably, the acceptance status of the stamped part is determined based on the defect set to obtain the determination result, including:
[0029] S40. Based on the position of the defect in the image coordinate system, determine whether each defect falls into the inkjet printing area. If so, mark the defect as a critical area defect; otherwise, mark the defect as a non-critical area defect.
[0030] S41, Obtain the maximum permissible attribute value of the defect in the current area based on the defect type;
[0031] S42, calculate the score of the defect based on the maximum allowable attribute value;
[0032] S43, determine whether the scoring result is greater than the set global pass / fail threshold. If so, the result is that the stamping part is unqualified.
[0033] Beneficial effects:
[0034] This invention proposes a stamping part appearance defect detection system based on the collaborative operation of multiple cameras and surface light sources. Addressing the structural complexity and highly reflective surface characteristics of various stamping part models, the system combines model-driven region adaptation with hardware-level image acquisition optimization to form a closed-loop process from structural configuration loading, illumination control, image acquisition, defect recognition, to region determination. The system first automatically identifies the model and loads the structural configuration when the stamping part enters the inspection area, clearly defining the location of the inkjet printing area, the inspection area mask, and tolerance standards. Subsequently, it automatically adjusts the light source illumination angle, the position of the light-shielding baffle, and brightness parameters according to the configuration, creating a differentiated light field in the highly reflective area to avoid imaging artifacts. Image acquisition is performed by five fixed industrial cameras, and the stamping part is driven by a robotic arm to complete the angled exposure, ensuring complete coverage of all areas to be inspected. The recognition model performs multi-channel convolutional inference based on the structural mask, combined with a direction enhancement mechanism to distinguish common defects such as scratches, cracks, indentations, and edge defects, and outputs their location and type. Finally, the system classifies and outputs all defects based on the different judgment tolerances of the coded and non-coded areas, and uses a multi-factor scoring method to improve the interpretability of the pass / fail judgment. The overall system design has the advantages of zero configuration for model switching, stable image acquisition quality, strong robustness of defect recognition, and clear region judgment mechanism. It is suitable for online defect detection tasks of stamped parts with high cycle time, multiple models, and high quality requirements, and solves the engineering bottleneck problems of unstable recognition, inaccurate positioning, and region misjudgment in existing technologies. Attached Figure Description
[0035] Figure 1 This is a schematic diagram of a stamping part appearance defect detection system based on multi-camera-surface light source collaborative positioning according to the present invention. Detailed Implementation
[0036] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0037] Please see Figure 1 The present invention provides a technical solution: a stamping part appearance defect detection system based on multi-camera-surface light source collaborative positioning, including an acquisition module, an illumination control module, a defect identification module and a judgment module.
[0038] The acquisition module is used to obtain the model number of the stamped part and obtain the structural configuration file based on the model number.
[0039] The goal of this module is to efficiently and stably identify the specific model of the stamped part at the start of the inspection process and load a complete set of structural configurations corresponding to that model. This provides basic parameter support for subsequent lighting configuration, image acquisition area positioning, and defect judgment logic. Because automotive structural stamped parts are diverse, have significant structural differences, and exhibit marked variations in the location of the marking area, a single, uniform model is insufficient for high-precision inspection. To meet the industrial demands of high cycle time and low false positives, the system employs a model-driven configuration loading mechanism, automatically identifying the model number when the stamped part enters the inspection area. And load the complete structure configuration object based on it. This avoids manual intervention during the detection phase and improves the system's intelligence and rhythm adaptability.
[0040] Preferably, the acquisition module includes a QR code reader and a structure recognition camera.
[0041] The QR code reader is used to identify the QR code label on the stamped part and obtain the model number of the stamped part;
[0042] In a typical deployment, each stamped part is affixed with a laser-engraved or oil-resistant QR code label before being put into production. This label is located on one edge of the stamped part and features a black background with white code for contrast, taking advantage of the reflective properties of metal. The QR code reader is an industrial-grade vision recognition module (such as the Cognex DM374X series), deployed to the side of a fixed workstation. When the stamped part is fed into the detection position by a robotic arm, an image is automatically captured by a trigger, and decoding is completed within 150ms.
[0043] The structural camera recognition device is used to acquire an image of the stamped part from above the detection position when the QR code reader fails to recognize the QR code label, and to obtain the model number of the stamped part based on the acquired image.
[0044] If the QR code is missing or fails to be recognized, the system will activate the above structure recognition camera. This camera (such as Baslerac A1920-155um) is installed above the main detection position and acquires grayscale images with a resolution of 1920×1200, using a polarizing filter to reduce interference from reflections on the stamped parts.
[0045] The model identification process prioritizes QR code reading; upon successful reading, the decoding result is directly assigned as the model number. .
[0046] Preferably, the model number of the stamped part is obtained based on the acquired image, including:
[0047] S10: Perform edge detection and median filtering on the obtained image sequentially to obtain the edge contour image.
[0048] After image acquisition, edge detection and median filtering are performed to extract clear edge contour images of the stamped parts. , As input and standard contour plots in the model library Perform a match.
[0049] S11, calculate the comprehensive score between the edge contour image and each standard contour image in the model library respectively;
[0050] use With model library contour template collection Structural comparison was performed, and the most similar model number was selected using the following comprehensive scoring formula:
[0051]
[0052] In this formula, Indicates the overlap ratio of the contour region. The Hausdorff distance represents the local alignment between edge point sets, and is a weighted coefficient of the two metrics. and These controls the weights for global and local matching respectively, with default values of 0.6 and 0.4. (Structure Template) All data is derived from CAD drawings imported offline and then standardized. It is pre-stored in the local high-performance industrial computer SSD and accessed at high speed through memory mapping. The entire matching process takes no more than 180ms.
[0053] S12, take the model number of the stamping part corresponding to the standard contour image with the highest comprehensive score as the model number of the stamping part currently located at the detection position.
[0054] Preferably, the structural configuration file includes a coding area, a detection area mask, a highly reflective area, an illumination scheme number, defect judgment rules, and a light-shielding template.
[0055] Once the model number is identified The system will retrieve the corresponding structure configuration object from the local structure configuration database. Taking model "825" as an example, its configuration file contains the following fields:
[0056] inkjet printing area Defined as a rectangle in the image coordinate system, with the format as follows: ,For example ;
[0057] Detection area mask , is a binary mask image with the same size as the image, where white represents the detectable area and black represents the occluded or non-detectable area;
[0058] Highly reflective areas , is defined as several irregular polygonal regions in the image, in the format of a point set contour array, which is used for subsequent loading of occlusion strategies;
[0059] Illumination scheme number This is used to retrieve the corresponding light source angle and brightness parameter set;
[0060] Defect Judgment Rules The defects are classified according to their type (indentation, scratch, crack, edge loss), and each type corresponds to a set of tolerance values, such as crack length not exceeding 4mm and scratch width not exceeding 1.5mm.
[0061] The above structural configuration was jointly annotated by process engineers based on the CAD model and photographed images during the system deployment phase. The data was then entered and verified using a structural template management platform to ensure consistency with the actual camera field of view. All coordinate data is based on the top-left corner of the image, in pixels, requiring no further calibration or conversion.
[0062] The lighting control module is used to control the lighting and shading of stamped parts according to the structural configuration file.
[0063] This module plays a crucial role in ensuring image acquisition quality throughout the entire detection system. Its main task is to perform image acquisition based on the structural configuration after completing model recognition and structural configuration loading (step one). The module controls various parameters to enable rapid configuration and precise scheduling of the lighting and shading systems. Because the surface of stamped parts is uncoated bare metal with high gloss and irregular curves, it is highly susceptible to specular reflection interference under strong light. Conventional fixed lighting schemes struggle to simultaneously obtain high-quality images on complex structures such as the coding area, edge areas, and recessed areas. Therefore, this module utilizes a collaborative mechanism of "structure configuration-driven + area-aware control," combining multiple controllable surface light sources and mechanical shading mechanisms to precisely optimize the light field for different stamped part models. This allows the system to control imaging quality from the source without relying on post-processing image enhancement, providing stable, high-contrast, and low-artifact image input for subsequent multi-camera synchronous acquisition and defect identification. This mechanism is particularly suitable for stamping inspection scenarios with the following typical characteristics: recessed or raised coding areas, varied edge curvature distribution, materials such as cold-rolled steel or aluminum alloy, uncoated surfaces, and extremely strong reflective properties.
[0064] Preferably, the stamped parts are subject to illumination control and shading control according to the structural configuration file, including:
[0065] S20: Based on the lighting scheme number, obtain the incident angle of the surface light source and the target brightness level from the local strategy library.
[0066] According to the lighting scheme number given in the structural configuration Extract the basic lighting parameters of the area light source from the local policy library. ,in The incident angle of the light source. The target brightness level (expressed in current) for power supply control.
[0067] S21, illumination control is performed based on the incident angle of the light source and the target brightness level.
[0068] During lighting control, three sets of surface light sources are arranged crosswise above the stamped part on the left and right sides. By adjusting the angle and brightness, oblique and distributed lighting is achieved to avoid concentrated specular reflections entering the camera's field of view.
[0069] To enhance control accuracy, this system introduces a specific adjustment regularization term targeting interference from highly reflective areas, in addition to the conventional illumination control terms. This regularization term is learned from the model and applied to areas with high reflectivity. Constructing regional brightness suppression factors This causes the light to be distributed non-uniformly in space, forming a so-called "reflection suppression domain." Its core light adjustment formula is as follows:
[0070]
[0071] In this formula, Indicates the first Group of light sources in image coordinates The local effective brightness at that location; For the first The actual angle of illumination from the light source For the desired lighting direction, The project implements adaptive brightness adjustment based on illumination deviation; It is a binary suppression mask that sets the high reflectivity area to 1 and the other areas to 0; The reflection suppression coefficient is recommended to be between 0.3 and 0.5. This feature is a spatially selective brightness penalty mechanism specifically designed for areas of localized high brightness "overflow" on bare metal surfaces. Its innovation lies in incorporating regional information into the originally globally unified illumination control logic, using hardware instruction-level brightness adjustment to intervene in image quality in advance, rather than performing corrections during image post-processing.
[0072] S22, control the shading according to the shading template.
[0073] In addition to brightness adjustment, the shading control module is also based on Perform the action. The system based on... The boundary of the strongly reflective area is defined, its projection range in the illumination path of the surface light source is calculated, and the corresponding light-shielding plate displacement template is called to control the stepper motor to drive the light-shielding mechanism to position it before detection. The light-shielding template is based on... The occlusion range is defined in mm as the start and end points, manually calibrated and stored during the deployment phase. For example, the model number... There is a 90° concave corner near the inkjet printing area, corresponding to the light-shielding template. This indicates that the edge shading is completed by moving from 14mm to 48mm on the left, ensuring that the light source only affects the central area. The mechanism features a reverse locking structure to ensure no structural vibration or shading error occurs during the shading process.
[0074] To further improve the light response time and cycle stability, the system adopts a preloading strategy. After the previous stamping part has been inspected, the system loads the light according to the requirements of the next stamping part. Preloading and will The control buffer is written in advance, and the PLC triggers the synchronization setting instantaneously when the stamping part is positioned. The illumination stabilization time is controlled within 80ms, which does not affect the 30s detection cycle.
[0075] The defect identification module is used to acquire a set of image frames of the stamped part, and to identify each frame to obtain a defect set.
[0076] This module aims to utilize the lighting and shading conditions configured in step two. Under standard imaging conditions, for the current model Multi-angle image acquisition is performed on the stamped parts, and a defect identification task is performed on the acquired images. The result of the defect type and location contained in the image is output. Unlike general image recognition systems, surface defects in stamped parts exhibit distinct characteristics of industrial scenarios: First, strong reflective disturbances easily obscure low-contrast texture signals; second, defects are characterized by small scale, complex shapes, and strong directionality, leading to weak responses or misidentification risks in traditional convolutional networks; and third, defect distribution is extremely uneven, with most areas consisting of background information, resulting in wasted recognition resources. Based on these scenario characteristics, this module designs a workflow mechanism of "five-view synchronization + region mask limitation + direction-enhanced recognition," and improves the model's response sensitivity to target areas and defect edges by constructing a novel loss function and defect scoring formula, ensuring that the system can still stably output highly reliable recognition results under a 30-second cycle time requirement.
[0077] Preferably, the set of image frames of the stamped part is acquired, including:
[0078] When the stamped part enters the inspection position, an industrial camera is used to simultaneously capture images of the stamped part from multiple angles to obtain a set of image frames.
[0079] The system first triggers five industrial cameras to simultaneously acquire images based on the stamping part's arrival signal, forming a set of image frames. Each camera is fixedly mounted with complementary perspectives, ensuring that images of the stamped part surface can be obtained from at least two viewing angles under different lighting conditions.
[0080] Preferably, each frame of the image is identified separately to obtain a defect set, including:
[0081] S30, cropping is performed on the image using a detection region mask to obtain a cropped image;
[0082] S31, Input the cropped image into the defect recognition model for recognition to obtain the type and location of the defect;
[0083] Defect identification model It is a dual-channel lightweight convolutional network. The main channel processes the main image information, and the auxiliary channel is used to input the detection region mask. This forms an attention enhancement path. The model structure contains three convolutional modules (each layer has 32, 64, and 64 channels, with 3×3 convolution and ReLU activation), followed by a set of orientation selection convolutional kernels (with orientations of 0°, 45°, 90°, and 135° respectively) to enhance the directional response of the linear structure, which is particularly suitable for scratch and crack defects.
[0084] To address the issues of high reflectivity and false boundary detection in metal parts, a direction-sensitive regularization term and a boundary suppression term are introduced into the model's loss function. The joint loss function is defined as follows:
[0085]
[0086] in, For conventional cross-entropy loss, The softmax prediction value output by the model. For the gradient response in the specified direction, Represents the square norm; It is a weighted map generated from highly reflective and sensitive areas, used to enhance the discrimination of defect direction edges; For the structural boundary mask of the stamped part (by Edge generation), suppressing overfitting responses in boundary regions. The coefficients of the two regularization terms are respectively... , All of these were obtained through experimental optimization. This structure allows the model to both enhance the fine-grained structural response in the target region and eliminate interference signals from metal edges and fold lines.
[0087] S32, after the recognition is completed, retain the response points in the image whose predicted values are greater than the set recognition threshold, and combine all the response points into a defect result item. The defect result item includes the defect type number of each response point and the position of the defect in the image coordinate system.
[0088] After defect identification is completed, the model outputs the center point coordinates of each response region in the image frame. Corresponding defect type channel Combined with recognition threshold Perform binary judgment and retain the predicted value. The system combines these response points into a defect result item. , Number the defect type. These correspond to "scratches, cracks, indentations, and missing edges," respectively. This represents the location of the defect in the image coordinate system.
[0089] S33, Summarize the defect results obtained from identifying all images in the image frame set to obtain the defect set.
[0090] This process is performed independently and in parallel on five frames, and all results are finally combined to form:
[0091]
[0092] Each element in the defect set is in the image coordinate system. The format will be passed to the next step and the inkjet printing area in the structure configuration. Perform location matching and tolerance judgment.
[0093] The judgment module is used to determine the pass / fail status of stamped parts based on the defect set and obtain the judgment result.
[0094] The task of this module is to receive the defect identification results output from the previous step. and in combination with structural configuration The system uses predefined detection areas and defect tolerance rules to classify and determine each defect, outputting structured detection conclusions and image annotation results. In this patented system, the inkjet printing area... This is the highest priority detection area; any defect falling into this area has extremely low tolerance and must be handled independently. Therefore, this module adopts a two-layer structure of "area attribution determination + type-level tolerance verification" to achieve automatic classification and conformity judgment of all identified defects. Finally, this step will complete the visualization output of defects and the generation of structured messages, which is the final step in the entire patent system's output of detection conclusions.
[0095] The inputs of this module include the outputs of the previous module. ,in Number the defect type. This represents the location of the defect in the image coordinate system. The auxiliary input comes from the structure configuration object in step one. Including the location of the inkjet printing area Defined as a group of rectangular boxes in the image coordinate system, and the defect tolerance rule. The maximum acceptable range for each type of defect in each area is defined in dictionary form. For example, the maximum length of a scratch in the coding area is 3mm, and the allowable indentation depth in the edge area is no more than 0.2mm.
[0096] Preferably, the acceptance status of the stamped part is determined based on the defect set to obtain the determination result, including:
[0097] S40: Based on the position of the defect in the image coordinate system, determine whether each defect falls into the inkjet printing area. If so, mark the defect as a critical area defect; otherwise, mark the defect as a non-critical area defect.
[0098] The system first traverses the defect set. For each defect result item Perform a region attribution determination, that is, determine whether the defect falls within the coding area. This process is completed by calculating the relationship between the point coordinates and the bounding rectangle. If... The defect is then marked as a "critical area defect," and the area label is set to... Otherwise, mark as .
[0099] S41, Obtain the maximum allowed attribute value of the defect in the current area based on the defect type.
[0100] The system provides each defect type with... Tolerance rules in query structure configuration This yields the maximum permissible attribute value for this defect type in the current region. .
[0101] S42, calculate the score of the defect based on the maximum allowable attribute value.
[0102] Each defect is assessed for compliance using a multi-attribute defect scoring function, which is based on the defect's original identification attributes (such as length). ,area Grayscale contrast A comprehensive evaluation is conducted, using the normalized length of the defect. The scoring function is designed as follows, using the primary indicator:
[0103]
[0104] In the formula, It represents the pixel length calculated from the farthest boundary point of the defective image region, and is converted into the actual unit length (mm) using the known camera pixel resolution. It is the tolerance length threshold; It is the average grayscale contrast between the defect area and the background, used to evaluate the salience of the defect; It is an adjustable weighting factor (recommended value is 0.2). The innovation of this formula lies in using "physical size exceeding limits" and "visual perceptibility" as dual factors for joint judgment, enabling the system to make appropriate tolerance for low-contrast pseudo-defects while ensuring rigorous judgment. This is the scoring result.
[0105] S43, determine whether the scoring result is greater than the set global pass / fail threshold. If so, the result is that the stamping part is unqualified.
[0106] Set global compliance threshold ,like If the defect is found to be non-compliant, it is considered "unacceptable"; otherwise, it is considered "acceptable". Additionally, if the defective area is... And any If a part is deemed unqualified, the entire stamped part is immediately marked as "unqualified".
[0107] The system organizes all defect results into structured output objects. The format is:
[0108]
[0109] This object will be used in the MES system for statistics, traceability, and quality analysis.
[0110] In terms of visualization, the system marks each defect with a border on the original image, and the color of the border is dynamically adjusted according to the defect judgment result (green = qualified, red = unqualified, orange = critical value), and is displayed in the border. and Numerical values. Image annotation results are output as follows: It is used for operator review interface display and subsequent data archiving.
[0111] The above embodiments are only for illustrating the technical concept and features of the present invention. Their purpose is to enable those skilled in the art to understand the content of the present invention and implement it accordingly. They should not be used to limit the scope of protection of the present invention. All equivalent changes or modifications made in accordance with the spirit and essence of the present invention should be covered within the scope of protection of the present invention.
Claims
1. A stamping part appearance defect detection system based on multi-camera-surface light source collaborative positioning, comprising an acquisition module, an illumination control module, a defect identification module, and a judgment module; The acquisition module is used to obtain the model number of the stamped part and obtain the structural configuration file based on the model number; The lighting control module is used to control the lighting and shading of stamped parts according to the structural configuration file. The defect identification module is used to acquire a set of image frames of the stamped part, and to identify each frame to obtain a defect set; The judgment module is used to determine the pass / fail status of stamped parts based on the defect set and obtain the judgment result.
2. The stamping part appearance defect detection system based on multi-camera-surface light source collaborative positioning according to claim 1, characterized in that, The acquisition module includes a QR code reader and a structure recognition camera. The QR code reader is used to identify the QR code label on the stamped part and obtain the model number of the stamped part; The structural camera recognition device is used to acquire an image of the stamped part from above the detection position when the QR code reader fails to recognize the QR code label, and to obtain the model number of the stamped part based on the acquired image.
3. The stamping part appearance defect detection system based on multi-camera-surface light source collaborative positioning according to claim 2, characterized in that, The model number of the stamped part is obtained based on the acquired image, including: S10, perform edge detection and median filtering on the obtained image in sequence to obtain the edge contour image; S11, calculate the comprehensive score between the edge contour image and each standard contour image in the model library respectively; S12, take the model number of the stamping part corresponding to the standard contour image with the highest comprehensive score as the model number of the stamping part currently located at the detection position.
4. The stamping part appearance defect detection system based on multi-camera-surface light source collaborative positioning according to claim 1, characterized in that, The structural configuration file includes the inkjet printing area, the inspection area mask, the high reflectivity area, the lighting scheme number, the defect judgment rules, and the light-shielding template.
5. The stamping part appearance defect detection system based on multi-camera-surface light source collaborative positioning according to claim 4, characterized in that, Light and shading control are performed on the stamped parts according to the structural configuration file, including: S20, based on the lighting scheme number, obtain the incident angle of the surface light source and the target brightness level from the local strategy library; S21, illumination control is performed based on the incident angle of the light source and the target brightness level; S22, control the shading according to the shading template.
6. The stamping part appearance defect detection system based on multi-camera-surface light source collaborative positioning according to claim 1, characterized in that, Obtain the set of image frames of the stamped part, including: When the stamped part enters the inspection position, an industrial camera is used to simultaneously capture images of the stamped part from multiple angles to obtain a set of image frames.
7. The stamping part appearance defect detection system based on multi-camera-surface light source collaborative positioning according to claim 4, characterized in that, Each frame of the image is identified separately to obtain a defect set, including: S30, cropping is performed on the image using a detection region mask to obtain a cropped image; S31, Input the cropped image into the defect recognition model for recognition to obtain the type and location of the defect; S32, After the recognition is completed, retain the response points in the image whose predicted values are greater than the set recognition threshold, and combine all the response points into a defect result item. The defect result item includes the defect type number of each response point and the position of the defect in the image coordinate system. S33, Summarize the defect results obtained from identifying all images in the image frame set to obtain the defect set.
8. The stamping part appearance defect detection system based on multi-camera-surface light source collaborative positioning according to claim 4, characterized in that, The acceptance status of stamped parts is determined based on the defect set, and the determination results are obtained, including: S40. Based on the position of the defect in the image coordinate system, determine whether each defect falls into the inkjet printing area. If so, mark the defect as a critical area defect; otherwise, mark the defect as a non-critical area defect. S41, Obtain the maximum permissible attribute value of the defect in the current area based on the defect type; S42, calculate the score of the defect based on the maximum allowable attribute value; S43, determine whether the scoring result is greater than the set global pass / fail threshold. If so, the result is that the stamping part is unqualified.