A dispensing self-positioning method, device and equipment

By using image processing technology in the dispensing machine to determine the object boundaries and characteristic areas and set the dispensing trajectory, the problem that the dispensing machine cannot automatically adjust the dispensing position is solved, and automatic identification and precise control of the dispensing position are achieved.

CN118371398BActive Publication Date: 2024-08-27深圳子柒科技有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410815296.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-24
Publication Date
2024-08-27
Estimated Expiration
2044-06-24

AI Technical Summary

Technical Problem

Existing dispensing machines cannot automatically adjust the dispensing position, resulting in inability to accurately dispensing when the product position changes or shifts.

Method used

By acquiring the product image, determining edge pixels and object boundaries, identifying characteristic areas, setting the dispensing trajectory based on this information, and controlling the mobile device to move along the trajectory to achieve dispensing.

Benefits of technology

It realizes automatic self-positioning of dispensing equipment, can adapt to object position changes and offsets, and ensures dispensing precision and accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118371398B
    Figure CN118371398B
Patent Text Reader

Abstract

The present invention relates to the field of positioning technology, and in particular to a method, device and equipment for self-positioning of glue dispensing. The self-positioning method for glue dispensing includes: obtaining a product image within the working range of the glue dispensing device; determining edge pixels in the product image, determining the object boundary based on all edge pixels to determine the object that needs glue dispensing; from the center of the object that needs glue dispensing to the surroundings, determining the feature area that needs glue dispensing in the object that needs glue dispensing based on the gray value difference between pixels; setting a minimum rectangle based on the feature area, and setting a glue dispensing track based on the overlapping line segments of the feature area and the minimum rectangle; controlling the mobile device to move along the glue dispensing track and controlling the glue dispensing device to dispense glue. The present invention can automatically identify the glue dispensing track regardless of whether the object that needs glue dispensing has changed or the position of the product has shifted, resulting in a shift in the glue dispensing position, thereby solving the problem of being unable to self-position the glue dispensing position.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the field of positioning technology, and in particular to a dispensing self-positioning method, device and equipment. Background Art

[0002] Glue dispensing is a process, also known as gluing, coating, pouring, dripping, etc. It is to apply, pour, and drip electronic glue, oil or other liquids onto the product to make the product stick, pour, insulate, fix, and have a smooth surface.

[0003] Currently, glue dispensing is performed using a glue dispensing machine. The current method is to pre-program the position coordinates so that the glue dispensing head automatically moves to the position coordinates to perform the glue dispensing movement.

[0004] In this way, the position of the product cannot shift, because the dispensing machine can only dispense glue at a fixed position. If the object to be dispensed changes or the position of the product shifts, causing the dispensing position to shift, the dispensing machine will still dispense glue at a fixed position, and there is a problem that the dispensing position cannot be self-positioned. Summary of the invention

[0005] Based on this, it is necessary to provide a dispensing self-positioning method, device and equipment to address the above problems.

[0006] The embodiment of the present invention is implemented as follows: a dispensing self-positioning method, the dispensing self-positioning method comprising:

[0007] Acquire product images within the working range of the dispensing equipment;

[0008] Determine edge pixels in the product image, determine the object boundary based on all edge pixels, and thus determine the object that needs to be glued;

[0009] From the center of the object to be glued to the surroundings, determine the characteristic area to be glued in the object to be glued according to the gray value difference between pixels;

[0010] Set a minimum rectangle according to the feature area, and set a dispensing track according to the overlapping line segments of the feature area and the minimum rectangle;

[0011] Control the mobile device to move along the dispensing track and control the dispensing device to dispense glue.

[0012] In one embodiment, the present invention provides a dispensing self-positioning device, the dispensing self-positioning device comprising:

[0013] An image acquisition module is used to acquire product images within the working range of the dispensing equipment;

[0014] The object determination module is used to determine edge pixels in the product image, determine the object boundary based on all edge pixels, and thus determine the object that needs to be glued;

[0015] A region determination module is used to determine a characteristic region that needs to be glued in the object that needs to be glued from the center to the surrounding areas according to the gray value difference between pixels;

[0016] A trajectory determination module is used to set a minimum rectangle according to a feature area, and to set a dispensing trajectory according to an overlapping line segment between the feature area and the minimum rectangle;

[0017] The mobile dispensing module is used to control the mobile device to move along the dispensing track and control the dispensing device to dispense glue.

[0018] In one of the embodiments, the present invention provides a dispensing self-positioning device, the dispensing self-positioning device housing, a moving module, a dispensing module, an image acquisition module and a control module;

[0019] The housing is provided with a first cabinet and a second cabinet, the first cabinet is provided with a moving module, a dispensing module and an image acquisition module, and the second cabinet is provided with a control module;

[0020] The moving module is used to drive the dispensing module to move or drive the product to move;

[0021] The dispensing module is fixed on the mobile module and is used for dispensing glue on the product;

[0022] The image acquisition module is fixed on the mobile module and is used to acquire product images;

[0023] The control module is connected to the moving module, the dispensing module and the image acquisition module, and is used to execute the steps of the above-mentioned dispensing self-positioning method.

[0024] A method for self-positioning of dispensing provided by an embodiment of the present invention obtains a product image within the working range of a dispensing device; determines edge pixels in the product image, determines the object boundary based on all edge pixels, and thereby determines the object that needs dispensing; determines the feature area that needs dispensing in the object that needs dispensing from the center to the surroundings based on the grayscale value difference between pixels; sets a minimum rectangle based on the feature area, and sets a dispensing track based on the overlapping line segments of the feature area and the minimum rectangle; controls the mobile device to move along the dispensing track and controls the dispensing device to dispense. In this way, the object that needs dispensing is first determined on the product image, and then the feature area that needs dispensing, that is, the filling area of ​​the colloid, is determined, and then the dispensing track is determined based on the feature area so that the dispensing device completes the dispensing. Since the dispensing track is determined based on the product image, whether the object that needs dispensing has changed or the position of the product has shifted, resulting in the position of the dispensing being shifted, the dispensing track can be automatically identified, thereby solving the problem of being unable to self-position the dispensing position. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] Figure 1 A flow chart of a dispensing self-positioning method in one embodiment;

[0026] Figure 2 A schematic diagram of the determination process of edge pixel identification;

[0027] Figure 3 It is a schematic diagram of the process of setting the dispensing trajectory;

[0028] Figure 4 This is an operational effect diagram of a dispensing self-positioning method in an embodiment;

[0029] Figure 5 It is a structural block diagram of a dispensing self-positioning device in one embodiment;

[0030] Figure 6 A structural diagram of a dispensing self-positioning device in one embodiment;

[0031] Figure 7 It is a structural diagram of a dispensing module in a dispensing self-positioning device;

[0032] Figure 8 FIG. 4 is a block diagram of the internal structure of a control module in an embodiment.

[0033] In the accompanying drawings: 1. Shell; 11. First cabinet; 12. Second cabinet; 2. Moving module; 21. First motion component; 22. Second motion component; 3. Dispensing module; 4. Image acquisition module; 5. Control module. DETAILED DESCRIPTION

[0034] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.

[0035] It is understood that the terms "first", "second", etc. used in the present invention may be used herein to describe various elements, but unless otherwise specified, these elements are not limited by these terms. These terms are only used to distinguish a first element from another element. For example, a first xx script may be referred to as a second xx script, and similarly, a second xx script may be referred to as a first xx script without departing from the scope of the present invention.

[0036] like Figure 1 As shown, in one embodiment, a dispensing self-positioning method is proposed, which may specifically include the following steps:

[0037] S101, acquiring a product image within a working range of a dispensing device;

[0038] S102, determining edge pixels in the product image, determining object boundaries based on all edge pixels, and thereby determining objects that need to be glued;

[0039] S103, determining a characteristic area requiring glue dispensing in the object requiring glue dispensing from the center to the surrounding areas according to the gray value difference between pixels;

[0040] S104, setting a minimum rectangle according to the feature area, and setting a dispensing track according to the overlapping line segments of the feature area and the minimum rectangle;

[0041] S105, controlling the mobile device to move along the dispensing track and controlling the dispensing device to dispense glue.

[0042] In this embodiment, the product is fixed on the placement table, and the placement table is part of the mobile device. Generally speaking, there are three ways of moving when dispensing glue, one is that the placement table moves below the dispensing device, one is that the dispensing device moves above the placement table, and the last one is that both the placement table and the dispensing device can move. In essence, the three ways are the same. For the placement table or the dispensing device, they are all moving relative to each other. For the convenience of explanation, the present invention adopts the method of moving the dispensing device above the placement table. Specifically, it can be shown that the product is fixed on the placement table, and the placement table drives the product to move to the middle of the dispensing self-positioning device. The dispensing device moves within a fixed range in the middle of the dispensing self-positioning device. The fixed range is the working range of the dispensing device, for example, it moves within a range of 5cm*5cm. Conversely, the dispensing device is fixed in the middle of the dispensing self-positioning device, and the center point of the placement table moves within a range of 5cm*5cm of the center point of the dispensing self-positioning device, which is also the same.

[0043] In this embodiment, the product image is captured by an image acquisition device. The image acquisition device can be fixed on the dispensing device, or it can be set above the center of the dispensing self-positioning device. For example, if the dispensing device is fixed, the image acquisition device can be fixed on the dispensing device; if the dispensing device is mobile, the image acquisition device can be set in the center of the dispensing self-positioning device. The image acquisition device captures images within a fixed range, such as a range of 5cm*5cm. When the product appears in the fixed range, the image captured by the image acquisition device is the product image. The image acquisition device can enlarge the product image.

[0044] In this embodiment, determining the object that needs glue is not to determine the specific type, but the area of ​​the solid structure that needs glue on the surface of the product. The solid structure that needs glue is the specific type. Therefore, you only need to determine the edge of the object that needs glue, that is, the boundary of the object, to know the object that needs glue. The solid structure that needs glue can be various types of screws, and the object that needs glue does not mean that glue is applied to the entire object. For example, if the solid structure that needs glue is a cross screw, then the object that needs glue only needs to be glued to the cross area, and there is no need to glue the entire cross screw area on the product, that is, the object that needs glue.

[0045] In this embodiment, for example, if the solid structure that needs to be glued is a cross screw, then the cross area is the characteristic area of ​​the cross screw. If the object that needs to be glued is a hexagon socket screw, then the hexagon area is the characteristic area of ​​the hexagon socket screw. The characteristic area is a part of the object that needs to be glued.

[0046] In this embodiment, the glue dispensing device can control the width of the glue dispensing track by adjusting the size of the glue outlet, so setting the glue dispensing track mainly means setting the length of the glue dispensing track.

[0047] In this embodiment, if the dispensing device is moved, the dispensing device moves along the dispensing track and dispenses glue. If the placement table is moved, the placement table moves along the dispensing rule and controls the dispensing device to dispense glue.

[0048] A method for self-positioning of dispensing provided by an embodiment of the present invention obtains a product image within the working range of a dispensing device; determines edge pixels in the product image, determines the object boundary based on all edge pixels, and thereby determines the object that needs dispensing; determines the feature area that needs dispensing in the object that needs dispensing from the center to the surroundings based on the grayscale value difference between pixels; sets a minimum rectangle based on the feature area, and sets a dispensing track based on the overlapping line segments of the feature area and the minimum rectangle; controls the mobile device to move along the dispensing track and controls the dispensing device to dispense. In this way, the object that needs dispensing is first determined on the product image, and then the feature area that needs dispensing, that is, the filling area of ​​the colloid, is determined, and then the dispensing track is determined based on the feature area so that the dispensing device completes the dispensing. Since the dispensing track is determined based on the product image, whether the object that needs dispensing has changed or the position of the product has shifted, resulting in the position of the dispensing being shifted, the dispensing track can be automatically identified, thereby solving the problem of being unable to self-position the dispensing position.

[0049] In one embodiment, determining edge pixels in the product image, determining the object boundary according to all edge pixels, and thus determining the object requiring glue dispensing, includes:

[0050] S201, select any side of the product image, take the pixel at the midpoint of the selected side as the starting point, and make a ray perpendicular to the side;

[0051] S202, selecting a pixel on the ray in order along the direction of the ray;

[0052] S203, determining whether the selected pixel is the first pixel, if not, repeating S202 until the selected pixel is the first pixel;

[0053] S204, if the selected pixel is a first pixel, determine whether there are two or more first pixels in the pixels adjacent to the pixel, if so, determine the pixel as an edge pixel, if not, skip the pixel and execute S202-S203;

[0054] S205, determining edge pixels among pixels adjacent to the most recently determined edge pixel;

[0055] S207, determining whether the newly determined edge pixel has been determined before, if so, stopping the recognition of the edge pixel, if not, determining edge pixels among pixels adjacent to the newly determined edge pixel;

[0056] S208, repeat S207 until the latest determined edge pixel has been determined;

[0057] S209, determining a first curve according to all edge pixels;

[0058] S210, executing S201-S209 for the remaining three sides of the product image to obtain a second curve, a third curve, and a fourth curve;

[0059] S211, performing overlapping fitting on the first curve, the second curve, the third curve, and the fourth curve to obtain an object boundary, and determining an area enclosed by the object boundary as an object requiring glue dispensing.

[0060] In this embodiment, under normal circumstances, the object that needs to be glued is offset based on the center point, and if the product image is divided into 4 parts, the object that needs to be glued will appear in each part. Therefore, in S201, if there are no interfering pixels, the ray will pass through the object that needs to be glued. If the midpoint of the edge is not a pixel, but between two pixels, any one of the pixels is taken as the midpoint. Since the product image has a boundary, the ray is essentially a line segment composed of several pixels.

[0061] In this embodiment, two edge pixels that are in contact, whether the vertices of the pixels are in contact or the sides of the pixels are in contact, are considered as adjacent pixels. If pixel G is taken as the midpoint, then the pixel has at most 8 adjacent pixels, and these 8 adjacent pixels surround pixel G.

[0062] In this embodiment, a pixel on the ray is continuously selected for judgment along the direction of the ray. When an edge pixel is judged, the pixel on the ray is no longer judged, but the edge pixel adjacent to the edge pixel is judged, so as to judge the object boundary and then determine the object that needs to be glued. It can be understood as looking for the first edge pixel along the ray, determining other edge pixels based on the edge pixel, and stopping after determining the object boundary. It is not necessary to analyze the pixels of the entire product image, but only some pixels, so as to reduce the data processing amount of the control module. The process of determining the edge pixel is as follows: Figure 2 As shown, the arrows are the order of determining edge pixels, which can be determined from two directions at the same time, and the identification of edge pixels is stopped when the two arrows intersect.

[0063] In this embodiment, if there is no interference, any one of the first curve, the second curve, the third curve, and the fourth curve can be used as the object boundary. Determination from four directions is to eliminate interference. For example, if some small black dots appear on the product and are just in the direction of the ray, then when determining the object boundary, the edge of the small black dots may be determined. For example, if the first curve is the edge curve of the small black dots, then the second curve, the third curve, and the fourth curve are very different from the first curve, such as area, perimeter, etc., and the first curve needs to be discarded when performing overlapping fitting.

[0064] In this embodiment, overlapping fitting is to determine the object boundary, that is, to determine a unique curve. A simple method is to determine the area enclosed by the four curves respectively, and make errors for the areas in pairs. If the error range is within the first preset range, the average area is calculated. At the same time, the centers of the areas enclosed by the four curves are determined respectively, and whether the distance between any two centers is within the second preset range. If so, a center is determined as the center of the object boundary according to the relative coordinates of the four centers, and then the object boundary is determined according to the average area. A smaller value can be set for the first preset range and the second preset range. For example, the first curve is the edge curve of a small black dot, so the error between the area enclosed by the first curve and the area enclosed by other curves far exceeds the first preset range, and the distance between the center of the area enclosed by the first curve and the center of the area enclosed by other curves also far exceeds the second preset range. At this time, the first curve is excluded and only other curves are fitted. Of course, a preset area can also be set, which is the estimated area of ​​the object that needs to be glued on the product image. If the error between the area enclosed by any curve and the preset area is not within the first range, it can also be excluded.

[0065] In this embodiment, the pixels on the surface of the product are generally not black, and the object boundary is composed of a circle of black pixels, which are the first pixels. The outermost layer of black pixels of these black pixels is the edge pixels.

[0066] In one embodiment, determining whether the selected pixel is the first pixel includes:

[0067] Get the gray value of the selected pixel;

[0068] It is determined whether the grayscale value is less than a first preset value. If so, the selected pixel is the first pixel; if not, the selected pixel is not the first pixel.

[0069] In this embodiment, a gray value of 0 is black, and a gray value of 255 is white. The gray value range is 0-255. Therefore, the first preset value can be set to 50.

[0070] In this embodiment, the first pixel is only a preliminary determination of an edge pixel. Only when the pixel is the first pixel is it determined whether it is an edge pixel.

[0071] In one embodiment, determining edge pixels among pixels adjacent to the most recently determined edge pixel comprises:

[0072] Set the priority of the pixels adjacent to the most recently determined edge pixel;

[0073] Determine a first pixel among pixels adjacent to the most recently determined edge pixel;

[0074] A first pixel with the highest priority is determined according to the priorities of pixels adjacent to the edge pixel that is determined most recently, and the first pixel is determined as the edge pixel.

[0075] In this embodiment, the first edge pixel is passed by the ray, and the first edge pixel is extended in two directions at the same time, so the first edge pixel has two different priorities, and each priority determines one edge pixel. The edge pixels other than the first edge pixel have only one extension direction, and thus only one priority, so only one edge pixel can be determined.

[0076] In one embodiment, setting the priority of pixels adjacent to the most recently determined edge pixel includes:

[0077] Determine the extension direction of the most recently determined edge pixel;

[0078] Determine whether the most recently determined edge pixel is on the ray. If so, take the pixels adjacent to the most recently determined edge pixel along the ray as the lowest priority, and determine the priorities of the pixels adjacent to the most recently determined edge pixel above the ray in a counterclockwise direction from low to high.

[0079] The pixels adjacent to the most recently determined edge pixel along the direction of the ray are given the lowest priority, and the priorities of the pixels adjacent to the most recently determined edge pixel below the ray are determined from low to high in a clockwise direction;

[0080] If the most recently determined edge pixel is not on the ray, determine whether the most recently determined edge pixel is above the ray. If so, take the pixel adjacent to the most recently determined edge pixel in the upper left corner along the extension direction as the starting point, and determine the priority of the pixels adjacent to the most recently determined edge pixel in a clockwise direction from high to low.

[0081] If the most recently determined edge pixel is not above the ray, the priority of the pixels adjacent to the most recently determined edge pixel is determined from high to low in a counterclockwise direction, starting from the pixel adjacent to the most recently determined edge pixel at the lower left along the extension direction.

[0082] In this embodiment, the previously determined edge pixel and the latest determined edge pixel are connected, and the direction from the previously determined edge pixel to the latest determined edge pixel is the extension direction of the latest determined edge pixel.

[0083] In this embodiment, since the first edge pixel is on the ray, there is an extension direction extending upward and an extension direction extending downward for the first edge pixel, but the specific directions of the two extension directions cannot be determined, so the adjacent pixels of the first edge pixel are divided into two parts according to the ray, the edge pixels in the adjacent pixels of the upper part extend upward of the ray, and the edge pixels in the adjacent pixels of the lower part extend downward of the ray, so it is necessary to determine the priorities of the adjacent pixels in the upper and lower parts respectively.

[0084] In this embodiment, since the extension direction is from the previously determined edge pixel to the latest determined edge pixel, it is necessary to exclude the pixel position of the previously determined edge pixel from the priority sorting. Therefore, for the latest determined edge pixel above the ray, it can be understood that the next adjacent pixel in the clockwise direction of the previously determined edge pixel is taken as the starting point, and the priority of the pixels adjacent to the newly determined edge pixel is determined from high to low in the clockwise direction; for the latest determined edge pixel below the ray, it can be understood that the next adjacent pixel in the counterclockwise direction of the previously determined edge pixel is taken as the starting point, and the priority of the pixels adjacent to the newly determined edge pixel is determined from high to low in the counterclockwise direction.

[0085] In one embodiment, determining the characteristic area requiring glue dispensing in the object requiring glue dispensing from the center to the surrounding areas according to the gray value difference between pixels includes:

[0086] S601, determining a standard pattern according to the object to be glued;

[0087] S602, determining the central pixel of the central point of the standard figure;

[0088] S603, calculating the gray value difference D between each pixel adjacent to the central pixel and the central pixel i ;

[0089] S604, by Determine the deviation value;

[0090] S605, recording the pixels adjacent to the central pixel as second pixels;

[0091] S606, for each second pixel, determine whether there is a pixel whose grayscale value difference with the second pixel is greater than the deviation value among the pixels adjacent to the second pixel; if not, determine the pixel adjacent to the second pixel as the second pixel;

[0092] S607, executing S606 for the most recently determined second pixel;

[0093] S608, repeat S607 until no latest determined second pixel appears;

[0094] S609, the area formed by all the second pixels and the central pixel is determined as a feature area requiring glue dispensing;

[0095] Among them, i is the number of pixels adjacent to the central pixel, n is the number of pixels adjacent to the central pixel, is the preset error value.

[0096] In this embodiment, the characteristic area is in the middle area of ​​the object that needs glue dispensing, so the judgment can be started from the center of the object that needs glue dispensing.

[0097] In this embodiment, the standard figure can be a circle or a polygon, which depends on the solid structure that needs to be glued. For example, if the solid structure that needs to be glued is a circular screw, then the object that needs to be glued is a quasi-circle, and the standard figure is a circle; if the solid structure that needs to be glued is a hexagonal screw, then the object that needs to be glued is a quasi-hexagon, and the standard figure is a hexagon. Determining a circle based on a quasi-circle can be achieved through a variety of existing methods, such as direct approximation methods, which are not explained here, and the same is true for polygons.

[0098] In this embodiment, the characteristic area is slightly whiter than the surrounding area in the product image due to the sinking and reflection, and the pixels surrounding the characteristic area are slightly darker than the surrounding area due to the sinking cross section, so a larger gray value difference is formed. The gray value difference of the pixels in the characteristic area is very small, within 20. A gray value difference mean is determined. In order to allow for the existence of errors, a preset error value is set, and the preset error value does not exceed 1 / 2 of the gray value difference mean.

[0099] In this embodiment, the pixel master is essentially judged to touch the edge of the feature area in a water wave-like manner with the center pixel as the center. If there is a pixel whose gray value difference with the second pixel is greater than the deviation value among the pixels adjacent to the second pixel, it means that the second pixel has touched the edge of the feature area, and at this time, there is no need to determine a new second pixel for the pixels adjacent to the second pixel. Of course, the pixels adjacent to the second pixel include the second pixels that have been determined before, but the pixels that have not been determined are no longer determined as new second pixels.

[0100] In one embodiment, the step of setting a minimum rectangle according to the feature area and setting a dispensing track according to an overlapping line segment between the feature area and the minimum rectangle includes:

[0101] Determine a minimum rectangle covering the feature area;

[0102] Determine the overlapping line segments between the minimum rectangle and the feature area;

[0103] For each overlapping line segment, determine the midpoint of the overlapping line segment and record the midpoint as a punctuation point;

[0104] Connect line segments between every two punctuation points to obtain several line segments;

[0105] For each line segment, determine whether the line segment is contained in the feature area. If so, the line segment is recorded as the dispensing track.

[0106] In this embodiment, the second boundary corresponding to the feature area has been determined. For a solid structure that needs to be glued, the feature area is usually a regular image, for example, a cross area. Drawing a border for a target is a prior art and will not be described here. There are many methods used, such as using the rectangle method.

[0107] In this embodiment, if Figure 3 As shown, F is the feature area, P is the minimum rectangle, the feature area is a cross area, the overlapping line segments are A, B, C and E, and the punctuation points are a, b, c and e. The connecting line segments of a and c and b and e are the dispensing tracks, which are also a cross shape and are included in the feature area. Other connecting line segments are not in the feature area and need to be excluded.

[0108] In this embodiment, the operation effect diagram is as follows: Figure 4 As shown, Figure 4 The characteristic area in the figure is in the shape of "X", and the two line segments in the "X" are the dispensing tracks.

[0109] like Figure 5 As shown, in one embodiment, a dispensing self-positioning device is provided, which may specifically include:

[0110] An image acquisition module is used to acquire product images within the working range of the dispensing equipment;

[0111] The object determination module is used to determine edge pixels in the product image, determine the object boundary based on all edge pixels, and thus determine the object that needs to be glued;

[0112] A region determination module is used to determine a characteristic region that needs to be glued in the object that needs to be glued from the center to the surrounding areas according to the gray value difference between pixels;

[0113] A trajectory determination module is used to set a minimum rectangle according to a feature area, and to set a dispensing trajectory according to an overlapping line segment between the feature area and the minimum rectangle;

[0114] The mobile dispensing module is used to control the mobile device to move along the dispensing track and control the dispensing device to dispense glue.

[0115] In this embodiment, each module of the dispensing self-positioning device is a modularization of the method part of the present invention. For the specific explanation of each module, please refer to the corresponding content of the method part of the present invention, and the embodiment of the present invention will not be repeated here.

[0116] like Figure 6 As shown, in one embodiment, a dispensing self-positioning device is provided, which may specifically include: a housing 1, a moving module 2, a dispensing module 3, an image acquisition module 4 and a control module 5;

[0117] The housing 1 is provided with a first cabinet 11 and a second cabinet 12, the first cabinet 11 is provided with a moving module 2, a dispensing module 3 and an image acquisition module 4, and the second cabinet 12 is provided with a control module 5;

[0118] The moving module 2 is used to drive the dispensing module 3 to move or drive the product to move;

[0119] The dispensing module 3 is fixed on the mobile module 2 and is used for dispensing glue on the product;

[0120] The image acquisition module 4 is fixed on the mobile module 2 and is used to acquire product images;

[0121] The control module 5 is connected to the moving module 2, the dispensing module 3, and the image acquisition module 4, and is used to execute the steps of the above-mentioned dispensing self-positioning method.

[0122] In this embodiment, the dispensing self-positioning device also includes other modules such as a power module, a light source compensation module, and a heat dissipation module.

[0123] In this embodiment, the image acquisition module 4 may be a terminal with an image acquisition function, such as a camera.

[0124] A dispensing self-positioning device provided by an embodiment of the present invention obtains a product image within the working range of a dispensing module 3 through an image acquisition module 4; determines edge pixels in the product image, determines the object boundary based on all edge pixels, and thereby determines the object that needs dispensing; determines the feature area that needs dispensing in the object that needs dispensing from the center to the surroundings based on the grayscale value difference between pixels; sets a minimum rectangle based on the feature area, and sets a dispensing track based on the overlapping line segments of the feature area and the minimum rectangle; controls the moving module 2 to move along the dispensing track and controls the dispensing module 3 to dispense glue. In this way, the object that needs dispensing is first determined on the product image, and then the feature area that needs dispensing, that is, the filling area of ​​the colloid, is determined, and then the dispensing track is determined based on the feature area so that the dispensing module 3 completes the dispensing. Since the dispensing track is determined based on the product image, whether the object that needs dispensing has changed or the position of the product has shifted, resulting in the position of the dispensing being shifted, the dispensing track can be automatically identified, thereby solving the problem of being unable to self-position the dispensing position.

[0125] like Figure 7 As shown, in one embodiment, the mobile module 2 includes a first moving component 21 and a second moving component 22;

[0126] The first motion component 21 is disposed on the side wall of the first cabinet 11, fixed to the dispensing module 3 and the image acquisition module 4, and is used to drive the dispensing module 3 and the image acquisition module 4 to move;

[0127] The second moving component 22 is disposed on the horizontal surface of the first cabinet 11 and is used to drive the product to move.

[0128] In this embodiment, the second motion component 22 includes a placement table and a conveying component. The placement table is used to place the product, and the conveying component is used to drive the placement table to move and thus drive the product to move.

[0129] Figure 8 FIG. 2 shows an internal structure diagram of a control module in an embodiment. Figure 8As shown, the control module includes a processor, a memory, a network interface, an input device and a display screen connected through a system bus. Among them, the memory includes a non-volatile storage medium and an internal memory. The non-volatile storage medium of the control module stores an operating system and may also store a computer program. When the computer program is executed by the processor, the processor can implement a dispensing self-positioning method provided in an embodiment of the present invention. The internal memory may also store a computer program. When the computer program is executed by the processor, the processor can execute a dispensing self-positioning method provided in an embodiment of the present invention. The display screen of the control module may be a liquid crystal display screen or an electronic ink display screen, and the input device of the control module may be a touch layer covering the display screen, or a button, trackball or touchpad provided on the housing of the control module, or an external keyboard, touchpad or mouse, etc.

[0130] Those skilled in the art will understand that Figure 8 The structure shown in the figure is only a block diagram of a partial structure related to the scheme of the present invention, and does not constitute a limitation on the control module to which the scheme of the present invention is applied. The specific control module may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0131] In one embodiment, a dispensing self-positioning device provided by an embodiment of the present invention can be implemented in the form of a computer program. The computer program can be used in Figure 8 The control module is operated on the control module shown. The memory of the control module can store various program modules constituting the dispensing self-positioning device, such as, Figure 5 The computer program composed of the image acquisition module, object determination module, area determination module, trajectory determination module and mobile dispensing module shown in the figure enables the processor to execute the steps of a dispensing self-positioning method of each embodiment of the present invention described in this specification.

[0132] For example, Figure 8 The control module shown can be Figure 5 The image acquisition module in the dispensing self-positioning device shown executes step S101; the control module can execute step S102 by determining the object module; the control module can execute step S103 by determining the area module; the control module can execute step S104 by determining the trajectory module; the control module can execute step S105 by moving the dispensing module.

[0133] In one embodiment, a control module is provided, the control module comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the following steps when executing the computer program:

[0134] S101, acquiring a product image within a working range of a dispensing device;

[0135] S102, determining edge pixels in the product image, determining object boundaries based on all edge pixels, and thereby determining objects that need to be glued;

[0136] S103, determining a characteristic area requiring glue dispensing in the object requiring glue dispensing from the center to the surrounding areas according to the gray value difference between pixels;

[0137] S104, setting a minimum rectangle according to the feature area, and setting a dispensing track according to the overlapping line segments of the feature area and the minimum rectangle;

[0138] S105, controlling the mobile device to move along the dispensing track and controlling the dispensing device to dispense glue.

[0139] 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, the processor performs the following steps:

[0140] S101, acquiring a product image within a working range of a dispensing device;

[0141] S102, determining edge pixels in the product image, determining object boundaries based on all edge pixels, and thereby determining objects that need to be glued;

[0142] S103, determining a characteristic area requiring glue dispensing in the object requiring glue dispensing from the center to the surrounding areas according to the gray value difference between pixels;

[0143] S104, setting a minimum rectangle according to the feature area, and setting a dispensing track according to the overlapping line segments of the feature area and the minimum rectangle;

[0144] S105, controlling the mobile device to move along the dispensing track and controlling the dispensing device to dispense glue.

[0145] It should be understood that, although each step in the flow chart of each embodiment of the present invention is shown in sequence according to the indication of the arrow, these steps are not necessarily performed in sequence according to the order indicated by the arrow. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be performed in other orders. Moreover, at least a portion of the steps in each embodiment may include a plurality of sub-steps or a plurality of stages, and these sub-steps or stages are not necessarily performed at the same time, but can be performed at different times, and the execution order of these sub-steps or stages is not necessarily performed in sequence, but can be performed in turn or alternately with at least a portion of other steps or sub-steps or stages of other steps.

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

[0147] The technical features of the above-described embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above-described 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 specification.

[0148] The above-mentioned embodiments only express several implementation methods of the present invention, and the description thereof is relatively specific and detailed, but it cannot be understood as limiting the scope of the present invention. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present invention, which all belong to the protection scope of the present invention.

Claims

1. A dispensing self-positioning method, characterized in that: The dispensing self-positioning method comprises: Acquire product images within the working range of the dispensing equipment; Determine edge pixels in the product image, determine the object boundary based on all edge pixels, and thus determine the object that needs to be glued; From the center of the object to be glued to the surroundings, determine the characteristic area to be glued in the object to be glued according to the gray value difference between pixels; Set a minimum rectangle according to the feature area, and set a dispensing track according to the overlapping line segments of the feature area and the minimum rectangle; Control the mobile device to move along the dispensing track and control the dispensing device to dispense glue; The step of determining edge pixels in the product image, determining the object boundary according to all edge pixels, and thus determining the object that needs to be glued includes: S201, select any side of the product image, take the pixel at the midpoint of the selected side as the starting point, and make a ray perpendicular to the side; S202, selecting a pixel on the ray in order along the direction of the ray; S203, determining whether the selected pixel is the first pixel, if not, repeating S202 until the selected pixel is the first pixel; S204, if the selected pixel is a first pixel, determine whether there are two or more first pixels in the pixels adjacent to the pixel, if so, determine the pixel as an edge pixel, if not, skip the pixel and execute S202-S203; S205, determining edge pixels among pixels adjacent to the most recently determined edge pixel; S207, determining whether the newly determined edge pixel has been determined before, if so, stopping the recognition of the edge pixel, if not, determining edge pixels among pixels adjacent to the newly determined edge pixel; S208, repeat S207 until the latest determined edge pixel has been determined; S209, determining a first curve according to all edge pixels; S210, executing S201-S209 for the remaining three sides of the product image to obtain a second curve, a third curve, and a fourth curve; S211, performing overlapping fitting on the first curve, the second curve, the third curve, and the fourth curve to obtain an object boundary, and determining an area enclosed by the object boundary as an object requiring glue dispensing; The method of setting a minimum rectangle according to the feature area and setting a dispensing track according to the overlapping line segments of the feature area and the minimum rectangle includes: Determine a minimum rectangle covering the feature area; Determine the overlapping line segments between the minimum rectangle and the feature area; For each overlapping line segment, determine the midpoint of the overlapping line segment and record the midpoint as a punctuation point; Connect line segments between every two punctuation points to obtain several line segments; For each line segment, determine whether the line segment is contained in the feature area. If so, the line segment is recorded as the dispensing track.

2. The dispensing self-positioning method according to claim 1, characterized in that: The determining whether the selected pixel is the first pixel comprises: Get the grayscale value of the selected pixel; It is determined whether the grayscale value is less than a first preset value. If so, the selected pixel is the first pixel; if not, the selected pixel is not the first pixel.

3. The dispensing self-positioning method according to claim 2, characterized in that: The step of determining edge pixels among pixels adjacent to the most recently determined edge pixel comprises: Set the priority of the pixels adjacent to the most recently determined edge pixel; Determine a first pixel among pixels adjacent to the most recently determined edge pixel; A first pixel with the highest priority is determined according to the priorities of pixels adjacent to the edge pixel that is determined most recently, and the first pixel is determined as the edge pixel.

4. The dispensing self-positioning method according to claim 3, characterized in that: The step of setting the priority of pixels adjacent to the most recently determined edge pixel comprises: Determine the extension direction of the most recently determined edge pixel; Determine whether the most recently determined edge pixel is on the ray. If so, take the pixels adjacent to the most recently determined edge pixel along the ray as the lowest priority, and determine the priorities of the pixels adjacent to the most recently determined edge pixel above the ray in a counterclockwise direction from low to high. The pixels adjacent to the most recently determined edge pixel along the direction of the ray are given the lowest priority, and the priorities of the pixels adjacent to the most recently determined edge pixel below the ray are determined from low to high in a clockwise direction; If the most recently determined edge pixel is not on the ray, determine whether the most recently determined edge pixel is above the ray. If so, take the pixel adjacent to the most recently determined edge pixel in the upper left direction of the extension direction as the starting point, and determine the priority of the pixels adjacent to the most recently determined edge pixel in a clockwise direction from high to low. If the most recently determined edge pixel is not above the ray, the priority of the pixels adjacent to the most recently determined edge pixel is determined from high to low in a counterclockwise direction, starting from the pixel adjacent to the most recently determined edge pixel at the lower left along the extension direction.

5. The dispensing self-positioning method according to claim 1, characterized in that: The step of determining a characteristic area requiring glue dispensing in the object requiring glue dispensing from the center of the object requiring glue dispensing to the surrounding areas according to the gray value difference between pixels includes: S601, determining a standard pattern according to the object to be glued; S602, determining the central pixel of the central point of the standard figure; S603, calculating the gray value difference D between each pixel adjacent to the central pixel and the central pixel i ; S604, by Determine the deviation value; S605, recording the pixels adjacent to the central pixel as second pixels; S606, for each second pixel, determine whether there is a pixel whose grayscale value difference with the second pixel is greater than the deviation value among the pixels adjacent to the second pixel; if not, determine the pixel adjacent to the second pixel as the second pixel; S607, executing S606 for the most recently determined second pixel; S608, repeat S607 until no latest determined second pixel appears; S609, the area formed by all the second pixels and the central pixel is determined as a feature area requiring glue dispensing; Among them, i is the number of pixels adjacent to the central pixel, n is the number of pixels adjacent to the central pixel, is the preset error value.

6. A dispensing self-positioning device, characterized in that: The dispensing self-positioning device comprises: An image acquisition module is used to acquire product images within the working range of the dispensing equipment; The object determination module is used to determine edge pixels in the product image, determine the object boundary based on all edge pixels, and thus determine the object that needs to be glued; A region determination module is used to determine a characteristic region that needs to be glued in the object that needs to be glued from the center to the surrounding areas according to the gray value difference between pixels; A trajectory determination module is used to set a minimum rectangle according to a feature area, and to set a dispensing trajectory according to an overlapping line segment between the feature area and the minimum rectangle; A mobile dispensing module is used to control the mobile device to move along the dispensing track and control the dispensing device to dispense glue; The step of determining edge pixels in the product image, determining the object boundary according to all edge pixels, and thus determining the object that needs to be glued includes: S201, select any side of the product image, take the pixel at the midpoint of the selected side as the starting point, and make a ray perpendicular to the side; S202, selecting a pixel on the ray in order along the direction of the ray; S203, determining whether the selected pixel is the first pixel, if not, repeating S202 until the selected pixel is the first pixel; S204, if the selected pixel is a first pixel, determine whether there are two or more first pixels in the pixels adjacent to the pixel, if so, determine the pixel as an edge pixel, if not, skip the pixel and execute S202-S203; S205, determining edge pixels among pixels adjacent to the most recently determined edge pixel; S207, determining whether the newly determined edge pixel has been determined before, if so, stopping the recognition of the edge pixel, if not, determining edge pixels among pixels adjacent to the newly determined edge pixel; S208, repeat S207 until the latest determined edge pixel has been determined; S209, determining a first curve according to all edge pixels; S210, executing S201-S209 for the remaining three sides of the product image to obtain a second curve, a third curve, and a fourth curve; S211, performing overlapping fitting on the first curve, the second curve, the third curve, and the fourth curve to obtain an object boundary, and determining an area enclosed by the object boundary as an object requiring glue dispensing; The method of setting a minimum rectangle according to the feature area and setting a dispensing track according to the overlapping line segments of the feature area and the minimum rectangle includes: Determine a minimum rectangle covering the feature area; Determine the overlapping line segments between the minimum rectangle and the feature area; For each overlapping line segment, determine the midpoint of the overlapping line segment and record the midpoint as a punctuation point; Connect line segments between every two punctuation points to obtain several line segments; For each line segment, determine whether the line segment is contained in the feature area. If so, the line segment is recorded as the dispensing track.

7. A dispensing self-positioning device, characterized in that: The dispensing self-positioning device comprises a housing, a moving module, a dispensing module, an image acquisition module and a control module; The housing is provided with a first cabinet and a second cabinet, the first cabinet is provided with a moving module, a dispensing module and an image acquisition module, and the second cabinet is provided with a control module; The moving module is used to drive the dispensing module to move or drive the product to move; The dispensing module is fixed on the mobile module and is used for dispensing glue on the product; The image acquisition module is fixed on the mobile module and is used to acquire product images; The control module is connected to the moving module, the dispensing module, and the image acquisition module, and is used to execute the steps of the dispensing self-positioning method described in any one of claims 1 to 5.

8. The dispensing self-positioning device according to claim 7, characterized in that: The mobile module includes a first moving component and a second moving component; The first motion component is disposed on the side wall of the first cabinet, fixed to the dispensing module and the image acquisition module, and used to drive the dispensing module and the image acquisition module to move; The second motion component is arranged on the horizontal surface of the first cabinet and is used for driving the product to move.