Dispensing equipment control method and device and electronic equipment

By using a camera to identify the target dispensing edge and dynamically control the dispensing speed, the problem of insufficient glue filling of gaps caused by manual operation is solved, thus improving product quality and production efficiency.

CN122006977APending Publication Date: 2026-05-12DONG GUAN GAO WEI GUANG XUE DIAN ZI YOU XIAN GONG SI
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
DONG GUAN GAO WEI GUANG XUE DIAN ZI YOU XIAN GONG SI
Filing Date
2024-11-12
Publication Date
2026-05-12

AI Technical Summary

Technical Problem

In existing technologies, the product dispensing process relies on manual operation, which results in the adhesive failing to effectively fill the gaps, affecting product reliability and production efficiency.

Method used

The system captures images of the target dispensing area using a camera, identifies the target dispensing edge and determines the gap width, and dynamically controls the dispensing speed using a preset mapping relationship, so that the dispensing equipment dispenses adhesive at the target dispensing speed.

Benefits of technology

This allows the colloid to better fill the gaps, improving product quality and dispensing efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122006977A_ABST
    Figure CN122006977A_ABST
Patent Text Reader

Abstract

The invention discloses a dispensing equipment control method and device and electronic equipment, and is applied to the electronic equipment. The method comprises the steps that an area image of a target dispensing area is collected through a camera; identifying the area image, and determining a target dispensing edge in the target dispensing area; determining a gap width corresponding to the target dispensing edge; according to a preset mapping relation, the target dispensing speed corresponding to the gap width is determined, and the preset mapping relation is used for describing the corresponding relation between the gap width of the dispensing edge and the dispensing speed; and sending a control instruction to the dispensing equipment according to the target dispensing speed, wherein the control instruction is used for instructing the dispensing equipment to dispense the target dispensing edge according to the target dispensing speed. By means of the dispensing equipment control method and device and the electronic equipment, the electronic equipment can dynamically control the dispensing speed of the dispensing equipment according to the gap width of the product, the gap can be better filled with glue, and the product quality and the dispensing efficiency are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of dispensing technology, specifically to a dispensing equipment control method, device, and electronic equipment. Background Technology

[0002] In the product manufacturing process, dispensing is often used to adhere, pot, insulate, fix, and smooth the surface of products. Currently, the dispensing process mainly relies on manual operation. However, due to differences in operator skill levels, the adhesive may not adequately cover gaps in the product, affecting product reliability and production efficiency. Summary of the Invention

[0003] This application discloses a dispensing equipment control method, device, and electronic device, which enables the electronic device to dynamically control the dispensing speed of the dispensing equipment according to the gap width of the product, so that the adhesive can better fill the gap and improve product quality and dispensing efficiency.

[0004] The first aspect of this application discloses a dispensing equipment control method applied to electronic devices, the method comprising:

[0005] The camera captures regional images of the target adhesive application area;

[0006] The image of the region is identified to determine the target adhesive edge in the target adhesive area;

[0007] Determine the gap width corresponding to the adhesive edge of the target point;

[0008] According to a preset mapping relationship, the target dispensing speed corresponding to the gap width is determined. The preset mapping relationship is used to describe the correspondence between the gap width of the dispensing edge and the dispensing speed.

[0009] A control command is sent to the dispensing equipment according to the target dispensing speed. The control command is used to instruct the dispensing equipment to dispense glue to the target dispensing edge at the target dispensing speed.

[0010] In some possible embodiments, identifying the region image and determining the target adhesive edge in the target adhesive region includes:

[0011] Determine the search area in the region image, wherein the search area includes the image content of the target dispensing area;

[0012] Determine the search image features from the search area;

[0013] Based on the search parameters and the search image features, the search area is matched with a plurality of pre-stored first dispensing area templates to determine the target dispensing area template corresponding to the search area from the plurality of first dispensing areas.

[0014] The target dispensing edge in the target dispensing area is determined based on the dispensing edge position information corresponding to the template of the target dispensing area.

[0015] In some possible embodiments, the step of matching the search region with a plurality of pre-stored first dispensing region templates based on search parameters and the search image features to determine the target dispensing region template corresponding to the search region from the plurality of first dispensing regions includes:

[0016] The search image features are matched with multiple pre-stored first dispensing area templates to obtain the contour matching degree between the search area and each of the first dispensing area templates.

[0017] From the plurality of first dispensing area templates, select a second dispensing area template whose contour matching degree is greater than a preset matching degree threshold;

[0018] Calculate the template similarity between any two templates of the second dotted adhesive region;

[0019] The second dispensing area template with a template similarity less than the preset similarity threshold is identified as the target dispensing area template.

[0020] In some possible embodiments, after identifying the region image and determining the target adhesive edge in the target adhesive region, the method further includes:

[0021] Determine an adjacent edge that is adjacent to the target glue edge, and determine the first intersection point between the adjacent edge and the target glue edge;

[0022] Based on the first intersection point, determine the offset between the adjacent edge and the target point adhesive edge;

[0023] Determine the first dispensing length corresponding to the target dispensing edge;

[0024] The dispensing start position is determined based on the first dispensing length, the offset, and the first intersection point;

[0025] Sending a control command to the dispensing equipment according to the target dispensing speed, wherein the control command instructs the dispensing equipment to dispense adhesive onto the target edge at the target dispensing speed, includes:

[0026] The control command is sent to the dispensing device according to the dispensing start position and the target dispensing speed. The control command is used to instruct the dispensing device to dispense glue to the target dispensing edge starting from the dispensing start position and at the target dispensing speed.

[0027] In some possible embodiments, determining the dispensing start position based on the first dispensing length, the offset, and the first intersection includes:

[0028] Calculate the sum of the first dispensing length and the offset to obtain the second dispensing length;

[0029] Based on the first intersection point and the second glue dot length, determine the arc passing through the edge of the target glue dot, with the first intersection point as the center and the radius being the second glue dot length;

[0030] The second intersection point of the arc and the target dispensing edge is determined as the dispensing start position.

[0031] In some possible embodiments, determining the gap width corresponding to the target adhesive edge includes:

[0032] The target adhesive edge is divided into multiple sub-edges of equal length, and the gap width corresponding to each sub-edge is determined.

[0033] Sending control commands to the dispensing equipment according to the target dispensing speed includes:

[0034] Control commands are sent to the dispensing equipment according to the target dispensing speed corresponding to each of the multiple sub-edges. The control commands are used to instruct the dispensing equipment to dispense glue to each of the sub-edges sequentially according to the target dispensing speed corresponding to each sub-edge.

[0035] In some possible embodiments, the method further includes, prior to sending control commands to the dispensing device according to the target dispensing speed:

[0036] The coordinate information of multiple guide points is determined on the target glue edge, and the guide points include at least the two endpoints of the target glue edge and the glue point corresponding to each sub-edge;

[0037] The step of sending control commands to the dispensing equipment according to the target dispensing speed corresponding to each of the multiple sub-segments includes:

[0038] Based on the coordinate information of the multiple guide points and the target dispensing speeds corresponding to the multiple sub-edges, a control command is sent to the dispensing device. The control command is used to instruct the dispensing device to dispense glue onto the target dispensing edge according to the movement trajectory formed by the coordinate information of the multiple guide points and the target dispensing speed corresponding to the sub-target dispensing edge where each guide point is located.

[0039] In some possible embodiments, the method further includes, prior to sending control commands to the dispensing device according to the target dispensing speed:

[0040] The depth image of the target adhesive dispensing area is captured by a camera;

[0041] Determine the first relative distance between the target adhesive edge and the camera based on the depth image;

[0042] The relative height between the target dispensing edge and the reference plane is determined based on the first relative position between the camera and the reference plane, the second relative position between the dispensing device and the reference plane, and the first relative distance.

[0043] The dispensing height of the target dispensing edge is determined based on the relative height.

[0044] Sending control commands to the dispensing equipment according to the target dispensing speed includes:

[0045] The control command is sent to the dispensing equipment according to the dispensing height and the target dispensing speed. The control command is used to instruct the dispensing equipment to dispense glue to the target dispensing edge according to the dispensing height and the target dispensing speed.

[0046] A second aspect of this application discloses a dispensing equipment control device, applied to an electronic device, the device comprising:

[0047] The image acquisition module is used to acquire regional images of the target dispensing area via a camera;

[0048] The glue dispensing edge determination module is used to identify the region image and determine the target glue dispensing edge in the target glue dispensing region;

[0049] The gap width determination module is also used to determine the gap width corresponding to the adhesive edge of the target point;

[0050] The dispensing speed determination module is also used to determine the target dispensing speed corresponding to the gap width according to a preset mapping relationship, wherein the preset mapping relationship is used to describe the correspondence between the gap width of the dispensing edge and the gap width.

[0051] The control module is used to send control commands to the dispensing equipment according to the target dispensing speed. The control commands are used to instruct the dispensing equipment to dispense glue to the target dispensing edge at the target dispensing speed.

[0052] A third aspect of this application discloses an electronic device, including: a memory storing executable program code and a processor coupled to the memory; the processor calls the executable program code stored in the memory to execute the method described in any of the above embodiments.

[0053] A fourth aspect of this application discloses a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor in an electronic device, causes the electronic device to perform the method described in any of the preceding embodiments.

[0054] The fifth aspect of this application discloses a computer program product, which includes a computer program and, when executed by a processor, causes the processor to implement the method described in any of the above embodiments.

[0055] The dispensing equipment control method, apparatus, electronic device, and storage medium disclosed in this application embodiment involve an electronic device acquiring a region image of the target dispensing area via a camera, identifying the target dispensing edge within the target dispensing area, determining the corresponding gap width of the target dispensing edge, determining the target dispensing speed corresponding to the gap width based on a preset mapping relationship, and sending a control command to the dispensing equipment according to the target dispensing speed. This causes the dispensing equipment to dispense adhesive onto the target dispensing edge according to the control command and the target dispensing speed. In this application embodiment, the electronic device can identify the region image of the target dispensing area, accurately determine the gap width of the target dispensing edge, and then determine the corresponding target dispensing speed based on the gap width. This allows the electronic device to dynamically control the dispensing speed of the dispensing equipment according to the gap width of the product, enabling the adhesive to better fill the gap, improving product quality and dispensing efficiency. Attached Figure Description

[0056] To more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0057] Figure 1 This application provides an illustration of an application scenario for a dispensing equipment control method.

[0058] Figure 2 A flowchart of a dispensing equipment control method provided in this application embodiment;

[0059] Figure 3This is a schematic diagram illustrating the determination of target glue edges by identifying regional images, as provided in an embodiment of this application.

[0060] Figure 4 A schematic diagram of the opening surface of the gap between the camera and the adhesive edge of the target point, provided in an embodiment of this application;

[0061] Figure 5 A flowchart for determining the adhesive edge of a target point by identifying a region image, provided in an embodiment of this application;

[0062] Figure 6 A schematic diagram illustrating the determination of search image features using a region image, as provided in an embodiment of this application;

[0063] Figure 7 A flowchart for determining the target dispensing area template provided in the embodiments of this application;

[0064] Figure 8 A flowchart for performing a dispensing operation by confirming the dispensing start position, provided for an embodiment of this application;

[0065] Figure 9 A schematic diagram illustrating the determination of the first intersection point provided in an embodiment of this application;

[0066] Figure 10 A flowchart for determining the dispensing start position using an arc, provided as an embodiment of this application;

[0067] Figure 11 This is a schematic diagram illustrating the determination of the dispensing start position using an arc, as provided in an embodiment of this application.

[0068] Figure 12 A flowchart illustrating another dispensing equipment control method provided in this application embodiment;

[0069] Figure 13 A schematic diagram illustrating the dispensing operation performed by a dispensing device with a dispensing head, as provided in an embodiment of this application.

[0070] Figure 14 A schematic diagram illustrating the dispensing operation performed by a dispensing device with multiple dispensing heads, as provided in an embodiment of this application.

[0071] Figure 15 This is a schematic diagram of the dispensing device provided in this application dispensing an adhesive to a target edge according to multiple guide points;

[0072] Figure 16 A flowchart for determining the dispensing height of the target dispensing edge, provided for embodiments of this application;

[0073] Figure 17 A schematic diagram illustrating the determination of the dispensing height of the target dispensing edge for embodiments of this application;

[0074] Figure 18 A structural block diagram of a dispensing equipment control device provided in an embodiment of this application;

[0075] Figure 19 This is a structural block diagram of an electronic device provided in an embodiment of this application. Detailed Implementation

[0076] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0077] It should be noted that the terms "comprising" and "having," and any variations thereof, in the embodiments and accompanying drawings of this application are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units is not limited to the steps or units listed, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or devices.

[0078] Furthermore, "at least one" refers to one or more, while "more than one" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can mean: A alone, A and B simultaneously, or B alone, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, and c can mean: a, or b, or c, or a and b, or a and c, or b and c, or a, b, and c, where a, b, and c can be single or multiple.

[0079] Figure 1 This diagram illustrates an application scenario of a dispensing equipment control method provided in an embodiment of this application. Figure 1 As shown, the dispensing equipment control scenario includes electronic device 110, camera 120, and dispensing equipment 130.

[0080] Dispensing refers to the process of applying, potting, or dripping adhesive onto a product to achieve functions such as adhesion, potting, insulation, fixation, and surface smoothing.

[0081] Electronic device 110 can be a terminal device such as a personal computer, laptop, tablet, or mobile phone, or other types of electronic devices with computing and analysis capabilities, but is not limited thereto. Camera 120 can be used, under the control of electronic device 110, to acquire regional images of the target dispensing area of ​​the product. Camera 120 can be a 2D camera, a 3D camera, or other vision sensors with image capture capabilities, but is not limited thereto. After acquiring the regional image of the target dispensing area using camera 120, electronic device 110 can further process the regional image to obtain detailed information such as the gap width corresponding to the target dispensing edge.

[0082] Dispensing equipment 130 refers to mechanical equipment used for dispensing adhesive to products. Under the control of electronic equipment 110, dispensing equipment 130 performs dispensing operations on the target dispensing edges of the product. One dispensing device 130 can perform dispensing operations on one target dispensing edge of the product individually, or simultaneously on multiple target dispensing edges of the product. One dispensing device 130 may include one or more dispensing heads, which are responsible for dispensing adhesive from the dispensing device 130 during the dispensing operation. One dispensing head can be responsible for dispensing adhesive to one dispensing edge, or multiple dispensing heads can be responsible for dispensing adhesive to one dispensing edge.

[0083] Electronic device 110 acquires a regional image of the target dispensing area through camera 120. Electronic device 110 identifies the regional image, determines the target dispensing edge in the target dispensing area, and determines the gap width corresponding to the target dispensing edge. Electronic device 110 determines the target dispensing speed corresponding to the gap width according to a preset mapping relationship. Electronic device 110 sends a control command to dispensing device 130 according to the target dispensing speed, so that dispensing device 130 dispenses glue to the target dispensing edge according to the control command and the target dispensing speed.

[0084] like Figure 2 As shown, in one embodiment, a dispensing equipment control method is provided, which can be applied to electronic devices. The method may include the following steps:

[0085] S210 uses a camera to capture regional images of the target dispensing area.

[0086] The target dispensing area refers to the area or part of the product where dispensing operations are required. The area image refers to an image obtained by taking a picture of the target dispensing area using a camera; the area image may include the entire target dispensing area.

[0087] S220, identify the region image and determine the target glue edge in the target glue application area.

[0088] The target dispensing area may include a target dispensing edge, which refers to the edge of the product's target dispensing area where the dispensing operation needs to be performed. Further, the target dispensing edge may have a certain gap, which refers to the space between the two sides of the target dispensing area where dispensing is required. Adhesive needs to be filled into this gap to cover it. Optionally, the electronic device may define one or more target dispensing edges from the target dispensing area.

[0089] Electronic devices can identify regional images and determine the target adhesive edge within the target adhesive dispensing region. Methods for identifying regional images may include, but are not limited to, edge detection, shape analysis, and feature extraction. Furthermore, determining the target adhesive edge within the target adhesive dispensing region can involve determining the image position of the target adhesive edge within the regional image.

[0090] Optionally, the camera may include a brightness camera. The area image captured by the brightness camera can be a brightness image, which can refer to an image where each pixel value represents the brightness or grayscale level of that pixel. After the electronic device captures the brightness image of the area image through the brightness camera, it can identify the brightness image to determine the target adhesive edge in the target adhesive application area.

[0091] Figure 3 This is a schematic diagram illustrating the process of identifying a target adhesive edge by recognizing a region image, as provided in an embodiment of this application. The electronic device first acquires a brightness image 300 of the target adhesive area using a brightness camera, identifies the brightness image 300, determines the target adhesive area 310, and identifies one of the target adhesive edges 320 within the target adhesive area 310.

[0092] S230, determine the gap width corresponding to the adhesive edge of the target point.

[0093] The gap width refers to the width of the space between the two sides of the target adhesive edge of the product that need to be adhesived. The two sides of the target adhesive edge can refer to a first side and a second side. The first side can refer to the side furthest from the center of the product or the target adhesive area, while the second side can refer to the side closer to the center of the product or the target adhesive area relative to the first side. When the opening surface of the gap in the target adhesive edge is parallel to the vertical direction, the relative height of the second side is greater than the relative height of the first side. The electronic device can determine the corresponding target adhesive edge gap width based on the relative height of the second side and the relative height of the first side. Optionally, when the camera is facing the opening surface of the gap in the target adhesive edge, the second side can refer to the side above the other side.

[0094] The electronic device can determine multiple measurement points on the adhesive edge of the target point, and corresponding first and second side points on the first and second side surfaces corresponding to the multiple measurement points. Based on the position information of the first and second side points, the electronic device can determine the gap width corresponding to the measurement point. With a sufficient number of measurement points, the electronic device can obtain the gap width corresponding to the adhesive edge of the target point.

[0095] Figure 4 This is a schematic diagram of the opening surface of the gap between the camera and the adhesive edge of the target point, provided in an embodiment of this application. (See diagram below.) Figure 4 As shown, in the target adhesive edge 400, the second side 410 is the side closest to the top of the paper, and the first side 420 is the side closest to the bottom of the paper. The gap width 430 corresponding to the target adhesive edge 400 is the height difference between the second side 410 and the first side 420. The electronic device can determine six measurement points a, b, c, d, e, and f on the target adhesive edge 400, and determine the corresponding first side points 2, 4, 6, 8, 10, and 12, and the corresponding second side points 1, 3, 5, 7, 9, and 11 on the first side 420 and the second side 410, respectively. The electronic device can determine the gap width of measurement point a based on the coordinate information of the first side point 2 and the second side point 1. For example, when establishing a two-dimensional coordinate system with the first side point, the coordinates of the first side point 2 are (0, 0), and the coordinates of the second side point 1 are (0, 5), then the gap width 430 of measurement point a can be calculated as 5 mm. The gap width 430 of other measurement points can be obtained in the same way.

[0096] S240, determine the target dispensing speed corresponding to the gap width according to the preset mapping relationship.

[0097] The preset mapping relationship refers to the pre-defined correspondence between the gap width and the dispensing speed. This preset mapping relationship can be derived through experimental data, empirical formulas, or machine learning algorithms. The target dispensing speed refers to the dispensing speed at which the amount of adhesive from the dispensing equipment can fill the gap at the target dispensing edge.

[0098] It should be noted that, under stable dispensing conditions, gap width and dispensing speed can be negatively correlated. That is, the wider the gap at the target dispensing edge, the lower the dispensing speed required to ensure sufficient adhesive to fill the gap. If the gap width is large and the dispensing speed is too fast, the adhesive volume may be insufficient to fill the gap, resulting in unfilled voids. Conversely, if the gap width is small and the dispensing speed is too slow, excessive dispensing may cause adhesive to overflow. In other words, a mismatch between the gap width and dispensing speed can lead to serious product quality issues. Therefore, it is necessary to pre-determine the dispensing speed that matches each gap width and establish a preset mapping relationship. After the electronic equipment acquires the gap width of the target dispensing edge, it can directly determine the corresponding target dispensing speed based on the preset mapping relationship.

[0099] Optionally, a preset mapping relationship can be established based on a specific range of gap width and dispensing speed. After obtaining the gap width of the target dispensing edge, the electronic device can determine which range the gap width is located in and determine the corresponding target dispensing speed in the preset mapping relationship.

[0100] Optionally, when the electronic device obtains the gap width of the adhesive edge at the target point based on multiple measurement points, a preset mapping relationship can be established for each measurement point.

[0101] Table 1

[0102]

[0103] For example, a preset mapping relationship can be set as shown in Table 1. For measurement points a, b, and c, which are in the first half of the target glue edge, if the gap width is in the range (0mm, 0.26mm), then the corresponding dispensing speed should be 12mm / s; if the gap width is in the range (0.26mm, 1mm), then the corresponding dispensing speed should be 9.6mm / s. For measurement points e, d, and f, which are in the second half of the target glue edge, if the gap width is in the range (0mm, 0.12mm), then the corresponding point... The dispensing speed should be 12 mm / s. When the gap width is within the range (0.26 mm, 1 mm), the corresponding dispensing speed is determined to be 9.6 mm / s. Therefore, at the target dispensing edge, when the gap width of measurement point a is 0.13 mm, the electronic device can determine that the target dispensing speed corresponding to measurement point a should be 12 mm / s according to the preset mapping relationship. When the gap width of measurement point d is 0.8 mm, the electronic device can determine that the target dispensing speed corresponding to measurement point d should be 9.6 mm / s according to the preset mapping relationship.

[0104] S250 sends control commands to the dispensing equipment according to the target dispensing speed.

[0105] Control commands can be used to instruct the dispensing equipment to dispense adhesive onto the target edge at a target dispensing speed. After determining the position of the target edge, the gap width of the target edge, and the target dispensing speed, the electronic equipment can generate control commands based on the target dispensing speed and send these commands to the dispensing equipment, thereby controlling the dispensing equipment to dispense adhesive onto the target edge at the target dispensing speed.

[0106] For example, the electronic device determines that the gap width of the target dispensing edge is 0.5 mm, and determines that the dispensing speed matching the gap width (0.26 mm, 1 mm) is 9.6 mm / s according to a preset mapping relationship. Therefore, the target dispensing speed of the target dispensing edge is determined to be 9.6 mm / s. The electronic device can generate control commands based on the target dispensing speed of 9.6 mm / s, thereby controlling the dispensing device to dispense adhesive to the target dispensing edge at the target dispensing speed of 9.6 mm / s.

[0107] In this embodiment, the electronic device can identify the area image of the target dispensing area, accurately determine the gap width of the target dispensing edge, and then determine the corresponding target dispensing speed according to the gap width in a preset mapping relationship. This allows the electronic device to dynamically control the dispensing speed of the dispensing device according to the gap width of the product, so that the adhesive can better fill the gap, improve product quality and dispensing efficiency.

[0108] like Figure 5 As shown, in one embodiment, the step of identifying the region image and determining the target adhesive edge in the target adhesive area may include the following steps:

[0109] S510, Determine the search area in the region image.

[0110] The search area refers to a specific region within a region image selected by a search box for further analysis to locate the target adhesive edge. The size of the search box corresponding to the search area can be smaller than the size of the region image, and the electronic device can move the search box within the region image to locate the target adhesive edge.

[0111] Optionally, the size of the search box can be set automatically by the electronic device or manually by the user; the search box can be moved automatically by the electronic device in fixed steps or manually dragged by the user, but is not limited to these.

[0112] Optionally, after determining the search region in the region image, non-search regions can be masked by cropping the region image to facilitate the subsequent determination of search image features.

[0113] S520, determine the features of the search image from the search area.

[0114] Search image features refer to image features extracted from the search area. Search image features may include, but are not limited to, edge features, color features, etc. After determining the search image features from the search area, the electronic device can determine information such as the contour, shape, or position of the target adhesive application area based on these search image features.

[0115] Figure 6 This is a schematic diagram illustrating the determination of search image features using a region image, as provided in an embodiment of this application. Figure 6 As shown, the electronic device acquires a brightness image 600 of the target dispensing area using a brightness camera. The image size is 800 pixels × 800 pixels. The user-selected search box 610 is 500 pixels × 500 pixels. After determining the search image features 630 from the search area 620 defined by the search box 610, the electronic device determines the contour corresponding to the target dispensing area based on the search image features 630 (e.g., ...). Figure 6 The region (shown by the thick black line) is hexagonal, and a two-dimensional coordinate system is constructed with the center of the search area at 640 as the origin (as shown in the image). Figure 6 (As shown by the dashed line in the middle), determine the coordinate information of the search image feature 630, as well as the coordinate information of the hexagonal contour corresponding to the target dotted area.

[0116] S530, based on the search parameters and search image features, the search area is matched with multiple pre-stored first dispensing area templates to determine the target dispensing area template corresponding to the search area from the multiple first dispensing areas.

[0117] The first dispensing area template can refer to a search area template for multiple products where the search image features and target dispensing areas have been determined in advance.

[0118] The electronic device can pre-store the first dispensing area templates of multiple products. After determining the search area, the electronic device can match the search area with the search area templates (i.e., the first dispensing area templates) of multiple products according to the search parameters and search image features to determine the search area template corresponding to the search area. This eliminates the need for further analysis of the search area and allows the electronic device to directly obtain relevant information about the target dispensing edge from the search area template.

[0119] For example, the electronic device pre-stores first dispensing area templates for products A and B, where the outline of the dispensing area for product A is a regular hexagon, and the outline of the dispensing area for product B is an irregular hexagon. The electronic device determines the search image features of the unknown product C, and determines that the outline of the target dispensing area for product C is a regular hexagon. Based on the search parameters and search image features, the electronic device matches the search area of ​​product C with the first dispensing area templates of each product. It finds that the regular hexagonal outline of product C best matches the regular hexagonal outline of product A. Therefore, the first dispensing area template of product A is directly used as the target dispensing area template of product C.

[0120] The search parameters refer to adjustable parameters used to match the search area with multiple pre-stored first dispensing area templates. Search parameters may include, but are not limited to, one or more of the following: greediness, number of matches, maximum overlap, and timeout. Greediness refers to the matching speed; the number of matches refers to the number of first dispensing area templates that can be used as the target dispensing area template; maximum overlap refers to the similarity between the search area and the first dispensing area templates that can be used as the target dispensing area template; and timeout refers to the maximum time limit allowed for matching. Optionally, the search parameters can be set by the user according to their needs.

[0121] The electronic device can determine the search image features from the search area, and match the search image features with multiple pre-stored first dispensing area templates according to the currently set search parameters, thereby determining the target dispensing area template corresponding to the search area.

[0122] For example, after determining the search area and search image features in the area image, the electronic device determines that the contour corresponding to the dispensing area is a regular hexagonal contour. Therefore, the electronic device sets the greediness to 0.99, the number of matches to 1, the maximum overlap to 0.5, and the timeout to 10000. Based on the search image feature that the contour corresponding to the dispensing area is a regular hexagonal contour, it matches multiple pre-stored first dispensing area templates to obtain the target dispensing area template corresponding to the search area.

[0123] In some embodiments, such as Figure 7 As shown, step S530 may include steps S710 to S740:

[0124] S710, the search image features are matched with multiple pre-stored first dispensing area templates to obtain the contour matching degree between the search area and each first dispensing area template.

[0125] Contour matching degree refers to the degree of matching between the contour of the dispensing area of ​​the search area and the contour of the dispensing area of ​​the first dispensing area template. The higher the contour matching degree, the more similar the contour of the dispensing area of ​​the search area is to the contour of the dispensing area of ​​the first dispensing area template, and thus the higher the probability that the first dispensing area template is the target dispensing area template corresponding to the search area.

[0126] The electronic device can match the outline of the dispensing area of ​​the search area with the outlines of the dispensing areas of multiple pre-stored first dispensing area templates to obtain the outline matching degree between the search area and each first dispensing area template.

[0127] S720: Select a second dispensing area template from multiple first dispensing area templates, wherein the contour matching degree is greater than a preset matching degree threshold.

[0128] The electronic device can match multiple pre-stored first dispensing area templates according to search parameters and search image features, and select the first dispensing area template with a contour matching degree greater than a preset matching degree threshold as the second dispensing area template.

[0129] For example, a first dispensing area template A, a first dispensing area template B, and a first dispensing area template C are pre-stored in the electronic device. The contour matching degree between the search area D and the above three is 0.995, 0.9, and 0.998, respectively. The preset matching degree threshold is 0.99. Therefore, the first dispensing area template A and the first dispensing area template C are used as the second dispensing area template.

[0130] It should be noted that contour matching can only identify the second dispensing area template that best matches the dispensing area contour of the search area, but it cannot further distinguish between multiple second dispensing area templates. For example, when using first dispensing area template A and first dispensing area template C as second dispensing area templates, the dispensing area contours of both templates A and C are regular hexagons, but it cannot determine which one of them should be the target dispensing area template. Therefore, further analysis of the differences between multiple second dispensing area templates is needed to determine the target dispensing area template.

[0131] S730, calculate the template similarity between any two second dotting area templates.

[0132] Template similarity refers to the degree of similarity between any two second adhesive region templates. It should be noted that template similarity focuses on the similarity between any two second adhesive region templates, not the similarity between the second adhesive region template and the search area. Template similarity is used to filter out the second adhesive region template with the most significant differences from multiple second adhesive region templates.

[0133] Electronic devices can calculate the template similarity between any two second dispensing area templates by using the template features of those templates. Template features may include, but are not limited to, distance, color, texture, and quantity.

[0134] Optionally, the electronic device can map template features to template feature vectors and then calculate template similarity using cosine similarity, or it can calculate template similarity using the Euclidean distance function, but it is not limited to these methods.

[0135] S740, the second dispensing area template with a template similarity less than the preset similarity threshold is determined as the target dispensing area template.

[0136] The smaller the template similarity of the second dispensing area template, the greater the difference between it and other second dispensing area templates, and the greater the probability that the second dispensing area template will be identified as the target dispensing area template.

[0137] Optionally, the electronic device can acquire all template similarities of each second dispensing area template, calculate its average template similarity based on all template similarities of each second dispensing area template, and determine the second dispensing area template with an average template similarity less than a preset similarity threshold as the target dispensing area template.

[0138] For example, with a preset similarity threshold of 0.2, for the second dispensing area template D, the second dispensing area template E, and the second dispensing area template F, the template similarity between the second dispensing area template D and the second dispensing area template E is calculated to be 0.1, the template similarity between the second dispensing area template D and the second dispensing area template F is 0.15, and the template similarity between the second dispensing area template E and the second dispensing area template F is 0.8. Then, the average template similarity of the second dispensing area template D is 0.225, the average template similarity of the second dispensing area template E is 0.45, and the average template similarity of the second dispensing area template F is 0.475. The average template similarity of the second dispensing area template D is less than the preset similarity threshold of 0.2, therefore, the second dispensing area template D is determined as the target dispensing area template.

[0139] Optionally, if there is only one template for the second dispensing area, the template similarity will not be calculated, and the electronic device can directly determine the second dispensing area template as the target dispensing area template.

[0140] In this embodiment, a first dispensing area template with a high degree of matching is first determined by contour matching degree to ensure the consistency between the dispensing area contour and the first dispensing area template. Then, the second dispensing area template with the greatest difference from other templates is determined by template similarity as the target dispensing area template. This not only improves the accuracy of dispensing equipment in dispensing operations based on the target dispensing area template by determining the most matching target dispensing area template through a two-step matching and screening process, but also avoids the manual screening process, thereby improving the automation level of dispensing operations and increasing production efficiency.

[0141] S540, determine the target dispensing edge in the target dispensing area based on the dispensing edge position information corresponding to the template of the target dispensing area.

[0142] Since the target dispensing area template has its dispensing edge position information pre-marked at the center, the electronic device can construct a two-dimensional coordinate system in the search area with the center of the search area as the origin, and directly determine the target dispensing edge in the search area based on the dispensing edge position information of the target dispensing area template. The dispensing edge position information may include, but is not limited to, the coordinate information of the dispensing edge.

[0143] In this embodiment, the electronic device first determines the search area in the region image, then determines the search image features from the search area, and then matches them with multiple pre-stored dispensing area templates based on the search parameters and search image features, thereby quickly determining the target dispensing area template. This helps improve the accuracy of template matching and production efficiency. At the same time, the electronic device determines the target dispensing edge in the target dispensing area based on the target dispensing area template. This not only avoids the need for the electronic device to spend a lot of time and computing resources to determine the target dispensing edge, thus improving production efficiency, but also enables the electronic device to accurately locate the target dispensing edge, improving the precision of the dispensing operation.

[0144] like Figure 8 As shown, in one embodiment, after identifying the target adhesive edge in the target adhesive area by recognizing the region image, the following steps may be included:

[0145] S810, determine an adjacent edge that is adjacent to the glue edge of the target point, and determine the first intersection point between the adjacent edge and the glue edge of the target point.

[0146] The electronic device can determine a neighboring edge to the left of the target glue edge (i.e., the left neighboring edge) or a neighboring edge to the right of the target glue edge (i.e., the right neighboring edge), and determine the intersection point between the left or right neighboring edge and the target glue edge as the first intersection point.

[0147] Figure 9 This is a schematic diagram illustrating the determination of the first intersection point as provided in an embodiment of this application. Figure 9As shown, a two-dimensional coordinate system is constructed with the center of the search area 900 as the origin, the positive x-axis direction 910 (flying to the right of the paper) and the positive y-axis direction 920 (flying downwards of the paper). The electronic device determines that the outline of the target adhesive application area is hexagonal, and the target adhesive application edge 930 is the bottom edge of this hexagon (e.g., ...). Figure 9 (As shown by the thick black line), determine the right adjacent edge 940 based on the target point glue edge 930 (e.g., ...). Figure 9 (As shown by the black dashed line), and determine the intersection point between the right adjacent edge 940 and the target point glue edge 930 as the first intersection point 950 (as shown by the black dashed line). Figure 9 (Hollow origin shown).

[0148] Optionally, the electronic device may use the intersection point between the left or right adjacent edge and the first side of the target adhesive edge as the first intersection point, and the intersection point between the left or right adjacent edge and the second side of the target adhesive edge as the third intersection point.

[0149] S820, based on the first intersection point, determine the offset between the adjacent edge and the target point adhesive edge.

[0150] The offset can refer to the positional difference between the first intersection point and the target point glue edge, which can include the deviation between the first and third intersection points. The offset can include right PR offset and left PR offset. The right PR offset can refer to the offset of the first intersection point to the right, and the left PR offset can refer to the offset of the first intersection point to the left.

[0151] For example, the electronic device can determine the right PR offset of the target point adhesive edge as 0.133mm based on the first intersection point.

[0152] S830, determine the length of the first dot corresponding to the target dot edge.

[0153] The first dispensing length can refer to the length from the first intersection point on the target dispensing edge to the dispensing start position, which can refer to the position where the dispensing device begins to perform the dispensing operation. The first dispensing length can include the left dispensing length and the right dispensing length. The left dispensing length can refer to the length from the first intersection point on the left adjacent edge to the dispensing start position, and the right dispensing length can refer to the length from the first intersection point on the right adjacent edge to the dispensing start position.

[0154] S840 determines the dispensing start position based on the first dispensing length, offset, and first intersection point.

[0155] The first dispensing length can refer to the length of the target dispensing edge. The electronic device can determine the actual dispensing length based on the first dispensing length and the offset, and draw an arc based on the actual dispensing length and the first intersection point to determine the dispensing start position through the intersection point of the arc and the target dispensing edge.

[0156] like Figure 10As shown, in one embodiment, step S840 may include steps S1010 to S1030:

[0157] S1010, calculate the sum of the first dispensing length and the offset to obtain the second dispensing length.

[0158] The second dispensing length can refer to the actual dispensing length. It should be noted that there is an inevitable difference between the target dispensing edge determined by the electronic device through the area image and the actual position of the dispensing edge. Therefore, the dispensing device needs to compensate for the first dispensing length using an offset to obtain the actual dispensing length.

[0159] For example, the right dispensing length is 7.158 mm and the right PR offset is 0.133 mm. Therefore, the electronic device can determine the second dispensing length as 7.291 mm by calculating the sum of the right dispensing length and the right PR offset.

[0160] S1020, based on the first intersection point and the second glue application length, determine the arc passing through the glue edge of the target point, with the first intersection point as the center and the radius being the second glue application length.

[0161] S1030, the second intersection point of the arc and the target dispensing edge is determined as the dispensing start position.

[0162] Figure 11 This is a schematic diagram illustrating how an arc is used to determine the starting position of adhesive dispensing, as provided in an embodiment of this application. Figure 11 As shown, the electronic device calculates the sum of the first dispensing length and the offset to obtain the second dispensing length 1100. By constructing a two-dimensional coordinate system with the center of the search area as the origin, the coordinate information of the first intersection point 1110 is determined. An arc 1120 is drawn with the first intersection point 1110 as the center and the second dispensing length 1100 as the radius. The coordinate information of the second intersection point 1140 between the arc 1120 and the target dispensing edge 1130 can be determined. Therefore, when the second intersection point 1140 is taken as the dispensing start position, the coordinate information of the dispensing start position can be obtained.

[0163] S850, determine the gap width corresponding to the adhesive edge of the target point.

[0164] S860 determines the target dispensing speed corresponding to the gap width based on a preset mapping relationship.

[0165] S870 sends control commands to the dispensing equipment based on the dispensing start position and target dispensing speed.

[0166] Control commands are used to instruct the dispensing equipment to start dispensing from the dispensing start position and dispense adhesive to the target dispensing edge at the target dispensing speed.

[0167] For example, after the electronic device determines the dispensing start position by using the arc and the target dispensing edge, it sets the dispensing start position as 0 and the first intersection position as 6. Three measurement points are generated on the target dispensing edge, namely 0, 2, and 5. At each measurement point, the gap widths are determined to be 1mm, 2mm, and 3mm, respectively. Through a preset mapping relationship, the target dispensing speeds for the corresponding measurement points are determined to be 12mm / s, 9.6mm / s, and 7.2mm / s, respectively. The electronic device generates control commands based on the dispensing start position and the target dispensing speed, thereby controlling the dispensing device to perform dispensing operations at a speed of 12mm / s within the interval [0,2], at a speed of 9.6mm / s within the interval [2,5], and at a speed of 7.2mm / s within the interval [5,6].

[0168] In this embodiment, by accurately calculating the dispensing start position and gap width, and determining the target dispensing speed corresponding to the gap width according to a preset mapping relationship, the dispensing process can be made more precise, reducing dispensing errors caused by offset and improving dispensing accuracy and efficiency. Simultaneously, the electronic device can send control commands to the dispensing device to instruct it to dispensing from the starting position at the target speed. This helps the electronic device dynamically control the dispensing speed based on the product's gap width, ensuring the adhesive fills the gap and improving product quality and dispensing efficiency.

[0169] like Figure 12 As shown, in one embodiment, another method for controlling a dispensing device is provided, the method comprising the following steps:

[0170] S1210 uses a camera to capture regional images of the target dispensing area.

[0171] S1220 identifies the region image and determines the target glue edge in the target glue application area.

[0172] S1230, divide the target adhesive edge into multiple equal-length sub-edges and determine the gap width corresponding to each sub-edge.

[0173] After dividing the target adhesive edge into multiple equal-length sub-edges, the electronic device can set adhesive dots based on the endpoints of the sub-edges. These adhesive dots can be used to obtain the gap width corresponding to each sub-edge of the target adhesive edge. The electronic device can determine the gap width corresponding to the adhesive dot using the coordinate information of the first and second measurement points corresponding to that dot, and thus use it as the gap width of the sub-edge starting from that adhesive dot.

[0174] Optionally, if the dispensing equipment has one dispensing head, the dispensing head can sequentially perform dispensing operations on multiple sub-sides according to the target dispensing speed corresponding to each sub-side. If the dispensing equipment has multiple dispensing heads, each dispensing head can perform a dispensing operation on the corresponding sub-side according to the target dispensing speed of the corresponding sub-side.

[0175] For example, the electronic device can form n adhesive dots on the target adhesive edge of the corresponding area image, generate a first side point and a second side point on the first and second sides of each adhesive dot, obtain the relative height of the first side point and the second side point, and determine the gap width corresponding to each adhesive dot on the target adhesive edge based on the first side point and the second side point:

[0176] Width[n]=High2[n]-High1[n] Formula (1);

[0177] Where n represents the nth glue dot, and n is an integer greater than or equal to 1; Width[n] represents the gap width corresponding to the nth glue dot on the target glue edge; High2[n] represents the relative height of the second side point corresponding to the nth glue dot; High1[n] represents the relative height of the first side point corresponding to the nth glue dot; High2[n] and High1[n] can be calculated from the coordinate information of the nth first side point and the nth second side point.

[0178] S1240, based on the preset mapping relationship, determines the target dispensing speed corresponding to the gap width of each sub-edge.

[0179] S1250 sends control commands to the dispensing equipment according to the target dispensing speed corresponding to each of the multiple edge segments.

[0180] The control command is used to instruct the dispensing equipment to dispense adhesive to each sub-edge sequentially according to the target dispensing speed corresponding to each sub-edge.

[0181] Figure 13 This is a schematic diagram illustrating the dispensing operation performed by a dispensing device with a dispensing head, as provided in an embodiment of this application. Figure 13 The diagonally lined section represents the adhesive used in the dispensing equipment. For example... Figure 13As shown, the target adhesive edge 1300 has a range of [0,3]. The electronic device divides the target adhesive edge 1300 into three equal-length sub-edges and determines four adhesive dots 1310 as 0, 1, 2 and 3 respectively. The range of the first sub-edge 1320 is [0,1], the range of the second sub-edge 1330 is [1,2], and the range of the third sub-edge 1340 is [2,3]. According to the preset mapping relationship, the target adhesive dispensing speeds of each sub-edge are determined to be 9.6mm / s, 12mm / s and 9.6mm / s respectively. The electronic device can generate control commands based on the target dispensing speed corresponding to each sub-edge, thereby controlling the dispensing head 1350 of the dispensing device to first dispense onto the first sub-edge 1320 at a target dispensing speed of 9.6 mm / s; after the dispensing head 1350 enters the second sub-edge 1330, the target dispensing speed of the dispensing head 1350 changes from 9.6 mm / s to 12 mm / s, and dispensing onto the second sub-edge 1330; after the dispensing head 1350 enters the third sub-edge 1340, the target dispensing speed of the dispensing head 1350 changes from 12 mm / s to 9.6 mm / s, and dispensing onto the third sub-edge 1340.

[0182] Figure 14 This is a schematic diagram illustrating the dispensing operation performed by a dispensing device with multiple dispensing heads according to an embodiment of this application. With the same target dispensing edge 1300, the dispensing device has a first dispensing head 1410 and a second dispensing head 1420. The first dispensing head 1410 starts from 0 and is responsible for dispensing operations in the interval [0, 1.5]. The second dispensing head 1420 starts from 1.5 and is responsible for dispensing operations in the interval [1.5, 3]. Therefore, the dispensing equipment can control the first dispensing head 1410 to first dispense onto the first sub-edge 1320 at a target dispensing speed of 9.6 mm / s. After entering the second sub-edge 1330, the target dispensing speed of the first dispensing head 1410 changes from 9.6 mm / s to 12 mm / s, and dispenses onto a portion of the second sub-edge 1330 [1, 1.5]. While the first dispensing head 1410 is dispensing, the second dispensing head 1420 dispenses onto a portion of the second sub-edge 1330 [1.5, 2] at a target dispensing speed of 12 mm / s. After entering the third sub-edge 1340, the target dispensing speed of the second dispensing head 1420 changes from 12 mm / s to 9.6 mm / s, and dispenses onto the third sub-edge 1340.

[0183] In this embodiment, by dividing the target dispensing edge into multiple sub-edges and determining an independent target dispensing speed for each sub-edge, the potential gap width differences at different positions of the target dispensing edge are fully considered. This allows for more precise control of the dispensing process, improving dispensing accuracy and efficiency. Simultaneously, by precisely controlling the dispensing position and speed of multiple dispensing points, the amount of adhesive can fill the gaps at various points along the target dispensing edge, further improving product quality and dispensing efficiency.

[0184] In other embodiments, before sending control commands to the dispensing device according to the target dispensing speed, coordinate information of multiple guide points is determined on the target dispensing edge. The guide points include at least the two endpoints of the target dispensing edge and the dispensing point corresponding to each sub-edge. Based on the coordinate information of the multiple guide points and the target dispensing speeds corresponding to the multiple sub-edges, control commands are sent to the dispensing device. The control commands instruct the dispensing device to dispense glue onto the target dispensing edge according to the movement trajectory formed by the coordinate information of the multiple guide points and the target dispensing speed corresponding to the sub-target dispensing edge where each guide point is located.

[0185] A guide point refers to a point on the trajectory of the dispensing head of a dispensing device during the dispensing operation. The coordinate information of the guide point may include two-dimensional coordinate information. The dispensing device can control the dispensing head to move along the trajectory formed by the coordinate information of multiple guide points to perform dispensing operations on the target dispensing edge.

[0186] It should be noted that since the first and second sides of the target adhesive edge may not be planar, or the first and second sides are non-parallel planes, the electronic device can combine various information such as gap width, first side points and second side points to determine multiple guide points on the target adhesive edge in order to form a suitable movement trajectory for the dispensing device.

[0187] Figure 15 This is a schematic diagram illustrating how the dispensing device provided in this application dispensing procedure applies adhesive to a target edge using multiple guide points. For example... Figure 15 As shown, the first side 1520 and the second side 1510 of the target dispensing edge 1500 are non-parallel planes. The electronic device can combine the gap width, the coordinate information of n first side points 1560 and n second side points 1540 to determine the coordinate information of the guide point 1550 located between the first side points 1560 and the second side points 1540, thereby forming a suitable movement trajectory 1530 for the dispensing device. This ensures that when the dispensing device performs dispensing operations along the movement trajectory 1530, the dispensing device can fill the gap of the target dispensing edge 1500 with the dispensing material.

[0188] In this embodiment, the electronic device determines the coordinate information of multiple guide points on the target dispensing edge, enabling the dispensing device to dispense glue to the target dispensing edge according to the movement trajectory formed by the coordinate information of the multiple guide points and the target dispensing speed corresponding to each guide point. This allows the electronic device to dynamically control the dispensing speed and movement trajectory of the dispensing device according to the gap width of the product, enabling the dispensing device to perform dispensing operations more accurately and improving product quality and production efficiency.

[0189] like Figure 16As shown, in one embodiment, the step of sending control commands to the dispensing equipment according to the target dispensing speed may include the following steps:

[0190] S1610 uses a camera to capture depth images of the target dispensing area.

[0191] The camera may include a depth camera, which captures a depth image of the area. A depth image can refer to an image where the distance (depth) from the depth camera to each point in the target adhesive area is used as pixel values. A depth image is a grayscale image and can be a matrix composed of the depth data of all pixels within the camera's field of view. The darker the color in the depth image, the farther the distance between the camera and the corresponding color pixel, and the larger the pixel value of the corresponding color pixel.

[0192] The camera can be positioned directly facing the opening of the gap in the target adhesive area to acquire a depth image of the target adhesive edge.

[0193] S1620 determines the first relative distance between the target point adhesive edge and the camera based on the depth image.

[0194] Electronic devices can determine the first relative distance by the pixel value of the pixel corresponding to the bottom surface of the gap between the target point and the glue edge on the depth image.

[0195] S1630, based on the first relative position between the camera and the reference plane, the second relative position between the dispensing device and the reference plane, and the first relative distance, determine the relative height between the target dispensing edge and the reference plane.

[0196] The reference plane can refer to the opening surface of the gap at the target point's adhesive edge, or a plane parallel to the opening surface, or a plane parallel to the bottom surface of the gap at the target point's adhesive edge.

[0197] Based on the first relative position between the camera and the reference plane and the second relative position between the dispensing device and the reference plane, the electronic device can obtain the relative height between the camera and the reference plane and the relative height between the dispensing device and the reference plane. Then, based on the relative height between the camera and the reference plane and the bottom surface of the gap between the camera and the target dispensing edge, the electronic device can directly determine the relative height between the bottom surface of the gap of the target dispensing edge and the reference plane.

[0198] For example, the electronic device can determine, based on the depth image, that the first relative distance between the bottom surface of the gap of the adhesive edge of the target point and the camera is 10 mm, and the relative height between the camera and the reference plane is 7 mm. Therefore, the relative height between the bottom surface of the gap of the adhesive edge of the target point and the reference plane can be determined to be 3 mm.

[0199] Optionally, when the reference plane is the opening surface of the gap of the adhesive edge at the target point, the distance between the product surface (i.e., the reference plane) and the camera can be determined by the depth image as the second relative distance. Based on the first relative distance and the second relative distance, the relative height between the bottom surface of the gap of the adhesive edge at the target point and the reference plane can be directly obtained.

[0200] S1640, determine the dispensing height of the target dispensing edge based on the relative height.

[0201] Dispensing height refers to the relative height between the bottom surface of the gap between the dispensing device and the target dispensing edge. Electronic equipment can determine the relative height between the bottom surface of the gap between the dispensing device and the target dispensing edge based on the relative height between the dispensing device and a reference plane, as well as a first relative distance and a second relative distance.

[0202] Figure 17 This is a schematic diagram illustrating the determination of the dispensing height of the target dispensing edge, provided as an embodiment of this application. (See attached diagram.) Figure 17 As shown, camera 1700 faces the opening of the gap formed by the second side 1730 and the first side 1740. Dispensing device 1710 is located above this gap. Reference plane 1720 is the opening of the gap. The first relative distance 1760 is the distance between the bottom surface 1750 of the gap and camera 1700. Based on the depth image captured by camera 1700, the electronic device can determine that the first relative distance 1760 is 10mm, the second relative distance 1770 between camera 1700 and reference plane is 7mm, and the relative height 1780 between dispensing device 1710 and reference plane 1720 is 5mm. Therefore, the electronic device can directly determine the relative height between the bottom surface 1750 of the gap at the target dispensing edge and dispensing device 1710, i.e., the dispensing height 1790 is 10-7+5=8mm.

[0203] S1650 sends control commands to the dispensing equipment based on the dispensing height and target dispensing speed.

[0204] The electronic device can obtain the target dispensing speed based on the dispensing height and gap width through a preset mapping relationship, and then send control commands to the dispensing equipment according to the dispensing height and target dispensing speed, thereby controlling the dispensing equipment to dispense glue to the target dispensing edge according to the corresponding dispensing height and target dispensing speed.

[0205] It should be noted that both dispensing height and dispensing speed affect the final dispensing effect. With a stable and moderate speed, the amount of adhesive dispensed by the dispensing equipment can fill the gaps at the target dispensing edge. However, if the dispensing height is too high, the time required for the adhesive to reach the gap will be prolonged, potentially resulting in insufficient adhesive to completely fill the gap; if the dispensing height is too low, the adhesive will quickly fill the gap, easily causing adhesive overflow. Therefore, during the dispensing process, it is necessary to compensate for the dispensing speed according to the dispensing height to ensure that the amount of adhesive dispensed by the dispensing equipment can completely fill the gaps.

[0206] Optionally, the electronic device can also acquire three-dimensional coordinate information, including the dispensing height, at the target dispensing edge, and can set guide points according to the dispensing height and the target dispensing speed.

[0207] Optionally, the electronic device can compensate for the target dispensing speed obtained through a preset mapping relationship based on the dispensing height, thereby obtaining a compensated dispensing speed. Based on the dispensing height and the compensated dispensing speed, the electronic device sends a control command to the dispensing equipment. The control command is used to instruct the dispensing equipment to dispense glue to the target dispensing edge according to the dispensing height and the compensated dispensing speed. Alternatively, the electronic device can establish preset mapping relationships corresponding to dispensing height, gap width, and dispensing speed respectively. After obtaining the dispensing height and gap width, the target dispensing speed can be directly determined through the preset mapping relationship.

[0208] Table 2

[0209]

[0210] For example, a preset mapping relationship can be established as shown in Table 2, corresponding to dispensing height, gap width, and dispensing speed. When the dispensing height is 8mm and the gap width is 0.5mm, the corresponding target dispensing speed is 12mm / s; when the dispensing height is 8mm and the gap width is 1mm, the corresponding target dispensing speed is 9.6mm / s; when the dispensing height is 9mm and the gap width is 0.5mm, the corresponding target dispensing speed is 11.6mm / s; and when the dispensing height is 9mm and the gap width is 1mm, the corresponding target dispensing speed is 9mm / s.

[0211] The electronic device acquires an image of the target dispensing area through a camera, obtains a dispensing height of 8mm and a gap width of 2mm at the target dispensing edge, and obtains the corresponding target dispensing speed of 9.6mm / s based on a preset mapping relationship. Therefore, the dispensing device controls the dispensing head to dispense adhesive to the target dispensing edge at a dispensing height of 8mm and a target dispensing speed of 9.6mm / s.

[0212] Optionally, when the gap width corresponds to a specific range and the dispensing speed, a preset mapping relationship including the dispensing height can also be established as shown in Table 3.

[0213] Table 3

[0214]

[0215] In this embodiment, a depth image of the target dispensing area is captured by a camera to determine the first relative distance between the target dispensing edge and the camera. Then, the dispensing height is determined by combining the relative positional relationship between the camera and the reference plane and the dispensing device and the reference plane. The dispensing height and dispensing speed together ensure that the amount of adhesive in the dispensing device can fill the gap of the target dispensing edge, avoiding the problem of insufficient adhesive or overflow, which helps to improve product quality.

[0216] Based on the dispensing equipment control method provided in the above embodiments, Figure 18 This is a structural block diagram of a dispensing equipment control device provided in an embodiment of this application. Figure 18 As shown, in one embodiment, a dispensing equipment control device 1800 is provided, which includes an image acquisition module 1810, a dispensing edge determination module 1820, a gap width determination module 1830, a dispensing speed determination module 1840, and a control module 1850. The image acquisition module 1810 is used to acquire area images of the target dispensing area using a camera.

[0217] The dispensing edge determination module 1820 is used to identify the region image and determine the target dispensing edge in the target dispensing region.

[0218] The gap width determination module 1830 is also used to determine the gap width corresponding to the adhesive edge of the target point.

[0219] The dispensing speed determination module 1840 is also used to determine the target dispensing speed corresponding to the gap width according to a preset mapping relationship. The preset mapping relationship is used to describe the correspondence between the gap width of the dispensing edge and the gap width.

[0220] The control module 1850 is used to send control commands to the dispensing equipment according to the target dispensing speed. The control commands are used to instruct the dispensing equipment to dispense glue to the target dispensing edge at the target dispensing speed.

[0221] In some embodiments, the dispensing edge determination module 1820 is further configured to determine a search region in a region image, the search region including the image content of the target dispensing region; determine search image features from the search region; match the search region with a plurality of pre-stored first dispensing region templates according to search parameters and search image features, so as to determine the target dispensing region template corresponding to the search region from the plurality of first dispensing regions; and determine the target dispensing edge in the target dispensing region according to the dispensing edge position information corresponding to the target dispensing region template.

[0222] In some embodiments, the dispensing edge determination module 1820 is further configured to match the search image features with a plurality of pre-stored first dispensing region templates to obtain the contour matching degree between the search region and each first dispensing region template; select a second dispensing region template from the plurality of first dispensing region templates whose contour matching degree is greater than a preset matching degree threshold; calculate the template similarity between any two second dispensing region templates; and determine the second dispensing region template whose template similarity is less than a preset similarity threshold as the target dispensing region template.

[0223] In some embodiments, the dispensing edge determination module 1820 is further configured to determine an adjacent edge adjacent to the target dispensing edge, and determine a first intersection point between the adjacent edge and the target dispensing edge; determine the offset between the adjacent edge and the target dispensing edge based on the first intersection point; determine a first dispensing length corresponding to the target dispensing edge; and determine the dispensing start position based on the first dispensing length, the offset, and the first intersection point.

[0224] The control module 1850 is also used to send control commands to the dispensing equipment according to the dispensing start position and the target dispensing speed. The control commands are used to instruct the dispensing equipment to dispense glue to the target dispensing edge from the dispensing start position at the target dispensing speed.

[0225] In some embodiments, the dispensing equipment control device 1800 further includes a dispensing start position module.

[0226] The dispensing start position module is used to calculate the sum of the first dispensing length and the offset to obtain the second dispensing length; based on the first intersection point and the second dispensing length, it determines the arc passing through the target dispensing edge, with the first intersection point as the center and the radius being the second dispensing length; the second intersection point of the arc and the target dispensing edge is determined as the dispensing start position.

[0227] In some embodiments, the gap width determination module 1830 is further configured to divide the target adhesive edge into multiple sub-edges of equal length and determine the gap width corresponding to each sub-edge.

[0228] The control module 1850 is also used to send control commands to the dispensing equipment according to the target dispensing speed corresponding to each of the multiple sub-edges. The control commands are used to instruct the dispensing equipment to dispense glue to each sub-edge sequentially according to the target dispensing speed corresponding to each sub-edge.

[0229] In some embodiments, the dispensing equipment control device 1800 further includes a coordinate information determination module.

[0230] The coordinate information determination module is used to determine the coordinate information of multiple guide points on the target glue edge. The guide points include at least the two endpoints of the target glue edge and the glue point corresponding to each sub-edge.

[0231] The control module 1850 is also used to send control commands to the dispensing equipment based on the coordinate information of multiple guide points and the target dispensing speeds corresponding to the multiple sub-segments. The control commands are used to instruct the dispensing equipment to dispense glue onto the target dispensing edge according to the movement trajectory formed by the coordinate information of multiple guide points and the target dispensing speed corresponding to the sub-target dispensing edge where each guide point is located.

[0232] In some embodiments, the dispensing equipment control device 1800 further includes a dispensing height determination module.

[0233] The dispensing height determination module is used to acquire a depth image of the target dispensing area through a camera; determine a first relative distance between the target dispensing edge and the camera based on the depth image; determine the relative height between the target dispensing edge and the reference plane based on the first relative position between the camera and the reference plane, the second relative position between the dispensing device and the reference plane, and the first relative distance; and determine the dispensing height of the target dispensing edge based on the relative height.

[0234] The control module 1850 is also used to send control commands to the dispensing equipment according to the dispensing height and the target dispensing speed. The control commands are used to instruct the dispensing equipment to dispense glue to the target dispensing edge according to the dispensing height and the target dispensing speed.

[0235] Figure 19 This is a structural block diagram of an electronic device provided in an embodiment of this application. Figure 19 As shown, the electronic device 1900 may include a memory 1910 and a processor 1920. The memory 1910 stores a computer program. When the computer program is executed by the processor 1920, the electronic device 1900 implements the dispensing equipment control method as described in the above embodiments.

[0236] Processor 1920 may include one or more processing cores. Processor 1920 connects to various parts of the electronic device using various interfaces and lines, and performs various functions and processes data by running or executing instructions, programs, code sets, or instruction sets stored in memory, and by calling data stored in memory. Optionally, processor 1920 may be implemented using at least one hardware form of digital signal processing, field-programmable gate array, or programmable logic array. Processor 1920 may integrate one or more of the following: Central Processing Unit (CPU), Graphics Processing Unit (GPU), and modem. The CPU primarily handles the operating system, user interface, and applications; the GPU is responsible for rendering and drawing displayed content; and the modem handles wireless communication. It is understood that the modem may also not be integrated into processor 1920 and may be implemented separately through a communication chip.

[0237] The memory 1910 may include random access memory (RAM) or read-only memory (ROM). The memory can be used to store instructions, programs, code, code sets, or instruction sets. The memory may include a program storage area and a data storage area. The program storage area may store instructions for implementing an operating system, instructions for implementing at least one function, instructions for implementing the various method embodiments described above, etc. The data storage area may also store data created during the use of the electronic device.

[0238] This application discloses a computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, the processor implements the dispensing equipment control method as described in the above embodiments.

[0239] This application discloses a computer program product, which includes a computer program, and when executed by a processor, causes the processor to implement the dispensing equipment control method described in the above embodiments.

[0240] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. The storage medium can be a magnetic disk, optical disk, ROM, etc.

[0241] The above description is merely a specific example of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application shall be included within the scope of protection of this application.

Claims

1. A method for controlling a dispensing device, characterized in that, Applied to electronic devices, the method includes: The camera captures regional images of the target adhesive application area; The image of the region is identified to determine the target adhesive edge in the target adhesive area; Determine the gap width corresponding to the adhesive edge of the target point; According to a preset mapping relationship, the target dispensing speed corresponding to the gap width is determined. The preset mapping relationship is used to describe the correspondence between the gap width of the dispensing edge and the dispensing speed. A control command is sent to the dispensing equipment according to the target dispensing speed. The control command is used to instruct the dispensing equipment to dispense glue to the target dispensing edge at the target dispensing speed.

2. The method according to claim 1, characterized in that, The step of identifying the region image and determining the target adhesive edge in the target adhesive area includes: Determine the search area in the region image, wherein the search area includes the image content of the target dispensing area; Determine the search image features from the search area; Based on the search parameters and the search image features, the search area is matched with a plurality of pre-stored first dispensing area templates to determine the target dispensing area template corresponding to the search area from the plurality of first dispensing areas. The target dispensing edge in the target dispensing area is determined based on the dispensing edge position information corresponding to the template of the target dispensing area.

3. The method according to claim 2, characterized in that, The step of matching the search region with a plurality of pre-stored first dispensing region templates based on the search parameters and the search image features, in order to determine the target dispensing region template corresponding to the search region from the plurality of first dispensing regions, includes: The search image features are matched with multiple pre-stored first dispensing area templates to obtain the contour matching degree between the search area and each of the first dispensing area templates. From the plurality of first dispensing area templates, select a second dispensing area template whose contour matching degree is greater than a preset matching degree threshold; Calculate the template similarity between any two templates of the second dotted adhesive region; The second dispensing area template with a template similarity less than the preset similarity threshold is identified as the target dispensing area template.

4. The method according to claim 1, characterized in that, After identifying the region image and determining the target adhesive edge in the target adhesive area, the method further includes: Determine an adjacent edge that is adjacent to the target glue edge, and determine the first intersection point between the adjacent edge and the target glue edge; Based on the first intersection point, determine the offset between the adjacent edge and the target point adhesive edge; Determine the first dispensing length corresponding to the target dispensing edge; The dispensing start position is determined based on the first dispensing length, the offset, and the first intersection point; The step of sending a control command to the dispensing equipment according to the target dispensing speed, wherein the control command is used to instruct the dispensing equipment to dispense glue to the target dispensing edge at the target dispensing speed, includes: The control command is sent to the dispensing device according to the dispensing start position and the target dispensing speed. The control command is used to instruct the dispensing device to dispense glue to the target dispensing edge starting from the dispensing start position and at the target dispensing speed.

5. The method according to claim 4, characterized in that, Determining the dispensing start position based on the first dispensing length, the offset, and the first intersection point includes: Calculate the sum of the first dispensing length and the offset to obtain the second dispensing length; Based on the first intersection point and the second glue dot length, determine the arc passing through the edge of the target glue dot, with the first intersection point as the center and the radius being the second glue dot length; The second intersection point of the arc and the target dispensing edge is determined as the dispensing start position.

6. The method according to claim 1, characterized in that, Determining the gap width corresponding to the target adhesive edge includes: The target adhesive edge is divided into multiple sub-edges of equal length, and the gap width corresponding to each sub-edge is determined. Sending control commands to the dispensing equipment according to the target dispensing speed includes: Control commands are sent to the dispensing equipment according to the target dispensing speed corresponding to each of the multiple sub-edges. The control commands are used to instruct the dispensing equipment to dispense glue to each of the sub-edges sequentially according to the target dispensing speed corresponding to each sub-edge.

7. The method according to claim 6, characterized in that, Before sending control commands to the dispensing equipment according to the target dispensing speed, the method further includes: The coordinate information of multiple guide points is determined on the target glue edge, and the guide points include at least the two endpoints of the target glue edge and the glue point corresponding to each sub-edge; The step of sending control commands to the dispensing equipment according to the target dispensing speed corresponding to each of the multiple sub-segments includes: Based on the coordinate information of the multiple guide points and the target dispensing speeds corresponding to the multiple sub-edges, a control command is sent to the dispensing device. The control command is used to instruct the dispensing device to dispense glue onto the target dispensing edge according to the movement trajectory formed by the coordinate information of the multiple guide points and the target dispensing speed corresponding to the sub-target dispensing edge where each guide point is located.

8. The method according to any one of claims 1-7, characterized in that, Before sending control commands to the dispensing equipment according to the target dispensing speed, the method further includes: The depth image of the target adhesive dispensing area is captured by a camera; Determine the first relative distance between the target adhesive edge and the camera based on the depth image; The relative height between the target dispensing edge and the reference plane is determined based on the first relative position between the camera and the reference plane, the second relative position between the dispensing device and the reference plane, and the first relative distance. The dispensing height of the target dispensing edge is determined based on the relative height. Sending control commands to the dispensing equipment according to the target dispensing speed includes: The control command is sent to the dispensing equipment according to the dispensing height and the target dispensing speed. The control command is used to instruct the dispensing equipment to dispense glue to the target dispensing edge according to the dispensing height and the target dispensing speed.

9. A control device for dispensing equipment, characterized in that, Applied to electronic devices, including: The image acquisition module is used to acquire regional images of the target dispensing area via a camera; The glue dispensing edge determination module is used to identify the region image and determine the target glue dispensing edge in the target glue dispensing region; The gap width determination module is also used to determine the gap width corresponding to the adhesive edge of the target point; The dispensing speed determination module is also used to determine the target dispensing speed corresponding to the gap width according to a preset mapping relationship, wherein the preset mapping relationship is used to describe the correspondence between the gap width of the dispensing edge and the gap width. The control module is used to send control commands to the dispensing equipment according to the target dispensing speed. The control commands are used to instruct the dispensing equipment to dispense glue to the target dispensing edge at the target dispensing speed.

10. An electronic device, characterized in that, include: A memory storing executable program code, and a processor coupled to the memory; The processor invokes the executable program code stored in the memory to execute the method as described in any one of claims 1-8.