Bulb assembly quality detection method and system based on AI
By acquiring images from multiple angles and adjusting exposure time, combined with supervised training and feature channel adjustment, the problems of illumination changes and 3D recognition in traditional bulb assembly detection are solved, achieving high-precision and stable detection results.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-10
- Publication Date
- 2026-03-13
AI Technical Summary
Traditional methods for inspecting the quality of light bulb assembly rely on fixed exposure and single-view acquisition, which makes the image grayscale and edge contours susceptible to changes in illumination. They lack three-dimensional spatial analysis, making it difficult to identify subtle deformations and determine errors, resulting in unstable inspection results and repeatability deviations.
By acquiring images from multiple angles and adjusting exposure time, the spatial projection vector and grayscale change curve of structural points are calculated. Combined with supervised training discriminant information and feature channel adjustment, the detection model is optimized to identify assembly misalignment and surface defects, thus achieving dynamic feedback detection.
It improves the clarity of image acquisition and the ability to recognize three-dimensional structures, and enhances the sensitivity of deformation detection and the stability and accuracy of detection results.
Smart Images

Figure CN121661380A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of visual inspection technology, and in particular to an AI-based method and system for inspecting the assembly quality of light bulbs. Background Technology
[0002] The field of visual inspection technology encompasses the identification and judgment of the state, size, defects, and consistency of products or components during the production and assembly process using machine vision and image analysis. It focuses on acquiring target image data through optical imaging devices, combining image preprocessing, feature extraction, and target recognition algorithms to automate the inspection and judgment of the workpiece. It consists of an image acquisition unit, an image processing unit, and a result output unit. The image acquisition unit captures image information of the target under different angles and lighting conditions. The image processing unit extracts key features using methods such as grayscale analysis, edge detection, region segmentation, and pattern matching. The result output unit classifies and labels the inspection results. It is widely used in assembly inspection, surface defect detection, dimensional measurement, and position positioning, and is a crucial supporting direction for achieving production automation and quality control. Among these applications, AI-based light bulbs are a prime example. Assembly quality inspection method refers to a method that uses artificial intelligence algorithms and visual inspection equipment to identify and analyze assembly quality in real time during the assembly production of ring bulbs. This method involves setting up image acquisition devices at the inspection position of the bulb assembly machine to capture images of the bulb's appearance and structure during assembly. A trained neural network model is then used to identify assembly degree, determine component positions, detect luminous areas, and identify surface defects. Based on changes in image features, it automatically distinguishes between normal and abnormal assembly states. A multi-camera track structure is used to acquire and compare images from different perspectives, covering the inspection range of each assembly surface of the bulb. Specifically, this method encompasses optical image acquisition, image preprocessing, feature extraction, and model recognition. An AI model is used to perform region division, key point detection, and morphological analysis in the image space, completing the automated visual inspection process for bulb assembly quality.
[0003] Traditional visual inspection techniques for bulb assembly quality inspection rely on fixed exposure and single-view acquisition modes. Image grayscale and edge contours are easily affected by changes in illumination, leading to incomplete identification of structural details. In the spatial detection stage, based on two-dimensional image features, there is a lack of analysis on the projection correspondence of the assembly structure in three-dimensional space, resulting in misjudgments and recognition deviations. In the light emission detection stage, no quantitative correlation between brightness changes and pixel displacement is established, making it difficult to identify subtle deformations. Error judgment relies on static thresholds, resulting in insufficient discrimination of response channels. In the path detection stage, trajectory adjustment cannot be made according to real-time edge continuity, causing instability and repeatability deviations in the detection results under dynamic detection conditions. Summary of the Invention
[0004] To address the technical problems existing in the prior art, embodiments of the present invention provide an AI-based method for detecting the assembly quality of light bulbs, comprising the following steps:
[0005] To achieve the above objectives, the present invention adopts the following technical solution: an AI-based bulb assembly quality inspection method, comprising the following steps:
[0006] S1: Call the light bulb assembly image, obtain the grayscale contours of multiple regions under the current exposure settings, determine the integrity of the image expression, establish a corresponding combination group of exposure settings and structural expression, compare the expression differences and determine the exposure adjustment direction, and obtain the exposure time adjustment configuration;
[0007] S2: Using the exposure time adjustment configuration, analyze the correspondence of the assembly structure in multi-angle images, calculate the spatial projection vector of the structural points under multiple views, compare the interval of the projection intersection position, determine the spatial offset range, compare it with the error boundary of the combined structure, and obtain the spatial offset residual coefficient.
[0008] S3: Using the spatial offset residual coefficient, acquire the edge emission image of the lit bulb, calculate the gray-scale change curve of the light guide plate area, screen the gradient jump position and analyze the edge pixel offset of adjacent frames, match the gray-scale change and displacement, and generate supervised training discrimination information.
[0009] S4: Based on the supervised training discrimination information, analyze the error map of the assembly misalignment, brightness abnormality and surface scratch prediction area during the model training process, calculate the pixel error overlap range, judge the feature response consistency, filter the error concentration channel and adjust the convolution sequence arrangement and response weight, and output the assembly process detection model.
[0010] S5: Based on the assembly process detection model, extract the structural image within the trajectory window, calculate the edge connection length and number of interruptions, analyze the coverage position of continuous segments, identify unstable edge regions, extract the current path number and coordinates, reconstruct the image acquisition path, and obtain the trajectory window offset coordinate group.
[0011] As a further embodiment of the present invention, the exposure time adjustment configuration includes image grayscale distribution combination, structural region clarity comparison item, and exposure setting matching parameters. The spatial offset residual coefficient specifically refers to the structural projection intersection distance, angle projection error group, and fixed structural tolerance reference. The structural deformation supervision training discrimination information specifically includes grayscale jump position data, edge displacement matching item, and luminous region pixel offset record. The assembly process detection model includes task cross-error graph group, feature channel activation intensity sequence, and channel convolution response configuration. The trajectory window offset coordinate group specifically refers to path number index, image expression stability label, and adjusted trajectory coordinate set.
[0012] As a further aspect of the present invention, the step of obtaining the exposure time adjustment configuration specifically includes:
[0013] S101: Call the bulb assembly image, obtain the bulb structure image at the corresponding angle under the current exposure setting, extract the grayscale boundary contours of the package boundary, pin position and light-emitting area, calculate the grayscale transition distribution density and edge contour clear length in the area, analyze the correspondence between the grayscale distribution density and edge contour length of the structure area, and establish the structure area expression feature group.
[0014] S102: Based on the structural region expression feature group, determine the expression integrity of the structural region of the image under the current exposure condition, establish a corresponding combination group between exposure setting and structural image integrity, compare the expression difference of the control exposure setting combination group under each structural region, and establish an exposure and expression combination parameter set.
[0015] S103: Call the exposure and expression combination parameter set, analyze the direction of expression difference in the structural region, filter the exposure setting group that needs to be adjusted, determine the exposure adjustment direction, and output the exposure time adjustment configuration.
[0016] As a further aspect of the present invention, the step of obtaining the spatial offset residual coefficient specifically includes:
[0017] S201: Call the exposure time adjustment configuration, collect images of the bulb assembly structure from multiple camera angles, detect the structural points in each viewpoint, calculate the spatial projection vector of the structural points in each viewpoint image, and obtain the spatial projection data set of structural points.
[0018] S202: Based on the spatial projection data set of the structural points, compare the intersection interval of the projection line segments of the same structural points under multiple views, determine the spatial offset amplitude between each projection path, and filter the projection paths whose offset amplitude is outside the error boundary according to the fixed combination structural parameters to generate a set of spatial projection offset parameters.
[0019] S203: Based on the set of spatial projection offset parameters, statistically analyze the difference between the offset amplitude and the error boundary, combine the error intervals of the spatial projection, adjust the ray combination, establish a spatial ray combination error group, and obtain the spatial offset residual coefficient.
[0020] As a further aspect of the present invention, the process of selecting projection paths with offset amplitudes outside the error boundary based on fixed combined structural parameters specifically comprises:
[0021] Extract the structural reference spacing, assembly limit angle and allowable fit tolerance from the fixed combination structural parameters. Based on the length and direction of the spatial projection vector of the structural points in each collection batch, calculate the tolerance mapping of the structural reference spacing and assembly limit angle in the projection space, and merge the allowable fit tolerance to establish error boundary parameters.
[0022] The offset magnitude of each projection path is compared with the error boundary parameter. Projection paths with offset magnitudes greater than the error boundary parameter are marked as offset paths. The identifiers of the offset paths are then associated with their corresponding viewpoint indices to form a set of filtered results.
[0023] As a further aspect of the present invention, the step of obtaining the supervised training discrimination information specifically comprises:
[0024] S301: Using the spatial offset residual coefficient, acquire the edge emission image of the bulb in the lit state, divide the edge region of the light guide plate into multiple angle segments, calculate the grayscale boundary change curve of each angle segment in the continuous image frame, and obtain the angle segment grayscale curve group.
[0025] S302: Based on the angle segmented grayscale curve group, filter the gradient jump position in each grayscale boundary change curve, determine the pixel position change of the jump point between adjacent frames, analyze the correspondence between jump amplitude and pixel displacement, and generate grayscale jump displacement parameter group.
[0026] S303: Based on the grayscale jump displacement parameter group, match the grayscale jump amplitude and corresponding edge displacement of each angle segment, integrate the grayscale position corresponding data of each angle segment, output the grayscale position corresponding data required for supervised training, and obtain structural deformation supervised training discrimination information.
[0027] As a further aspect of the present invention, the step of obtaining the assembly process detection model specifically includes:
[0028] S401: Based on the structural deformation supervision training discrimination information, extract the error map of the assembly misalignment, brightness abnormality and surface scratch prediction area during the model training process, analyze the error coverage of the corresponding image area in the multi-task output results, calculate the pixel error overlap range of the same area in the error map between multiple tasks, and obtain the area error overlap parameter group.
[0029] S402: Based on the region error coincidence parameter group, determine the consistency of feature response in the multi-task error intersection region, extract the feature channel number in the corresponding region, compare the activation intensity and index order of the feature channel in the convolutional structure, filter the error concentration channel, and obtain the feature channel filtering group.
[0030] S403: Based on the feature channel filtering group, adjust the convolution sequence arrangement and response weight of the corresponding feature channel group in the feature operation, optimize the response path of the output feature, establish the parameter configuration of the detection model, and output the assembly process detection model.
[0031] As a further aspect of the present invention, the step of obtaining the trajectory window offset coordinate group specifically includes:
[0032] S501: Based on the assembly process detection model, obtain the bulb structure image in each trajectory window during the path detection process, extract the structural edge information of each image, calculate the edge connection length and the number of edge interruptions, analyze the spatial distribution of continuous edge segments, and generate an edge continuity distribution parameter set.
[0033] S502: Based on the edge continuity distribution parameter set, identify regions with unstable edge distribution in the image space, extract the path number and coordinate information of the corresponding trajectory window, evaluate the image representation stability of each path segment under the current detection conditions, and obtain the path representation stability parameter set;
[0034] S503: Based on the path expression stability parameter set, combined with the current movement direction and angle information of the trajectory segment, adjust the viewpoint offset angle and displacement direction of the detected path segment, reconstruct the acquisition trajectory of the path window, and output the trajectory window offset coordinate set.
[0035] As a further aspect of the present invention, the process of identifying regions with unstable edge distribution in the image space specifically comprises:
[0036] In the acquired bulb structure image, the edge connection length and edge interruption number data in the edge continuity distribution parameter group are extracted. The edge connection ratio is calculated for each image partition, and a fluctuation function is established based on the difference between the edge connection ratio and the edge interruption number. Based on the fluctuation function distribution of all image partitions, the average fluctuation amplitude is calculated, and the average fluctuation amplitude is used as the basic parameter to generate the edge stability threshold.
[0037] In each image partition, when the difference between the edge connectivity ratio and the number of edge interruptions exceeds the edge stability threshold, the corresponding partition is marked as an unstable edge distribution region, and the marking result is matched with the coordinate information of the corresponding path window to form an unstable edge region mapping group.
[0038] An AI-based light bulb assembly quality inspection system includes:
[0039] The exposure parameter control module calls the bulb assembly image, obtains the grayscale contours of multiple regions under the current exposure setting, judges the integrity of the image expression, establishes a corresponding combination group of exposure settings and structural expression, compares the expression differences and judges the exposure adjustment direction, and obtains the exposure time adjustment configuration.
[0040] The spatial offset analysis module uses the exposure time adjustment configuration to analyze the correspondence of the assembly structure in multi-angle images, calculates the spatial projection vector of the structural points under multiple views, compares the interval of the projection intersection position, determines the spatial offset range, compares it with the error boundary of the combined structure, and obtains the spatial offset residual coefficient.
[0041] The light emission boundary analysis module uses the spatial offset residual coefficient to acquire the edge light emission image of the lit bulb, calculate the gray-level change curve of the light guide plate area, screen the gradient jump position and analyze the edge pixel offset of adjacent frames, match the gray-level change and displacement, and generate supervised training discrimination information.
[0042] Based on the supervised training discrimination information, the feature channel adjustment module analyzes the error map of the assembly misalignment, brightness abnormality and surface scratch prediction area during the model training process, calculates the pixel error overlap range, judges the feature response consistency, filters the error concentration channel and adjusts the convolution sequence arrangement and response weights, and outputs the assembly process detection model.
[0043] The path feedback reconstruction module extracts the structural image within the trajectory window based on the assembly process detection model, calculates the edge connection length and the number of interruptions, analyzes the coverage position of continuous segments, identifies unstable edge regions, extracts the current path number and coordinates, reconstructs the image acquisition path, and obtains the trajectory window offset coordinate group.
[0044] Compared with the prior art, the advantages and positive effects of the present invention are as follows:
[0045] In this invention, the clarity and detail reproduction of image acquisition are improved by linking exposure settings with structural representation. The assembly offset recognition capability of three-dimensional structures is enhanced by combining spatial projection and error boundary judgment. The sensitivity of deformation detection is improved by matching gray-scale abrupt changes and pixel displacements. The feature response distribution is optimized by using error channel filtering and weight adjustment. The adaptive correction of the acquisition path is achieved by combining edge continuity feedback. A dynamic feedback detection system is constructed to improve the stability of detection and the overall recognition accuracy. Attached Figure Description
[0046] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0047] Figure 1 This is a schematic diagram of the steps of the present invention;
[0048] Figure 2 This is a detailed schematic diagram of S1 of the present invention;
[0049] Figure 3 This is a detailed schematic diagram of S2 of the present invention;
[0050] Figure 4 This is a detailed schematic diagram of S3 of the present invention;
[0051] Figure 5 This is a detailed schematic diagram of S4 of the present invention;
[0052] Figure 6 This is a detailed schematic diagram of S5 of the present invention;
[0053] Figure 7 This is a system module diagram of the present invention. Detailed Implementation
[0054] The technical solution of the present invention will now be described with reference to the accompanying drawings.
[0055] In embodiments of the present invention, words such as "exemplarily," "for example," etc., are used to indicate that something is an example, illustration, or description. Any embodiment or design described as "exemplary" in the present invention should not be construed as being more preferred or advantageous than other embodiments or designs. Specifically, the use of the word "exemplary" is intended to present the concept in a concrete manner. Furthermore, in embodiments of the present invention, the meaning expressed by "and / or" can be both, or either one.
[0056] In the embodiments of this invention, the terms "image" and "picture" may sometimes be used interchangeably. It should be noted that, without emphasizing the distinction between them, they convey the same meaning. Similarly, the terms "of," "corresponding (relevant)," and "corresponding" may sometimes be used interchangeably. It should be noted that, without emphasizing the distinction between them, they convey the same meaning.
[0057] In this embodiment of the invention, sometimes a subscript such as W1 may be written in a non-subscript form such as W1. When the difference is not emphasized, the meaning they express is the same.
[0058] To make the technical problems, technical solutions and advantages of the present invention clearer, a detailed description will be given below in conjunction with the accompanying drawings and specific embodiments.
[0059] Please see Figure 1 This invention provides an AI-based method for inspecting the assembly quality of light bulbs, comprising the following steps:
[0060] S1: Call the light bulb assembly image, obtain the grayscale contours of multiple regions under the current exposure settings, determine the integrity of the image expression, establish a corresponding combination group of exposure settings and structural expression, compare the expression differences and determine the exposure adjustment direction, and obtain the exposure time adjustment configuration;
[0061] S2: Adjust the configuration using exposure time, analyze the correspondence of the assembly structure in multi-angle images, calculate the spatial projection vector of the structural points under multiple views, compare the interval of the projection intersection position, determine the spatial offset range, compare it with the error boundary of the combined structure, and obtain the spatial offset residual coefficient.
[0062] S3: Using the spatial offset residual coefficient, acquire edge emission images of the lit bulb, calculate the gray-scale change curve of the light guide plate area, screen gradient jump positions and analyze the edge pixel offset of adjacent frames, match gray-scale abrupt changes and displacement, and generate supervised training discrimination information.
[0063] S4: Based on the supervised training discrimination information, analyze the error map of the assembly misalignment, brightness abnormality and surface scratch prediction area during the model training process, calculate the pixel error overlap range, judge the consistency of feature response, filter the error concentration channel and adjust the convolution sequence arrangement and response weight, and output the assembly process detection model.
[0064] S5: Based on the assembly process detection model, extract the structural image within the trajectory window, calculate the edge connection length and number of interruptions, analyze the coverage position of continuous segments, identify unstable edge regions, extract the current path number and coordinates, reconstruct the image acquisition path, and obtain the trajectory window offset coordinate group.
[0065] The exposure time adjustment configuration includes image grayscale distribution combination, structural region clarity comparison item, and exposure setting matching parameters. The spatial offset residual coefficient specifically refers to the structural projection intersection distance, angle projection error group, and fixed structural tolerance reference. The structural deformation supervised training discrimination information specifically includes grayscale jump position data, edge displacement matching item, and luminous region pixel offset record. The assembly process detection model includes task cross error map group, feature channel activation intensity sequence, and channel convolution response configuration. The trajectory window offset coordinate group specifically refers to path number index, image expression stability label, and adjusted trajectory coordinate set.
[0066] Please see Figure 2 The specific steps to obtain the exposure time adjustment configuration are as follows:
[0067] S101: Call the bulb assembly image, obtain the bulb structure image at the corresponding angle under the current exposure setting, extract the grayscale boundary contours of the package boundary, pin position and light-emitting area, calculate the grayscale transition distribution density and edge contour clear length in the area, analyze the correspondence between the grayscale distribution density and edge contour length of the structure area, and establish the structure area expression feature group.
[0068] Call the image of the light bulb assembly, which is at the exposure time ,aperture At the initial exposure settings, Shot from a different perspective Pixel images, first targeting the encapsulation boundary region (pixel coordinates) to Extract the grayscale boundary contour of the region, process it using the Canny operator to obtain a binarized edge image, and then count all grayscale values in the edge image from below... (Dark) transition to above The set of (bright) pixels, calculate the total number of pixels within this transition band (e.g., (pixels) and the total number of pixels in the encapsulation boundary region (pixels) The ratio of pixels to the grayscale transition distribution density is used to obtain the grayscale transition distribution density. Next, all connected edge pixel chains in the binarized edge image are counted, the pixel length of each chain is calculated, and chains with lengths greater than a certain threshold are filtered out. The edge chains of pixels are summed up to obtain the edge outline with a clear length of . Pixels, then, for the pin location area (coordinates) to ) and the luminous area (coordinates) to Perform the same grayscale transition distribution density calculation (to obtain respectively) and ) and edge contour clear length calculation (obtained respectively) Pixels and (pixels), representing the grayscale distribution density values of these three structural regions. With edge contour length value Combine and analyze the correspondence between the two, for example, the density of the encapsulation boundary region. Corresponding length Density of pin location area Corresponding length Establish structural region expression feature groups.
[0069] S102: Based on the structural region expression feature group, determine the expression integrity of the structural region of the image under the current exposure condition, establish a corresponding combination group between exposure setting and structural image integrity, compare the expression difference of the control exposure setting combination group under each structural region, and establish an exposure and expression combination parameter set.
[0070] Based on structural region expression feature groups To determine the structural integrity of an image under the current exposure conditions, the process involves: setting integrity benchmarks for each region and defining encapsulation boundaries (density benchmarks). Length reference ), pins (density reference) Length reference ), luminescent area (density reference) Length reference The measured value is compared with the reference value, and the encapsulation boundary is determined. and The area was determined to be "complete" and the luminous area was identified as such. and The result was determined to be "complete", while the pin location... and The result was determined to be "incomplete". Based on the combined results of the three areas, the current exposure setting is ( The structural image integrity was assessed as "partially incomplete (pins)", and subsequently, the system adjusted the exposure settings (e.g., adjusted to...). Then repeat the acquisition in S101 and the integrity judgment in S102 until all preset exposure setting combinations (e.g., a total of 5 sets of settings) are traversed, and a corresponding combination group between exposure settings and structural image integrity is established. Specific examples are shown in Table 1 below.
[0071] Table 1. Exposure Settings and Structural Integrity Combination Table
[0072]
[0073] As shown in Table 1, the differences in expression in each structural region (package boundary, pin, light-emitting region) were compared between the control exposure setting combination groups (5 groups in total). For example, comparing group 1 ( ) and Group 2 ( The pin integrity changed from "incomplete" to "complete", while comparing group 2 and group 3 ( The luminescent area changed from "complete" to "overexposed" (overexposure criterion: grayscale transition distribution density exceeds...). By summarizing these comparison results, a set of parameters for exposure and expression combination is established.
[0074] S103: Call the exposure and expression combination parameter set, analyze the direction of expression difference in the structural region, filter the exposure setting group that needs to be adjusted, determine the exposure adjustment direction, and output the exposure time adjustment configuration;
[0075] Using the exposure and expression combination parameter set (as shown in Table 1), the direction of expression differences in structural regions was analyzed. The specific analysis process was as follows: taking the 4th group ( Starting with "incomplete", and combining with Group 1 ( Based on a comprehensive (partially incomplete) comparison, the difference lies in the aperture. Adjust to (Aperture increase), the area outside the pin shows improvement, indicating that increasing the aperture is a positive direction. Then, comparing groups 1 and 2... In a comprehensive comparison (of the "complete" results), the difference lies in the exposure time, from... Increase to The improved pin area indicates that increasing the exposure time is a positive step. Further comparisons were made between group 2 and group 3. (Based on the incomplete information), the exposure time starts from... Increase to This leads to overexposure in the luminous area, indicating that there is an upper limit to increasing the exposure time. Based on this analysis, the system filters the exposure setting groups that need adjustment. The filtering logic is as follows: select the setting with "Overall Integrity" set to "Complete". If there is no "Complete" setting, select the setting with the fewest "Incomplete" areas among the "Partially Incomplete" settings. In this example, group 2 ( If all settings are "incomplete", then the direction of exposure adjustment is determined. For example, if the current best setting is group 1 (…), then… The problem is "incomplete pins" (underexposure), so the exposure adjustment direction is to "increase exposure". The best option is group 3. The problem is "overexposure of the luminous area," so the adjustment direction is determined to be "reducing the exposure." In this example, since the optimal setting group (group 2) has been selected, the system directly outputs the configuration parameters for this group, namely the exposure time. ,aperture This is used to adjust the exposure time configuration.
[0076] Please see Figure 3 The specific steps for obtaining the spatial offset residual coefficients are as follows:
[0077] S201: Call the exposure time adjustment configuration, collect images of the bulb assembly structure from multiple camera angles, detect the structural points in each viewpoint, calculate the spatial projection vector of the structural points in each viewpoint image, and obtain the spatial projection data set of structural points.
[0078] Call the exposure time adjustment configuration (exposure time) ,aperture Using this configuration, three cameras (located at coordinates) can be controlled. , , ,unit Simultaneously, images of the bulb assembly structure at three angles were acquired (images). ), detect key structural points in each image, such as the pin tip of light bulb A. In the image The pixel coordinates detected in the middle are In the image China In the image China Based on the intrinsic and extrinsic parameter matrices of each camera (pre-calibrated), the spatial projection vector of the structural points in each viewpoint image is calculated. Specifically, the calculation involves: mapping the pixel coordinates... Convert to Normalized coordinates in a coordinate system are obtained from Starting from the light center Direction vector Similarly, the calculation yields Direction vector in coordinate system and Direction vector in coordinate system These three vectors This constitutes the structural point. The projected rays from three perspectives, for other key structural points on the assembly (such as... , Perform the same operation to summarize the projection vectors of all structural points under all viewpoints, and obtain the spatial projection data set of structural points.
[0079] S202: Based on the spatial projection data set of structural points, compare the intersection interval of the projection line segments of the same structural points under multiple views, determine the spatial offset magnitude between each projection path, and filter the projection paths whose offset magnitude is outside the error boundary according to the fixed combination structural parameters to generate a set of spatial projection offset parameters.
[0080] Based on the spatial projection data set of structural points (containing points) vector and their corresponding camera positions The process of comparing the intersection intervals of projected line segments of the same structural point under multiple viewpoints is as follows: In the world coordinate system, calculate the projection ray. (starting point ,direction )and (starting point ,direction The midpoint of the line connecting the two closest points in space is denoted as . The coordinates are , and midpoint of intersection Coordinates are , and midpoint of intersection Coordinates are Calculate the distance between these intersection midpoints as the intersection interval, for example... and Distance between , , Determine the spatial offset magnitude between each projection path. Here, the offset magnitude is defined as the maximum value of all intersection intervals, i.e. Based on the fixed combined structural parameters (as shown in Table 2 below), projection paths with offset amplitudes outside the error boundaries are selected. The specific selection process is as follows: First, the structural reference spacing (pin AB spacing) is extracted from the fixed combined structural parameters. Assembly limiting angle (angle between pin A and base plane) ) and allowable fit tolerances ( ).
[0081] Table 2 Parameters of Fixed Combination Structure
[0082]
[0083] Based on the structural points within the collection batch ( The length of the spatial projection vector (e.g., average projection distance) ) and direction, calculate the tolerance mapping of structural reference spacing and assembly limiting angle in projection space, and set the angle tolerance. for Then the angle tolerance mapping Spacing tolerance Assuming that in this projection it is mapped to Merging allows for tolerance items Establish error boundary parameters The calculation method is the root of the square of each tolerance. The offset magnitude of each projection path (here) ) and error boundary parameters To compare, because The projection path (i.e., the point) The measurement path is marked as an offset path, and the identifier of the offset path ("offset") is matched with the corresponding view index ( Establish corresponding relationships to form a set of filtering results. The results of filtering all structural points are summarized to generate a set of spatial projection offset parameters.
[0084] S203: Based on the spatial projection offset parameter set, statistically analyze the difference between the offset amplitude and the error boundary, combine the error intervals of the spatial projection, adjust the ray combination, establish the spatial ray combination error group, and obtain the spatial offset residual coefficient.
[0085] According to the spatial projection offset parameter set, which contains And data from other points, such as Statistical offset magnitude and error boundary ( The difference in ) for The difference is ,for The difference is (Without offset), the error range of the combined spatial projection, for example, including all positive difference values. Collected together, forming an error range Adjust the ray combination, specifically for the point marked "offset". Attempt to remove the rays that contribute the most to the error (e.g., by calculating and identifying which rays to remove). rays back, and Intersection Only less than However, this step does not discard the data; instead, it retains all ray data and establishes a spatial ray combination error group. This error group records the original combination. Corresponding offset Obtain the spatial offset residual coefficient, which quantifies the overall assembly accuracy. The calculation method is the average offset magnitude of all points marked "offset". If only... Offset, then spatial offset residual coefficient If there are still Also offset (amplitude) ),but Here it is assumed that only Offset, obtain spatial offset residual coefficients .
[0086] Please see Figure 4 The specific steps for obtaining the discriminant information during supervised training are as follows:
[0087] S301: Using the spatial offset residual coefficient, acquire the edge emission image of the bulb in the lit state, divide the edge region of the light guide plate into multiple angle segments, calculate the grayscale boundary change curve of each angle segment in the continuous image frame, and obtain the angle segment grayscale curve group.
[0088] Using spatial offset residual coefficient This coefficient serves as prior knowledge of the degree of physical deformation of this batch of light bulbs (greater than the error boundary). (Indicating minute deformation), dynamic detection is initiated to collect data on the driving voltage under illumination conditions. Current Images of the light bulb's edge glow, captured using a high-speed camera. Continuous frame rate acquisition Frame image, the edge region of the light guide plate in the image (e.g., coordinates) to The strip-shaped region is divided circumferentially into Divide into segments from each angle, denoted as... to Each segment (e.g.) )Include Pixels, calculate each angle segment (e.g.) In continuous The grayscale boundary change curve in the frame image is calculated as follows: In the first frame image, in Scan line by line within the region along the normal direction (e.g., horizontal direction) to find gray values that start below a certain threshold. Become higher than The pixel position is denoted as the boundary position. In the second frame, repeat this process to find Until the 100th frame Sequence of the average gray values (or the boundary locations themselves) of these boundary locations As The grayscale boundary change curve, for to Perform the same operation to obtain A series of curves are used to form a group of grayscale curves segmented by angle.
[0089] S302: Based on the angle segmented grayscale curve group, filter the gradient jump position in each grayscale boundary change curve, determine the pixel position change of the jump point between adjacent frames, analyze the correspondence between jump amplitude and pixel displacement, and generate grayscale jump displacement parameter group.
[0090] Based on a group of segmented grayscale curves (8 curves in total, 100 data points per curve), the gradient transition positions in each grayscale boundary change curve are selected to... The curve of the segment For example, calculate its first-order difference (gradient) sequence. For example, in hour, , , ,exist hour, , ,exist hour, , Set gradient jump threshold ,because ,Location Selected as gradient transition locations, the pixel position change of the transition point between adjacent frames is determined, specifically: checking the transition location ( ) boundary point pixel coordinates Compared to the previous frame ( ) boundary point pixel coordinates Euclidean distance between them, for example exist , exist Then the pixel position changes (displaces). Pixels, analyze the jump amplitude ( ) and pixel displacement ( The correspondence between them is recorded as a data pair. traversal All frames of the curve (1 to 100) and all other segments ( to The curve of ) collects all The data pairs are used to generate a set of grayscale jump displacement parameters.
[0091] S303: Based on the gray-level jump displacement parameter group, match the gray-level jump amplitude and the corresponding edge displacement of each angle segment, integrate the gray-level position corresponding data of each angle segment, output the gray-level position corresponding data required for supervised training, and obtain the structural deformation supervised training discrimination information.
[0092] Based on the grayscale jump displacement parameter group, which contains a large number of data pairs, for example... Match the grayscale abrupt change amplitude of each angle segment with the corresponding edge displacement. Specifically, this involves: All data collected in segments Perform aggregations, such as calculating the average, maximum, or building a histogram; here, maximum matching is used. The maximum jump amplitude of the segment is The corresponding displacement is ,but The matching result is Similarly, The matching result is Similarly, the grayscale position data corresponding to each angle segment is integrated to form a mapping table, for example... It outputs the grayscale position corresponding data required for supervised training. This data is formatted as training labels, for example, for The grayscale jump of the 51st frame image patch in the region is as follows: Then assign a label to it, which indicates that it exists. Edge displacement of 1 pixel is used to obtain structural deformation supervised training discrimination information.
[0093] Please see Figure 5 The specific steps for obtaining the assembly process detection model are as follows:
[0094] S401: Based on the structural deformation supervised training discrimination information, extract the error map of the assembly misalignment, brightness abnormality and surface scratch prediction area during the model training process, analyze the error coverage of the corresponding image area in the multi-task output results, calculate the pixel error overlap range of the same area in the error map between multiple tasks, and obtain the area error overlap parameter group.
[0095] Based on structural deformation supervised training of discriminant information (e.g.) This information is used to train a multi-task AI model that simultaneously predicts three tasks: assembly misalignment, brightness anomaly, and surface scratches. After training iterations (e.g., the 1000th iteration), the error map of the predicted regions on the validation set images is extracted. For example, for image A, the error map (predicted error region) of the assembly misalignment task. lie in to Region, total Error map of pixel and brightness anomaly task lie in to Region, total Error map of pixel-level surface scratch task lie in to Region, total Pixel-level analysis is used to assess the error coverage of corresponding image regions in the multi-task output results. The overlap range of pixel errors in the same region across multiple tasks is calculated. Specifically, the calculation involves: and The intersection region is to The number of overlapping pixels is Pixels, calculation and Intersection area to The number of overlapping pixels is Pixels, calculation and Intersection area to The number of overlapping pixels is Pixels, calculate the intersection area of the three. to The number of overlapping pixels is Pixels, these overlapping range data By summarizing, we obtain the set of coincidence parameters for regional errors.
[0096] Table 3. Examples of Multi-Task Error Overlap Range
[0097]
[0098] As shown in Table 3, this table lists the error overlap under different task combinations.
[0099] S402: Based on the regional error coincidence parameter group, determine the consistency of feature response in the cross region of multi-task error, extract the feature channel number in the corresponding region, compare the activation intensity and index order of the feature channel in the convolutional structure, filter the channels in the error concentration, and obtain the feature channel filtering group.
[0100] Based on the regional error coincidence parameter group, the consistency of feature response in the cross-region of multi-task errors is judged, with the region having the most overlapping pixels (Combination 1: assembly misalignment and brightness abnormality, overlap). Taking pixels as an example, extract the corresponding region ( to Within the model, the feature channel numbers of the penultimate convolutional layer (e.g., Conv-5) were analyzed. It was found that the assembly misalignment task primarily activated channel number [channel number missing] in this region. The brightness anomaly task primarily activated channel number in this area. Both activated the channel. This indicates that the feature responses of these three channels have a high degree of consistency, and the activation intensity of these feature channels in the convolutional structure (e.g., the average activation value of channel 3 is...) Channel 8 is Channel 64 is The channels are compared with the index order (e.g., in the network definition, channel 3 is in group 1, channel 8 is in group 1, and channel 64 is in group 4) to filter channels in the error set. The filtering criteria are: channels that are jointly activated in multi-task overlapping regions (number of overlapping pixels > 1000) and whose average activation intensity is greater than 1000. The passage, the passage All conditions are met, and they are selected to obtain the feature channel filtering group.
[0101] S403: Based on the feature channel selection group, adjust the convolution sequence arrangement and response weight of the corresponding feature channel group in the feature operation, optimize the response path of the output feature, establish the parameter configuration of the detection model, and output the assembly process detection model.
[0102] Based on feature channel screening group The convolution sequence arrangement and response weights of the corresponding feature channel groups in feature computation are adjusted. Specifically, in the original model, channels 3 and 8 are located in the first group of convolution kernels (Group 1) of Conv-5, and channels 6 and 4 are located in the fourth group of convolution kernels (Group 4). They are merged only in the later stages of computation. Now, the convolution sequence arrangement is adjusted so that the convolution kernel of channel 64 is moved from the fourth group to the first group, making the channel... Feature computation and information interaction are performed at an earlier stage (within Group1). Simultaneously, the response weights are adjusted, increasing the output weights of these three channels (when connecting to the next layer). For example, the original weight of channel 3 is After adjustment, it is: Similarly, for channels 8 and 64, optimize the response path of the output features and establish the parameter configuration of the detection model (including the adjusted network structure definition and weight coefficients). ), output the assembly process detection model.
[0103] Please see Figure 6 The specific steps for obtaining the trajectory window offset coordinate group are as follows:
[0104] S501: Based on the assembly process detection model, obtain the bulb structure image in each trajectory window during the path detection process, extract the structural edge information of each image, calculate the edge connection length and the number of edge interruptions, analyze the spatial distribution of continuous edge segments, and generate an edge continuity distribution parameter set;
[0105] Based on the assembly process detection model, in the actual detection process, the path detection process (e.g., a robotic arm carrying a camera moves along a predetermined trajectory T) is obtained. A trajectory window ( Image of the bulb structure inside) ,extract The structural edge information is used to extract a binary edge map using the S403 model (or a lightweight edge detection operator). The edge connectivity length and the number of edge breaks are calculated. Specifically, in the edge map, all 8-connected pixel chains are traced, and the total number of pixels in all chains is counted to obtain the edge connectivity length. Pixel count; simultaneously, count the number of endpoints (edge points with only one neighbor) of edge chains, divide this number by 2 (each interrupted chain contributes 2 endpoints, excluding closed loops) to obtain the number of edge interruptions. Next, analyze the coverage location of continuous edge segments (i.e., pixel chains) in the image space, for example, by dividing the image into... The grid (100 partitions in total) is used to count the data for each partition. within and For example, partitions middle , partition middle , Summarize all partitions Data, generating a set of edge continuity distribution parameters.
[0106] S502: Based on the edge continuity distribution parameter set, identify regions with unstable edge distribution in the image space, extract the path number and coordinate information of the corresponding trajectory window, evaluate the image representation stability of each path segment under the current detection conditions, and obtain the path representation stability parameter set;
[0107] Based on the edge continuity distribution parameter set (including all partitions) ), identifying regions with unstable edge distribution in the image space, the specific identification process is as follows: in the acquired light bulb structure image In the process, the edge connectivity length and edge breakage count data are extracted from the edge continuity distribution parameter set, and then applied to each image partition (e.g., and Calculate the edge connectivity ratio , Defined as the number of edge pixels within this partition. Divide by the total number of pixels in that partition (Assuming each partition) Pixels ),for : ,for : A fluctuation function is established based on the difference between the edge connectivity ratio and the number of edge interruptions, and the fluctuation function value is... Defined as (Add 0.001 to avoid division by zero), for : ,for : Based on the fluctuation function distribution of all 100 image partitions Calculate the average fluctuation range Assuming the calculation yields And using the average fluctuation amplitude as the basic parameter, multiplied by a sensitivity coefficient. (This coefficient is set through offline testing and is used to define the tolerance for "instability"), generating an edge stability threshold. In each image partition, the difference between the edge connectivity ratio and the number of edge breaks (i.e., the fluctuation function value) Exceeding the edge stability threshold At that time, the corresponding partition is marked as a region with unstable edge distribution. In this example, , Stablize, , It was identified as an unstable region with marginal distribution, and the identification result ("unstable") was compared with the corresponding path window. Coordinate information (e.g.) Corresponding camera center coordinates Matching is performed to form a mapping group of unstable edge regions. Summarize all unstable regions and evaluate each path segment (i.e. Under the current detection conditions, the image representation stability is assessed. If the number of unstable regions exceeds five, then the image is deemed unstable. The image representation stability is "poor", and the path representation stability parameter set is obtained.
[0108] S503: Based on the path expression stability parameter set, combined with the current movement direction and angle information of the trajectory segment, adjust the viewpoint offset angle and displacement direction of the detected path segment, reconstruct the acquisition trajectory of the path window, and output the trajectory window offset coordinate set.
[0109] Based on the path expression stability parameter set, this parameter set indicates the trajectory window. The image representation stability is rated as "poor," and unstable regions (e.g., partitions) are identified. ), combined with trajectory segments The current direction of movement (e.g., moving along the positive X-axis, vector) ) and angle information (e.g., camera pitch angle) Adjust the viewpoint offset angle and displacement direction of the detection path segment, specifically for unstable partitions. (It is located on the upper left side of the image), calculate an adjustment vector to shift the camera viewpoint to the upper left, for example, adjust the viewpoint offset angle, and shift the pitch angle from... Adjusted to (offset) At the same time, adjust the displacement direction, in the original direction of movement. Add a Y-axis component to it, and it becomes Reconstruct the acquisition trajectory of the path window so that the next acquisition window The center point was originally planned. Move to And as the camera angle changes, the system responds to the new... Reacquire images at the location and repeat stability assessments S501 and S502 until the stability of the region is rated as "good" (number of unstable regions < 5). Output the adjusted trajectory window offset coordinate group. and corresponding Pitch angle.
[0110] Please see Figure 7 An AI-based light bulb assembly quality inspection system includes:
[0111] The exposure parameter control module calls the bulb assembly image, obtains the grayscale contours of multiple regions under the current exposure setting, judges the integrity of the image expression, establishes a corresponding combination group of exposure settings and structural expression, compares the expression differences and judges the exposure adjustment direction, and obtains the exposure time adjustment configuration.
[0112] The spatial offset analysis module uses exposure time to adjust the configuration, analyzes the correspondence of the assembly structure in multi-angle images, calculates the spatial projection vectors of structural points under multiple views, compares the interval of the projection intersection position, determines the spatial offset range, compares it with the error boundary of the combined structure, and obtains the spatial offset residual coefficient.
[0113] The luminous boundary analysis module uses the spatial offset residual coefficient to acquire the edge luminous image of the lit bulb, calculates the gray-level change curve of the light guide plate area, filters the gradient jump position and analyzes the edge pixel offset of adjacent frames, matches gray-level abrupt change with displacement, and generates supervised training discrimination information.
[0114] Based on the supervised training discrimination information, the feature channel adjustment module analyzes the error map of the assembly misalignment, brightness abnormality and surface scratch prediction area during the model training process, calculates the pixel error overlap range, judges the consistency of feature response, filters the error concentration channel and adjusts the convolution sequence arrangement and response weight, and outputs the assembly process detection model.
[0115] The path feedback reconstruction module extracts the structural image within the trajectory window based on the assembly process detection model, calculates the edge connection length and number of interruptions, analyzes the coverage position of continuous segments, identifies unstable edge regions, extracts the current path number and coordinates, reconstructs the image acquisition path, and obtains the trajectory window offset coordinate group.
[0116] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. An AI-based method for inspecting the assembly quality of light bulbs, characterized in that, Includes the following steps: S1: Call the light bulb assembly image, obtain the grayscale contours of multiple regions under the current exposure settings, determine the integrity of the image expression, establish a corresponding combination group of exposure settings and structural expression, compare the expression differences and determine the exposure adjustment direction, and obtain the exposure time adjustment configuration; S2: Using the exposure time adjustment configuration, analyze the correspondence of the assembly structure in multi-angle images, calculate the spatial projection vector of the structural points under multiple views, compare the interval of the projection intersection position, determine the spatial offset range, compare it with the error boundary of the combined structure, and obtain the spatial offset residual coefficient. S3: Using the spatial offset residual coefficient, acquire the edge emission image of the lit bulb, calculate the gray-scale change curve of the light guide plate area, screen the gradient jump position and analyze the edge pixel offset of adjacent frames, match the gray-scale change and displacement, and generate supervised training discrimination information. S4: Based on the supervised training discrimination information, analyze the error map of the assembly misalignment, brightness abnormality and surface scratch prediction area during the model training process, calculate the pixel error overlap range, judge the consistency of feature response, filter the error concentration channel and adjust the convolution sequence arrangement and response weight, and output the assembly process detection model.
2. The AI-based bulb assembly quality inspection method according to claim 1, characterized in that, The exposure time adjustment configuration includes image grayscale distribution combination, structural region clarity comparison item, and exposure setting matching parameters. The spatial offset residual coefficient specifically refers to the structural projection intersection distance, angle projection error group, and fixed structural tolerance reference. The structural deformation supervised training discrimination information specifically includes grayscale jump position data, edge displacement matching item, and luminous region pixel offset record. The assembly process detection model includes task cross error map group, feature channel activation intensity sequence, and channel convolution response configuration.
3. The AI-based bulb assembly quality inspection method according to claim 1, characterized in that, The specific steps for obtaining the exposure time adjustment configuration are as follows: S101: Call the bulb assembly image, obtain the bulb structure image at the corresponding angle under the current exposure setting, extract the grayscale boundary contours of the package boundary, pin position and light-emitting area, calculate the grayscale transition distribution density and edge contour clear length in the area, analyze the correspondence between the grayscale distribution density and edge contour length of the structure area, and establish the structure area expression feature group. S102: Based on the structural region expression feature group, determine the expression integrity of the structural region of the image under the current exposure condition, establish a corresponding combination group between exposure setting and structural image integrity, compare the expression difference of the control exposure setting combination group under each structural region, and establish an exposure and expression combination parameter set. S103: Call the exposure and expression combination parameter set, analyze the direction of expression difference in the structural region, filter the exposure setting group that needs to be adjusted, determine the exposure adjustment direction, and output the exposure time adjustment configuration.
4. The AI-based bulb assembly quality inspection method according to claim 3, characterized in that, The specific steps for obtaining the spatial offset residual coefficients are as follows: S201: Call the exposure time adjustment configuration, collect images of the bulb assembly structure from multiple camera angles, detect the structural points in each viewpoint, calculate the spatial projection vector of the structural points in each viewpoint image, and obtain the spatial projection data set of structural points. S202: Based on the spatial projection data set of the structural points, compare the intersection interval of the projection line segments of the same structural points under multiple views, determine the spatial offset amplitude between each projection path, and filter the projection paths whose offset amplitude is outside the error boundary according to the fixed combination structural parameters to generate a set of spatial projection offset parameters. S203: Based on the set of spatial projection offset parameters, statistically analyze the difference between the offset amplitude and the error boundary, combine the error intervals of the spatial projection, adjust the ray combination, establish a spatial ray combination error group, and obtain the spatial offset residual coefficient.
5. The AI-based bulb assembly quality inspection method according to claim 4, characterized in that, The process of selecting projection paths with offset amplitudes outside the error boundary based on fixed combined structural parameters is as follows: Extract the structural reference spacing, assembly limit angle and allowable fit tolerance from the fixed combination structural parameters. Based on the length and direction of the spatial projection vector of the structural points in each collection batch, calculate the tolerance mapping of the structural reference spacing and assembly limit angle in the projection space, and merge the allowable fit tolerance to establish error boundary parameters. The offset magnitude of each projection path is compared with the error boundary parameter. Projection paths with offset magnitudes greater than the error boundary parameter are marked as offset paths. The identifiers of the offset paths are then associated with their corresponding viewpoint indices to form a set of filtered results.
6. The AI-based bulb assembly quality inspection method according to claim 4, characterized in that, The specific steps for obtaining the supervised training discriminant information are as follows: S301: Using the spatial offset residual coefficient, acquire the edge emission image of the bulb in the lit state, divide the edge region of the light guide plate into multiple angle segments, calculate the grayscale boundary change curve of each angle segment in the continuous image frame, and obtain the angle segment grayscale curve group. S302: Based on the angle segmented grayscale curve group, filter the gradient jump position in each grayscale boundary change curve, determine the pixel position change of the jump point between adjacent frames, analyze the correspondence between jump amplitude and pixel displacement, and generate grayscale jump displacement parameter group. S303: Based on the grayscale jump displacement parameter group, match the grayscale jump amplitude and corresponding edge displacement of each angle segment, integrate the grayscale position corresponding data of each angle segment, output the grayscale position corresponding data required for supervised training, and obtain structural deformation supervised training discrimination information.
7. The AI-based bulb assembly quality inspection method according to claim 6, characterized in that, The specific steps for obtaining the assembly process detection model are as follows: S401: Based on the structural deformation supervision training discrimination information, extract the error map of the assembly misalignment, brightness abnormality and surface scratch prediction area during the model training process, analyze the error coverage of the corresponding image area in the multi-task output results, calculate the pixel error overlap range of the same area in the error map between multiple tasks, and obtain the area error overlap parameter group. S402: Based on the region error coincidence parameter group, determine the consistency of feature response in the multi-task error intersection region, extract the feature channel number in the corresponding region, compare the activation intensity and index order of the feature channel in the convolutional structure, filter the error concentration channel, and obtain the feature channel filtering group. S403: Based on the feature channel filtering group, adjust the convolution sequence arrangement and response weight of the corresponding feature channel group in the feature operation, optimize the response path of the output feature, establish the parameter configuration of the detection model, and output the assembly process detection model.
8. The AI-based bulb assembly quality inspection method according to claim 1, characterized in that, The method further includes: S5: Based on the assembly process detection model, extract the structural image within the trajectory window, calculate the edge connection length and the number of interruptions, analyze the coverage position of continuous segments, identify unstable edge regions, extract the current path number and coordinates, reconstruct the image acquisition path, and obtain the trajectory window offset coordinate group. The trajectory window offset coordinate group specifically refers to the path number index, the image representation stability label, and the adjusted trajectory coordinate set.
9. The AI-based bulb assembly quality inspection method according to claim 8, characterized in that, The specific steps for obtaining the trajectory window offset coordinate group are as follows: S501: Based on the assembly process detection model, obtain the bulb structure image in each trajectory window during the path detection process, extract the structural edge information of each image, calculate the edge connection length and the number of edge interruptions, analyze the spatial distribution of continuous edge segments, and generate an edge continuity distribution parameter set. S502: Based on the edge continuity distribution parameter set, identify regions with unstable edge distribution in the image space, extract the path number and coordinate information of the corresponding trajectory window, evaluate the image representation stability of each path segment under the current detection conditions, and obtain the path representation stability parameter set; S503: Based on the path expression stability parameter set, combined with the current movement direction and angle information of the trajectory segment, adjust the viewpoint offset angle and displacement direction of the detected path segment, reconstruct the acquisition trajectory of the path window, and output the trajectory window offset coordinate set.
10. An AI-based light bulb assembly quality inspection system, characterized in that, The system is used to implement the AI-based bulb assembly quality inspection method according to any one of claims 1-9, the system comprising: The exposure parameter control module calls the bulb assembly image, obtains the grayscale contours of multiple regions under the current exposure setting, judges the integrity of the image expression, establishes a corresponding combination group of exposure settings and structural expression, compares the expression differences and judges the exposure adjustment direction, and obtains the exposure time adjustment configuration. The spatial offset analysis module uses the exposure time adjustment configuration to analyze the correspondence of the assembly structure in multi-angle images, calculates the spatial projection vector of the structural points under multiple views, compares the interval of the projection intersection position, determines the spatial offset range, compares it with the error boundary of the combined structure, and obtains the spatial offset residual coefficient. The light emission boundary analysis module uses the spatial offset residual coefficient to acquire the edge light emission image of the lit bulb, calculate the gray-level change curve of the light guide plate area, screen the gradient jump position and analyze the edge pixel offset of adjacent frames, match the gray-level change and displacement, and generate supervised training discrimination information. Based on the supervised training discrimination information, the feature channel adjustment module analyzes the error map of the assembly misalignment, brightness abnormality and surface scratch prediction area during the model training process, calculates the pixel error overlap range, judges the feature response consistency, filters the error concentration channel and adjusts the convolution sequence arrangement and response weights, and outputs the assembly process detection model. The path feedback reconstruction module extracts the structural image within the trajectory window based on the assembly process detection model, calculates the edge connection length and the number of interruptions, analyzes the coverage position of continuous segments, identifies unstable edge regions, extracts the current path number and coordinates, reconstructs the image acquisition path, and obtains the trajectory window offset coordinate group.