Real-time monitoring method for electrical equipment production assembly line

By combining morphological reconstruction and watershed algorithm with geometric prior scoring rules, the problem of inaccurate image segmentation caused by reflective interference from electrical components is solved, enabling precise monitoring of the assembly quality of electrical components and improving the reliability and accuracy of automated monitoring.

CN120876459BActive Publication Date: 2025-11-25REITER ELECTRIC CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511366716.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-09-24
Publication Date
2025-11-25
Estimated Expiration
2045-09-24

AI Technical Summary

Technical Problem

In existing technologies for automated visual inspection of electrical components, the image segmentation algorithm cannot accurately extract the true contour due to reflective interference, which affects the reliability of assembly misalignment detection.

Method used

Morphological reconstruction methods are used for anti-reflective processing. Combined with the watershed algorithm and geometric prior scoring rules, the outer envelope of electrical components is extracted. Then, the assembly fastening quality coefficient is calculated through cluster analysis and dynamic benchmark learning to achieve real-time monitoring.

Benefits of technology

It improves the image quality of electrical component assembly, ensures the uniqueness and accuracy of contour extraction, enables reliable monitoring of assembly faults, reduces false alarm rate, and improves the environmental adaptability of the production line.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120876459B_ABST
    Figure CN120876459B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of computer vision and image processing, in particular to a real-time monitoring method for electrical equipment production assembly line, which comprises the following steps: firstly, collecting the assembly image of the electrical component to be monitored, and eliminating the highlight artifact through morphological reconstruction technology; then, segmenting the assembly image by using the watershed algorithm, and combining with the geometric priori scoring rule to accurately extract the real envelope line of the component from the segmentation result of the watershed algorithm, and quantifying it into a core point; then, obtaining the target core point by clustering analysis on the core points of historical electrical components; finally, quantifying the assembly quality of the electrical component to be monitored according to the offset of the core point of the electrical component to be monitored relative to the target core point, so as to determine whether there is assembly misplacement. The method avoids the influence of highlight interference and normal fluctuation of the assembly line, and improves the monitoring accuracy of the production assembly line.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer vision and image processing technology. Specifically, it relates to a real-time monitoring method for electrical equipment production assembly lines. Background Technology

[0002] In the electrical equipment manufacturing industry, automated production assembly lines are the core infrastructure for achieving efficient and large-scale production. These lines involve a series of continuous processes, including the precise positioning, assembly, fastening, and wiring of numerous electrical components. Among these, the precise positioning and assembly of electrical components is the cornerstone of all subsequent processes, its importance self-evident. Even a slight misalignment during assembly and fastening can trigger a chain reaction, leading to unstable busbar or conductor connections, poor contact, or even incorrect wiring. This can severely impact the electrical performance and long-term operational safety of the final product, and even pose significant fire or electric shock hazards.

[0003] To control assembly quality, traditional quality inspection methods mainly rely on manual visual sampling on the production line. However, the drawbacks of this method are becoming increasingly apparent: First, manual inspection is inefficient and cannot keep up with the fast pace of modern production lines, creating a bottleneck in the production process; second, the inspection results are easily affected by subjective factors such as the inspector's experience and fatigue, lacking consistency and repeatability.

[0004] To overcome the shortcomings of manual inspection, existing technologies are beginning to explore automated visual inspection solutions. These solutions typically acquire images of assembled electrical components, use image segmentation algorithms to extract the components' outlines, and finally compare the extracted outlines with standard outlines to detect any assembly misalignments.

[0005] However, electrical components on assembly lines are typically made of a composite of various materials, including metals and engineering plastics. Their surfaces, especially metal terminals or smooth plastic casings, are highly susceptible to strong specular reflections under industrial lighting conditions. These highlights create extremely bright artifacts in images, interfering with conventional image segmentation algorithms. Most of these algorithms rely on gradient changes in the image to identify edges, but the gradient at the edges of highlight areas is often more pronounced than the gradient of the component's true physical contour. This causes the algorithm to incorrectly identify the edges of reflective areas as the boundaries of the electrical component. As a result, a complete component surface is incorrectly fragmented into multiple unrelated areas by the algorithm, making it impossible to extract the true, complete outer contour. Consequently, subsequent assembly quality assessments lack a reliable data foundation, preventing automated monitoring solutions from achieving the expected accuracy and stability in practical applications. Summary of the Invention

[0006] To address the problem that existing technologies for automated visual inspection of electrical components suffer from glare interference from the surface of these components, preventing conventional image segmentation algorithms from accurately extracting their true contours and thus affecting the reliability of assembly misalignment monitoring, this invention proposes a real-time monitoring method for electrical equipment production assembly lines. This method includes:

[0007] Taking any electrical component on the production assembly line as the electrical component to be monitored, the assembly image of the electrical component to be monitored is collected, and the assembly image is processed for anti-reflection based on the morphological reconstruction method to obtain an anti-reflection image.

[0008] The anti-reflective image is segmented using a watershed algorithm to generate multiple segmented regions. The boundary lines between these regions are extracted as the segmentation edges of all connected regions. Based on a preset geometric prior scoring rule, the score of each connected segmentation edge as the outer envelope of the electrical component to be monitored is calculated. The connected segmentation edge with the highest score is then determined as the outer envelope of the electrical component to be monitored.

[0009] The average value of the position information of all pixels in the outer envelope of the electrical component to be monitored is calculated as the core point of the electrical component to be monitored; the target core point of the electrical component to be monitored is determined by obtaining the core points of all historical electrical components of the electrical component to be monitored and performing cluster analysis; the assembly fastening quality coefficient of the electrical component to be monitored is determined based on the spatial distance between the core point of the electrical component to be monitored and the target core point.

[0010] In response to the comparison between the assembly fastening quality coefficient of the electrical component to be monitored and the preset judgment threshold, the system monitors in real time whether the assembly of the electrical component to be monitored is misaligned.

[0011] This technical solution utilizes morphological reconstruction technology to deeply cleanse image data. It accurately fills in artifact areas caused by reflections while preserving the true physical contours and texture details of components without loss, eliminating false gradient information that interferes with the algorithm. This provides a high-quality, interference-free image foundation unmatched by existing technologies for subsequent analysis. Furthermore, it uses a watershed algorithm for segmentation to obtain a set of edge contours. By introducing an intelligent filtering mechanism based on geometric common sense, it quantifies the score of each edge contour. Through this scoring, it identifies and extracts the unique and meaningful outer envelope from the complex segmentation results, obtaining the final edge contour of the electrical component. This ensures the uniqueness and accuracy of contour extraction, avoiding inaccurate monitoring results due to incorrect segmentation. Moreover, it reduces the complex outer envelope information to an easily comparable core point. By clustering the core points of multiple assembled electrical components, it learns and extracts a dynamic normal state benchmark from the actual production process. By calculating the spatial distance between the current electrical component's core point and the normal state benchmark, the resulting quality assessment can accurately distinguish between genuine assembly faults and acceptable normal fluctuations on the production line, achieving reliable online monitoring.

[0012] Preferably, the steps for anti-reflective processing of the assembly image include: Step 1: Performing a morphological opening operation on the assembly image to obtain an initial marker image; Step 2: Using the assembly image as a mask image; Step 3: Using the initial marker image as the input marker image for the first iteration, starting the iterative reconstruction process; Step 4: In each iteration, performing a morphological dilation operation on the input marker image for that iteration, and performing a pixel-by-pixel minimum value operation on the dilated image and the mask image to obtain an output marker image; Step 5: Comparing the output marker image obtained in this iteration with the input marker image. If all pixel values ​​of the two are the same, the iteration terminates; otherwise, using the output marker image obtained in this iteration as the input marker image for the next iteration, and repeating Step 4; Step 6: Using the final output marker image obtained at the end of the iteration as the anti-reflective image.

[0013] This technical solution provides a specific and implementable anti-highlight processing workflow. Morphological opening operations first remove all bright spots smaller than the structuring element, but at the cost of darkening the overall image. The subsequent iterative reconstruction process allows the gray values ​​of the suppressed non-highlight regions to be gradually restored to their proper brightness levels, with the gray values ​​of the original image as the upper limit. Highlight regions, because their original gray values ​​are much higher than their neighbors, cannot be restored under the constraint of the "minimum value" operation and are therefore suppressed, thus resolving the inherent contradiction between highlight removal and detail preservation.

[0014] Preferably, the score of each connected segmentation edge as the outer envelope of the electrical component to be monitored is calculated as follows: For each connected segmentation edge, the total number of pixels constituting the connected segmentation edge is calculated as the perimeter feature value of the connected segmentation edge, and the maximum spatial distance between any two pixels of the connected segmentation edge is calculated as the spatial span feature value of the connected segmentation edge; the perimeter feature value and the spatial span feature value are normalized, and the normalized perimeter feature value and the spatial span feature value are multiplied to obtain the score of the connected segmentation edge as the outer envelope of the electrical component to be monitored.

[0015] This technical solution proposes an intelligent screening mechanism based on geometric priors, transforming the physical fact that the real outer contour line dominates in both perimeter and spatial span into a quantitative scoring model. By calculating a comprehensive score for each candidate contour, the model can uniquely and accurately identify the outer envelope line representing the physical boundary of the electrical component from numerous interfering lines caused by internal textures.

[0016] Preferably, the method for obtaining the core points of all historical electrical components to be monitored is the same as the method for obtaining the core points of the electrical component to be monitored, and the electrical component to be monitored is the same type of electrical component as all historical electrical components.

[0017] Preferably, all historical electrical components of the electrical component to be monitored are determined as follows: the M electrical components that were installed before the electrical component to be monitored are taken as all historical electrical components of the electrical component to be monitored, where M is a preset positive integer.

[0018] Preferably, the target core point of the electrical component to be monitored is determined in the following way: the core points of all historical electrical components to be monitored are divided into multiple clusters through cluster analysis; the cluster containing the largest number of samples is taken as the stable cluster, and the centroid of the stable cluster is used to determine the target core point of the electrical component to be monitored.

[0019] This technical solution proposes a dynamic benchmark learning mechanism. By performing cluster analysis on the core points of all historical electrical components, it can automatically identify the dominant data clusters representing stable production states and use the centroid of the cluster as a benchmark. This benchmark is not a static ideal position, but a dynamic center that includes normal minor vibrations of the production line. This enables the system to accurately distinguish between real assembly anomalies and acceptable process fluctuations, thereby improving the robustness of monitoring.

[0020] Preferably, the assembly fastening quality coefficient of the electrical component to be monitored is determined based on the following method: calculating the Euclidean distance between the core point of the electrical component to be monitored and the target core point; using the negative value of the Euclidean distance as the exponent of the natural exponential function, performing exponential function calculation, and determining the calculation result as the assembly fastening quality coefficient of the electrical component to be monitored.

[0021] This technical solution transforms the original error of physical offset into a standardized assembly fastening quality coefficient through the nonlinear mapping of a negative exponential function. This results in the assembly fastening quality coefficient and the physical offset exhibiting an inverse relationship. Furthermore, due to the nonlinear sensitivity of this exponential function, it can disproportionately amplify minute physical offsets caused by tool wear or fixture loosening that are still in their nascent stage, enabling the assembly fastening quality coefficient to accurately reflect the assembly quality.

[0022] Preferably, the judgment threshold is determined based on the following method: obtaining the assembly fastening quality coefficient of the historical electrical components corresponding to each core point contained in the stable cluster to form an assembly fastening quality coefficient set; calculating the mean and standard deviation of the assembly fastening quality coefficient set; subtracting the standard deviation by a preset multiple from the mean of the assembly fastening quality coefficient set, and using the result as the judgment threshold of the assembly fastening quality coefficient.

[0023] Preferably, the method for real-time monitoring of whether the assembly of the electrical component to be monitored is as follows: if the assembly fastening quality coefficient of the electrical component to be monitored is less than the judgment threshold of the assembly fastening quality coefficient, it is determined that there is a misalignment abnormality in the assembly of the electrical component to be monitored, and an early warning signal is generated; if the assembly fastening quality coefficient of the electrical component to be monitored is not less than the judgment threshold of the assembly fastening quality coefficient, it is determined that there is no misalignment abnormality in the assembly of the electrical component to be monitored.

[0024] Preferably, the step of acquiring the assembly image of the electrical component to be monitored is as follows: the image acquisition device is fixed above the assembly and fastening station of the electrical component to be monitored, and the image acquisition device is electrically connected to the control system of the assembly and fastening station through an input / output module to establish a hardware triggering mechanism; the hardware triggering mechanism is used to send a hardware trigger signal to the image acquisition device through the input / output module after the assembly and fastening action is completed, so that the image acquisition device responds to the hardware trigger signal to acquire the surface image of the electrical component to be monitored, and obtains the assembly image.

[0025] The present invention has the following effects:

[0026] This technical solution improves the quality of assembly images of electrical components through anti-reflective processing. Then, it uses geometric prior knowledge to extract the accurate contour edges of the electrical components, providing accurate and reliable contour input for subsequent intelligent monitoring and analysis. Finally, it achieves accurate monitoring of assembly misalignment faults of electrical components through dynamic adaptive judgment thresholds. Attached Figure Description

[0027] Figure 1 This is a schematic diagram of the method flow of the present invention. Detailed Implementation

[0028] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention.

[0029] Reference Figure 1 The specific process includes the following steps:

[0030] S1: Acquire the original assembly image of the electrical components to be monitored.

[0031] Electrical components inside electrical equipment require the connection of numerous busbars, and the arrangement of these busbars has strict requirements. Misalignment in the assembly or fastening of electrical components can lead to problems with the busbar connections, potentially causing safety accidents. Therefore, it is necessary to first acquire images of the assembled and fastened electrical components to facilitate accurate segmentation of the components later.

[0032] Specifically:

[0033] On the production and assembly line of electrical components, any electrical component on the production and assembly line is taken as the electrical component to be monitored. Above the fastening station of the electrical component to be monitored, a high-resolution industrial camera is fixed in a direction perpendicular to the surface of the electrical component. After the fastening operation of the electrical component to be monitored is completed, the surface image of the electrical component to be monitored is acquired as the assembly image.

[0034] To ensure the synchronization and consistency of data acquisition, the industrial camera is electrically connected to the control system of the assembly and fastening equipment via an I / O (input / output) module to establish a hardware triggering mechanism. When the fastening equipment completes the fastening action on a component and returns an action completion signal to the control system, the control system immediately sends a trigger signal to the industrial camera via the I / O module. The camera then performs real-time image acquisition and converts the acquired assembly image to grayscale for subsequent analysis.

[0035] S2: Perform anti-reflective processing on the original assembly image to generate an anti-reflective image.

[0036] Since the outer casing of electrical components is mostly made of engineering plastic and has various metal wiring areas on its surface, it will be subject to strong metallic highlight interference, forming highlight artifacts on the image. If the image is processed directly on the original grayscale image, it will be subject to strong metallic highlight interference, affecting the accuracy of the image segmentation results and making it impossible to accurately extract the true outline of the electrical components.

[0037] This step performs anti-reflective processing on the original assembly image to generate an anti-reflective image. Considering the opening operation processing of morphological techniques, these highlight areas can be eliminated. However, while suppressing highlight areas, the opening operation processing will darken the entire image, which may result in the loss of some real texture details and affect the subsequent segmentation accuracy. Therefore, this step selects to introduce the darkened image after the opening operation as the seed and the original image as the growth limit to restore the original texture details of non-highlight areas and suppress highlight areas, so as to obtain the final anti-reflective image.

[0038] Specifically, this embodiment employs an anti-reflective processing method based on morphological reconstruction, which includes two core stages: initialization and iterative reconstruction, ultimately yielding an anti-reflective image.

[0039] Phase 1: Initialization, generating a marker image to suppress highlights and setting a mask. The goal is to eliminate small areas with high brightness while preserving the general shape of the electrical components, and to prepare the seed (marker image) and reference blueprint (mask image) for subsequent detail restoration.

[0040] S21: Morphological opening operation generates labeled images.

[0041] A morphological opening operation is performed on the assembly image obtained in step S1 to obtain an initial marker image. The physical meaning of the morphological opening operation is to remove all bright spots smaller than its structuring element, thus effectively suppressing highlights. However, its side effect is that it may reduce the contrast of the entire image and lose some real texture details. Therefore, the obtained marker image serves as the starting point for the subsequent restoration process.

[0042] S22: Set the mask image.

[0043] The assembly image obtained in step S1 without morphological processing (step S21) is directly set as a mask image. This mask image retains all the original detail information and will be used as the pixel-level upper limit of the restoration process in the next stage to ensure the fidelity of the restoration.

[0044] The second stage is iterative reconstruction, restoring realistic details under mask constraints. The goal is to use the marker image without highlights obtained in the first stage as a basis, and under the hard constraints of the mask image, to gradually grow or restore the realistic texture details belonging to the non-highlight areas that are suppressed by the opening operation through iterative morphological dilation.

[0045] S23: Start the iteration process.

[0046] The initial labeled image obtained in step S21 is used as the input labeled image for the first iteration, and the iterative reconstruction process is started.

[0047] S24: Perform a single iteration.

[0048] In each iteration, a morphological dilation operation is performed on the input labeled image for that iteration. The physical meaning of the dilation operation is to expand the bright areas in the image, and its function is to restore the gray values ​​of the suppressed non-highlight areas to their original brightness levels. Next, the dilated image is compared with the mask image set in step S22, and a pixel-by-pixel minimum value operation is performed. The result is used as the output labeled image for this iteration. The constraint of the minimum value operation is crucial; it ensures that during the restoration process, the gray value of any pixel cannot exceed its true value in the original image, thus guaranteeing the fidelity of the restoration.

[0049] In one example, the operation of finding the minimum value pixel by pixel is as follows:

[0050] Let A be the image after the dilation operation, and B be the mask image. Using the top-left corner of both A and B as the origin, and the horizontal axis as the x-axis and the vertical axis as the y-axis, take two pixels along each axis to obtain A. Pixels and B Pixels, where the value of each pixel represents its grayscale value (0 represents pure black, 255 represents pure white).

[0051] A's The number of pixels is: (The first pixel in the horizontal direction) (The second pixel in the horizontal direction) (The first pixel in the vertical direction) (The second pixel in the vertical direction);

[0052] B's The number of pixels is: (The first pixel in the horizontal direction) (The second pixel in the horizontal direction) (The first pixel in the vertical direction) (The second pixel in the vertical direction);

[0053] For the first pixel in the horizontal direction, 140 is less than 150, so we take 140; for the second pixel in the horizontal direction, If the value is less than 100, take 90; for the first pixel in the vertical direction, if the value is 120, then take the minimum value of 120; for the second pixel in the vertical direction, if the value is less than 180, take 170.

[0054] After the operation, the resulting output image is The pixel values ​​are: 140 (the first pixel in the horizontal direction) and 90 (the second pixel in the horizontal direction). (The first pixel in the vertical direction), 170 (the second pixel in the vertical direction);

[0055] In summary, the pixel-by-pixel minimum value operation compares the pixel values ​​at the same location in two images sequentially, selecting the smaller pixel value as the new pixel value for that location in the output image. This operation ensures that during the process of restoring details (brightening), the image will never produce artifacts exceeding its original true brightness, thus guaranteeing the fidelity of the information.

[0056] S25: Iteration termination condition.

[0057] Compare the output labeled image obtained in this iteration with the input labeled image. If all pixel values ​​are the same, it means that the image has recovered to a stable state under the constraint of the mask and cannot grow further, at which point the iteration terminates. Otherwise, use the output labeled image obtained in this iteration as the input labeled image for the next iteration and return to repeat step S24.

[0058] S26: Obtain the final result.

[0059] The final output marker image obtained at the end of the iteration is used as the anti-reflective image of the present invention.

[0060] Through this process, the highlight areas, which are suppressed in the initial marked image, cannot be recovered, while the real texture details of the non-highlight areas are restored with high fidelity, thus resolving the contradiction between highlight removal and detail preservation.

[0061] One example demonstrates this iterative process:

[0062] The demonstration is conducted using a small portion of the mask image and the corresponding portion of the input marker image, as well as the corresponding portion of the output marker image. Therefore, during the demonstration, the mask image, the input marker image, and the output marker image all represent a small portion of the image.

[0063] The pixel values ​​of the mask image are: ,in, These are the pixel values ​​of the highlighted area. These are the normal pixel values ​​for the electrical components;

[0064] The pixel values ​​of the input marker image (corresponding to the positions in the mask image) in the first iteration are: [0,135,140,145,145,145,140,0];

[0065] Setting the length of the structuring element in the opening operation process to 3 means that when calculating the value of each pixel, it considers itself and its two immediately adjacent left and right pixels, a total of 3 pixels. A dilation operation is performed on the input labeled image of the first iteration. That is, for each pixel of the input labeled image of the first iteration, the maximum pixel value of the pixel and its two immediately adjacent left and right pixels are obtained, and the maximum pixel value of these 3 pixels is set as the pixel value of that pixel. The dilation result of the input labeled image of the first iteration is: .

[0066] Next, the dilation result of the input labeled image from the first iteration is compared with the mask image using a pixel-by-pixel minimum operation, and the result is used as the output labeled image for the first iteration. The pixel values ​​of the output labeled image are: ;

[0067] The complete iteration results are as follows:

[0068] The pixel values ​​of the marker image output in the first iteration: ;

[0069] The pixel values ​​of the marker image output from the second iteration: ;

[0070] The pixel values ​​of the marker image output in the 3rd iteration: ;

[0071] The pixel values ​​of the marker image output in the 4th iteration: ;

[0072] The pixel values ​​of the marker image output from the 5th iteration: ;

[0073] The pixel values ​​of the marker image output in the 6th iteration: ;

[0074] As can be seen, the output marker image after the 6th iteration is exactly the same as that after the 5th iteration and no longer changes. The iteration terminates, and the grayscale of the non-highlighted pixels eventually recovers to their respective upper limits. The highlight pixels in the assembled image are successfully eliminated.

[0075] S3: Accurately extract the outer envelope of electrical components based on anti-reflective images.

[0076] After acquiring the anti-reflective image, the outlines of electrical components need to be accurately extracted from it. In this embodiment, a watershed algorithm-based segmentation process is performed on the anti-reflective image to generate multiple segmented regions, and the boundary lines between these regions are extracted as the segmentation edges for all connected regions.

[0077] Since internal features such as switches and screw holes on the surface of components can still easily cause the watershed algorithm to oversegment (i.e. generate redundant internal segmentation lines), this embodiment calculates the score of each connected segmentation edge as the outer envelope of the electrical component to be monitored based on the preset geometric prior scoring rules, and determines the connected segmentation edge with the highest score as the outer envelope of the electrical component to be monitored.

[0078] The score for each connected dividing edge, representing the outer envelope of the monitored electrical component, is calculated as follows:

[0079] First, for each connected segmentation edge, calculate the total number of pixels constituting the connected segmentation edge, which is used as the perimeter feature value of the connected segmentation edge. At the same time, calculate the maximum spatial distance between any two pixels of the connected segmentation edge, which is used as the spatial span feature value of the connected segmentation edge.

[0080] Then, the perimeter feature value and the spatial span feature value are normalized, and the normalized perimeter feature value and the spatial span feature value are multiplied together to obtain the score of the connected segmentation edge as the outer envelope of the electrical component to be monitored.

[0081] For example, the The scores of the connected dividing edges, which serve as the outer envelope of the electrical component to be monitored, satisfy the following relationship:

[0082]

[0083] in, For the first Each connected segmentation edge is used as a score for the outer envelope of the electrical component to be monitored. For the first The perimeter feature value of each connected segmented edge reflects the contour length; For the first The spatial span feature value of a connected segmented edge reflects the breadth of the region enclosed by the contour. To find the maximum value function, For the first Each connected segmentation edge is used as a score for the outer envelope of the electrical component to be monitored. The total number of connected dividing edges. For the first The spatial span feature value of the connected dividing edge. The first... The perimeter and spatial span feature values ​​of each connected segmenting edge are divided by their respective maximum values, and then normalized. The normalized perimeter and spatial span feature values ​​are all within the range of... Within the range.

[0084] This method successfully transforms an intuitive common sense in human visual recognition—that "the outer contour of an object is usually the longest of all lines and occupies the widest space"—into two quantifiable, orthogonal geometric features: the perimeter feature value representing the contour length and the spatial span feature value representing the spatial range.

[0085] In the assembly of electrical components, a circular dividing line created by a screw hole may have a reasonable spatial span but a very short perimeter; while a thin dividing line created by surface engraving may have a long perimeter but a very small spatial span. By multiplying these two normalized feature values ​​to calculate the score, the model ensures that only contours that dominate in both dimensions simultaneously (i.e., the true outer envelope) can obtain the highest score.

[0086] By fusing the scores calculated from these two dimensions, a highly efficient filter can be used to automatically and objectively eliminate all interference caused by internal features from numerous candidate contours, uniquely and accurately identifying the outer envelope representing the physical boundary of the component. This step is crucial because it resolves the ambiguity and uncertainty of the segmentation results, providing reliable and unambiguous data input for all subsequent steps regarding core point calculation and position offset evaluation.

[0087] Typically, the true outer envelope dominates in both perimeter and spatial span, thus scoring the highest. Therefore, if a connected dividing edge scores the highest as the outer envelope of the electrical component to be monitored, that connected dividing edge is taken as the outer envelope of the electrical component to be monitored.

[0088] In summary, this step proposes an intelligent screening mechanism based on geometric priors. Its core significance lies in providing a simple and efficient mathematical method for machines to accurately identify the true physical boundaries from the oversegmentation results caused by internal features such as switches and screw holes on the surface of electrical components.

[0089] S4: Calculate the core point based on the outer envelope and quantify the assembly fastening quality coefficient.

[0090] For electrical components, the outer envelope is the direct geometric representation of the assembly state. The final overall outline (i.e., the outer envelope) of a component assembled from multiple parts is determined by the relative positions and orientations of all the parts.

[0091] In an ideal assembly state, when all parts are precisely and securely fastened together according to design requirements—for example, screws are tightened vertically, washers are flat, and components are aligned—the resulting envelope will exhibit a regular, symmetrical, and smooth ideal shape. However, if there are quality issues in the assembly, such as tilted screws, misaligned parts, insufficient torque leading to loosening, or excessive torque causing deformation, these microscopic defects will inevitably propagate to the macroscopic level, resulting in irregular distortions in the final envelope, such as localized bulges, skewing, asymmetry, or an uneven contour.

[0092] Since the quality of assembly directly affects the geometry of the outer envelope, conversely, by accurately measuring the geometric characteristics of the outer envelope, assembly quality can be quantified. The geometry of the outer envelope is a reliable external macroscopic representation of internal assembly quality. By accurately analyzing the shape characteristics of the outer envelope, it is possible to deduce whether the internal components are properly assembled and secured, thereby achieving an assessment of assembly quality.

[0093] Therefore, after determining the unique outer envelope, this step will evaluate the assembly quality by analyzing the outer envelope, specifically including:

[0094] S41: Calculate the core points of the electrical components to be monitored.

[0095] Using the top-left corner of the assembly image as the origin, with the horizontal axis pointing to the right and the vertical axis pointing downwards, a coordinate system is constructed to obtain the position information (position coordinates) of all pixels on the outer envelope of the electrical component to be monitored. A complete outer envelope is a complex, high-dimensional set of hundreds or thousands of pixel coordinates. By calculating the average value of the position information of all pixels on the outer envelope, this complex set of position information is condensed into a statistically representative position coordinate, i.e., the core point. Essentially, this is an efficient data dimensionality reduction, using a simple point to represent a complex shape.

[0096] S42: Determine the target core point of the electrical component to be monitored.

[0097] This paper proposes a data-driven dynamic benchmark learning mechanism. By clustering the core points of recently assembled components of the same type, the mechanism intelligently selects the stable cluster with the largest number of samples and uses its centroid as the target core point. Statistical methods are used to identify the dominant and stable states in the production process. The established benchmark is a stable center that includes normal micro-vibrations of the production line. This allows subsequent deviation calculations to accurately distinguish between actual assembly anomalies caused by fixture loosening, locating pin wear, etc., and acceptable process fluctuations. This improves the environmental adaptability and reliability of the monitoring system and effectively reduces the false alarm rate.

[0098] Specifically, the M previously assembled electrical components preceding the electrical component to be monitored are considered as all historical electrical components of the component to be monitored. These historical electrical components are of the same type as the component to be monitored, and their core points are obtained using the same method. Cluster analysis (such as iterative self-organizing clustering) is used to divide the core points of all historical electrical components into multiple clusters, and the cluster with the largest number of samples is designated as the stable cluster. The centroid of this stable cluster is then determined as the target core point of the component to be monitored. Here, M is a preset positive integer, with M=120, to ensure that the sample size is sufficient to reflect the recent process status while avoiding early process fluctuations.

[0099] S43: Calculate the assembly and fastening quality coefficient of the electrical component to be monitored.

[0100] The specific determination method is as follows: calculate the Euclidean distance between the core point of the electrical component to be monitored and the target core point; use the negative value of the Euclidean distance as the exponent of the natural exponential function, perform exponential function calculation, and determine the calculation result as the assembly fastening quality coefficient of the electrical component to be monitored.

[0101] The assembly and fastening quality coefficient of the electrical component to be monitored satisfies the following relationship:

[0102]

[0103] In this formula, The assembly and fastening quality coefficient of the electrical component to be monitored. It is a natural exponential function. As the core of the target, The core component of the electrical appliance to be monitored. for and The smaller the Euclidean distance between them, the smaller the difference between the assembly tightness of the monitored electrical component and the recently successfully assembled electrical components, indicating better assembly tightness and a higher assembly tightness quality coefficient, and vice versa. Therefore, by... Establish a negative correlation between Euclidean distance and assembly fastening quality coefficient.

[0104] The calculation of the assembly tightness quality coefficient of the monitored electrical component here transforms minute changes in the physical state of the assembly tools into a quantifiable, highly sensitive quality indicator. In high-precision assembly scenarios for electrical equipment, when fixtures on the assembly line begin to loosen slightly, or when locating pins experience imperceptible wear due to long-term use, these physical changes directly lead to a slight shift in the final fastening position of the electrical component. This means the Euclidean distance between the core point of the monitored electrical component and the target core point increases. (Negative exponential function) It exhibits extremely high sensitivity to deviations near the zero point (i.e., the point where the Euclidean distance corresponding to the ideal assembly position is minimized). This means that a tiny physical deviation caused by tool wear can immediately lead to a disproportionately large decrease in the quality coefficient. It can detect trend-based deterioration in the assembly process earlier than manual visual inspection or traditional linear models, thus providing early warnings before a large number of defective products are produced, prompting operators to check and maintain potentially problematic tooling fixtures. This early fault insight based on mathematical models plays a role in ensuring the long-term reliability and safety of electrical equipment connections and improving the quality control level of assembly lines.

[0105] S5: Real-time monitoring based on assembly fastening quality coefficient and adaptive threshold.

[0106] After obtaining the assembly fastening quality coefficient, this embodiment responds to the comparison result between the assembly fastening quality coefficient of the electrical component to be monitored and the preset judgment threshold to monitor in real time whether the assembly of the electrical component to be monitored is misaligned.

[0107] First, determine the judgment threshold:

[0108] Obtain each core point contained in the stable cluster and its corresponding historical electrical component assembly fastening quality coefficient to form an assembly fastening quality coefficient set.

[0109] Calculate the mean of the set of assembly fastening quality coefficients. and standard deviation ;

[0110] Subtract the standard deviation of a preset multiple from the mean of the set of assembly fastening quality coefficients, and use the result as the judgment threshold T for the assembly fastening quality coefficient, for example, set to 1. This corresponds to the three-standard-deviation rule in statistics. .

[0111] Then, real-time monitoring is performed: if the assembly tightness quality coefficient C of the current electrical component to be monitored is less than the judgment threshold T, it is determined that there is a misalignment abnormality in the assembly of the electrical component to be monitored, and an early warning signal is generated, for example, an alarm signal is sent to the control system; if C is not less than T, it is determined that there is no misalignment abnormality in the assembly of the electrical component to be monitored.

[0112] In summary, this invention overcomes the monitoring challenges of existing technologies in high-light interference and dynamic production line environments through a complete technical solution, thereby improving the accuracy of electrical equipment assembly monitoring.

[0113] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A real-time monitoring method for an electrical equipment production assembly line, characterized in that, include: Take any electrical component on the production assembly line as the electrical component to be monitored, and collect the assembly image of the electrical component to be monitored. Anti-reflective processing of assembly images based on morphological reconstruction methods to obtain anti-reflective images includes: Step 1: Performing a morphological opening operation on the assembly image to obtain an initial marker image; Step 2: Using the assembly image as a mask image; Step 3: Using the initial marker image as the input marker image for the first iteration, starting the iterative reconstruction process; Step 4: In each iteration, performing a morphological dilation operation on the input marker image of that iteration, and performing a pixel-by-pixel minimum operation on the dilated image and the mask image to obtain an output marker image; Step 5: Comparing the output marker image obtained in this iteration with the input marker image. If all pixel values ​​of the two are the same, the iteration terminates; otherwise, the output marker image obtained in this iteration is used as the input marker image for the next iteration, and Step 4 is repeated; Step 6: Using the final output marker image obtained at the end of the iteration as the anti-reflective image. Adversarial reflective images are segmented using a watershed algorithm to generate multiple segmented regions, and the boundaries between these regions are extracted as the segmentation edges for all connected regions. Based on the preset geometric prior scoring rules, the score of each connected segmentation edge as the outer envelope of the electrical component to be monitored is calculated, including: for each connected segmentation edge, the total number of pixels constituting the connected segmentation edge is calculated as the perimeter feature value of the connected segmentation edge, and the maximum spatial distance between any two pixels of the connected segmentation edge is calculated as the spatial span feature value of the connected segmentation edge; the perimeter feature value and the spatial span feature value are normalized, and the normalized perimeter feature value and the spatial span feature value are multiplied to obtain the score of the connected segmentation edge as the outer envelope of the electrical component to be monitored; The highest-scoring connected segmentation edge is identified as the outer envelope of the electrical component to be monitored. The average value of the position information of all pixels in the outer envelope of the electrical component to be monitored is calculated as the core point of the electrical component to be monitored; the target core point of the electrical component to be monitored is determined by obtaining the core points of all historical electrical components of the electrical component to be monitored and performing cluster analysis; the assembly fastening quality coefficient of the electrical component to be monitored is determined based on the spatial distance between the core point of the electrical component to be monitored and the target core point. In response to the comparison between the assembly fastening quality coefficient of the electrical component to be monitored and the preset judgment threshold, the system monitors in real time whether the assembly of the electrical component to be monitored is misaligned.

2. The real-time monitoring method according to claim 1, characterized in that, The method for obtaining the core points of all historical electrical components of the electrical component to be monitored is the same as the method for obtaining the core points of the electrical component to be monitored, and the electrical component to be monitored and all its historical electrical components are of the same type.

3. The real-time monitoring method according to claim 1, characterized in that, All historical electrical components to be monitored were determined based on the following method: The M electrical components that were already installed before the electrical component to be monitored are taken as all the historical electrical components of the electrical component to be monitored, where M is a preset positive integer.

4. The real-time monitoring method according to claim 1, characterized in that, The target core points of the electrical components to be monitored are determined based on the following method: Cluster analysis was used to divide the core points of all historical electrical components to be monitored into multiple clusters; the cluster with the largest number of samples was selected as the stable cluster, and the centroid of the stable cluster was used to determine the target core point of the electrical component to be monitored.

5. The real-time monitoring method according to claim 1, characterized in that, The assembly and fastening quality coefficient of the electrical component to be monitored is determined based on the following method: Calculate the Euclidean distance between the core point of the electrical component to be monitored and the target core point; The negative value of the Euclidean distance is used as the exponent of the natural exponential function. The exponential function operation is performed, and the result is determined as the assembly tightness quality coefficient of the electrical component to be monitored.

6. The real-time monitoring method according to claim 4, characterized in that, The decision threshold is determined based on the following method: Obtain the assembly and fastening quality coefficients of historical electrical components corresponding to each core point in a stable cluster, forming a set of assembly and fastening quality coefficients. Calculate the mean and standard deviation of the set of assembly fastening quality coefficients; The standard deviation of the assembly fastening quality coefficient set is subtracted from the mean of the set of assembly fastening quality coefficients, and the result is used as the judgment threshold of the assembly fastening quality coefficient.

7. The real-time monitoring method according to claim 6, characterized in that, The method for real-time monitoring of whether the electrical components to be monitored are misaligned is as follows: If the assembly tightness quality coefficient of the electrical component to be monitored is less than the judgment threshold of the assembly tightness quality coefficient, it is determined that there is a misalignment abnormality in the assembly of the electrical component to be monitored, and an early warning signal is generated; if the assembly tightness quality coefficient of the electrical component to be monitored is not less than the judgment threshold of the assembly tightness quality coefficient, it is determined that there is no misalignment abnormality in the assembly of the electrical component to be monitored.

8. The real-time monitoring method according to claim 1, characterized in that, The steps for acquiring assembly images of the electrical components to be monitored are as follows: the image acquisition device is fixed above the assembly and fastening station of the electrical components to be monitored; the image acquisition device is electrically connected to the control system of the assembly and fastening station through an input / output module to establish a hardware triggering mechanism; the hardware triggering mechanism is used to send a hardware trigger signal to the image acquisition device through the input / output module after the assembly and fastening action is completed, so that the image acquisition device responds to the hardware trigger signal to acquire the surface image of the electrical components to be monitored, thereby obtaining the assembly image.

Citation Information

Patent Citations

  • Steel size measurement method based on watershed algorithm

    CN116245837A

  • Stranded wire production quality monitoring method and system based on machine vision

    CN120339270A