Dispensing control method, electronic device, dispensing robot and readable storage medium

By segmenting the image region and matching the feature points of the dispensing equipment, the positioning problem of multiple circuit boards was solved, enabling precise positioning and dispensing of multiple circuit boards, and improving the dispensing control accuracy and efficiency.

CN122156296APending Publication Date: 2026-06-05GUANGZHOU SHIYUAN ELECTRONICS CO LTD +1

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
GUANGZHOU SHIYUAN ELECTRONICS CO LTD
Filing Date
2024-12-03
Publication Date
2026-06-05

AI Technical Summary

Technical Problem

Existing intelligent dispensing equipment cannot simultaneously locate multiple dispensing positions when dealing with multiple printed circuit boards, resulting in missed and incorrect identification, which affects dispensing efficiency and accuracy.

Method used

By segmenting the image of the area to be glued, the approximate location of each board is roughly determined, and the segmented image is used for fine positioning. Feature point matching is then used to map the glue dispensing position in the board template to the board image area, thereby controlling the robot to perform the glue dispensing action.

Benefits of technology

It enables simultaneous positioning and dispensing of multiple circuit boards, avoiding missed identification and improving dispensing control accuracy and efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122156296A_ABST
    Figure CN122156296A_ABST
Patent Text Reader

Abstract

The application relates to a dispensing control method, electronic equipment, a dispensing robot and a computer readable storage medium. The method comprises the following steps: acquiring a current image of a dispensing area; performing region segmentation on the current image to obtain N board card image regions, wherein N is an integer greater than or equal to 1; for each board card image region, performing feature point matching on a board card template and the board card image region, and mapping a dispensing position in the board card template to the board card image region to obtain a target dispensing position corresponding to the board card image region; and controlling the robot to perform a dispensing action according to the target dispensing positions corresponding to the N board card image regions respectively. In the method, the current image is subjected to region segmentation in advance, the approximate positions of each board card are roughly positioned, and the segmented image is used for fine positioning, so that the problem that the visual positioning of the dispensing equipment cannot simultaneously position multiple dispensing positions is solved, the missed identification of the board cards is avoided, and the dispensing control precision is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of intelligent manufacturing technology, and in particular to a dispensing control method, electronic device, dispensing robot, and computer-readable storage medium. Background Technology

[0002] Currently, intelligent dispensing equipment mainly utilizes visual positioning technology to locate individual printed circuit boards (PCBs), thereby controlling the robotic arm to perform dispensing or spraying operations. However, in actual manufacturing processes, if multiple boards are placed simultaneously, current visual positioning cannot locate multiple targets, discarding image feature data of other boards as mismatched data, leading to missed identification. Summary of the Invention

[0003] Therefore, it is necessary to provide a dispensing control method, electronic device, dispensing robot, and computer-readable storage medium to address the above-mentioned technical problems, which can simultaneously locate multiple dispensing positions, avoid missed identification of circuit boards, and improve dispensing control accuracy.

[0004] In a first aspect, this application provides a method for dispensing control, comprising:

[0005] Get the current image of the area to be glued;

[0006] Perform region segmentation on the current image to obtain N board image regions, where N is an integer not less than 1;

[0007] For each board image region, feature points are matched between the board template and the board image region, and the dispensing position in the board template is mapped to the board image region to obtain the target dispensing position corresponding to the board image region.

[0008] Based on the target dispensing positions corresponding to the N board image regions, the robot is controlled to perform the dispensing action.

[0009] In one embodiment, the current image is segmented to obtain N board image regions, including:

[0010] Extract feature points from the current image;

[0011] The two-dimensional coordinate information of the feature points is reduced in dimensionality to generate the target curve; the target curve is used to represent the number of feature points corresponding to different horizontal coordinates.

[0012] The gradient descent method is used to determine multiple local optima in the target curve.

[0013] Multiple dividing lines are determined based on the horizontal coordinates corresponding to multiple local optima;

[0014] Based on multiple segmentation lines, the current image is segmented into regions to obtain N board image regions.

[0015] In one embodiment, after determining multiple local optima in the target curve using gradient descent, the method further includes:

[0016] For each local optimum, at least one target point is searched on the target curve according to a set threshold; the set threshold is the difference between the number of feature points corresponding to the target point and the number of feature points corresponding to the local optimum.

[0017] Based on the horizontal coordinates of the target points corresponding to multiple local optima, determine multiple dividing lines;

[0018] Based on multiple segmentation lines, the current image is segmented into regions to obtain N board image regions.

[0019] In one embodiment, the current image is segmented to obtain N board image regions, including:

[0020] The current image is binarized to obtain the target image;

[0021] Identify N outer rectangles of the circuit board from the target image;

[0022] Based on N outer rectangles of the board, the current image is segmented to obtain N board image regions.

[0023] In one embodiment, the current image is segmented to obtain N board image regions, including:

[0024] A template matching strategy is used to identify N target objects in the current image;

[0025] Based on the coordinate information of N target objects, the current image is segmented to obtain N board image regions.

[0026] In one embodiment, the current image is segmented to obtain N board image regions, including:

[0027] Using a pre-trained board recognition model, the current image is identified to determine N target boards in the current image;

[0028] Based on the coordinate information of N target boards, the current image is segmented to obtain N board image regions.

[0029] In one embodiment, based on the target dispensing positions corresponding to N board image regions, the robot is controlled to perform a dispensing action, including:

[0030] The target dispensing positions corresponding to the N board image regions are transformed into the robot coordinate system to obtain N target coordinate information;

[0031] Based on the coordinates of N targets, control signals are sent to the robot. The control signals are used to instruct the robot to call up N robotic arms and control the N robotic arms to synchronously perform the dispensing action based on the coordinates of N targets.

[0032] Secondly, this application also provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the method described in the first aspect above.

[0033] Thirdly, this application also provides a dispensing robot, which is equipped with the electronic equipment described in the second aspect above.

[0034] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method described in the first aspect above.

[0035] The aforementioned dispensing control method, electronic device, dispensing robot, and computer-readable storage medium acquire a current image of the area to be dispensed; segment the current image to obtain N board image regions, where N is an integer not less than 1; for each board image region, match feature points between the board template and the board image region, and map the dispensing position in the board template to the board image region to obtain the target dispensing position corresponding to the board image region; based on the target dispensing positions corresponding to the N board image regions, control the robot to perform the dispensing action. By performing region segmentation of the current image in advance, the approximate position of each board is coarsely located, and the segmented image is used for fine positioning. This solves the problem that the visual positioning of dispensing equipment cannot simultaneously locate multiple dispensing positions, avoids missed board identification, and improves the accuracy of dispensing control. Attached Figure Description

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

[0037] Figure 1 This is an application environment diagram of the dispensing control method in one embodiment;

[0038] Figure 2 This is a flowchart illustrating a dispensing control method in one embodiment;

[0039] Figure 3 This is a flowchart illustrating the region segmentation steps in one embodiment;

[0040] Figure 4 This is a schematic diagram of the target curve in one embodiment;

[0041] Figure 5 This is a schematic diagram of the segmented image in one embodiment;

[0042] Figure 6 This is a schematic diagram of the image processing result in one embodiment;

[0043] Figure 7 This is a flowchart illustrating the dispensing control method in another embodiment;

[0044] Figure 8 This is a diagram of the internal structure of an electronic device in one embodiment. Detailed Implementation

[0045] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0046] Understandably, current intelligent dispensing equipment primarily utilizes visual positioning technology to locate individual printed circuit boards (PCBs), thereby controlling the robotic arm to perform dispensing or spraying operations. However, in actual manufacturing processes, if multiple boards are placed simultaneously, current visual positioning cannot locate multiple targets, discarding image feature data of other boards as mismatched data, leading to missed identification.

[0047] On the other hand, if the images used for visual positioning include images of multiple circuit boards, it will affect the visual positioning effect and cause misidentification.

[0048] With the development of intelligent manufacturing, higher demands are being placed on the dispensing efficiency of dispensing equipment. Current dispensing equipment can only identify a single circuit board at a time. When capturing images of multiple circuit boards, missed or incorrect identifications may occur, requiring manual troubleshooting and further impacting dispensing efficiency.

[0049] Based on this, embodiments of this application provide a dispensing control method, an electronic device, a dispensing robot, and a computer-readable storage medium. The method pre-segments the current image to roughly locate the approximate position of each board, and then uses the segmented image for fine positioning. This solves the problem that the visual positioning of dispensing equipment cannot simultaneously locate multiple dispensing positions, avoiding missed identification of boards and improving dispensing control accuracy. By performing feature point matching on N board image regions respectively, it avoids confusion between board images in the image, preventing misidentification of boards and improving visual recognition accuracy.

[0050] The dispensing control method provided in this application embodiment can be applied to, for example... Figure 1 The application environment shown is illustrated. The dispensing robot 102 includes a dispensing base 104, a robotic arm 106, an electronic device 108, and a data acquisition device 110. The dispensing area of ​​the dispensing base 104 is used to place printed circuit board cards (referred to as "board cards" in this embodiment). The data acquisition device 110 is aligned with the dispensing area on the dispensing base 104 to acquire real-time images of the dispensing area. The electronic device 108 has image processing capabilities to process the images acquired by the data acquisition device 110; the electronic device 108 also has robot control capabilities to control the movement mode and trajectory of the robotic arm 106. The robotic arm 106 is used to perform dispensing or spraying operations on the printed circuit board cards on the dispensing base 104. Optionally, the data acquisition device 110 and the electronic device 108 can be integrated together. Optionally, the electronic device 108 can be located remotely and communicate with the data acquisition device 110 and the robotic arm 106 via a network. The electronic device 108 is used to execute the steps of the dispensing control method provided in this application.

[0051] In one exemplary embodiment, such as Figure 2 As shown, a dispensing control method is provided, which is applied to... Figure 1 Taking electronic device 108 as an example, the explanation includes:

[0052] Step 202: Obtain the current image of the area to be glued.

[0053] The area to be glued can be understood as the worktable of the glue dispensing robot. The circuit board to be glued is placed on this worktable, the camera captures image data of the worktable, and the glue dispensing robot performs glue dispensing or spraying operations on the circuit board on the worktable. In essence, the electronic equipment communicates with the camera to obtain the current image of the area to be glued captured by the camera.

[0054] In one alternative implementation, prior to step 202, the method further includes: calibrating the camera intrinsic parameters and calculating the affine transformation matrix between the camera and the robot.

[0055] The calibrated camera intrinsic parameters include the camera matrix and distortion coefficients. The camera matrix is ​​an inherent property of the camera, including the focal length (f...). x f y ), Optical Center (C x C y The camera matrix is ​​represented as follows: [f x ,0,C x ;0,f y C y [;0,0,1]. The distortion coefficients include five parameters of the distortion mathematical model: D = (k1, k2, P1, P2, k3), where k1, k2, and k3 are the radial distortion coefficients, and P1 and P2 are the tangential distortion coefficients. The affine transformation matrix from the camera image coordinate system to the robot coordinate system is calculated using the commonly used nine-point calibration method, facilitating subsequent coordinate transformations.

[0056] Step 204: Perform region segmentation on the current image to obtain N board image regions, where N is an integer not less than 1.

[0057] The process involves identifying the features of the circuit boards in the current image, roughly locating the approximate position of each circuit board, and dividing the current image into N circuit board image regions.

[0058] In an optional implementation, before step 204, the method further includes: extracting key points of image pixels from the current image to obtain image point cloud data, the image point cloud data including multiple feature points; filtering the image point cloud data to obtain feature point data; performing region segmentation based on the feature point data to obtain N board image regions; optionally, calculating key point descriptors and filtering out unsuitable key points to obtain feature point data; optionally, using at least one of ORB (Oriented FAST and Rotated BRIEF), SURF (Speed ​​Up Robust Features), FAST (Features from Accelerated Segment Test), and SIFT (Scale-invariant Feature Transform) to extract key points of image pixels from the current image.

[0059] Optionally, the feature points of the current image are subjected to dimensionality reduction processing, and the board image region is segmented using gradient descent. Optionally, graphics operations are used to identify the outer rectangle of the board in the current image, and the board image region is segmented based on the outer rectangle. Optionally, a template matching algorithm is used to identify multiple targets in the current image, and N board image regions are segmented. Optionally, a board recognition model is trained using deep learning technology, and the current image is recognized based on the board recognition model to segment N board image regions.

[0060] Step 206: For each board image region, perform feature point matching between the board template and the board image region, and map the dispensing position in the board template to the board image region to obtain the target dispensing position corresponding to the board image region.

[0061] In this process, based on the positional information of the board image region, feature point data for each board image region is filtered from the feature point data of the current image. The feature point data of each board image region is matched with the feature point data of the board template. An affine transformation is used to calculate the pixel coordinate transformation matrix between the board template and the current image. Based on this pixel coordinate transformation matrix, the dispensing position in the board template is mapped to the board image region, thus determining the target dispensing position corresponding to the board image region. The dispensing position refers to the specific location on the board template where the dispensing operation needs to be performed, which can be any location on the board template. This embodiment allows any point on the board template to be mapped to the current image. The target dispensing position is the pixel coordinate on the current image, used to indicate the point on the current image where the dispensing operation needs to be performed.

[0062] Optionally, any one of the following matching methods can be used to match the feature point data of the board image region with the feature point data of the board template: k-Nearest Neighbor (KNN) classification algorithm, Hamming distance algorithm, or RANSAC (Random Sampling Consensus).

[0063] In one optional implementation, before step 202, the method further includes: capturing an image of the board with a camera as a board template, extracting the image point cloud data of the board template, filtering the image point cloud data to obtain the feature point data corresponding to the board template, which is used for subsequent feature point matching.

[0064] By matching the N board image regions with the board template, the target glue application positions corresponding to the N board image regions can be determined, that is, the coordinates of the N pixels can be determined.

[0065] Step 208: Control the robot to perform the dispensing action according to the target dispensing positions corresponding to the N board image areas.

[0066] Specifically, based on the pre-calculated affine transformation matrix between the camera and the robot, the coordinates of N pixels are transformed into the robot coordinate system, and the position information of the target glue dispensing position of each board in the robot's view is located. The robot is then controlled to perform glue dispensing or spraying actions according to this position information.

[0067] In one optional implementation, the robot is controlled to sequentially perform dispensing or spraying actions on N circuit boards. Alternatively, the robot is controlled to perform dispensing or spraying actions on N circuit boards simultaneously.

[0068] In the above dispensing control method, the current image of the area to be dispensed is acquired; the current image is segmented to obtain N board image regions, where N is an integer not less than 1; for each board image region, feature points are matched between the board template and the board image region, and the dispensing position in the board template is mapped to the board image region to obtain the target dispensing position corresponding to the board image region; based on the target dispensing positions corresponding to the N board image regions, the robot is controlled to perform the dispensing action. By performing region segmentation of the current image in advance, the approximate position of each board is coarsely located, and the segmented image is used for fine positioning. This solves the problem that the visual positioning of dispensing equipment cannot simultaneously locate multiple dispensing positions, avoids missed board identification, and improves the accuracy of dispensing control.

[0069] In one exemplary embodiment, such as Figure 3 As shown, step 204 includes:

[0070] Step 302: Extract feature points from the current image.

[0071] Among them, at least one of ORB, SURF, FAST and SIFT is used to extract key points, i.e. feature points, of the current image pixels.

[0072] Step 304: Dimensionality reduction is performed on the two-dimensional coordinate information of the feature points to generate the target curve; the target curve is used to represent the number of feature points corresponding to different horizontal coordinates.

[0073] The feature points contain two-dimensional coordinate information, namely pixel coordinates (x, y). To improve computation speed and reduce computational load, this embodiment reduces the two-dimensional coordinate information to one-dimensional information, and combines the calculation of the number of feature points in each interval of the pixel horizontal coordinate axis (x-axis) to generate the target curve. By generating the target curve through dimensionality reduction, it is possible to statistically analyze the changing trend of the number of feature points in the horizontal direction of the current image.

[0074] Optionally, the specific steps of dimensionality reduction processing include: setting a reasonable interval T based on the pixel size of the current image, for example, if the pixel size of the current image is P[0,2592], setting the interval T=50. The size of the dimensionality reduction array A can be determined based on the pixel size of the current image and this interval, for example, the size of the dimensionality reduction array A is P / T=2592 / 50=518; looping through the feature point list, calculating which interval of the dimensionality reduction array A the horizontal pixel coordinate (x-coordinate) of each feature point belongs to, counting the number of feature points in each interval, generating the target curve, and referring to the target curve generated by the dimensionality reduction processing. Figure 4 .

[0075] Step 306: Use gradient descent to determine multiple local optima in the target curve.

[0076] Based on the board size and the trend of the number of feature points in the horizontal direction of the current image, gradient descent can be used to determine multiple local optima in the target curve. Figure 4 The four points marked in the middle (x1, x2, x3, x4).

[0077] Step 308: Determine multiple dividing lines based on the horizontal coordinates corresponding to multiple local optima.

[0078] In this process, each local optimum on the target curve corresponds to a horizontal coordinate (i.e., the x-axis pixel coordinate). Based on the horizontal coordinates corresponding to multiple local optima, multiple segmentation lines are generated on the current image. For example, if the horizontal coordinate of the local optimum x2 is 1000, a segmentation line with x=1000 is generated on the current image.

[0079] Step 310: Based on multiple dividing lines, perform region segmentation on the current image to obtain N board image regions.

[0080] This process involves segmenting the current image based on multiple dividing lines to roughly locate the approximate position of each board, dividing the current image into N board image regions. In essence, given N+1 dividing lines, the image region between the k-th dividing line and the (k+1)-th dividing line in the current image is defined as the k-th board image region, where k is an integer not less than 1 and not greater than N.

[0081] In this embodiment, by performing dimensionality reduction processing on the two-dimensional coordinate information of feature points, the dimensionality of the feature point data can be reduced, thereby reducing the computational complexity of subsequent processing and helping to improve image processing efficiency. By segmenting the current image into N board image regions, the approximate location of each board can be roughly located, solving the problem that the visual positioning of dispensing equipment cannot simultaneously locate multiple dispensing positions.

[0082] In an exemplary embodiment, after step 306, the method further includes: for each local optimum, searching for at least one target point on the target curve according to a set threshold; the target point being near the local optimum, and the difference between the number of feature points corresponding to the target point and the number of feature points corresponding to the local optimum being the set threshold; determining multiple segmentation lines based on the horizontal coordinates of the target points corresponding to the multiple local optima; and performing region segmentation on the current image based on the multiple segmentation lines to obtain N board image regions.

[0083] The threshold is a pre-set limit for the number of feature points within an image region used to determine whether it includes board features. This threshold can be set or adjusted according to actual conditions. In one optional implementation, for each local optimum, a search is performed starting from that local optimum and then moving towards both smaller and larger horizontal coordinate directions. The difference between the number of feature points found initially in the smaller (or larger) horizontal coordinate direction and the number corresponding to the local optimum is taken as the threshold value and determined as the target point. (Refer to...) Figure 4 Starting from the local optimum x1, the target point found is x. 11 Starting from the local optimum x2, the target point found is x. 21 and x 22 Starting from the local optimum x3, the target point found is x. 31 and x 32 Starting from the local optimum x4, the target point found is x. 41 .

[0084] The current image is segmented using multiple segmentation lines, resulting in N board-based image regions and multiple non-board-based image regions. The image regions between adjacent segmentation lines generated based on the same local optimum target point are non-board-based image regions; the image regions between adjacent segmentation lines generated based on target points with different local optima are board-based image regions. (Refer to...) Figure 4 and Figure 5 , Figure 5 This is a schematic diagram of the segmented image in one embodiment, with the target point located at x. 11 With target point x 21 The image area between the corresponding dividing lines is the board image area, and the target point is x. 21 With target point x 22 The image area between the corresponding dividing lines is the non-board image area.

[0085] In one optional implementation, feature point matching between the board template and the board image region can be performed as follows: For each board image region, a local part of the board image region (such as corner or edge regions) is matched with a local part of the board template; the homography matrix between the board image region and the board template is calculated; based on the homography matrix and the local matching results between the board image region and the board template, the matching result of the complete region can be inferred. Optionally, the q-th local part of the board image region is matched with the q-th local part of the board template to determine their similarity; the number of local parts with a similarity lower than a similarity threshold (set value) is determined; if the proportion of this number of local parts to the total number of local parts is lower than the set proportion, the aforementioned set threshold is reduced to increase the board image region, avoid mismatches, and thus improve the board positioning accuracy.

[0086] In this embodiment, by searching for target points near local optima, it can be ensured that the segmentation points are located in areas with significant changes in image features, thereby improving the accuracy of region segmentation; by setting a threshold, the number of feature points in the board image region can be controlled, the board image region can be reduced, and the computational complexity of subsequent processing can be reduced.

[0087] In an exemplary embodiment, step 204 includes: performing binarization processing on the current image to obtain a target image; identifying N board outer rectangles from the target image; and performing region segmentation on the current image based on the N board outer rectangles to obtain N board image regions.

[0088] The process involves binarization, which converts the pixels of the current image into foreground and background colors. Specifically, the grayscale values ​​of the current image are obtained, and pixels with grayscale values ​​higher than a threshold (set value) are set as the foreground color, while pixels with grayscale values ​​lower than the threshold are set as the background color.

[0089] Optionally, a connected component analysis algorithm is used to identify N board outer rectangles from the target image. Optionally, graphics operations such as erosion and dilation are performed on the target image to detect rectangular contours from the processed image, determine N board outer rectangles, and segment N board image regions from the current image based on the positional information corresponding to the N board outer rectangles.

[0090] In an exemplary embodiment, step 204 includes: using a template matching strategy to identify N target objects in the current image; and performing region segmentation on the current image based on the coordinate information of the N target objects to obtain N board image regions.

[0091] The template matching strategy can be selected according to actual needs, such as grayscale matching, color matching, and normalized cross-correlation coefficient (NCC) matching. In one optional implementation, a sliding window of the same size as the template image is defined in the current image to search for matches. This sliding window slides across the current image with a certain step size to cover all possible matching positions. During the sliding window's movement, the similarity (such as mean squared error, correlation coefficient, mutual information, etc.) between the image region corresponding to the sliding window and the template image is calculated. The positions of sliding windows with similarity higher than a set similarity are determined as the coordinate information of the target object. Based on the coordinate information of the target object, a rectangle is drawn on the current image, and the current image is segmented based on this rectangle to obtain the board image region. The template image in this embodiment can be the aforementioned board template or another image; this embodiment does not limit this.

[0092] In an exemplary embodiment, step 204 includes: using a pre-trained board recognition model to identify the current image and determine N target boards in the current image; and performing region segmentation on the current image based on the coordinate information of the N target boards to obtain N board image regions.

[0093] In this process, board image data and labels are collected in advance to form a training set. Deep learning technology is used to train a board recognition model based on this training set. The board recognition model is used to recognize the current image, identify N target boards in the current image, mark them with recognition boxes, and segment N board image regions based on the coordinate information of the recognition boxes.

[0094] In an exemplary embodiment, step 208 includes: converting the target dispensing positions corresponding to the N board image regions to the robot coordinate system to obtain N target coordinate information; sending a control signal to the robot based on the N target coordinate information; the control signal is used to instruct the robot to call N robotic arms and control the N robotic arms to synchronously perform dispensing actions based on the N target coordinate information.

[0095] The electronic device stores an affine transformation matrix between the camera and the robot. After determining the target dispensing positions corresponding to the N board image regions, the electronic device, based on this affine transformation matrix, can transform the N target dispensing positions (pixel coordinates) into the robot coordinate system, locating the target coordinate information of each board's target dispensing position from the robot's perspective, and controlling the robot to perform dispensing or spraying actions according to this target coordinate information. In this embodiment, the electronic device controls the robot to call N robotic arms, and controls the N robotic arms to simultaneously perform dispensing or spraying on the N boards based on the N target coordinate information.

[0096] Reference Figure 6 , Figure 6 This is a schematic diagram of the image processing results in one embodiment; the location of the board is marked by the recognition box, the target dispensing position is marked by the "cross" shaped graphic, and the target dispensing position is transformed by the coordinate system so that the robot can dispense or spray at the appropriate position on the board.

[0097] In this embodiment, by controlling the robot to process multiple circuit boards simultaneously, the dispensing time for multiple circuit boards is significantly shortened, thereby improving overall production efficiency.

[0098] In one exemplary embodiment, refer to Figure 7 The dispensing control method provided in this application includes preliminary preparation and subsequent processing. Preliminary preparation includes: calibrating camera intrinsic parameters; calculating the affine transformation matrix between the camera and the robot; creating a board template; extracting the image point cloud data of the board template; and filtering and selecting feature points. Subsequent processing includes: real-time camera capture of board images; extracting the image point cloud data of the board images; filtering and selecting feature points; dimensionality reduction processing of the feature point coordinates; determining the segmentation line of each board using gradient descent; segmenting image regions; re-selecting feature points based on the regions; matching feature points between the board template and each image region; determining the target dispensing position in the board image; calculating the robot coordinates corresponding to the target dispensing position; if not all segmented regions have been traversed, re-selecting feature points based on the regions and performing feature point matching; if all segmented regions have been traversed, completing the dispensing process based on the robot coordinates.

[0099] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0100] In one exemplary embodiment, an electronic device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 8As shown, this electronic device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides the environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communicating with external terminals via a network connection. When the computer program is executed by the processor, it implements a dispensing control method.

[0101] Those skilled in the art will understand that Figure 8 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the electronic device to which the present application is applied. The specific electronic device may include more or fewer components than shown in the figure, or combine certain components, or have different component arrangements.

[0102] In one exemplary embodiment, an electronic device is provided, including a memory and a processor. The memory stores a computer program, and the processor executes the computer program to perform the following steps: acquiring a current image of the area to be dispensed; segmenting the current image to obtain N board image regions, where N is an integer not less than 1; for each board image region, matching the board template with the board image region for feature points, and mapping the dispensing position in the board template to the board image region to obtain the target dispensing position corresponding to the board image region; and controlling a robot to perform dispensing actions according to the target dispensing positions corresponding to the N board image regions.

[0103] In one embodiment, when the processor executes the computer program, it further performs the following steps: extracting feature points of the current image; performing dimensionality reduction processing on the two-dimensional coordinate information of the feature points to generate a target curve; the target curve is used to characterize the number of feature points corresponding to different horizontal coordinates; using the gradient descent method to determine multiple local optima in the target curve; determining multiple segmentation lines based on the horizontal coordinates corresponding to the multiple local optima; and performing region segmentation on the current image based on the multiple segmentation lines to obtain N board image regions.

[0104] In one embodiment, when the processor executes the computer program, it further performs the following steps: for each local optimum, searching for at least one target point on the target curve according to a set threshold; the target point is located near the local optimum, and the difference between the number of feature points corresponding to the target point and the number of feature points corresponding to the local optimum is the set threshold; based on the horizontal coordinates of the target points corresponding to the multiple local optima, determining multiple segmentation lines; and based on the multiple segmentation lines, performing region segmentation on the current image to obtain N board image regions.

[0105] In one embodiment, when the processor executes the computer program, it further performs the following steps: binarizing the current image to obtain a target image; identifying N board outer rectangles from the target image; and performing region segmentation on the current image based on the N board outer rectangles to obtain N board image regions.

[0106] In one embodiment, when the processor executes the computer program, it further performs the following steps: using a template matching strategy to identify N target objects in the current image; and based on the coordinate information of the N target objects, performing region segmentation on the current image to obtain N board image regions.

[0107] In one embodiment, when the processor executes the computer program, it further performs the following steps: using a pre-trained board recognition model to identify the current image and determine N target boards in the current image; based on the coordinate information of the N target boards, it performs region segmentation on the current image to obtain N board image regions.

[0108] In one embodiment, when the processor executes the computer program, it further performs the following steps: converting the target dispensing positions corresponding to the N board image areas to the robot coordinate system to obtain N target coordinate information; sending control signals to the robot based on the N target coordinate information; the control signals are used to instruct the robot to call N robotic arms and control the N robotic arms to synchronously perform dispensing actions based on the N target coordinate information.

[0109] In one exemplary embodiment, a dispensing robot is provided, wherein the dispensing robot is equipped with the electronic device described in any embodiment of this application.

[0110] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, it performs the following steps: acquiring a current image of the area to be dispensed; segmenting the current image to obtain N board image areas, where N is an integer not less than 1; for each board image area, matching the board template with the board image area for feature points, and mapping the dispensing position in the board template to the board image area to obtain the target dispensing position corresponding to the board image area; and controlling a robot to perform dispensing actions according to the target dispensing positions corresponding to the N board image areas respectively.

[0111] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: extracting feature points of the current image; performing dimensionality reduction processing on the two-dimensional coordinate information of the feature points to generate a target curve; the target curve is used to represent the number of feature points corresponding to different horizontal coordinates; using the gradient descent method to determine multiple local optima in the target curve; determining multiple segmentation lines based on the horizontal coordinates corresponding to the multiple local optima; and performing region segmentation on the current image based on the multiple segmentation lines to obtain N board image regions.

[0112] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: for each local optimum, searching for at least one target point on the target curve according to a set threshold; the target point is located near the local optimum, and the difference between the number of feature points corresponding to the target point and the number of feature points corresponding to the local optimum is the set threshold; based on the horizontal coordinates of the target points corresponding to the multiple local optima, determining multiple segmentation lines; and based on the multiple segmentation lines, performing region segmentation on the current image to obtain N board image regions.

[0113] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: binarizing the current image to obtain a target image; identifying N board outer rectangles from the target image; and performing region segmentation on the current image based on the N board outer rectangles to obtain N board image regions.

[0114] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: using a template matching strategy to identify N target objects in the current image; and based on the coordinate information of the N target objects, performing region segmentation on the current image to obtain N board image regions.

[0115] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: using a pre-trained board recognition model to identify the current image and determine N target boards in the current image; based on the coordinate information of the N target boards, performing region segmentation on the current image to obtain N board image regions.

[0116] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: converting the target dispensing positions corresponding to the N board image areas to the robot coordinate system to obtain N target coordinate information; sending control signals to the robot based on the N target coordinate information; the control signals are used to instruct the robot to call N robotic arms and control the N robotic arms to synchronously perform dispensing actions based on the N target coordinate information.

[0117] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.

[0118] 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 computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments described above. The memory, database, or other media mentioned in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.

[0119] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0120] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A method for controlling dispensing, characterized in that, The method includes: Get the current image of the area to be glued; The current image is segmented to obtain N board image regions, where N is an integer not less than 1; For each board image region, feature points are matched between the board template and the board image region, and the dispensing position in the board template is mapped to the board image region to obtain the target dispensing position corresponding to the board image region; Based on the target dispensing positions corresponding to the N board image regions, the robot is controlled to perform the dispensing action.

2. The method according to claim 1, characterized in that, The process of segmenting the current image to obtain N board image regions includes: Extract feature points from the current image; The two-dimensional coordinate information of the feature points is reduced in dimensionality to generate a target curve; the target curve is used to represent the number of feature points corresponding to different horizontal coordinates. Multiple local optima in the target curve are determined using the gradient descent method. Based on the horizontal coordinates corresponding to the multiple local optima, multiple dividing lines are determined; Based on the multiple dividing lines, the current image is segmented into N board image regions.

3. The method according to claim 2, characterized in that, After determining multiple local optima in the target curve using the gradient descent method, the method further includes: For each local optimum, at least one target point is searched on the target curve according to a set threshold; the target point is located near the local optimum, and the difference between the number of feature points corresponding to the target point and the number of feature points corresponding to the local optimum is the set threshold. Based on the horizontal coordinates of the target points corresponding to the multiple local optima, determine multiple dividing lines; Based on the multiple dividing lines, the current image is segmented into N board image regions.

4. The method according to claim 1, characterized in that, The process of segmenting the current image to obtain N board image regions includes: The current image is binarized to obtain the target image; Identify N outer rectangles of the circuit board from the target image; Based on the N outer rectangles of the boards, the current image is segmented to obtain N board image regions.

5. The method according to claim 1, characterized in that, The process of segmenting the current image to obtain N board image regions includes: A template matching strategy is used to identify N target objects in the current image; Based on the coordinate information of the N target objects, the current image is segmented to obtain N board image regions.

6. The method according to claim 1, characterized in that, The process of segmenting the current image to obtain N board image regions includes: Using a pre-trained board recognition model, the current image is identified to determine N target boards in the current image; Based on the coordinate information of the N target boards, the current image is segmented to obtain N board image regions.

7. The method according to any one of claims 1 to 6, characterized in that, The step of controlling the robot to perform dispensing actions based on the target dispensing positions corresponding to the N board image regions includes: The target dispensing positions corresponding to the N board image regions are transformed into the robot coordinate system to obtain N target coordinate information; Based on the N target coordinate information, a control signal is sent to the robot; the control signal is used to instruct the robot to call N robotic arms and control the N robotic arms to synchronously perform dispensing actions based on the N target coordinate information.

8. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 7.

9. A dispensing robot, characterized in that, The dispensing robot is equipped with the electronic device as described in claim 8.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.