Colloid visual identification method for gluing rear cover of air suspension controller

By performing a series of image processing and feature fusion techniques on the colloid images collected by the colloid detection system, the problem of insufficient colloid image quality is solved, and the detection accuracy of colloid parameters is significantly improved.

CN119904608APending Publication Date: 2025-04-29浙江金麦特自动化系统有限公司

Patent Information

Application Number
CN202411958974.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-30
Publication Date
2025-04-29

AI Technical Summary

Technical Problem

The existing colloid detection system has shortcomings in colloid image quality, which affects the detection accuracy of colloid parameters.

Method used

Colloid images are collected through industrial cameras, grayscale processing, image segmentation, histogram equalization, image denoising enhancement, and multi-scale feature fusion, and Laplace edge detection is finally performed to output state information of the width and height of the colloid.

Benefits of technology

It effectively improves the quality of colloid images, improves the accuracy of colloid parameters, and enhances the accuracy of detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119904608A_ABST
    Figure CN119904608A_ABST
Patent Text Reader

Abstract

The invention discloses a colloid visual identification method for gluing a rear cover of an air suspension controller, and the method comprises the following specific colloid visual identification steps: collecting an image of colloid on the rear cover of the controller after the colloid is projected by a light source, carrying out the graying processing of the obtained image through an image processing module, carrying out the image segmentation of the image after the graying processing, and carrying out the visual identification of the colloid on the rear cover of the controller. Obtaining a first image; performing sharpening enhancement processing on the image through histogram equalization to obtain a second image, inputting the first image into an image neural network for image denoising enhancement, and marking the output image as a third image; and fusing the second image and the third image through a multi-scale feature fusion technology, carrying out Laplace edge detection on the fused image, and outputting state information of the width and height of the colloid according to the contour edge of the rear cover frame and the contour edge of the colloid shadow. According to the invention, the quality of the colloid image can be effectively improved, parameters of the colloid can be better identified and detected, and the accuracy of identification and detection is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the field of colloid detection systems, and in particular to a colloid visual recognition method for glue coating on a rear cover of an air suspension controller. Background Art

[0002] With the improvement of automation, automatic gluing system gradually replaces manual gluing. In order to facilitate the detection of colloid, visual recognition is used to detect colloid. Existing colloid detection systems, such as the Chinese invention patent with publication number CN115106260A, disclose an automatic gluing and detection method based on 3D vision, including the following steps: S1: The 3D vision sensor is installed at the end of the industrial robot arm. Before the system works, the robot and the 3D vision sensor are calibrated; S2: Before the system works, the glue path to be detected is divided into N sections according to the gluing process. The robot teaches the path to be detected and sets a signal point at the position where each section of gluing is completed. When the robot program executes to the signal point position, the glue section number, the end position of the glue gun, and the glue gun pressure value are output and transmitted to the upper computer vision system. S3: Before the system works, the upper computer vision software sets relevant parameters according to the glue segment information of S2; S4: When the system works, the upper computer vision software turns on the four cameras on the 3D vision sensor and sets the four laser lines to be always on; S5: According to the preset glue segment parameters of S3, two cameras in the glue coating direction are selected to collect images, and the 3D vision sensor extracts the laser line data in the two camera images and generates point cloud data respectively, which are transmitted to the upper computer software in real time; S6: The upper computer vision software receives the point cloud data transmitted by the 3D sensor in real time, and along the glue coating direction, on the one hand, calculates the distance between the glue gun and the glue coating position point according to the point cloud data of the front-end camera, and calculates the offset in the Z direction through the pid algorithm according to the calculated Z direction height and the preset Z direction height;

[0003] S7: The host computer software calculates the glue height, glue width, and glue volume in real time based on the point cloud data of the back-end camera, where the glue height is the maximum height from the reference plane, the glue width is the projection of the glue strip on the reference plane, and the glue volume is calculated by the section method; S8: Repeat S5 to achieve real-time detection. This system mainly connects the 3D vision sensor to the host computer through a network cable, avoiding the connection of multiple cameras to the host computer, reducing the complexity of wiring, and reducing the work cycle. However, in actual colloid detection, the quality of the obtained colloid image will affect the detection of various colloid parameters. Therefore, improving the quality of the colloid image can effectively improve the detection of colloid parameters. Summary of the invention

[0004] The purpose of the present invention is to provide a method for visually identifying colloids coated with glue on the rear cover of an air suspension controller. The present invention can effectively improve the quality of colloid images, help to better identify and detect colloid parameters, and improve the accuracy of identification and detection.

[0005] The technical solution of the present invention is a colloid visual recognition method for the glue coating on the rear cover of an air suspension controller, comprising the following steps:

[0006] Step 1: firstly, an industrial camera is used to capture an image of the colloid on the rear cover of the controller after being projected by a light source, and an image processing module performs grayscale processing on the obtained image, and then performs image segmentation on the grayscale processed image to obtain a first image for highlighting the edge of the rear cover shell;

[0007] Step 2: sharpening and enhancing the image by histogram equalization to obtain a second image for highlighting the edge of the rear cover shell, and then calling the first image;

[0008] Step 3: Input the first image into the graph neural network for image denoising and enhancement, and mark the output image as the third image;

[0009] Step 4: Fuse the second image and the third image using multi-scale feature fusion technology, and then perform Laplace edge detection on the fused image to detect the contour edge of the back cover frame and the contour edge of the colloid shadow, and output the status information of the width and height of the colloid based on the contour edge of the back cover frame and the contour edge of the colloid shadow.

[0010] In the above-mentioned colloid visual recognition method for the glue coating on the rear cover of the air suspension controller, in step 2, the histogram equalization method of the image is to use the weighted average method to process the pixels of the original image to obtain the grayscale value of the original image, and then map all grayscale values ​​to the corresponding grayscale value range, and then calculate the probability of occurrence of each grayscale level and the frequency distribution of each grayscale level in the image according to the statistical number of pixels to obtain the cumulative distribution function, and then map the value of the cumulative distribution function to the grayscale value range, calculate the transformed grayscale value, and use the normalization mapping function to redistribute the original grayscale column level, use the mapping relationship to replace the original grayscale value with the new grayscale value, output the equalized second image, and display its histogram, and use the equalization processing to change the grayscale histogram distribution of the second image into an approximately uniform distribution through the cumulative distribution function, enhance the contrast of the second image, and make the boundary contour of the outer contour in the arc-shaped bright area more obvious.

[0011] In the aforementioned colloid visual recognition method for the glue coating on the rear cover of the air suspension controller, in step 3, the graph neural network has a hybrid attention mechanism, and the graph neural network has a hybrid attention mechanism, and the hybrid attention mechanism includes global attention, local attention, channel attention and hybrid attention fusion; the global attention uses the self-attention mechanism to strengthen the globally important features by calculating the correlation of each pixel in the feature map to other pixels; the local attention is to perform local weighting through local convolution kernels to extract neighborhood information; the channel attention is a weighted mechanism based on feature channels, which enhances the attention to key channels by learning the importance weight of each channel, while suppressing the influence of unimportant channels; the hybrid attention fusion is to output the corresponding third image by weighted fusion of global attention, local attention and channel attention.

[0012] In the aforementioned colloid visual recognition method of the glue coating on the rear cover of the air suspension controller, the internal process of the channel attention includes three links: global feature extraction, weight generation and channel weighting; the global feature extraction is to compress the spatial dimension into a single value using global average pooling or global maximum pooling operations, thereby extracting global features; the weight generation is to learn the weight of each channel through a fully connected layer or a multi-layer perceptron; the channel weighting is to re-apply the generated weight to each channel, and realize channel weighting by element-by-element multiplication.

[0013] In the aforementioned colloid visual recognition method of the glue coating on the rear cover of the air suspension controller, in step 4, the multi-scale feature fusion technology uses the Laplacian pyramid to fuse the second image and the third image, and the fusion process can be expressed as:

[0014] LFI=FusionRule(LAL,LBL);

[0015] Wherein, FusionRu1e represents the fusion rule; LA1 and LBl are the first layer images obtained after the source images A and B are decomposed by the Laplace pyramid; LF1 is the fusion result;

[0016] The fused Laplacian pyramid image is reconstructed according to the inverse process of pyramid generation to obtain the final fused image. The reconstruction formula is as follows:

[0017] GFI=PyUp(GFI-1)+LFI;

[0018] Among them, GF1 is the fused Gaussian pyramid layer 1 image; PyrUp represents the upsampling operation; GF1-1 is the fused Gaussian pyramid image of the previous layer with a lower resolution; LF1 is the Laplacian pyramid fused image of the current layer.

[0019] In the aforementioned colloid visual recognition method for the glue coating on the rear cover of the air suspension controller, in step 4, the process of Laplace edge detection is as follows: first, the image is preprocessed by denoising and enhancement to improve the accuracy and stability of edge detection, and then the Laplace operator is applied to the preprocessed image, the second-order derivative of the image is calculated, and the position of the edge is determined based on the result of the second-order derivative, and finally the measured edge is post-processed by refinement and connection to obtain a clear and accurate edge image.

[0020] In the aforementioned colloid visual recognition method for the glue coating on the rear cover of the air suspension controller, in step 4, the colloid width measurement includes the colloid straight edge width measurement and the colloid arc edge width measurement; the straight edge width measurement is to compare the pixel width of the contour edge of the colloid shadow with the pixel of the calibration block in proportion, so as to calculate the actual width of the colloid; the arc edge width measurement is to find the arc edge point of the contour edge of the colloid shadow through Hough transform, and determine the width of the colloid arc edge by the distance between the straight lines where the points on the inner and outer arcs of the colloid are located, and the formula is as follows:

[0021]

[0022] Where d is the distance between the parallel lines where the points on the inner and outer arcs are located. The boundary points on the inner arc are P1 (x1, y1) and P2 (x2, y2), and the boundary points on the outer arc are P3 (x3, y3) and P4 (x4, y4).

[0023] In the aforementioned colloid visual recognition method for the glue coating on the rear cover of the air suspension controller, in step 4, the colloid height measurement adopts the shadow ranging method, and the point light source illuminates the colloid, and the colloid shadow is projected on the projection surface. The projection relationship is as follows:

[0024]

[0025] Where h is the height of the colloid, L P is the shadow length of the colloid, d s is the horizontal distance from the point light source to the projection point, z s is the position of the point light source in the z-axis direction.

[0026] Compared with the prior art, the present invention first performs image segmentation on the image that has completed grayscale processing to obtain a first image, then performs sharpening and enhancement processing on the image through histogram equalization to obtain a second image for highlighting the edge of the back cover shell, and inputs the first image into a graph neural network for image denoising and enhancement to obtain a third image, and fuses the second image and the third image through multi-scale feature fusion technology, and performs Laplace edge detection on the fused image to detect the contour edge of the back cover frame and the contour edge of the colloid shadow, and outputs the state information of the width and height of the colloid according to the contour edge of the back cover frame and the contour edge of the colloid shadow; by gradually analyzing the colloid image, a plurality of different colloid images are obtained, and the images are fused to obtain a higher quality image, which is helpful to better identify the parameters of the detected colloid and improve the accuracy of recognition and detection. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] Figure 1 It is a schematic diagram of the overall process of the present invention;

[0028] Figure 2 It is a flowchart of the image histogram equalization method;

[0029] Figure 3 Flowchart of the hybrid attention mechanism;

[0030] Figure 4 Schematic diagram of colloid shadow ranging. DETAILED DESCRIPTION

[0031] The present invention will be further described below in conjunction with the accompanying drawings and embodiments, but they are not intended to limit the present invention.

[0032] Embodiment: A method for visually identifying the colloid coated on the rear cover of an air suspension controller comprises the following steps:

[0033] Step 1: firstly, an industrial camera is used to collect an image of the colloid on the back cover of the controller after being projected by a light source, and an image processing module performs grayscale processing on the obtained image, and then performs image segmentation on the image after the grayscale processing to obtain a first image;

[0034] Step 2: sharpening and enhancing the image by histogram equalization to obtain a second image for highlighting the edge of the rear cover shell;

[0035] Step 3: Input the first image into the graph neural network for image denoising and enhancement, and mark the output image as the third image;

[0036] Step 4: Fuse the second image and the third image through multi-scale feature fusion technology, and then perform Laplace edge detection on the fused image to detect the contour edge of the back cover frame and the contour edge of the colloid shadow, then measure the width and height of the colloid, and finally output the status information of the width and height of the colloid.

[0037] Since the processing workshop is a dust-free workshop, the color of the back cover shell is silver-white, and the color of the colloid is black. The difference between the object images is obvious. However, since the inner groove of the back cover shell is chamfered, the arc surface after chamfering appears white exposure points after being irradiated by the light source, which affects the edge recognition of the image, causing the back cover image to degenerate and reduce the color fidelity. Therefore, in step 2, the second image is obtained by the histogram equalization method. The process is as shown in the attached figure. Figure 2 As shown; the histogram equalization method of the image mainly includes grayscale image, image grayscale column level, grayscale probability calculation, cumulative histogram calculation, normalization mapping, application of grayscale transformation and histogram equalization:

[0038] (1) Grayscale image

[0039] The pixels of the original image are processed using the weighted average method, that is, the grayscale value is calculated using the weighted average method to assign different weights to the three color channels of red (R), green (G), and blue (B), and then the weighted average is performed to obtain a grayscale value. The formula is as follows:

[0040] Y = 0.299R + 0.587G + 0.144B;

[0041] In the formula, Y represents the gray value, R, G, B represent the red, green, and blue component values ​​of each pixel in the color image;

[0042] (2) Image grayscale level

[0043] Count the grayscale values ​​of the original image and map all grayscale values ​​to the corresponding grayscale value range [0,255];

[0044] (3) Cumulative histogram calculation

[0045] According to the number of pixels counted, the probability of each gray level appearing is calculated, that is, the number of pixels of the gray level divided by the total number of pixels in the image. The formula is as follows:

[0046]

[0047] Where P(g) is the probability of gray level g, n g is the number of times the gray level g appears in the image, and N is the total number of all images;

[0048] (4) Cumulative distribution function calculation

[0049] Count the frequency distribution P(g) of each gray level in the image, where g is the gray level. Calculate the cumulative distribution function (CDF), the calculation formula of the cumulative distribution function is as follows:

[0050]

[0051] F(g) represents the cumulative probability of pixels below the gray value g, and the value range of F(g) is 0 to 1;

[0052] (5) Normalized mapping

[0053] Map the value of the cumulative distribution function to the range of [0,255] and calculate the grayscale value after transformation. The calculation formula is as follows:

[0054]

[0055] In the formula, s K is the gray value after transformation, F(x k ) is the independent variable of the normalization function, F min is the minimum value of the cumulative distribution function (non-zero), L is the number of gray levels, L = 256;

[0056] The normalized mapping function is used to redistribute the original grayscale column levels, that is, the grayscale value range with high frequency is stretched, and the grayscale value range with low frequency is compressed, so as to generate an equalized image for each pixel in the image;

[0057] (6) Apply grayscale transformation

[0058] Use the aforementioned normalized mapping relationship to replace the original grayscale value with the new grayscale value;

[0059] (7) Histogram equalization image

[0060] The equalized second image is output and its histogram is displayed. The grayscale histogram distribution of the second image is changed into an approximately uniform distribution through a cumulative distribution function by equalization processing, and the contrast of the second image is enhanced so that the outer contour is more obvious at the boundary contour of the arc-shaped bright area.

[0061] In step 3, the graph neural network has a hybrid attention mechanism, which combines the three attention mechanisms of global attention, local attention and channel attention. The specific process is as shown in the attached Figure 3 As shown:

[0062] (1) Global attention: Use self-attention or transformer modules to capture long-range dependencies between pixels in the global scope. The self-attention mechanism strengthens the globally important features by calculating the relevance of each pixel to other pixels in the feature map. The calculation formula is as follows:

[0063]

[0064] Where Q, K, and V are the feature maps of query, key, and value, respectively; d k is the feature dimension; the softmax operation is applied to the relationship between adjacent pixels to highlight the correlation between adjacent pixels;

[0065] In the process of image denoising, global attention helps to accurately restore important details;

[0066] (2) Local attention: Local weighting is performed through local convolution kernels to extract neighborhood information. Assume that the image feature map is X∈R C×H×W , where C is the number of channels, H and W are the height and width of the image, and the formula is as follows:

[0067]

[0068] Where X(i, j) is the feature of the image at position (i, j); W(m, n) is a local convolution kernel used to calculate the weight in the local area; ∑ m,n It represents the weighted summation of neighborhood features in a small local window (3×3 or 5×5); Z(i, j) is a normalization factor used to ensure that the sum of attention weights is 1, and all attention weights are normalized. The weighted process of local attention is to multiply the attention weight by the feature map, and its formula is expressed as X local (i, j) = A local (i, j)·X(i, j);

[0069] (3) Channel attention: Based on the weighted mechanism of feature channels, by learning the importance weight of each channel, we can enhance the attention to key channels while suppressing the influence of unimportant channels. The channel attention model is used to assign weights to each channel and dynamically adjust its contribution to the final output. Assume that the image feature map is X∈R C×H×W , where C is the number of channels, H and W are the height and width of the image, and the formula is as follows:

[0070] X′ C (i, j)=σ(W2·δ(W1·GAP(X)))⊙X;

[0071] In the formula, X′ C (i, j) is the weighted eigenvalue; GAP(X) extracts global features; ⊙ represents channel-by-channel weighting; W1 and W2 are trainable weight matrices; δ is the ReLU activation function, and σ is the sigmoid function.

[0072] The internal process of the hybrid attention mechanism includes three steps: global feature extraction, weight generation, and channel weighting;

[0073] (1) Global feature extraction: Using global average pooling or global maximum pooling operations, the spatial dimension H×W is compressed into a single value to extract global features. The calculation formula is as follows:

[0074]

[0075] In the formula, Z c is the global description factor of channel c, X c (i, j) is the eigenvalue of channel c at position (i, j);

[0076] (2) Weight generation: The channel weighting method uses a fully connected layer or a multi-layer perceptron to learn the weight of each channel. The calculation formula is as follows:

[0077] W C =σ(W2·δ(W1·Z));

[0078] Where W c is the weight matrix of channel c, W1 and W2 are trainable weight matrices, set to R C×r and R r×C , where r is the reduction ratio, which reduces the number of parameters by adjusting the ratio; δ is the activation function ReLU, σ is the sigmoid function, and the weights are normalized to [0, 1];

[0079] (3) Channel weighting: The generated weight ω is reapplied to each channel, and channel weighting is achieved by element-by-element multiplication, resulting in the following formula:

[0080] X′ C (i, j) = ω c ·X C (i, j);

[0081] In the formula, X′ c (i, j) is the weighted eigenvalue; ω c is the channel weight;

[0082] The output feature X′ is obtained by channel weighting.

[0083] The hybrid attention module in the hybrid attention mechanism obtains the following formula by weighted fusion of the three mechanisms of global attention, local attention and channel attention:

[0084] A hybrid =α·A global +β·A local +γ·A channel ;

[0085] In the formula, α, β, γ are weight parameters, which can be adjusted dynamically. hybridExpressed as mixed attention, A global Represented as global attention, A channel It is denoted as channel attention.

[0086] In two-dimensional images, the Laplacian operator is defined as the gradient Divergence It is a second-order differential linear operator. It determines the position of the edge by calculating the second-order derivative of each pixel in the image. The pixel with a larger second-order derivative is defined as the edge pixel. The Laplace operator uses the second-order derivative of the gray value of the image to detect the edge.

[0087] When implementing Laplace edge detection, a discretized Laplace operator template is used to perform convolution operations on the image. Commonly used Laplace operator templates are 3x3 and 5x5, of which the 3x3 template is the most commonly used; through the convolution operation of the template and the image, the second-order derivative value of each pixel can be obtained, and then a certain threshold is used to determine whether the pixel is an edge point.

[0088] In step 4, the Laplace edge detection is implemented by the following steps:

[0089] 1. Image preprocessing: Before performing Laplace edge detection, the image needs to be preprocessed, such as denoising and enhancement, to improve the accuracy and stability of edge detection;

[0090] 2. Apply the Laplace operator: Apply the Laplace operator to the preprocessed image and calculate the second-order derivative of the image. This step can be achieved through convolution operation, that is, convolution operation is performed on the image using the Laplace convolution kernel;

[0091] 3. Edge detection: According to the result of the second-order derivative, the position of the edge of the back cover is determined. The extreme point or zero point of the second-order derivative corresponds to the position of the edge.

[0092] 4. Post-processing: Post-process the detected edges, such as thinning and connection, to obtain a clearer and more accurate edge image.

[0093] In a two-dimensional image, the Laplacian operator is represented as a convolution kernel in discrete form. For a two-dimensional image f(x,y), the Laplacian operator can be defined as

[0094] In the discrete case, it can be achieved through convolution. The 3×3 convolution kernel formula is as follows:

[0095]

[0096] For each pixel (x, y), the Laplace transform value is as follows:

[0097]

[0098] In the formula, · represents convolution.

[0099] Its Laplace transform value is the sum of the grayscale values ​​of the pixel and its eight surrounding neighborhood pixels multiplied by the corresponding elements of the Laplace convolution kernel.

[0100] Because the changes in the horizontal, vertical and diagonal directions must be taken into account at the same time, the convolution kernel uses an 8-neighborhood Laplacian operator. The 8-neighborhood Laplacian kernel is as follows:

[0101]

[0102] Expanding the formula yields:

[0103]

[0104] The Laplacian operator can accurately locate the edge and has high sensitivity to fast-changing areas in the image.

[0105] Laplace edge detection specific calculation steps:

[0106] (1) Use Gaussian blur technology to smooth the image and remove noise. The calculation formula is as follows:

[0107]

[0108] In the formula, G is the Gaussian blur value, σ is the standard deviation, and e is a constant;

[0109] (2) Calculate the Laplace operator, use the operator to convolve the image, and calculate the response value of the second-order derivative of each pixel. The formula is as follows:

[0110]

[0111] The result of the convolution is a new image, in which each pixel represents the response intensity of the second-order derivative of that point;

[0112] (3) Detect zero-crossing points: The response value of the Laplace operator can be positive or negative. The edge is located at the zero-crossing point where the value changes from positive to negative (or from negative to positive). This is because the edge corresponds to a rapid change in the grayscale value. The second-order derivative will change its sign at this point. Traverse each pixel in the convolution result and check the sign change between it and the neighboring pixels. If the sign changes, the point is considered to be an edge. The formula is as follows:

[0113] if(I Laplace (x,y)>0and(I Laplace (x, y)<0)or((I Laplace(x, y)<0and(I Laplace (x′, y′)>0)

[0114] To improve the edge of the zero crossing point, a response threshold T is set for a more stable edge detection effect. When the absolute value of the response value is greater than a certain threshold and the pixel is a zero crossing point, it is considered an edge. This can filter out the pseudo zero crossing caused by noise. The formula is as follows:

[0115] if|I Laplace (x, y)|>Tand isZeroCrossing;

[0116] (4) Binarization: In order to clearly display the zero-crossing points, the edge points and non-edge points are enhanced. The points marked as edges, i.e., the zero-crossing points, are set to 255, and the points that do not meet the zero-crossing condition are set to 0. This will result in an image containing only edge information with a black background.

[0117] (5) Morphological operation: In order to optimize the image results, dilation (connecting broken edges) and erosion (removing isolated points) are used to further optimize the edge recognition results.

[0118] In order to ensure the details of the high-frequency area during the fusion process of the second image and the third image, Laplacian pyramid fusion is used in the image fusion process. The Laplacian pyramid saves the missing information by calculating the residual of the image after downsampling and upsampling and the original image. Let L(i) be the Gaussian pyramid image of the i-th layer, and G(0) be the original image. The construction formula of the Laplacian pyramid is as follows:

[0119] L(i) = G(i) - PyrUp(G(i+1));

[0120] Where PyrUp represents the upsampling operation, G(i+1) is the Gaussian pyramid image of the next layer with higher resolution, L(i) is the Laplacian image of the current layer, and G(i) is the Gaussian pyramid image of the current layer.

[0121] Steps to construct a Gaussian pyramid image:

[0122] Let G(i) be the i-th layer image of the Gaussian pyramid, and W(m, n) be a two-dimensional separable window function (Gaussian kernel), whose formula is as follows:

[0123]

[0124] In the formula, represents the convolution operation; ↓ represents the downsampling operation (removing even rows and columns), which reduces the resolution of the image to half of the original; G(1-1) is the Gaussian pyramid image of the previous layer; W(m, n) is the Gaussian kernel function, which is used to smooth the image and remove high-frequency noise.

[0125] In Laplacian pyramid fusion, each layer of Laplacian pyramid images are fused according to certain fusion rules. The fusion process can be expressed as:

[0126] LFI = FusionRule(LAL, LBL);

[0127] Wherein, FusionRule represents the fusion rule; LA1 and LB1 are the first layer images obtained after the source images A and B are decomposed by the Laplace pyramid; LF1 is the fusion result.

[0128] After obtaining the Laplacian pyramid image after fusion of each layer, it is necessary to reconstruct it according to the inverse process of pyramid generation to obtain the final fused image. The reconstruction process starts from the highest layer (lowest resolution) and performs upsampling and superposition operations layer by layer. The reconstruction formula is as follows:

[0129] GFI=PyUp(GFI-1)+LFI;

[0130] Where GF1 is the fused Gaussian pyramid layer 1 image; PyrUp represents the upsampling operation; GF1-1 is the fused Gaussian pyramid image of the previous layer (lower resolution); LF1 is the Laplacian pyramid fused image of the current layer.

[0131] Through layer-by-layer stacking and upsampling operations, a fused image GF0 with the same resolution as the original image can be finally obtained.

[0132] In step 3, the colloid width measurement includes the colloid straight edge width measurement and the colloid arc edge width measurement:

[0133] (1) Measurement of colloid straight edge width: A 0.5*0.5 mm calibration block is set on the machine tool platform, and the pixel width of the contour edge of the colloid shadow is proportionally compared with the pixels of the calibration block to calculate the actual width of the colloid;

[0134] (2) Measurement of the width of the colloidal arc edge: Find the edge point of the arc through Hough transform, assume that the edge point is a part of the approximate circle, and transform the parameterized equation of the circle (xa) 2 +(xb) 2 =r 2Mapping from image space to parameter space (a, b, r) uses accumulator a=xr·cosθ, b=yr·sinθ for each edge point; calculate the values ​​of a and br in the accumulator, the radius of the circle is determined by the maximum value of the accumulator, and the angle range between the detected circle and its edge point is determined by the positions of the two end points of the arc. The formula is as follows:

[0135]

[0136] Δθ=θ end -θ start ;

[0137] In the formula, θ start and θ end is the angle between the two endpoints of the arc, and Δθ is the difference between the angles of the two endpoints of the arc.

[0138] Assume that the two boundary points of the inner arc are P1(x1, y1) and P2(x2, y2). The width W1 of the arc can be calculated by the two-point distance formula, as follows:

[0139]

[0140] Similarly, the two boundary points of the outer arc are P3 (x3, y3) and P4 (x4, y4). The width W2 of the arc can be calculated by the two-point distance formula, as follows:

[0141]

[0142] According to the distance formula between two parallel lines, the formula is as follows:

[0143]

[0144] Where d is the distance between the parallel lines where the points on the inner and outer arcs lie.

[0145] The arc edge width measurement is to find the arc edge points of the contour edge of the colloid shadow through Hough transformation, and determine the width of the colloid arc edge by the distance between the straight lines where the points on the inner and outer arcs of the colloid are located.

[0146] Since the two arcs are not strictly concentric arcs, there are deviations in the colloid coating process. In order to reduce the detection error, the radius difference of the arc, that is, the width of the arc, is homogenized. The formula is as follows:

[0147]

[0148] Wherein, Δr1 is the first independent variable of the difference between the inner and outer arc radii, Δr2 is the second independent variable of the difference between the inner and outer arc radii, and Δr is the average value of the two independent variables.

[0149] The colloid height measurement adopts the shadow ranging method, which can be realized because the height of the colloid itself is not high.

[0150] Assume that the position of the point light source is (x s ,y s , z s ), assuming that the projection platform is a straight plane, the projection point (x p ,y p , 0), the top point of the colloid (x t ,y t , h), the length of the colloid shadow is L P , its projection relationship satisfies the following formula:

[0151]

[0152] The coordinates of the projection point on the substrate are given by the following formula:

[0153]

[0154] The shadow length of a colloid is given by the following formula:

[0155]

[0156] The horizontal distance from the point light source to the projection point is as follows:

[0157]

[0158] The colloid height is given by the following formula:

[0159]

[0160] Where h is the height of the colloid, L P is the shadow length of the colloid, d s is the horizontal distance from the point light source to the projection point, z s is the position of the point light source in the z-axis direction.

[0161] However, since the projection plane is not a plane but a stepped arc surface, the projected shadow area will be shorter than the estimated projection on the plane. The specific colloidal shadow distance measurement method is as follows Figure 4 shown.

[0162] Since the projected shadow area is too short, it is necessary to perform local shading on the original linear point light source. The arc part is formed by the tangent arcs at both ends. First, the colloid height is divided and calculated according to the different lengths of the detected shadow line Lp. The formula is as follows:

[0163] L p ∈[0, 0.7]

[0164]

[0165] L p ∈[0, 2.45]

[0166]

[0167] Since the distance from the light source to the edge of the slot is constant, let the distance be A, then the distance of the projection on the plane is d s -A, according to the projection relationship, the formula is as follows:

[0168]

[0169] In the formula, h d is the height of the colloid in different intervals of the shadow line length, and Lp is the length of the shadow line.

[0170] The present invention gradually analyzes the images taken by the camera to obtain multiple images with different highlights, and fuses the images to finally obtain a higher quality image, which helps to greatly improve the convenience of detection and obtain more accurate colloid parameters, further improving the accuracy of colloid identification and detection; when detecting the height of the colloid, a shadow ranging method is adopted. The shadow ranging tool is relatively simple in principle and has the characteristics of strong adaptability and good robustness, which greatly improves the convenience of colloid height detection.

Claims

1. A method for visually identifying the colloid coating on the rear cover of an air suspension controller, characterized in that: The steps include: Step 1: firstly, an industrial camera is used to collect an image of the colloid on the back cover of the controller after being projected by a light source, and an image processing module performs grayscale processing on the obtained image, and then performs image segmentation on the image after the grayscale processing to obtain a first image; Step 2: sharpening and enhancing the image by histogram equalization to obtain a second image for highlighting the edge of the rear cover shell; Step 3: Input the first image into the graph neural network for image denoising and enhancement, and mark the output image as the third image; Step 4: Fuse the second image and the third image using multi-scale feature fusion technology, and then perform Laplace edge detection on the fused image to detect the contour edge of the back cover frame and the contour edge of the colloid shadow, and output the status information of the width and height of the colloid based on the contour edge of the back cover frame and the contour edge of the colloid shadow.

2. The colloid visual recognition method for the glue coating on the rear cover of the air suspension controller according to claim 1 is characterized by: In step 2, the histogram equalization method of the image is to use the weighted average method to process the pixels of the original image to obtain the grayscale value of the original image, and then map all the grayscale values ​​to the corresponding grayscale value range, and then calculate the probability of each grayscale level appearing and the frequency distribution of each grayscale level in the image according to the statistical number of pixels to obtain the cumulative distribution function, and then map the value of the cumulative distribution function to the grayscale value range, calculate the transformed grayscale value, and use the normalization mapping function to redistribute the original grayscale column level, use the mapping relationship to replace the original grayscale value with the new grayscale value, output the equalized second image, and display its histogram, and use the equalization processing to change the grayscale histogram distribution of the second image into an approximately uniform distribution through the cumulative distribution function, enhance the contrast of the second image, and make the boundary contour of the outer contour in the arc-shaped bright area more obvious.

3. The colloid visual recognition method for the glue coating on the rear cover of the air suspension controller according to claim 1 is characterized by: In step 3, the graph neural network has a hybrid attention mechanism, which includes global attention, local attention, channel attention and hybrid attention fusion; the global attention uses the self-attention mechanism to strengthen the globally important features by calculating the correlation of each pixel in the feature map to other pixels; the local attention is to perform local weighting through local convolution kernels to extract neighborhood information; the channel attention is a weighted mechanism based on feature channels, which enhances the attention to key channels while suppressing the influence of unimportant channels by learning the importance weight of each channel; the hybrid attention fusion is to output the corresponding third image by weighted fusion of global attention, local attention and channel attention.

4. The colloid visual recognition method for the glue coating on the rear cover of the air suspension controller according to claim 3 is characterized by: The internal process of the channel attention includes three links: global feature extraction, weight generation and channel weighting; the global feature extraction is to compress the spatial dimension into a single value by using global average pooling or global maximum pooling operation, so as to extract global features; The weight generation is to learn the weight of each channel through a fully connected layer or a multi-layer perceptron; the channel weighting is to re-apply the generated weight to each channel and realize channel weighting through element-by-element multiplication.

5. The colloid visual recognition method for the glue coating on the rear cover of the air suspension controller according to claim 1, characterized in that: In step 4, the multi-scale feature fusion technology uses the Laplacian pyramid to fuse the second image and the third image. The fusion process can be expressed as: LFI = FusionRule(LAL, LBL); Wherein, FusionRule represents the fusion rule; LA1 and LBl are the l-th layer images obtained after the source images A and B are decomposed by the Laplace pyramid; LF1 is the fusion result; The fused Laplacian pyramid image is reconstructed according to the inverse process of pyramid generation to obtain the final fused image. The reconstruction formula is as follows: GFI=PyUp(GFI-1)+LFI; Among them, GF1 is the fused Gaussian pyramid layer l image; PyrUp represents the upsampling operation; GF1-1 is the fused Gaussian pyramid image of the previous layer with lower resolution; LF1 is the Laplacian pyramid fused image of the current layer.

6. The colloid visual recognition method for the glue coating on the rear cover of the air suspension controller according to claim 1, characterized in that: In step 4, the process of Laplace edge detection is as follows: first, the image is preprocessed by denoising and enhancing to improve the accuracy and stability of edge detection, then the Laplace operator is applied to the preprocessed image, the second-order derivative of the image is calculated, and the position of the edge is determined based on the result of the second-order derivative. Finally, the measured edge is post-processed by refinement and connection to obtain a clear and accurate edge image.

7. The colloid visual recognition method for the glue coating on the rear cover of the air suspension controller according to claim 1, characterized in that: In step 4, the colloid width measurement includes the colloid straight edge width measurement and the colloid arc edge width measurement; the straight edge width measurement is to compare the pixel width of the contour edge of the colloid shadow with the pixel of the calibration block in proportion to calculate the actual width of the colloid; the arc edge width measurement is to find the arc edge point of the contour edge of the colloid shadow through Hough transform, and determine the width of the colloid arc edge by the distance between the straight lines where the points on the inner and outer arcs of the colloid are located, and the formula is as follows: Where d is the distance between the parallel lines where the points on the inner and outer arcs are located. The boundary points on the inner arc are P1 (x1, y1) and P2 (x2, y2), and the boundary points on the outer arc are P3 (x3, y3) and P4 (x4, y4).

8. The colloid visual recognition method for the glue coating on the rear cover of the air suspension controller according to claim 1, characterized in that: In step 4, the colloid height is measured by shadow ranging. A point light source illuminates the colloid and projects a colloid shadow on the projection surface. The projection relationship is as follows: Where h is the height of the colloid, L P is the shadow length of the colloid, d s is the horizontal distance from the point light source to the projection point, z s is the position of the point light source in the z-axis direction.

Citation Information

Patent Citations

  • Automatic gluing and detecting method based on 3D vision

    CN115106260A

Cited By

  • Pig image feature enhancement method and system in complex illumination environment

    CN120526234A

  • A method and system for enhancing pig image features in complex lighting environments

    CN120526234B