An LCM border encapsulation method and device based on image processing

Through the image processing method, the uneven glue shape problem caused by discontinuity of glue coating path and speed in LCM frame dispensing technology is solved, and high-precision dispensing and stable glue coating quality are achieved.

CN119693364BActive Publication Date: 2025-06-03SHENZHEN YUANSHUO AUTOMATION TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510203027.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-02-24
Publication Date
2025-06-03
Estimated Expiration
2045-02-24

AI Technical Summary

Technical Problem

In the existing LCM frame dispensing technology, the discontinuity of the glue path and speed leads to uneven glue shape, affecting the sealing performance and optical shading effect, and it is difficult to meet the requirements of high-precision manufacturing.

Method used

Using an image processing-based method, the original image of the LCM is obtained through the visual system, pre-processed and edge feature extraction, and the optimized binary image is obtained, the connected edge area is calibrated, the candidate point set is filtered, and the dispensing path is planned and compensation correction is performed, and the dispensing robot is controlled to perform dispensing operations.

Benefits of technology

The smooth transition between straight and arc segments and high-precision dispensing are achieved, which solves the problem of uneven glue shape, improves the accuracy and consistency of the dispensing path, and ensures the uniformity of the glue shape and the stability of the glue coating quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119693364B_ABST
    Figure CN119693364B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of LCM preparation, and discloses an LCM border encapsulation method and device based on image processing. The method includes obtaining an original image of the LCM based on a vision system, preprocessing the original image, and performing edge feature extraction to obtain a preliminary edge image. Morphological processing is performed on the preliminary edge image, gray-scale thresholding processing is performed on the optimized edge image, connected edge regions in multiple specific regions are calibrated, and a candidate point set is screened according to the geometric features of the connected edge regions. The candidate point set is screened and processed, and the preliminary dispensing path is compensated and corrected based on the current position information of the LCM to obtain a corrected dispensing path. The dispensing robot is controlled according to the corrected dispensing path to perform a dispensing operation, which can effectively avoid the problem of uneven glue caused by recognition errors during the dispensing process. By compensating and correcting the preliminary dispensing path and dynamically adapting to the current position information of the LCM, the accuracy and consistency of the dispensing path are significantly improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of LCM preparation, and more particularly, to an LCM border encapsulation method and device based on image processing. Background Art

[0002] In the field of modern electronic device manufacturing, the liquid crystal module (Liquid Crystal Module, abbreviated as LCM) is a core component. The border dispensing process of the LCM has become an indispensable part in the manufacturing processes of devices such as mobile phones, tablet computers, and laptop computers. Dispensing not only plays roles in sealing, protection, and component bonding, but also affects the overall appearance quality and assembly performance of the device. With the development of device design towards thinner, lighter, and higher-precision directions, the dispensing process faces higher technical challenges, especially in the transition treatment of the border arc and straight-line segments, where the process complexity and operation difficulty increase significantly. To meet the needs of industrial development, robots and automated equipment have been gradually introduced in related fields to improve production efficiency and dispensing accuracy. However, even with the use of modern equipment, the non-uniformity of dispensing quality remains a major problem faced by the industry.

[0003] Existing LCM border dispensing technologies usually apply glue separately for straight-line segments and arc segments. Due to the discontinuity of the dispensing path and speed, it is easy to cause problems such as glue bulging, wire drawing, and glue breakage, resulting in non-uniform glue shapes. This not only affects the sealing performance of the border, but may also lead to a reduction in the optical shielding effect and insufficient assembly accuracy, making it difficult to meet the requirements of high-precision manufacturing.

[0004] Therefore, it is necessary to provide an LCM border encapsulation method and device based on image processing to solve the problem of non-uniform glue shapes caused by the discontinuity of the dispensing path and speed. Summary of the Invention

[0005] The main objective of the present invention is to provide an LCM border encapsulation method and device based on image processing, aiming to solve the technical problems mentioned in the above background art.

[0006] The present invention adopts the following technical solutions:

[0007] An LCM border encapsulation method and device based on image processing, comprising:

[0008] Obtaining an original image of the LCM based on a vision system, preprocessing the original image, and extracting edge features from the preprocessed original image to obtain a preliminary edge image;

[0009] Performing morphological processing on the preliminary edge image to obtain an optimized edge image;

[0010] Perform gray-scale thresholding on the optimized edge image based on a preset threshold to obtain a binary image, where the binary image includes a plurality of specific regions;

[0011] Calibrate the connected edge regions in the plurality of specific regions, and screen out a candidate point set according to the geometric features of the connected edge regions, where each candidate point represents a potential dispensing position;

[0012] Perform screening processing on the candidate point set to obtain an effective point set, and perform dispensing path planning on the effective point set to obtain a preliminary dispensing path;

[0013] Compensate and correct the preliminary dispensing path based on the current position information of the LCM, obtain a corrected dispensing path, and control a dispensing robot to perform dispensing operations according to the corrected dispensing path.

[0014] Further, the step of obtaining a preliminary edge image by acquiring an original image of the LCM based on a vision system, preprocessing the original image, and extracting edge features from the preprocessed original image specifically includes:

[0015] Capture an original image of the LCM based on a vision system, and perform color space conversion processing on the original image according to the color space characteristics of the original image to obtain a converted image;

[0016] Calculate the weighted average of each pixel in the converted image and its neighboring pixels to smooth the converted image and obtain a denoised image;

[0017] Perform enhanced contrast processing on the denoised image to highlight the edges of the denoised image and obtain an enhanced image;

[0018] Extract edge features from the enhanced image to obtain a preliminary edge image.

[0019] Further, the step of performing morphological processing on the preliminary edge image to obtain an optimized edge image specifically includes:

[0020] Perform dilation processing on the preliminary edge image according to a first preset structural element to obtain a dilated image;

[0021] Shrink the edge regions in the dilated image according to a second preset structural element to obtain a shrunk image, where the area of the first preset structural element is larger than the area of the second preset structural element;

[0022] Perform edge detection on the shrunk image, calculate the gradient information of each pixel point in the shrunk image, and extract the object boundary of the shrunk image to obtain an edge feature image;

[0023] Perform an opening operation on the edge feature image to obtain an opening operation image, and perform a closing operation on the opening operation image to obtain a closing operation image;

[0024] Perform a filtering process on the closing operation image to obtain an optimized edge image.

[0025] Further, the step of performing gray-scale thresholding on the optimized edge image based on a preset threshold to obtain a binary image, where the binary image includes multiple specific regions, specifically includes:

[0026] According to the gray value distribution of the optimized edge image, calculate the gray value frequency of each pixel of the optimized edge image to generate a gray-level histogram;

[0027] Perform peak detection on the gray-level histogram, identify the regions with specific gray value changes in the optimized edge image, and set a candidate threshold range;

[0028] Apply the candidate threshold range to the optimized edge image, and perform gray-scale thresholding on the optimized edge image to obtain a binary image;

[0029] Perform connected component analysis on the binary image to obtain multiple connected regions;

[0030] According to the geometric features of the multiple connected regions, screen out multiple specific regions.

[0031] Further, the step of calibrating the connected edge regions in the multiple specific regions and screening out a candidate point set according to the geometric features of the connected edge regions, specifically includes:

[0032] Perform connected component analysis processing on the multiple specific regions to obtain multiple connected region images;

[0033] Extract the geometric features of the connected edge regions of each connected region image to obtain the geometric parameters of each connected edge region;

[0034] Screen the geometric parameters according to a preset geometric standard to obtain a candidate region set;

[0035] Perform region clustering processing on the candidate region set to obtain multiple region clusters;

[0036] Optimize the position of each region cluster, determine the center point of each region cluster, and obtain a candidate point set.

[0037] Further, the step of screening the candidate point set to obtain an effective point set and performing dispensing path planning on the effective point set to obtain a preliminary dispensing path, specifically includes:

[0038] Perform position consistency analysis processing on each candidate point in the candidate point set to obtain a position consistency screening result;

[0039] Perform edge intensity feature analysis processing on the edge intensity of each candidate point according to the position consistency screening result to obtain an intensity screening result;

[0040] Perform topological structure analysis processing on the position relationship of candidate points according to the intensity screening result to obtain a connected topology screening result;

[0041] Perform path sorting processing on the candidate points of the connected topology screening result to obtain a dispensing path point sequence;

[0042] Perform smoothing optimization processing on the path interval according to the dispensing path point sequence to obtain an optimized path point sequence;

[0043] Perform dispensing speed planning processing based on the optimized path point sequence to obtain a preliminary dispensing path.

[0044] Further, the step of compensating and correcting the preliminary dispensing path based on the current position information of the LCM, and controlling the dispensing robot to perform dispensing operations according to the corrected dispensing path specifically includes:

[0045] Perform calibration processing on the current position information of the LCM, calculate the spatial difference between the actual position and the theoretical position of the LCM, and obtain the spatial offset matrix of the LCM;

[0046] Perform pose transformation processing on the preliminary dispensing path according to the spatial offset matrix to obtain a preliminary corrected dispensing path;

[0047] Perform path continuity optimization processing on the preliminary corrected dispensing path to obtain a continuity optimized dispensing path;

[0048] Perform speed allocation processing on the continuity optimized dispensing path based on the dynamic response characteristics of the dispensing robot to obtain a speed allocation optimized dispensing path;

[0049] Perform dispensing offset compensation processing on the speed allocation optimized dispensing path to obtain an offset compensation optimized dispensing path;

[0050] Based on the kinematic model of the dispensing robot and joint angle constraints, and perform trajectory planning processing on the dispensing robot according to the offset compensation optimized dispensing path to obtain a corrected dispensing path, and control the dispensing robot to perform dispensing operations according to the corrected dispensing path.

[0051] The present invention also proposes an LCM border encapsulation device based on image processing, including:

[0052] An acquisition module, configured to acquire the original image of the LCM, preprocess the original image, and extract edge features from the preprocessed original image to obtain a preliminary edge image;

[0053] A first processing module, configured to perform morphological processing on the preliminary edge image to obtain an optimized edge image;

[0054] A second processing module, configured to perform gray-scale thresholding on the optimized edge image based on a preset threshold to obtain a binary image, where the binary image includes a plurality of specific regions;

[0055] A calibration module, configured to calibrate the connected edge regions in the plurality of specific regions, and screen out a candidate point set according to the geometric features of the connected edge regions, where each candidate point represents a potential dispensing position;

[0056] A planning module, configured to perform screening processing on the candidate point set to obtain an effective point set, and perform dispensing path planning on the effective point set to obtain a preliminary dispensing path;

[0057] A control module, configured to perform compensation and correction on the preliminary dispensing path based on the current position information of the LCM to obtain a corrected dispensing path, and control a dispensing robot to perform a dispensing operation according to the corrected dispensing path.

[0058] The present invention also provides a computer device, which includes a processor, a memory, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, the above method is implemented.

[0059] The present invention also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the above method is implemented.

[0060] Beneficial effects:

[0061] In the present invention, by acquiring the original image of the LCM based on the vision system and performing preprocessing and edge feature extraction, the processing accuracy of the image and the extraction quality of the edge features are effectively improved. By performing morphological processing and gray-scale thresholding on the preliminary edge image, an optimized binary image is obtained, which can more accurately segment multiple specific regions. After screening the candidate point set based on the geometric features of the connected edge regions, the obtained effective point set after further screening can not only ensure the accuracy of the dispensing position, but also effectively avoid the problem of uneven glue caused by recognition errors during the dispensing process, thus realizing the smooth transition between the straight line segment and the arc segment and high-precision dispensing. In addition, by compensating and correcting the preliminary dispensing path, this method can dynamically adapt to the current position information of the LCM, significantly improving the accuracy and consistency of the dispensing path, and solving problems such as glue bulging, wire drawing, and glue breakage caused by the discontinuity of the coating path and speed, ensuring the uniformity of the glue shape and the stability of the coating quality. Brief Description of the Drawings

[0062] Figure 1 is a schematic diagram of the steps of a method for encapsulating the LCM border based on image processing according to the present invention;

[0063] Figure 2 is a schematic block diagram of the structure of a device for encapsulating the LCM border based on image processing according to the present invention;

[0064] Figure 3 is a schematic block diagram of the structure of a computer device according to an embodiment of the present invention;

[0065] The realization, functional characteristics, and advantages of the object of the present invention will be further described with reference to the embodiments and the accompanying drawings. Detailed Embodiments

[0066] It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0067] In the description of the present invention, it should be understood that the orientation or positional relationship indicated by the terms "center", "longitudinal", "lateral", "length", "width", "thickness", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", "clockwise", "counterclockwise", etc. is based on the orientation or positional relationship shown in the drawings. It is only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation. Therefore, it should not be construed as a limitation to the present invention. In addition, the terms "first" and "second" are only used for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features. Thus, the features defined with "first" and "second" may explicitly or implicitly include one or more of the said features. In the description of the present invention, "a plurality of" means two or more unless otherwise specifically defined.

[0068] In the description of the present invention, it should be noted that unless otherwise clearly specified and limited, the terms "mounted", "connected" and "coupled" should be understood in a broad sense. For example, it may be a fixed connection, a detachable connection or an integral connection; it may be a mechanical connection, a direct connection or an indirect connection through an intermediate medium, and it may be the communication inside two elements or the interaction relationship between two elements. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0069] In the present invention, unless otherwise clearly specified and limited, the first feature being "on" or "under" the second feature may include the direct contact between the first and second features, or may include the situation where the first and second features are not in direct contact but in contact through other features therebetween. Moreover, the first feature being "above", "over" and "on top of" the second feature includes that the first feature is directly above and obliquely above the second feature, or merely means that the horizontal height of the first feature is higher than that of the second feature. The first feature being "under", "beneath" and "underneath" the second feature includes that the first feature is directly below and obliquely below the second feature, or merely means that the horizontal height of the first feature is lower than that of the second feature.

[0070] Referring to Figure 1 , the present invention provides a method and device for LCM border encapsulation based on image processing, including:

[0071] S1: Obtain the original image of the LCM based on the vision system, preprocess the original image, and extract the edge features of the preprocessed original image to obtain a preliminary edge image;

[0072] In step S1, first, the original image of the LCM module border is obtained through the vision system. This original image is acquired by a camera or other image acquisition devices. A positioning camera, lens, and positioning light source can be used. Preferably, a 20-megapixel CMOS camera is used as the positioning camera, and a 35mm 1.1" 20MP FA lens is selected as the positioning lens. The assembly direction is from top to bottom. To ensure the clarity and accuracy of the image, the original image needs to be preprocessed. The main operations of the preprocessing include denoising, enhancing contrast, and image smoothing, etc. Denoising can effectively remove environmental noise or image interference generated during the acquisition process. Enhancing the image contrast can highlight the outline of the LCM border and improve the clarity of the edges, thus facilitating subsequent edge extraction. Image smoothing helps reduce irregular edges caused by minor errors or defects during the image acquisition process.

[0073] After completing the image preprocessing, edge feature extraction is performed. Edge feature extraction is a crucial step in image analysis, aiming to identify edge information from the image for subsequent path planning and dispensing operations. In this process, edge detection algorithms such as the Canny algorithm and Sobel operator can be used. By calculating the change in pixel intensity in the image, the edge lines of the LCM module border are located. The extracted edge image reflects the outer contour and geometric shape of the LCM module, which is the basis for subsequent processing and dispensing path planning.

[0074] S2: Perform morphological processing on the preliminary edge image to obtain an optimized edge image;

[0075] In step S2, the extraction of the preliminary edge image may identify edge information that is not smooth or continuous enough due to image noise, blur, or other factors, and there are some breaks or pseudo-edges. To improve the quality and accuracy of the edge image, morphological processing needs to be performed on the preliminary edge image. Morphological processing is an operation method based on image structure elements, mainly used to remove noise, fill in broken edges, and strengthen the target area.

[0076] In this LCM border dispensing method, first, an erosion operation is performed on the preliminary edge image, which can eliminate some small noise points and edges with irregular shapes and shrink unnecessary edge areas; then, a dilation operation is performed to make the edge lines more complete and continuous and fill the gaps in the edge lines. This series of operations can effectively improve the continuity and accuracy of the edge image and ensure more accurate subsequent geometric feature extraction.

[0077] S3: Perform gray-scale thresholding on the optimized edge image based on a preset threshold to obtain a binary image, and the binary image includes multiple specific regions;

[0078] In step S3, after the optimized edge image is obtained, the next step is to perform grayscale thresholding to convert the optimized edge image into a binary image. Grayscale thresholding is achieved by setting a threshold value, which divides the grayscale values in the image into two categories - pixels below the threshold are set as the background (black), and pixels above the threshold are set as the foreground (white). This processing converts all the grayscale information in the image into binary information of 0 and 1, greatly simplifying the subsequent processing steps.

[0079] In the LCM border dispensing method, the preset grayscale threshold should be adjusted according to the brightness characteristics of the image and the required dispensing accuracy. Through grayscale thresholding, the border area of the LCM module can be separated from the background to form a clear binary image, and this binary image can contain multiple different specific regions, such as the actual border area and the internal area of the LCM module.

[0080] S4: Calibrate the connected edge regions in the multiple specific regions, and screen out a candidate point set based on the geometric features of the connected edge regions, where each candidate point represents a potential dispensing position;

[0081] In step S4, after the binary image processing is completed, it enters the calibration stage of the connected edge regions. A connected region refers to a continuous region formed in the image through certain connection rules (such as 8-neighborhood connection). In LCM border dispensing, the connected edge region represents the effective border part of the LCM module, and this region is the target area for the dispensing operation.

[0082] Through image connected region calibration, different edge regions and their shape characteristics can be identified, and further screening can be carried out based on the geometric features of these regions. Geometric features include information such as the shape, size, and curvature of the edge, which can help determine the potential dispensing positions. The screened candidate point set represents each potential dispensing position on the LCM module.

[0083] S5: Screen the candidate point set to obtain an effective point set, and perform a dispensing path planning on the effective point set to obtain a preliminary dispensing path;

[0084] After the candidate point set screening is completed, the next step is to perform further screening on these candidate points. The screening basis includes the distance between points, the distribution law of points, and the requirements for dispensing accuracy. By comprehensively considering these factors, an effective point set can be obtained. The effective point set refers to the point set that meets the dispensing requirements and has accurate positions, and they represent the precise positions on the LCM border where dispensing needs to be performed.

[0085] Based on the set of valid points, dispense path planning is carried out. The goal of path planning is to calculate an optimized dispense path according to the distribution of the point set. This path not only requires smoothness and continuity but also takes into account the motion ability and working efficiency of the dispensing robot. Techniques such as the shortest path algorithm and interpolation methods can be used for the planning of the dispense path to ensure the rationality and efficiency of the path.

[0086] S6: Compensate and correct the preliminary dispense path based on the current position information of the LCM to obtain a corrected dispense path, and control the dispensing robot to perform the dispensing operation according to the corrected dispense path.

[0087] After the preliminary dispense path planning is completed, since the position of the LCM may shift due to equipment errors, vibrations during the processing, etc. in actual operation, it is necessary to compensate and correct the dispense path. The compensation and correction process is adjusted in real time based on the current position information of the LCM. The visual feedback system continuously monitors the actual position of the LCM and compares it with the predetermined path. If there is a deviation, the path is dynamically corrected. The goal of compensation and correction is to make the dispense path always consistent with the actual position of the LCM to ensure the accuracy and consistency of dispensing.

[0088] After compensation and correction, the corrected dispense path can be directly used to control the dispensing robot to perform the dispensing operation. The robot accurately executes the dispensing task according to the corrected path, ensuring that the glue is evenly coated at each dispensing position and meets the requirements, ultimately achieving high-quality and high-precision dispensing operations.

[0089] In summary, by acquiring the original image of the LCM through the vision system and performing preprocessing and edge feature extraction, the processing accuracy of the image and the extraction quality of the edge features are effectively improved. By performing morphological processing and gray thresholding on the preliminary edge image, an optimized binary image is obtained, which can more accurately segment multiple specific regions. After screening out the candidate point set based on the geometric features of the connected edge regions, the obtained effective point set after further screening and processing can not only ensure the accuracy of the dispensing position but also effectively avoid the problem of uneven glue caused by recognition errors during the dispensing process, thus realizing the smooth transition between straight line segments and arc segments and high-precision dispensing. In addition, through the compensation and correction of the preliminary dispense path, this method can dynamically adapt to the current position information of the LCM, significantly improving the accuracy and consistency of the dispense path, solving problems such as glue bulging, wire drawing, and glue breakage caused by the discontinuity of the glue application path and speed, and ensuring the uniformity of the glue shape and the stability of the glue application quality.

[0090] In an embodiment of an application scenario, the dispensing method for the LCM border of the present invention can be applied to the border dispensing task of the LCM module in a certain smartphone production line, effectively solving the problems of uneven glue path and complex debugging in the traditional method. By installing a high-precision vision positioning system on the production line, including a CMOS camera with 20 million pixels, a lens with an object distance of 35 mm, and an optimized light source configuration, a clear and distortion-free imaging effect is ensured. First, the vision system captures the initial image of the module, completes contour positioning through software, calculates the offset and rotation angle of the module in the reference coordinate system, and performs real-time correction by the rotating shaft to restore the module to the reference position. Subsequently, the vision system obtains the exact position of the dispensing line through wire grasping positioning, corrects the wire grasping area using the offset and rotation matrix, and further calculates the included angle difference to ensure the positioning accuracy. According to the geometric characteristics of the module border, the system plans a continuous and smooth dispensing path, and adjusts the path shape using the rotating shaft to simplify it into horizontal straight lines, arcs, and vertical straight lines, avoiding complex oblique path settings. After completing the path planning, the vision system measures the offset of the module in the X and Y directions, and the robot system quickly realizes precise compensation of the path by simply adding the X and Y coordinates of the glue path points to the offset. The corrected dispensing path is transmitted to the six-axis robot, and the robot completes the dispensing operation point by point along the path. The spray valve ensures uniform coating of the glue by precisely controlling the coating flow rate and pressure. After dispensing, the vision detection system verifies the accuracy of the glue path position and shape again, and performs path correction and glue replenishment operations for abnormal situations to ensure the dispensing quality. Through the implementation of this method, the production line has achieved significant improvements in simplified debugging, optimized path, and uniformity of the glue shape, significantly improving the production efficiency and product quality.

[0091] In one embodiment, the step of obtaining the original image of the LCM based on the vision system, preprocessing the original image, and extracting edge features from the preprocessed original image to obtain a preliminary edge image specifically includes:

[0092] Based on the vision system, the LCM is photographed to obtain the original image of the LCM, and according to the color space characteristics of the original image, color space conversion processing is performed on the original image to obtain a converted image;

[0093] The weighted average value of each pixel in the converted image and its neighboring pixels is calculated to smooth the converted image to obtain a denoised image;

[0094] The contrast of the denoised image is enhanced to highlight the edges of the denoised image to obtain an enhanced image;

[0095] Edge features are extracted from the enhanced image to obtain a preliminary edge image.

[0096] In the above embodiments, a vision system is used to capture the LCM to obtain its original image. The vision system consists of a high-resolution camera, a light source, and a lens, ensuring clear images can be captured under different ambient light conditions. Since there may be reflection, color difference, or other interference factors on the surface of the LCM module, the original image usually contains complex color information, which directly affects the extraction accuracy of edge features. Therefore, first, according to the color space characteristics of the original image, color space conversion processing is performed to convert the original image from the RGB color space to a color space suitable for edge feature extraction, such as the grayscale space or the HSV space. The purpose of this conversion is to simplify the image information, make the edge features in the image more prominent, and reduce redundant color interference.

[0097] Since there will inevitably be some background interference or camera noise in the industrial environment, directly extracting edges may lead to false detections. Therefore, a weighted average smoothing algorithm is adopted to perform weighted average calculations on each pixel value in the converted image and its neighboring pixel values to generate a denoised image. Specifically, the smoothing operation can be performed in the form of Gaussian filtering or median filtering. By reducing the local noise intensity of the image while retaining relatively prominent edge features, it ensures that the image quality is more suitable for subsequent processing.

[0098] After denoising, contrast enhancement processing is performed on the denoised image to further highlight the edge features. In the dispensing task, the border edge is a region of subtle brightness or color differences. By enhancing the contrast, the visual saliency of these regions can be effectively improved. In this step, image enhancement techniques are used to adjust the grayscale range or dynamic range of the image, expanding the low-contrast regions into high-contrast regions to generate a strengthened image. The strengthened image can not only more clearly present the contour information of the LCM border but also provide a more definite target area for edge feature extraction.

[0099] After the strengthened image undergoes contrast enhancement, the gradient change in the edge region becomes more significant. At this time, using an edge detection algorithm can accurately extract the border information of the LCM module. By calculating the gradient change or brightness change of the image pixels, a preliminary edge image is generated, which contains the key boundary information of the LCM module. The extracted edges include not only straight line segments but also arc segments, providing complete edge data support for subsequent path planning.

[0100] In one example, the step of performing morphological processing on the preliminary edge image to obtain an optimized edge image specifically includes:

[0101] Performing dilation processing on the preliminary edge image according to a first preset structural element to obtain a dilated image;

[0102] Shrink the edge region in the dilated image according to a second preset structural element to obtain a shrunk image, where the area of the first preset structural element is larger than that of the second preset structural element;

[0103] Perform edge detection on the shrunk image, calculate the gradient information of each pixel point in the shrunk image, and extract the object boundary of the shrunk image to obtain an edge feature image;

[0104] Perform an opening operation on the edge feature image to obtain an opening operation image, and perform a closing operation on the opening operation image to obtain a closing operation image;

[0105] Perform filtering processing on the closing operation image to obtain an optimized edge image.

[0106] In the above embodiment, the preliminary edge image is dilated according to a first preset structural element to obtain a dilated image. The purpose of the dilation operation is to expand the edge region. By adding new pixel points around the edge pixels, gaps or broken regions in the edge are filled, making the edge more coherent and wider. The first preset structural element can be set as a relatively large binary structural element (such as a 5×5 square kernel or circular kernel) to expand the edge in a larger range.

[0107] After the dilation operation is completed, to avoid excessive expansion of the edge region, the dilated image is shrunk according to a second preset structural element to obtain a shrunk image. The shrinking process removes redundant pixels in the edge through an erosion operation, causing the edge to retract to its actual contour range. The area of the second preset structural element is smaller than that of the first preset structural element (such as a 3×3 matrix kernel), enabling it to shrink the edge more precisely, retain the core feature region, and not overly weaken the integrity of the edge. The shrinking process can accurately restore the original shape of the edge and avoid the redundant edges generated during the dilation process from affecting subsequent feature extraction.

[0108] After obtaining the shrunk image, further perform edge detection on it, calculate the gradient information of each pixel point, and extract the object boundary to generate an edge feature image. Edge detection can effectively identify regions with large edge intensity by calculating the gradient change of pixel gray values in the image, thereby extracting the prominent boundary of the object in the image. In this embodiment, the Sobel operator or Canny edge detection algorithm can be used. The Sobel operator generates a feature image with clear edges by calculating the gradients in the horizontal and vertical directions. This step is particularly crucial for edge refinement, as it can further enhance the fineness of the edge, filter out background noise, and make the edge features more prominent.

[0109] After obtaining the edge feature image, perform an opening operation to obtain the opening operation image. The opening operation is a composite operation of erosion followed by dilation, which can remove isolated small noise points in the image. By erosion, small defects and isolated pixels in the edge are removed, and then by dilation, the overall structure of the edge is restored, making the edge smoother and neater, generating an image with small noise removed and a more regular edge, providing a cleaner basis for subsequent processing. Perform a closing operation on the opening operation image to obtain the closing operation image. The closing operation is a composite operation of dilation followed by erosion, which is complementary to the opening operation and is suitable for filling small gaps and broken areas in the edge. By dilation, the gaps in the edge are filled, and then by erosion, the actual contour of the edge is restored. The closing operation can make the edge more coherent and complete.

[0110] Perform a filtering process on the closing operation image to obtain an optimized edge image. The main purpose of the filtering process is to smooth the image, reduce abrupt changes on the edge, and make the edge more uniform and easier for subsequent calculations.

[0111] In one embodiment, the step of performing gray-scale thresholding on the optimized edge image based on a preset threshold to obtain a binary image, where the binary image includes multiple specific regions, specifically includes:

[0112] According to the gray-scale value distribution of the optimized edge image, calculate the gray-scale value frequency of each pixel of the optimized edge image to generate a gray-level histogram;

[0113] Perform peak detection on the gray-level histogram, identify the regions in the optimized edge image where the gray-scale values have specific changes, and set a candidate threshold range;

[0114] Apply the candidate threshold range to the optimized edge image, perform gray-scale thresholding on the optimized edge image to obtain a binary image;

[0115] Perform connected component analysis on the binary image to obtain multiple connected regions;

[0116] According to the geometric features of the multiple connected regions, screen out multiple specific regions.

[0117] In the above embodiment, according to the gray-scale value distribution of the optimized edge image, calculate the gray-scale value frequency of each pixel in the image to generate a gray-level histogram. The histogram can intuitively reflect the brightness distribution in the image and provide data support for determining the gray-scale threshold range.

[0118] Peak detection is performed on the grayscale histogram to identify regions in the optimized edge image where significant changes in grayscale values occur. These peaks correspond to the grayscale features of edges or significant regions in the image. By analyzing these peaks and their corresponding frequency distributions, a candidate threshold range can be set to separate the edge region from the background region. For example, for a bimodal histogram, the low-grayscale peak may correspond to the background region, the high-grayscale peak may correspond to the target region, and the candidate threshold range is selected within the range between these two peaks.

[0119] The candidate threshold range is applied to the optimized edge image for grayscale thresholding. According to the set threshold range, pixels with grayscale values falling within the range are set as the foreground (white), and the rest are set as the background (black), thereby generating a clear binary image that highlights the significant edge regions and removes background interference.

[0120] After obtaining the binary image, connected component analysis is performed to identify multiple connected regions in the image. A connected component is a continuous region composed of adjacent foreground pixels, and each connected component represents an independent target region. By analyzing these connected components, all potential target regions can be extracted for further screening.

[0121] Based on the geometric features (such as area, shape, aspect ratio, etc.) of the connected regions, multiple specific regions are screened. The screening criteria are set according to the actual requirements of the dispensing task. For example, regions with an area greater than a certain threshold and a shape close to a rectangle or a circle are screened to ensure that the selected specific regions meet the actual dispensing requirements. After the above steps, the generated specific regions accurately calibrate the target border, providing a reliable basis for subsequent dispensing path planning.

[0122] In one embodiment, the step of calibrating the connected edge regions in the multiple specific regions and screening a candidate point set according to the geometric features of the connected edge regions specifically includes:

[0123] Performing connected component analysis processing on the multiple specific regions to obtain multiple connected region images;

[0124] Extracting the geometric features of the connected edge regions of each connected region image to obtain the geometric parameters of each connected edge region;

[0125] Screening the geometric parameters according to preset geometric criteria to obtain a candidate region set;

[0126] Performing region clustering processing on the candidate region set to obtain multiple region clusters;

[0127] Performing position optimization on each region cluster to determine the center point of each region cluster to obtain a candidate point set.

[0128] In the above embodiments, connected component analysis can identify continuous foreground regions in a binary image. When performing connected component analysis on a specific region, the system will aggregate foreground pixels in the image into a series of independent connected regions based on the neighborhood connection relationship of pixels (such as 4-neighborhood and 8-neighborhood). These connected regions correspond to possible candidate targets in the image. The 4-neighborhood only considers adjacent pixels in the horizontal and vertical directions, while the 8-neighborhood further includes adjacent pixels in the diagonal direction. In this step, the input specific regions are multiple regions selected from the binarized image. These regions may contain edge features, noise, or non-target regions. Through connected component analysis, isolated points or small regions can be removed, and at the same time, image data of multiple connected regions (each connected region is represented by a unique label) is generated, laying a foundation for subsequent processing.

[0129] Specifically, input the preprocessed and binarized image, which contains multiple specific regions. Select the 4-neighborhood or 8-neighborhood as the judgment criterion for pixel connection. Scan each pixel in the image from left to right and from top to bottom. If the current pixel is a foreground pixel (e.g., white) and not marked, assign a new label to it. If the current pixel is a foreground pixel and already marked, check the labels of its neighborhood pixels. If there are marked foreground pixels in the neighborhood, mark the current pixel with the smallest label among these neighborhood pixels. This process ensures that all pixels within the same connected region are given the same label. During the scanning process, there may be a situation where multiple labels correspond to the same connected region. Therefore, it is necessary to record the equivalence relationship of these labels and perform label merging operations after the scanning is completed to ensure that each connected region has only one unique label. Generate multiple connected region images, each image containing only one uniquely marked connected region.

[0130] After obtaining multiple connected region images, the next step is to extract geometric features from the edges of each connected region. The purpose of this step is to quantify the geometric properties of each connected region and provide data support for subsequent screening and clustering. Geometric features can include area, perimeter, aspect ratio, orientation angle, shape factor, etc. These features can reflect information such as the size, shape complexity, and orientation of the connected region. After edge detection, various geometric parameters can be calculated based on the boundary pixels. The area can be calculated by counting the number of foreground pixels within the connected region, the perimeter can be estimated by counting the number of boundary pixels, the aspect ratio can be obtained by calculating the ratio of the width and height of the bounding box, and the orientation angle can be determined by calculating the direction of the major axis of the region.

[0131] After extracting the geometric parameters of each connected region, the next step is to screen these regions according to preset geometric criteria. The purpose of this step is to remove regions that do not meet the dispensing requirements, such as those with too small an area (possibly noise), too large or too small an aspect ratio (non-target shape), too large a deviation in the orientation angle (orientation does not meet the requirements), etc. Through screening, a set of candidate regions can be obtained, where each region meets the preset geometric conditions and is a potential dispensing target region.

[0132] The screening criteria need to be set according to the specific application scenario. For example, in LCM border dispensing, it may be necessary to screen out regions with an area within a certain range, an aspect ratio close to 1 (square or nearly square regions), and an orientation angle consistent with the border direction. These criteria can be obtained through statistical analysis of known qualified samples or directly set according to process requirements.

[0133] After obtaining the set of candidate regions, the next step is to perform clustering on these regions. The purpose of clustering is to group spatially adjacent or similar candidate regions into one category to reduce redundancy and better organize the data. In the dispensing application, clustering helps to identify different parts of the border or multiple dispensing positions, so that a unified path planning can be carried out for each cluster, improving the dispensing efficiency.

[0134] After obtaining the region clustering, each cluster represents a set of spatially adjacent or similar candidate regions. To further refine the dispensing position, it is necessary to optimize the position of each cluster to determine an optimal center point as the representative point of the cluster. This center point should be able to reflect the overall position characteristics of all regions within the cluster and be as close as possible to the ideal dispensing position.

[0135] In this embodiment, the calculation expression is

[0136] ;

[0137] where S is the set of candidate points, which contains the optimal center point of each cluster and the output is a set of optimal center points which will be used as the input for subsequent dispensing path planning;

[0138] is to find a point from all possible center points of the cluster to minimize the objective function, that is, to find the best center point among all points within the cluster.

[0139] is the nth cluster, which contains all candidate regions belonging to this cluster. Each cluster is an independent calculation unit, and the goal is to find an optimal center point for each cluster.

[0140] To accumulate all candidate regions in the clustering one by one, which is used to accumulate the weighted distances of all regions in the current clustering and calculate the central point of the current hypothesis and the total weighted distance from the central point to each region in the clustering.

[0141] is the weight of the k-th region, indicating the degree of influence of this region on the calculation of the central point.

[0142] is the coordinate of the hypothesized central point of the clustering. This is a variable, and during the optimization process, its value will be continuously adjusted until the point that minimizes the objective function is found, that is, the optimal central point.

[0143] is the geometric center coordinate of the k-th candidate region. When calculating the distance from the hypothesized central point to the k-th region, this fixed geometric center coordinate is needed.

[0144] is the hypothesized central point and the geometric center of the k-th region The Euclidean distance between them.

[0145] To solve for all clusterings n, where N represents the total number of clusterings.

[0146] In one embodiment, the steps of screening the candidate point set to obtain an effective point set and performing a dispensing path planning on the effective point set to obtain a preliminary dispensing path specifically include:

[0147] Performing a position consistency analysis on each candidate point in the candidate point set to obtain a position consistency screening result;

[0148] The main purpose of this step is to identify and exclude candidate points with inconsistent positions to ensure the stability and accuracy of subsequent processing. The position consistency analysis is achieved by calculating the position relationship between each candidate point and its neighboring points. The specific implementation steps include: calculating the distance between each pair of candidate points in the candidate point set and determining the neighborhood of each candidate point based on these distances (such as the nearest neighbor or radius neighborhood); analyzing the distance relationship between each candidate point and other points in its neighborhood and setting a certain threshold, such as marking as "inconsistent" if the distance is greater than a preset value; counting and analyzing the number and distribution density of points in the neighborhood, evaluating the neighborhood density of each candidate point and excluding points that do not meet the criteria; finally generating a position consistency screening result and marking candidate points that meet the position consistency conditions.

[0149] Perform edge intensity feature analysis processing on the edge intensity of each candidate point according to the position consistency screening result to obtain the intensity screening result;

[0150] The edge intensity reflects the obviousness of the edge at the candidate point and is achieved by calculating the image gradient. The specific implementation steps include: selecting an appropriate gradient operator (such as Sobel, Laplacian, etc.) and applying it to the original image, calculating the gradient magnitude and direction within the candidate point and its neighborhood; evaluating the edge intensity based on the average or maximum gradient value within the neighborhood; setting an edge intensity threshold and comparing the edge intensity of each candidate point with the threshold, marking it as "strong edge" or "weak edge"; finally generating the intensity screening result and retaining those candidate points that satisfy both position consistency and strong edge characteristics.

[0151] Perform topological structure analysis processing on the position relationship of the candidate points according to the intensity screening result to obtain the connected topology screening result;

[0152] By analyzing the topological structure between candidate points, ensure that the selected points can form an effective dispensing path. The specific implementation steps include: constructing a graph structure, regarding the candidate points as nodes in the graph, and establishing edges between nodes according to the distance threshold or nearest neighbor relationship; calculating the connected components in the graph, and each connected component represents a group of mutually connected candidate points; analyzing the topological characteristics of each connected component, such as the number of nodes, diameter, average path length, etc., to evaluate its connectivity and distribution pattern; setting corresponding screening criteria and excluding the candidate points in the connected components that do not meet the criteria, and finally generating the connected topology screening result.

[0153] Perform path sorting processing on the candidate points of the connected topology screening result to obtain the dispensing path point sequence;

[0154] After screening out the effective candidate points, path sorting aims to determine the order in which the dispensing head should visit these points in turn to construct a preliminary dispensing path. The specific implementation steps include: selecting a suitable path sorting algorithm (such as greedy algorithm, TSP approximation algorithm, heuristic search algorithm, etc.); calculating the distance between each pair of candidate points in the candidate point expansion set to construct a distance matrix; executing the path sorting algorithm, and determining the order in which the dispensing head visits the candidate points according to the distance matrix and the optimization objective of the algorithm (shortest path, fewest turns, etc.); generating the sorted dispensing path point sequence for subsequent processing.

[0155] Perform smoothing optimization processing on the path interval according to the dispensing path point sequence to obtain the optimized path point sequence;

[0156] To improve the smoothness and uniformity of the dispensing path, it is necessary to perform a smoothing optimization process on the path intervals. The specific implementation steps include: selecting a suitable smoothing algorithm, such as spline interpolation, Bezier curve fitting, filtering algorithms, etc.; setting the parameters of the smoothing algorithm, such as the number of interpolation points, the order of the curve, the size of the filtering window, etc.; applying the smoothing algorithm to process the sequence of dispensing path points, inserting or adjusting the point spacing to achieve a smooth transition of the path; evaluating the smoothing effect, such as path curvature, length, point spacing, etc., to ensure that the smoothed path meets the preset requirements; and finally generating an optimized sequence of path points.

[0157] Based on the optimized sequence of path points, perform a planning process on the dispensing speed to obtain a preliminary dispensing path.

[0158] After obtaining the optimized sequence of path points, the purpose of speed planning is to determine the movement speed of the dispensing head at different path points to ensure the smoothness and accuracy of the dispensing process. The specific implementation steps include: selecting a suitable speed planning method, such as trapezoidal speed planning, S-shaped speed planning, or look-ahead speed planning; setting the parameters of the speed planning, such as the maximum speed, acceleration, acceleration and deceleration time, etc.; calculating the speed of each path point and the speed transition between adjacent points according to the geometric characteristics of the path and the process requirements; performing a smoothing process on the speed curve to eliminate discontinuities and jitters; and combining the optimized sequence of path points and the speed planning results to generate a preliminary dispensing path containing position and speed information.

[0159] In one embodiment, the step of compensating and correcting the preliminary dispensing path based on the current position information of the LCM to obtain a corrected dispensing path and controlling the dispensing robot to perform dispensing operations according to the corrected dispensing path specifically includes:

[0160] Perform a calibration process on the current position information of the LCM, calculate the spatial difference between the actual position and the theoretical position of the LCM, and obtain the spatial offset matrix of the LCM;

[0161] Obtain the current position information of the LCM (Liquid Crystal Display Module) through a vision system or other sensors, compare it with the theoretical position, calculate the spatial difference between the actual position and the theoretical position, and thus obtain the spatial offset matrix. The specific implementation steps include: using a vision system or sensor to capture the feature points or edge information on the LCM to obtain the current position information; extracting the theoretical position information of the LCM from the CAD model or database; converting the current position information obtained by the sensor into the same coordinate system as the theoretical position; matching the feature point coordinates of the current position and the theoretical position, and calculating the rigid body transformation matrix describing the difference between the two through mathematical methods such as the least squares method, usually including a rotation matrix and a translation vector; combining the calculated rotation matrix and translation vector into a 4x4 homogeneous transformation matrix, that is, the spatial offset matrix of the LCM. This step ensures that the subsequent path transformation is based on the accurate difference between the actual and theoretical positions.

[0162] Perform a pose transformation on the preliminary dispensing path according to the spatial offset matrix to obtain a preliminary corrected dispensing path;

[0163] After obtaining the spatial offset matrix of the LCM, use this matrix to perform a pose transformation on each point on the preliminary dispensing path, so that the theoretical position points in the path are mapped to the actual positions, and a preliminary corrected dispensing path is obtained. The specific implementation steps include: reading the coordinates of all points in the preliminary dispensing path; applying the spatial offset matrix to perform a pose transformation on the coordinates of each point to calculate the positions of each point in the actual coordinate system; rearranging the transformed coordinate points into a new dispensing path to obtain the preliminary corrected dispensing path. This step ensures that the dispensing robot will perform the dispensing operation according to the actual position of the LCM.

[0164] Perform path continuity optimization on the preliminary corrected dispensing path to obtain a continuity optimized dispensing path;

[0165] In order to improve the smoothness and accuracy of the dispensing operation, it is necessary to perform path continuity optimization on the preliminary corrected dispensing path to make the path more continuous and smooth, reduce sharp corners and unnecessary turns. The specific implementation steps include: analyzing the geometric features of the preliminary corrected dispensing path to detect discontinuous points or inflection points in the path; using methods such as curve fitting and spline interpolation to smooth the path, inserting new transition points between the original path points, or adjusting the positions of the existing path points; evaluating the smoothness effect of the optimized path, calculating indicators such as curvature, length, and point spacing to ensure that the path continuity meets the preset requirements; generating a continuity optimized dispensing path to provide a basis for subsequent speed allocation and dispensing operations. This step ensures the smoothness and continuity of the dispensing path and adapts to the dynamic response characteristics of the dispensing robot.

[0166] Based on the dynamic response characteristics of the dispensing robot, perform speed allocation processing on the continuous optimized dispensing path to obtain an optimized dispensing path with speed allocation;

[0167] According to the dynamic response characteristics of the dispensing robot, such as maximum speed and acceleration limits, perform speed allocation processing on the continuous optimized dispensing path to ensure that the movement speed of each point on the path meets the performance constraints of the robot, and achieve smooth and efficient dispensing operations. The specific implementation steps include: determining dynamic response characteristic parameters of the dispensing robot, such as maximum speed and maximum acceleration; analyzing the continuous optimized dispensing path and detecting the inflection point positions that need deceleration on the path; allocating appropriate speeds to each point on the path to ensure that the maximum speed can be reached on the straight line segments, while deceleration is required at the inflection points and start / end points; performing smoothing processing on the speed allocation curve to avoid sudden speed changes and improve the dispensing quality; generating an optimized dispensing path with speed allocation. This step ensures that the dispensing robot maintains stable and smooth movement during the dispensing process through reasonable speed allocation.

[0168] Perform dispensing offset compensation processing on the optimized dispensing path with speed allocation to obtain an optimized dispensing path with offset compensation;

[0169] To compensate for the unknown offset of the dispensing head relative to the reference point, it is necessary to perform dispensing offset compensation processing on the optimized dispensing path with speed allocation to ensure that the glue is accurately deposited in the target area. The specific implementation steps include: determining the offset of the dispensing head relative to the reference point based on the installation and calibration data of the dispensing head; correcting the coordinates of each point on the path according to the offset to adjust the actual path of the dispensing head; rearranging and adjusting the path points after offset compensation to ensure that the path remains smooth and continuous; generating an optimized dispensing path with offset compensation, and the path after compensation conforms to the actual position of the dispensing head. This step ensures the dispensing accuracy and guarantees the alignment of the dispensing path with the actual product position.

[0170] Based on the kinematic model of the dispensing robot and joint angle constraints, and according to the optimized dispensing path with offset compensation, perform trajectory planning processing on the dispensing robot to obtain a corrected dispensing path, and control the dispensing robot to perform dispensing operations according to the corrected dispensing path.

[0171] On the basis of optimizing the dispensing path according to offset compensation, combined with the kinematic model and joint angle constraints of the dispensing robot, the trajectory of the dispensing path is planned. Finally, the corrected dispensing path is obtained, and the dispensing robot is controlled according to this path to perform precise dispensing operations. The specific implementation steps include: constructing the kinematic model of the dispensing robot, determining the motion range and constraint conditions of each joint; according to the robot kinematic model, planning the trajectory of the offset compensation optimized dispensing path, and converting the Cartesian coordinate points on the path into robot joint angles; ensuring the continuity and smoothness of the trajectory, avoiding sudden changes in joint angles, and optimizing the acceleration and velocity curves; executing the robot control program, driving each joint of the robot according to the corrected dispensing path, and performing actual dispensing operations. Through precise trajectory planning, this step realizes high-precision dispensing of the dispensing robot based on the actual position, meeting the process requirements.

[0172] Referring to Figure 2 , an LCM border encapsulation device based on image processing, comprising:

[0173] An acquisition module 100, configured to acquire the original image of the LCM, preprocess the original image, and extract edge features from the preprocessed original image to obtain a preliminary edge image;

[0174] A first processing module 200, configured to perform morphological processing on the preliminary edge image to obtain an optimized edge image;

[0175] A second processing module 300, configured to perform gray-scale thresholding on the optimized edge image based on a preset threshold to obtain a binary image, where the binary image includes a plurality of specific regions;

[0176] A calibration module 400, configured to calibrate the connected edge regions in the plurality of specific regions, and screen out a candidate point set according to the geometric features of the connected edge regions, where each candidate point represents a potential dispensing position;

[0177] A planning module 500, configured to perform screening processing on the candidate point set to obtain an effective point set, and perform dispensing path planning on the effective point set to obtain a preliminary dispensing path;

[0178] A control module 600, configured to perform compensation and correction on the preliminary dispensing path based on the current position information of the LCM to obtain a corrected dispensing path, and control a dispensing robot to perform dispensing operations according to the corrected dispensing path.

[0179] In this embodiment, by acquiring the original image of the LCM based on the vision system and performing preprocessing and edge feature extraction, the processing accuracy of the image and the extraction quality of the edge features are effectively improved. By performing morphological processing and gray-scale thresholding on the preliminary edge image, an optimized binary image is obtained, which can more accurately segment multiple specific regions. After screening the candidate point set based on the geometric features of the connected edge regions, the obtained effective point set after further screening can not only ensure the accuracy of the dispensing position, but also effectively avoid the problem of uneven glue caused by recognition errors during the dispensing process, thus realizing the smooth transition between the straight line segment and the arc segment and high-precision dispensing. In addition, by compensating and correcting the preliminary dispensing path, this method can dynamically adapt to the current position information of the LCM, significantly improving the accuracy and consistency of the dispensing path, and solving problems such as glue bulging, wire drawing, and glue breakage caused by the discontinuity of the dispensing path and speed, ensuring the uniformity of the glue shape and the stability of the dispensing quality.

[0180] Based on the same idea as the method in the above embodiment, the LCM border encapsulation device provided in this application can implement the method of the above embodiment. For the convenience of description, in the structural schematic diagram of the device embodiment, only the parts related to the embodiment of this application are shown. Those skilled in the art can understand that the illustrated structure does not constitute a limitation on the device, and it may include more or fewer components than those illustrated, or combine certain components, or have different component arrangements.

[0181] Refer to Figure 3 , and in the embodiment of this application, a computer device is also provided. This computer device can be a server, and its internal structure can be as Figure 3 shown. This computer device includes a processor, a memory, a network interface, and a database connected through a system bus. Among them, the processor of this computer design is used to provide computing and control capabilities. The memory of this computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of this computer device is used to store data such as the dispensing method of the LCM border. The network interface of this computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, it realizes a method for LCM border encapsulation based on image processing.

[0182] An embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, a method for encapsulating the LCM border based on image processing is implemented, including: obtaining an original image of the LCM based on a vision system, preprocessing the original image, and performing edge feature extraction on the preprocessed original image to obtain a preliminary edge image; performing morphological processing on the preliminary edge image to obtain an optimized edge image; performing gray-scale thresholding on the optimized edge image based on a preset threshold to obtain a binary image, where the binary image includes a plurality of specific regions; calibrating the connected edge regions in the plurality of specific regions, and screening out a candidate point set according to the geometric features of the connected edge regions, where each candidate point represents a potential dispensing position; performing screening processing on the candidate point set to obtain an effective point set, and performing dispensing path planning on the effective point set to obtain a preliminary dispensing path; compensating and correcting the preliminary dispensing path based on the current position information of the LCM to obtain a corrected dispensing path, and controlling a dispensing robot to perform a dispensing operation according to the corrected dispensing path.

[0183] Those of ordinary skill in the art can understand that all or part of the processes of implementing the methods in the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, storage, database, or other medium provided in the present application and used in the embodiments can include non-volatile and / or volatile memories. Non-volatile memories can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memories can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (SSRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0184] The above are only the preferred embodiments of the present invention, and do not limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made by using the content of the specification and drawings of the present invention, or directly or indirectly applied in other related technical fields, is equally included in the patent protection scope of the present invention.

Claims

1. A LCM frame packaging method based on image processing, characterized in that: include: Acquiring an original image of the LCM based on a visual system, preprocessing the original image, and extracting edge features from the preprocessed original image to obtain a preliminary edge image; Performing morphological processing on the preliminary edge image to obtain an optimized edge image; Performing grayscale thresholding processing on the optimized edge image based on a preset threshold to obtain a binary image, wherein the binary image includes a plurality of specific areas; Marking the connected edge regions in the plurality of specific regions, and selecting a candidate point set according to the geometric features of the connected edge regions, wherein each candidate point represents a potential dispensing position; The candidate point set is screened to obtain a valid point set, and a dispensing path is planned for the valid point set to obtain a preliminary dispensing path, specifically including: Performing position consistency analysis on each candidate point in the candidate point set to obtain a position consistency screening result; Perform edge strength feature analysis on the edge strength of each candidate point according to the position consistency screening result to obtain a strength screening result; Performing topological structure analysis on the positional relationship of the candidate points according to the strength screening results to obtain a connected topology screening result; Performing path sorting processing on the candidate points of the connected topology screening result to obtain a dispensing path point sequence; Performing smoothing optimization processing on the path interval according to the dispensing path point sequence to obtain an optimized path point sequence; Planning and processing the dispensing speed based on the optimized path point sequence to obtain a preliminary dispensing path; Based on the current position information of the LCM, the preliminary dispensing path is compensated and corrected to obtain a corrected dispensing path, and the dispensing robot is controlled to perform a dispensing operation according to the corrected dispensing path, specifically including: Calibrate the current position information of the LCM, calculate the spatial difference between the actual position and the theoretical position of the LCM, and obtain the spatial offset matrix of the LCM; Performing posture transformation processing on the preliminary dispensing path according to the spatial offset matrix to obtain a preliminary corrected dispensing path; Performing path continuity optimization processing on the preliminary corrected dispensing path to obtain a continuous optimized dispensing path; Based on the dynamic response characteristics of the dispensing robot, speed distribution processing is performed on the continuous optimized dispensing path to obtain a speed distribution optimized dispensing path; Performing dispensing offset compensation processing on the speed distribution optimized dispensing path to obtain an offset compensated optimized dispensing path; Based on the kinematic model and joint angle constraints of the glue robot, and according to the offset compensation to optimize the glue dispensing path, the glue dispensing robot is trajectory planned to obtain a corrected glue dispensing path, and the glue dispensing robot is controlled to perform glue dispensing operations according to the corrected glue dispensing path.

2. The LCM frame packaging method based on image processing according to claim 1, characterized in that: The steps of acquiring the original image of LCM based on the visual system, preprocessing the original image, and extracting edge features from the preprocessed original image to obtain a preliminary edge image specifically include: Shooting the LCM based on the visual system to obtain an original image of the LCM, and performing color space conversion processing on the original image according to the color space characteristics of the original image to obtain a converted image; Calculating a weighted average value of each pixel in the converted image and neighboring pixels to smooth the converted image and obtain a denoised image; Performing contrast enhancement processing on the denoised image to highlight the edge of the denoised image to obtain an enhanced image; Edge features are extracted from the enhanced image to obtain a preliminary edge image.

3. The LCM frame packaging method based on image processing according to claim 2, characterized in that: The step of performing morphological processing on the preliminary edge image to obtain an optimized edge image specifically comprises: Performing dilation processing on the preliminary edge image according to the first preset structure element to obtain a dilated image; Contracting an edge region in the dilated image according to a second preset structure element to obtain a contracted image, wherein an area of ​​the first preset structure element is greater than an area of ​​the second preset structure element; Performing edge detection on the shrunk image, calculating the gradient information of each pixel in the shrunk image, and extracting the object boundary of the shrunk image to obtain an edge feature image; Performing an open operation on the edge feature image to obtain an open operation image, and performing a close operation on the open operation image to obtain a closed operation image; The closed operation image is filtered to obtain an optimized edge image.

4. The LCM frame packaging method based on image processing according to claim 1, characterized in that: The step of performing grayscale thresholding processing on the optimized edge image based on a preset threshold to obtain a binary image, wherein the binary image includes a plurality of specific areas, specifically comprises: According to the gray value distribution of the optimized edge image, the gray value frequency of each pixel of the optimized edge image is calculated to generate a gray level histogram; Performing peak detection on the grayscale histogram to identify areas in the optimized edge image where grayscale values ​​have specific changes, so as to set a candidate threshold range; Applying the candidate threshold range to the optimized edge image, performing grayscale thresholding processing on the optimized edge image, and obtaining a binary image; Performing connected domain analysis on the binary image to obtain multiple connected regions; A plurality of specific regions are screened out according to the geometric features of the plurality of connected regions.

5. The LCM frame packaging method based on image processing according to claim 1, characterized in that: The step of calibrating the connected edge regions in the plurality of specific regions and selecting the candidate point set according to the geometric features of the connected edge regions specifically includes: Performing connected domain analysis processing on the multiple specific regions to obtain multiple connected region images; Extracting geometric features of connected edge regions of each connected region image to obtain geometric parameters of each connected edge region; Screening the geometric parameters according to preset geometric standards to obtain a set of candidate regions; Performing regional clustering processing on the candidate region set to obtain multiple regional clusters; The position of each of the regional clusters is optimized, the center point of each of the regional clusters is determined, and a candidate point set is obtained.

6. An LCM frame packaging device based on image processing, characterized in that: include: An acquisition module is used to acquire an original image of the LCM, preprocess the original image, and extract edge features from the preprocessed original image to obtain a preliminary edge image; A first processing module, used for performing morphological processing on the preliminary edge image to obtain an optimized edge image; A second processing module is used to perform grayscale threshold processing on the optimized edge image based on a preset threshold to obtain a binary image, wherein the binary image includes a plurality of specific areas; A calibration module, used for calibrating the connected edge regions in the plurality of specific regions, and screening out a candidate point set according to the geometric features of the connected edge regions, wherein each candidate point represents a potential dispensing position; The planning module is used to screen the candidate point set to obtain a valid point set, and perform dispensing path planning on the valid point set to obtain a preliminary dispensing path, specifically including: Performing position consistency analysis on each candidate point in the candidate point set to obtain a position consistency screening result; Perform edge strength feature analysis on the edge strength of each candidate point according to the position consistency screening result to obtain a strength screening result; Performing topological structure analysis on the positional relationship of the candidate points according to the strength screening results to obtain a connected topology screening result; Performing path sorting processing on the candidate points of the connected topology screening result to obtain a dispensing path point sequence; Performing smoothing optimization processing on the path interval according to the dispensing path point sequence to obtain an optimized path point sequence; Planning and processing the dispensing speed based on the optimized path point sequence to obtain a preliminary dispensing path; The control module is used to compensate and correct the preliminary dispensing path based on the current position information of the LCM to obtain a corrected dispensing path, and control the dispensing robot to perform a dispensing operation according to the corrected dispensing path, specifically including: Calibrate the current position information of the LCM, calculate the spatial difference between the actual position and the theoretical position of the LCM, and obtain the spatial offset matrix of the LCM; Performing posture transformation processing on the preliminary dispensing path according to the spatial offset matrix to obtain a preliminary corrected dispensing path; Performing path continuity optimization processing on the preliminary corrected dispensing path to obtain a continuous optimized dispensing path; Based on the dynamic response characteristics of the dispensing robot, speed distribution processing is performed on the continuous optimized dispensing path to obtain a speed distribution optimized dispensing path; Performing dispensing offset compensation processing on the speed distribution optimized dispensing path to obtain an offset compensated optimized dispensing path; Based on the kinematic model and joint angle constraints of the glue robot, and according to the offset compensation to optimize the glue dispensing path, the glue dispensing robot is trajectory planned to obtain a corrected glue dispensing path, and the glue dispensing robot is controlled to perform glue dispensing operations according to the corrected glue dispensing path.

7. A computer device, characterized in that: The method comprises a processor, a memory and a computer program stored in the memory and executable on the processor, wherein the processor implements the method according to any one of claims 1 to 5 when executing the computer program.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.

Citation Information

Patent Citations

  • Dispensing track calculation method, dispensing track calculation equipment, medium, dispensing machine equipment and dispensing method

    CN118840386A

  • Mobile phone middle frame dispensing path planning method based on improved reinforcement learning

    CN118963367A