Gluing detection method, system and device and electronic equipment
By directly detecting the shape parameters of the glue strips in the glue coating detection, the problems of matching errors and large offsets in the prior art are solved, and the detection accuracy is improved.
Patent Information
- Application Number
- CN202311361407.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-19
- Publication Date
- 2025-04-22
AI Technical Summary
In the prior art, matching errors or large offsets often occur in glue coating detection, resulting in low detection accuracy.
By detecting the shape parameters of the glue strip in the detection area of the image to be detected, it is directly determined whether the glue strip is compliant, without matching the image to be detected with the image of the compliant glue strip.
The misjudgment problem caused by image matching is improved and the detection accuracy is improved.
Smart Images

Figure CN119861072A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of battery detection, and in particular to a method, system, device and electronic equipment for detecting glue coating. Background Art
[0002] In the battery manufacturing process, in order to protect the battery, it is often necessary to coat the structural parts in the battery module (such as the middle partition, side panels, etc.) with glue. After the gluing process is completed, the glue shape needs to be tested to determine whether the glue strips coated on the structural parts can play a role in protecting the battery.
[0003] In the related art, there is a solution for detecting the shape of the rubber strip by matching the image of the rubber strip to be detected with the image of the compliant rubber strip. However, matching errors often occur, or large offsets after successful matching result in low detection accuracy. Summary of the invention
[0004] The purpose of the embodiments of the present application is to provide a glue coating detection method, system, device and electronic equipment to improve the detection accuracy of glue strips.
[0005] In a first aspect, an embodiment of the present application provides a glue detection method, the method comprising: receiving a glue detection instruction; the glue detection instruction is used to indicate whether a glue strip coated on an object to be detected is compliant; according to the glue detection instruction, detecting shape parameters of the glue strip within a detection area in an image to be detected; the image to be detected includes an object to be detected coated with a glue strip; and determining that the glue strip is compliant when the shape parameters of the glue strip meet coating requirements.
[0006] In this implementation, the detection device can detect the shape parameters of the rubber strip in the detection area of the image to be detected, so as to directly determine whether the rubber strip is compliant based on the shape parameters. In this way, there is no need to match the image to be detected with the image of the compliant rubber strip, which improves the problem of misjudgment caused by image matching and improves the detection accuracy.
[0007] Optionally, the shape parameters include a maximum width; and the detecting the shape parameters of the rubber strip in the detection area in the image to be detected includes: for each glue point on the rubber strip, detecting the distance from the glue point to the rubber strip boundary; determining the maximum width according to the glue point position corresponding to the maximum distance; wherein, when the maximum width of the rubber strip is less than a preset maximum width threshold, it is determined that the shape parameters of the rubber strip do not meet the coating requirements. In this way, the maximum width of the rubber strip can be calculated, and if the detection device determines that the maximum width is less than the preset maximum width threshold, it can be regarded as non-compliant with the rubber strip.
[0008] Optionally, for each glue point on the adhesive strip, detecting the distance from the glue point to the adhesive strip boundary includes: for each glue point, using an image distance function to calculate the image distance of the glue point; determining the two-dimensional value obtained after the image distance is converted as the distance from the glue point to the adhesive strip boundary; and determining the maximum width according to the glue point position corresponding to the maximum distance includes: determining the maximum width as the double value of the maximum two-dimensional value. In this way, the maximum width of the adhesive strip can be calculated by the image distance function and the image to array function.
[0009] Optionally, the shape parameters include a minimum width; and the detecting the shape parameters of the rubber strip in the detection area in the image to be detected includes: separating the upper contour coordinates and the lower contour coordinates of the rubber strip; for each contour coordinate, calculating the coordinate distance from the contour coordinate to the other contour coordinate; wherein the minimum coordinate distance is the minimum width; and when the minimum width is greater than a preset minimum width threshold, determining that the shape parameters of the rubber strip do not meet the coating requirements. In this way, the minimum width of the rubber strip can be calculated, and if the detection device determines that the minimum width is greater than the preset minimum width threshold, it can be regarded as the rubber strip being unqualified.
[0010] Optionally, the separation of the upper contour coordinates and the lower contour coordinates of the rubber strip includes: determining all contour coordinates of the rubber strip by extracting a curve function; separating contour coordinates located on the same side according to the horizontal position relationship and arrangement direction of the contour coordinates; separating the upper contour coordinates and the lower contour coordinates of the rubber strip according to a distinction rule; the distinction rule indicates that for two contour coordinates with the same horizontal position, the contour coordinate with a larger vertical distance is determined as the upper contour coordinate. In this way, the upper contour coordinates and the lower contour coordinates can be directly separated with high accuracy.
[0011] Optionally, the shape parameters include peak parameters and trough parameters; and the shape parameters of the rubber strip are detected in the detection area in the image to be detected, including: separating the upper contour coordinates and the lower contour coordinates of the rubber strip; detecting the upper contour coordinates by a peak detection function to obtain the peak parameters; detecting the lower contour coordinates by a trough detection function to obtain the trough parameters; wherein, when the peak parameters are not within a preset peak parameter range, and / or the trough parameters are not within a preset trough parameter range, it is determined that the shape parameters do not meet the coating requirements. In this way, the peak and trough conditions can be directly calculated by the peak detection function and the trough detection function, with high accuracy.
[0012] Optionally, the separation of the upper contour coordinates and the lower contour coordinates of the rubber strip includes: determining all contour coordinates of the rubber strip by extracting a curve function; separating contour coordinates located on the same side according to the size relationship and arrangement direction of the contour coordinates; separating the upper contour coordinates and the lower contour coordinates of the rubber strip according to a distinction rule; the distinction rule indicates that for two contour coordinates at the same horizontal position, the contour coordinate with the larger vertical distance is determined as the upper contour coordinate. In this way, the upper contour coordinates and the lower contour coordinates can be directly separated with high accuracy.
[0013] Optionally, the shape parameters include a glue shape offset; and the shape parameters of the glue strip are detected in the detection area of the image to be detected, including: when the edge straight line of the image to be detected is detected, the distance of the glue strip relative to the edge straight line is determined as the glue shape offset; when the edge straight line of the image to be detected is not detected, the edge distance of the glue strip relative to the preset offset detection area is determined as the glue shape offset; wherein, when the glue shape offset is not within the preset offset range, it is determined that the shape parameters do not meet the coating requirements. In this way, regardless of whether the detection device finds the edge straight line, the glue shape offset can be calculated, and then it can be determined whether the glue strip is compliant.
[0014] Optionally, before detecting the edge straight line, the shape parameters of the rubber strip are detected in the detection area in the image to be detected, and further include: separating the upper contour coordinates and the lower contour coordinates of the rubber strip; determining the left contour coordinates corresponding to the minimum horizontal coordinate value and the right contour coordinates corresponding to the maximum horizontal coordinate value; and the rubber shape offset includes: the upper average value of the distance from the upper contour coordinate to the upper edge straight line; the lower average value of the distance from the lower contour coordinate to the lower edge straight line; the left distance from the left contour coordinate to the left edge straight line; the right distance from the right contour coordinate to the right edge straight line; wherein, when the upper average value is not within the preset upper average value range, the lower average value is not within the preset lower average value range, the left distance is not within the preset left distance range, and / or the right distance is not within the preset right distance range, it is determined that the shape parameters do not meet the coating requirements. In this way, the rubber strip offset can be obtained more accurately, so that for each offset, if it is not within the preset offset range, it can be regarded as non-compliant with the rubber strip.
[0015] Optionally, after receiving the glue coating detection instruction, the method further includes: filtering the glue strip particles included in the image to be detected according to the width filtering rule; the width filtering rule includes filtering the glue strip particles with excessive width in the detection area, and the foreign particles that are not attached to the glue strip particles in the detection area; expanding the area of the detection area, and repeatedly filtering the remaining glue strip particles according to the width filtering rule in the expanded detection area to obtain the target glue strip; and detecting the shape parameters of the glue strip in the detection area in the image to be detected includes: detecting the shape parameters of the target glue strip in the detection area. In this way, the situation where the entire glue strip is filtered out can be improved.
[0016] Optionally, before detecting the shape parameters of the rubber strip in the detection area in the image to be detected according to the glue detection instruction, the method further includes: marking an ignored area in the image to be detected according to an area setting instruction; and detecting the shape parameters of the rubber strip in the detection area in the image to be detected includes: in the process of detecting the shape parameters of the rubber strip, detecting the shape parameters of the rubber strip portion outside the ignored area. In this way, only the shape parameters of the rubber strip portion outside the ignored area can be detected, without detecting the shape parameters of the rubber strip within the ignored area, which saves computing resources to a certain extent and speeds up detection efficiency.
[0017] Optionally, before detecting the shape parameters of the rubber strip in the detection area in the image to be detected, the method further includes: if the rubber strip is not completely located in the detection area, adjusting the position of the detection area so that the rubber strip is completely located in the detection area. In this way, the rubber strip can be completely located in the detection area, so that the entire rubber strip can be detected, thereby improving the situation of missed detection.
[0018] In the second aspect, the embodiment of the present application provides a glue coating detection system, comprising: a robot, used to carry the object to be detected coated with a rubber strip to the camera's shooting field of view; a camera, used to shoot the object to be detected to obtain an image to be detected; and a detection device, used to execute the method described in the first aspect to determine whether the rubber strip is compliant. In this way, there is no need to match the image to be detected with the image of a compliant rubber strip, which improves the problem of misjudgment caused by image matching and improves the detection accuracy.
[0019] Optionally, the glue coating detection system further includes: a light source, used to provide lighting of a preset color during the shooting process of the camera; the installation height of the light source is greater than the maximum height of the robot arm during the handling process of the robot.
[0020] In the third aspect, the embodiment of the present application provides a glue detection device, which includes: a receiving module for receiving a glue detection instruction; the glue detection instruction is used to indicate whether the glue strip coated on the object to be detected is compliant; a detection module for detecting the shape parameters of the glue strip in the detection area of the image to be detected according to the glue detection instruction; the image to be detected includes the object to be detected coated with the glue strip; a judgment module for judging that the glue strip is compliant when the shape parameters of the glue strip meet the coating requirements. In this way, there is no need to match the image to be detected with the image of the compliant glue strip, which improves the problem of misjudgment caused by image matching and improves the detection accuracy.
[0021] In a fourth aspect, an embodiment of the present application provides an electronic device, comprising a processor and a memory, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the steps in the method provided in the first aspect are executed.
[0022] In a fifth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps in the method provided in the first aspect are performed.
[0023] Other features and advantages of the present application will be described in the following description, and partly become apparent from the description, or be understood by practicing the embodiments of the present application. The purpose and other advantages of the present application can be realized and obtained by the structures specifically pointed out in the written description, claims, and drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments of the present application will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0025] Figure 1 A flow chart of a method for detecting glue coating provided in an embodiment of the present application;
[0026] Figure 2 A schematic diagram of a distance image of a rubber strip provided in an embodiment of the present application;
[0027] Figure 3 A schematic diagram of two-dimensional numerical distribution of a rubber strip provided in an embodiment of the present application;
[0028] Figure 4 A schematic diagram of the outline of a rubber strip provided in an embodiment of the present application;
[0029] Figure 5 A method for arranging the contour coordinates of a rubber strip provided in an embodiment of the present application;
[0030] Figure 6 A schematic diagram of a program for separating upper contour coordinates and lower contour coordinates provided in an embodiment of the present application;
[0031] Figure 7 A schematic diagram of a program for comparing the size of a vertical coordinate provided in an embodiment of the present application;
[0032] Figure 8 A visualization diagram of a "one-dimensional interpolation" operation for dividing the contour coordinates on both sides into six equal parts provided in an embodiment of the present application;
[0033] Fig. 9 A schematic diagram of a program for detecting peak parameters and trough parameters provided in an embodiment of the present application;
[0034] Fig.10 A schematic diagram for marking peak parameters and trough parameters provided in an embodiment of the present application;
[0035] Fig.11 A schematic diagram of a detection effect when an edge straight line is detected provided in an embodiment of the present application;
[0036] Fig.12 A schematic diagram of a detection effect provided in an embodiment of the present application when no edge straight line is detected;
[0037] Fig.13 An image to be detected provided in an embodiment of the present application;
[0038] Fig.14 A method for providing a method for Fig.13 The image to be detected in is an image after being binarized;
[0039] Fig.15 An image obtained by first processing an image to be processed using a particle filter provided in an embodiment of the present application;
[0040] Fig.16 An image obtained by processing an image to be processed again using a particle filter provided in an embodiment of the present application;
[0041] Fig.17 An image after a glue strip is cut provided in an embodiment of the present application;
[0042] Fig.18 A structural block diagram of a glue coating detection system provided in an embodiment of the present application;
[0043] Fig.19A schematic diagram of a situation where multiple robots and multiple cameras work together provided by an embodiment of the present application;
[0044] Fig. 20 A schematic diagram of simultaneously displaying images taken by three cameras provided in an embodiment of the present application;
[0045] Fig.21 A schematic diagram of a detection result of a partition provided in an embodiment of the present application;
[0046] Fig. 22 A schematic diagram of a detection result of a side panel provided in an embodiment of the present application;
[0047] Fig.23 A schematic diagram of a single robot and a single camera working together provided in an embodiment of the present application;
[0048] Fig.24 A schematic diagram showing a single image to be detected taken by a single camera provided in an embodiment of the present application;
[0049] Fig.25 A schematic diagram showing multiple images to be detected taken by a single camera provided in an embodiment of the present application;
[0050] Fig.26 A schematic diagram showing relevant data of multiple detection items provided in an embodiment of the present application;
[0051] Fig. 27 A schematic diagram of displaying corresponding related data according to a viewing instruction provided in an embodiment of the present application;
[0052] Fig.28 A schematic diagram showing a method of viewing a compliant adhesive strip image according to an instruction provided in an embodiment of the present application;
[0053] Fig.29 A schematic diagram showing multiple options provided in an embodiment of the present application;
[0054] Fig.30 A structural block diagram of a glue coating detection device provided in an embodiment of the present application;
[0055] Fig.31 A schematic diagram of the structure of an electronic device for executing a glue coating detection method provided in an embodiment of the present application;
[0056] 1-first robot, 2-second robot, 3-first camera, 4-second camera, 5-third camera, 6-middle partition, 7-first side panel, 8-second side panel, 9-detection equipment, 10-light source. DETAILED DESCRIPTION
[0057] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all of the embodiments. The components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.
[0058] It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings. At the same time, in the description of this application, the terms "first", "second", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.
[0059] It should be noted that the embodiments in this application or the technical features in the embodiments may be combined if there is no conflict.
[0060] In the related art, there is a solution for realizing glue shape detection through image matching. Specifically, the detection equipment can first collect the image of the structural part with compliant rubber strip shape, and then match the image of the structural part to be detected with the image of the structural part, locate the rubber strip in the image of the structural part to be detected, and then determine whether the rubber strip to be detected is also compliant through the relative position between the rubber strip to be detected (that is, the rubber strip in the image of the structural part to be detected) and the compliant rubber strip (that is, the rubber strip in the image of the structural part with compliant rubber strip shape). However, there are often problems such as matching errors or large offsets after successful matching, which lead to low detection accuracy. In order to solve this problem, the present application provides a method, system, device and electronic device for gluing detection; further, by directly detecting the shape parameters of the rubber strip in the image to be detected, the misjudgment problem caused by image matching is improved, and the detection accuracy is improved.
[0061] The defects existing in the solutions in the above-mentioned related technologies are the results obtained by the inventor after practice and careful research. Therefore, the discovery process of the above-mentioned problems and the solutions proposed in the embodiments of the present invention below for the above-mentioned problems should all be the contributions made by the inventor to the present invention during the process of the present invention.
[0062] In some application scenarios, the above-mentioned glue coating detection method can be applied to a detection device, and the above-mentioned detection device can include, for example, a laptop computer, a desktop computer, etc. In these application scenarios, a detection application program can be installed in the detection device to implement the glue coating detection method using the detection application program.
[0063] Please refer to Figure 1 , which shows a flow chart of a method for gluing detection provided by an embodiment of the present application. Figure 1 As shown, the glue coating detection method includes the following steps 101 to 103.
[0064] Step 101, receiving a glue coating detection instruction; the glue coating detection instruction is used to instruct whether the glue strip coated on the object to be detected is compliant;
[0065] In some application scenarios, the operator can send the above-mentioned gluing detection instruction to the detection device. In these application scenarios, for example, the gluing detection instruction can be sent by clicking a preset sending button or directly entering the detection instruction in a preset input box.
[0066] Furthermore, the above-mentioned glue detection instruction may include the image to be detected, or may not include the image to be detected. That is, when the operator sends the glue detection instruction, he may also send the image to be detected. At this time, the glue detection instruction is used to indicate whether the glue strip included in the image to be detected is compliant; in addition, the operator may also send multiple images to be detected to the detection device before or after sending the glue detection instruction, and then the detection device obtains the identity information of the object to be detected after receiving the glue detection instruction, so as to detect whether the glue strip coated on the object to be detected is compliant through the image to be detected corresponding to the identity information.
[0067] Step 102, according to the glue coating detection instruction, detecting the shape parameters of the glue strip in the detection area in the image to be detected; the image to be detected includes the object to be detected coated with the glue strip;
[0068] The objects to be inspected may include the middle partition, side panels and other structural parts in the battery module that actually need to be coated with rubber strips.
[0069] In some application scenarios, the detection device detects only a certain part of the image to be detected, and the part of the image can be regarded as the above-mentioned detection area. For example, the image to be detected includes the entire image of the object to be detected (including the part of the image coated with the adhesive strip), and the detection area can be the part of the image coated with the adhesive strip; or, the image to be detected includes the entire image of the object to be detected, and the detection area can be the area composed of all pixels whose distance from the edge of the image is greater than a preset distance, etc., and the preset distance can be, for example, 1 mm, 2 mm, etc.
[0070] The shape parameters of the rubber strips may include, for example, the width of the rubber strips, the length of the rubber strips, the number of wave crests of the rubber strips, the number of wave troughs of the rubber strips, and other parameters that may substantially reflect the shape of the rubber strips.
[0071] In some application scenarios, the detection application installed in the detection device can be developed through Labview (Laboratory Virtual Instrument Engineering Workbench, referred to as Labview), and the detection device can detect the shape parameters of the rubber strip through the functions provided in Labview. For example, it can detect the position parameters of the edge line of the image to be detected through the "Find Straight Edges" function.
[0072] Step 103, when the shape parameters of the rubber strip meet the coating requirements, determine that the rubber strip is compliant.
[0073] The above coating requirements can be regarded as the requirements that need to be met to determine whether the rubber strip is compliant, and then the coating requirements can be determined by the shape parameters of the compliant rubber strip.
[0074] In some application scenarios, the shape parameter of the rubber strip may be one or more. When it is more than one, it should be considered that the shape parameter of the rubber strip meets the coating requirement only when all the shape parameters meet the corresponding coating requirement.
[0075] In this embodiment, the detection device can detect the shape parameters of the rubber strip within the detection area of the image to be detected, so as to directly determine whether the rubber strip is compliant based on the shape parameters. In this way, there is no need to match the image to be detected with the image of the compliant rubber strip, which improves the problem of misjudgment caused by image matching and improves the detection accuracy.
[0076] It should be noted that the following application describes the detection of shape parameters of the rubber strip using an example in which a detection application developed based on LabVIEW is installed. Based on this, technicians in this field can adaptively adjust the corresponding implementation methods for detection applications in different development environments.
[0077] In some optional implementations, the shape parameter includes a maximum width; and the shape parameter of the adhesive strip detected in the detection area in the image to be detected in step 102 includes:
[0078] First, for each glue point on the rubber strip, the distance from the glue point to the edge of the rubber strip is detected;
[0079] The adhesive strip can be considered to be composed of multiple adhesive dots, and the detection device can detect the distance from each adhesive dot in the image to be detected to the adhesive strip boundary. In some application scenarios, for example, the pixel coordinates of each adhesive dot can be detected, and then the distance between each pixel coordinate and the pixel on the same edge line of the adhesive strip can be calculated.
[0080] Then, the maximum width is determined according to the glue point position corresponding to the maximum distance; wherein, when the maximum width of the glue strip is less than a preset maximum width threshold, it is determined that the shape parameters of the glue strip do not meet the coating requirements.
[0081] After the detection device detects the distance from each glue point to the edge of the glue strip, the maximum distance can be screened out, and then the maximum width can be determined using the glue point corresponding to the maximum distance. For example, for multiple glue points on the same horizontal line, if the pixel point corresponding to glue point A has the largest pixel distance to edge line a, the actual distance corresponding to the pixel distance can be regarded as the maximum width.
[0082] In this implementation, the maximum width of the rubber strip can be calculated, so that if the detection device determines that the maximum width is less than a preset maximum width threshold, the rubber strip can be regarded as non-compliant.
[0083] In some optional implementations, for each glue point on the adhesive strip, detecting the distance from the glue point to the adhesive strip boundary includes: for each glue point, using an image distance function to calculate the image distance of the glue point; determining the two-dimensional value obtained after converting the image distance as the distance from the glue point to the adhesive strip boundary;
[0084] In some application scenarios, the detection device can detect the distance from each glue point to the edge of the glue strip by using the Danielsson function (i.e., the image distance function), so that the distance image corresponding to the glue strip can be as follows: Figure 2 Then, we can use the ImageToArray function (also known as the "image to array" function) to convert Figure 2 The range image shown is converted into a two-dimensional array.
[0085] like Figure 3 As shown, it shows Figure 2 The two-dimensional numerical distribution corresponding to the rubber strip shown in the figure. Among them, the value tending to 0 indicates that the position of the glue point is close to the edge of the rubber strip, the value of 0 indicates that it is outside the rubber strip, and the value deviating from 0 indicates that its position is far away from the edge of the rubber strip. Figure 3 The distance from each glue point to the edge of the glue strip can be seen.
[0086] Thus, determining the maximum width according to the glue point position corresponding to the maximum distance includes: determining the double value of the largest two-dimensional value as the maximum width.
[0087] In this implementation, the maximum width of the rubber strip can be calculated by using an image distance function and an image to array function.
[0088] In some optional implementations, the shape parameter includes a minimum width; and the shape parameter of the adhesive strip detected in the detection area in the image to be detected in step 102 includes:
[0089] First, the upper contour coordinates and the lower contour coordinates of the rubber strip are separated;
[0090] In some application scenarios, the detection device can use edge detection algorithms (such as Canny algorithm, Sobel operator, etc.) to detect edge information in the image to be processed, and then use contour extraction algorithms (such as findContours function in OpenCV) to extract the contour coordinates of the rubber strip. Then all contour coordinates are sorted from top to bottom or from right to left, and then the upper contour coordinates and the lower contour coordinates can be determined by the sorted order.
[0091] Then, for each contour coordinate, the coordinate distance from the contour coordinate to the contour coordinate on the other side is calculated; wherein the minimum coordinate distance is the minimum width; and when the minimum width is greater than a preset minimum width threshold, it is determined that the shape parameters of the rubber strip do not meet the coating requirements.
[0092] In some application scenarios, the detection device can calculate the distance between each upper contour coordinate and all lower contour coordinates, or calculate the distance between each lower contour coordinate and all upper contour coordinates. Then, the minimum distance coordinate is selected from the calculated multiple coordinate distances. At this time, the minimum distance coordinate can be regarded as the minimum width of the rubber strip.
[0093] In this implementation, the minimum width of the rubber strip can be calculated, so that if the detection device determines that the minimum width is greater than a preset minimum width threshold, it can be regarded as non-compliant with the rubber strip.
[0094] In some optional implementations, the separating the upper contour coordinates and the lower contour coordinates of the adhesive strip includes:
[0095] Firstly, all contour coordinates of the rubber strip are determined by extracting a curve function;
[0096] In some application scenarios, the detection device can use the Extract Curves function (i.e., the curve extraction function) to perform a curve search operation on the processed image. The main search parameters may include, for example, the minimum length of the edge of the rubber strip, the search step, whether a closed curve is required, etc., and then, for example, the following can be obtained: Figure 4 The outline of the rubber strip shown can be used to obtain its complete outline coordinates.
[0097] Then, the contour coordinates located on the same side are separated according to the horizontal position relationship and arrangement direction of the contour coordinates; the upper contour coordinates and the lower contour coordinates of the rubber strip are separated according to the distinction rule; the distinction rule represents that for two contour coordinates with the same horizontal position, the contour coordinate with the larger vertical distance is determined as the upper contour coordinate.
[0098] After the detection equipment calculates all the contour coordinates, these contour coordinates will be arranged clockwise or counterclockwise. Among them, the starting contour coordinates and the end contour coordinates during the arrangement can be both the upper contour coordinates or the lower contour coordinates, so that the following can be presented: Figure 5 Arrangement shown.
[0099] In some application scenarios, the detection equipment can establish a rectangular coordinate system, and then the contour coordinate with the smallest horizontal coordinate among all contour coordinates can be determined as the left endpoint coordinate of the rubber strip, and the contour coordinate with the largest horizontal coordinate can be determined as the right endpoint coordinate of the rubber strip. Then, the contour coordinates on the same side can be determined by the left endpoint coordinates, the right endpoint coordinates, and the arrangement method. For example, if arranged clockwise, the contour horizontal coordinates are first increasing and then decreasing, then the coordinates starting from the left endpoint coordinate to the right endpoint coordinate can be the contour coordinates on one side, and the coordinates starting from the right endpoint coordinate to the left endpoint coordinate can be the contour coordinates on the other side.
[0100] Then, the detection device can determine two contour coordinates corresponding to the same horizontal coordinate, and determine the contour coordinate with a larger vertical coordinate value as the upper contour coordinate, and determine the contour coordinate with a smaller vertical coordinate value as the lower contour coordinate.
[0101] In some application scenarios, for example, Figure 6 The program diagram shown implements the above process of separating the upper contour coordinates and the lower contour coordinates. Specifically, the left endpoint coordinates and the right endpoint coordinates can be input into the "array maximum and minimum" controls, and all contour coordinates can be input into the "array subset" control, and the contour coordinates can be arranged through the "array size" control to separate the contour coordinates on both sides, and obtain the "one side point" data and the "other side point" data. Then, the two contour coordinates with the same horizontal position can be compared through the control representing the "UP DOWN" function to obtain the upper contour coordinates and the lower contour coordinates. It should be noted that Figure 6 The "Create Array" control and other controls shown are built-in controls of LabVIEW. Those skilled in the art are aware of their usage rules and functions, which will not be described here.
[0102] In some application scenarios, the above-mentioned "UP DOWN" function can be used, for example, Figure 7Specifically, the above-mentioned "one side point" data and "the other side point" data can be input into the control representing the rectangular coordinate system, and then the upper side contour coordinate and the lower side contour coordinate can be determined by comparing the size of the ordinate. It should be noted that Figure 7 The "method" control, "ntimes" control, "interpolate 1D.Vi" control and other controls shown are all built-in controls of LabVIEW. Those skilled in the art are aware of their usage rules and functions, which will not be described here.
[0103] In some application scenarios, if the 6-partition "1D interpolation" operation is used, the following can be obtained: Figure 8 That is, the rubber strip is divided into six equal parts, the contour coordinates of the six equal parts are selected, and then the ordinates of the six contour coordinates are compared, and the coordinate with the larger value is determined as the upper contour coordinate, and the coordinate with the smaller value is determined as the lower contour coordinate.
[0104] In this implementation, the upper contour coordinates and the lower contour coordinates can be directly separated with high accuracy.
[0105] In some optional implementations, the shape parameters include crest parameters and trough parameters; the rubber strip is generally coated in a wave shape, so it has crests and troughs, and the detection device can also detect the crest parameters and trough parameters. The crest parameters include the number of crests and the position of the crests, and the trough parameters include the number of troughs and the position of the troughs.
[0106] Thus, detecting the shape parameters of the adhesive strip in the detection area in the image to be detected includes:
[0107] First, the upper contour coordinates and the lower contour coordinates of the rubber strip are separated;
[0108] In some optional implementations, the separating the upper contour coordinates and the lower contour coordinates of the adhesive strip includes:
[0109] Determine all contour coordinates of the rubber strip by extracting the curve function;
[0110] Separating the contour coordinates located on the same side according to the size relationship and arrangement direction of the contour coordinates;
[0111] The upper contour coordinates and the lower contour coordinates of the rubber strip are separated according to a distinction rule; the distinction rule indicates that for two contour coordinates at the same horizontal position, the contour coordinate with the larger vertical distance is determined as the upper contour coordinate.
[0112] It should be noted that the process of separating the upper and lower contour coordinates of the rubber strip and the technical effect achieved here may be the same or similar to the separation process when detecting the minimum width mentioned above, and will not be described in detail here.
[0113] Then, the upper side contour coordinates are detected by a peak detection function to obtain the peak parameters; the lower side contour coordinates are detected by a trough detection function to obtain the trough parameters; wherein, when the peak parameters are not within a preset peak parameter range, and / or the trough parameters are not within a preset trough parameter range, it is determined that the shape parameters do not meet the coating requirements.
[0114] The peak detection function and the trough detection function can both be Peak Detecto functions, which can detect the number of peaks, the peak positions, the number of troughs, and the trough positions. In some application scenarios, the process of using this function to implement detection can be, for example, as follows: Fig. 9 As shown. Fig. 9 As shown, the Y coordinates of all the lower contour coordinates can be combined into a Y coordinate array, and the Y coordinates of all the upper contour coordinates can also be combined into a Y coordinate array, and then respectively input into the control representing the function to obtain information such as the number of peaks, peak positions, number of troughs, and trough positions. It should be noted that Fig. 9 The "peak" control and "Valleys" control shown are all built-in controls of LabVIEW. Those skilled in the art are aware of their usage rules and functions, which will not be described here.
[0115] In some application scenarios, after the detection device detects information such as the number of peaks and the number of troughs, it can display Fig.10 The image shown is used to mark the peak parameters, trough parameters, etc.
[0116] Furthermore, if the number of peaks is not within the preset peak number range, the peak position coordinates are not within the preset peak position coordinate range, the number of troughs is not within the preset trough number range, and / or the trough position coordinates are not within the preset trough position coordinate range, then the rubber strip can be considered non-compliant.
[0117] In this implementation, the peak and valley conditions can be directly calculated by using the peak detection function and the valley detection function, with high accuracy.
[0118] In some optional implementations, the shape parameter includes a gel offset;
[0119] The above-mentioned glue shape offset can be regarded as the distance between the glue strip and the edge of the image to be detected.
[0120] Thus, detecting the shape parameters of the adhesive strip in the detection area in the image to be detected includes:
[0121] When an edge straight line of the image to be detected is detected, the distance of the adhesive strip relative to the edge straight line is determined as the adhesive strip offset;
[0122] When the edge straight line of the image to be detected is not detected, the edge distance of the glue strip relative to the preset offset detection area is determined as the glue shape offset; wherein, when the glue shape offset is not within the preset offset range, it is determined that the shape parameters do not meet the coating requirements.
[0123] In some application scenarios, the detection device can, for example, use the "Find Straight Edges" function to find the edge straight lines of the image to be detected, wherein the edge straight lines include the upper edge straight line, the lower edge straight line, the left edge straight line, and the right edge straight line.
[0124] If an edge straight line is found, the glue shape offset can be directly determined using the edge straight line.
[0125] If no edge line is found, the offset of the glue shape can be determined by using a preset offset detection area. The preset offset detection area can be, for example, the aforementioned detection area, or a detection area preset based on the image to be detected, which is not limited here.
[0126] In this implementation, regardless of whether the detection device finds the edge straight line, the offset of the glue shape can be calculated, and then it can be determined whether the glue strip is compliant.
[0127] In some optional implementations, before detecting the edge straight line, detecting the shape parameter of the adhesive strip in the detection area in the image to be detected further includes:
[0128] First, the upper contour coordinates and the lower contour coordinates of the rubber strip are separated;
[0129] It should be noted that the process of separating the upper and lower contour coordinates of the rubber strip and the technical effect achieved here may be the same or similar to the separation process when detecting the minimum width mentioned above, and will not be described in detail here.
[0130] Then, determine the left contour coordinate corresponding to the minimum horizontal coordinate value and the right contour coordinate corresponding to the maximum horizontal coordinate value;
[0131] That is, the detection device can compare the horizontal coordinates of all contour coordinates to determine the left contour coordinates and the right contour coordinates.
[0132] In this way, the glue shape offset includes: the upper average value of the upper distance from the upper side contour coordinate to the upper edge straight line; the lower average value of the lower side contour coordinate to the lower side edge straight line; the left distance from the left contour coordinate to the left edge straight line; the right distance from the right contour coordinate to the right edge straight line; wherein, when the upper average value is not within the preset upper average value range, the lower average value is not within the preset lower average value range, the left distance is not within the preset left distance range and / or the right distance is not within the preset right distance range, it is determined that the shape parameters do not meet the coating requirements.
[0133] In some application scenarios, for each upper contour coordinate, the detection device can calculate the distance between the upper contour coordinate and the upper edge straight line (ie, the upper distance), and then calculate the average of multiple upper distances, which is the upper offset.
[0134] For each lower side contour coordinate, the detection device can calculate the distance between the lower side contour coordinate and the lower side edge straight line (ie, the lower side distance), and then calculate the average value of multiple lower side distances, which is the lower side offset.
[0135] For the left contour coordinates, the detection device can calculate the distance between the left contour coordinates and the left edge straight line (that is, the left distance), and this distance is the left offset; for the right contour coordinates, the detection device can calculate the distance between the right contour coordinates and the right edge straight line (that is, the right distance), and this distance is the right offset.
[0136] In this way, if an edge straight line is detected in the image to be detected, for example, Fig.11 The detection result shown in FIG. 1 is as follows; if no edge line is detected, for example, Fig.12 The detection effect is shown.
[0137] In this implementation, the offset of the rubber strip can be obtained more accurately, so that for each offset, if it is not within the preset offset range, it can be regarded as non-compliant with the rubber strip.
[0138] In some optional implementations, after receiving the glue coating detection instruction, the method further includes:
[0139] First, the rubber strip particles included in the image to be detected are filtered according to a width filtering rule; the width filtering rule includes filtering the rubber strip particles with excessive width in the detection area and the foreign particles that are not attached to the rubber strip particles in the detection area;
[0140] In some application scenarios, the image to be detected may only show the image of a portion of the rubber strip, and this portion of the rubber strip may be disconnected. In this case, all the rubber strips included in the image to be detected can be regarded as rubber strip particles. For example, if the image to be detected includes two rubber strip parts, each of the rubber strip parts can be regarded as a rubber strip particle. If the image to be detected includes only one rubber strip, the rubber strip can also be regarded as a rubber strip particle.
[0141] Furthermore, the detection device can filter out rubber strip particles whose width exceeds the standard in the detection area. For example, if there are three rubber strip particles in the image to be detected, rubber strip particles whose width is greater than a certain threshold can be filtered out. The threshold can be set based on the width parameter of the compliant rubber strip.
[0142] In some application scenarios, it is usually necessary to use a fixture to clamp the test object, so the image of the fixture will also be included in the captured image to be tested. Then, the detection equipment needs to filter out other external particles in the image to be tested that are not rubber strip particles (in addition to the particles corresponding to the fixture, there may also be particles corresponding to metal on the surface of the battery, etc.).
[0143] Furthermore, since these foreign particles may be attached to the rubber strip (such as clamp particles) or may not be attached to the rubber strip, the foreign particles that are not attached can be filtered out. This is because: if there is only an image of a part of the rubber strip in the image to be detected, the rubber strip is attached as a whole, so if the attached foreign particles are filtered out, the entire rubber strip will be directly filtered out.
[0144] Then, the area of the detection region is enlarged, and the remaining rubber strip particles are repeatedly filtered according to the width filtering rule in the enlarged detection region to obtain the target rubber strip;
[0145] In order to avoid directly filtering out the entire adhesive strip, the detection area can be enlarged so that the adhesive strip does not stick to the enlarged detection area. Here, the detection device can, for example, enlarge the detection area by a preset enlargement parameter, which can, for example, be to increase the original detection area by 30 pixels.
[0146] In some application scenarios, for example, Fig.13 The image to be detected is binarized according to the set gray threshold parameter. The image after binarization can be, for example, Fig.14 Then, the ParticleFilter function can be used to implement the width filtering process, so that, for example, the following Fig.15 The image shown in Figure 1 shows that there are still particles corresponding to the fixture. Then, the area of the detection area can be expanded, and the ParticleFilter function can be used again to implement the width filtering process, and the following can be obtained: Fig.16As shown in the image, it can be seen that the fixture particles have been filtered out, and the remaining particles can be regarded as the target strips.
[0147] Thus, detecting the shape parameters of the rubber strip in the detection area in the image to be detected includes: detecting the shape parameters of the target rubber strip in the detection area.
[0148] After the detection device obtains the target rubber strip, the detection process of the maximum width, the minimum width, the rubber shape offset, etc. can also be performed based on the target rubber strip, which improves the detection accuracy to a certain extent.
[0149] In some application scenarios, if the detection device detects that the number of particles in the image to be detected is 0, it can be considered that there is no rubber strip on the detection object or the overall length and width of the rubber strip exceeds the standard or the rubber strip is broken (for example, if the length of each section of the rubber strip after the rubber strip is broken exceeds the standard, each section of the rubber strip will be filtered out), and then the rubber strip can be determined to be non-compliant. Therefore, only when the number of particles in the image to be detected is equal to 1 or greater than 1, will the rubber strip be tested for compliance. In these application scenarios, for example, the particle with the largest area can be determined as the target rubber strip.
[0150] Furthermore, the rubber strip may be broken, but the detection equipment can determine whether the rubber strip is compliant through multiple detection processes such as the maximum width, minimum width, rubber shape offset, peak parameters and trough parameters. Fig.17 If the glue strip is broken, the number of particles is not 1, and it may be judged as non-compliant because the width exceeds the standard or the area is not the maximum area; or the number of peaks and troughs are not within the preset range and are judged as non-compliant, etc.
[0151] In some optional implementations, before detecting the shape parameters of the adhesive strip in the detection area in the image to be detected according to the adhesive detection instruction in the above step 102, the method further includes: marking an ignored area in the image to be detected according to an area setting instruction;
[0152] In some application scenarios, the area setting instruction may include information such as the location and size of the set area, so that the detection device can mark the corresponding ignored area after receiving the area setting instruction. The ignored area is the area that can be ignored and not detected during the detection process. In these application scenarios, for example, the area where rubber strips are prone to wire drawing can be set as the ignored area. The ignored area can be, for example, Fig.13 Further, if a certain area is set as an ignored area, for example, the gray value of its pixel point can be set to 0.
[0153] Thus, detecting the shape parameters of the rubber strip in the detection area in the image to be detected includes: in the process of detecting the shape parameters of the rubber strip, detecting the shape parameters of the rubber strip portion outside the ignored area.
[0154] In this implementation, only the shape parameters of the rubber strip portion outside the ignored area may be detected without detecting the shape parameters of the rubber strip within the ignored area, which saves computing resources to a certain extent and improves detection efficiency.
[0155] In some optional implementations, before detecting the shape parameters of the rubber strip within the detection area in the image to be detected as described in the above step 102, the method also includes: when the rubber strip is not entirely located within the detection area, adjusting the position of the detection area so that the rubber strip is entirely located within the detection area.
[0156] In some application scenarios, the detection area in the image to be processed may not be able to detect all the rubber strip areas, so there is a situation where the detection area needs to be adjusted. Specifically, if the rubber strip is not completely within the detection area, the position of the detection area can be adjusted by, for example, affine transformation, or by expanding the length or width of the detection area to make the entire rubber strip within the detection area, so that the entire rubber strip can be detected and the situation of missed detection can be improved.
[0157] It should be noted that the detection device can simultaneously execute multiple detection processes mentioned above, or can only execute one or part of the detection processes, thereby broadening the scope of application of the detection device.
[0158] Those skilled in the art will appreciate that, in the above method of a specific embodiment, the order in which the steps are written does not imply a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of the steps should be determined by their functions and possible internal logic.
[0159] Please refer to Fig.18 , which shows a structural block diagram of a glue coating detection system provided in an embodiment of the present application, the glue coating detection system may include a robot, a camera and a detection device. It should be understood that the detection device is similar to the above Figure 1 The method embodiment corresponds to and can be executed Figure 1 The various steps involved in the method embodiment and the specific functions of the detection device can be found in the above description. To avoid repetition, the detailed description is appropriately omitted here.
[0160] Optionally, the above-mentioned glue coating detection system includes:
[0161] A robot, used to carry the object to be inspected coated with the adhesive strip into the camera's field of view;
[0162] A camera is used to photograph the object to be detected to obtain an image to be detected;
[0163] Testing equipment for performing Figure 1 The method described in the illustrated embodiment determines whether the adhesive strip is compliant.
[0164] In some application scenarios, the system may include one or more robots, each of which can be used to carry different objects to be detected. The number of cameras can also be one or more, which can be determined by the camera's shooting field of view. For example, if the camera's shooting field of view is 200 mm long and the object to be detected is 400 mm long, then two cameras are required to be responsible for an area of 200 mm each to completely detect the entire object to be detected. It should be noted that the sum of the shooting fields of multiple cameras can be greater than the specifications of the object to be detected.
[0165] In some application scenarios, a PLC (Programmable Logic Controller, PLC for short) can be installed on the robot, and the PLC and the detection equipment, and the camera and the detection equipment can be connected via a network cable.
[0166] In these application scenarios, the robot can pick up the object to be inspected from the loading area, and then control the object to be inspected to move under the glue head of the glue coating machine for glue coating. Then the object to be inspected can be moved to the camera's shooting field of view, and the robot can notify the camera to shoot through the PLC. After the camera is finished shooting, the image to be inspected is sent to the inspection device so that the inspection device can perform the following operations: Figure 1 The detection steps in the illustrated embodiment.
[0167] In some optional implementations, the glue coating detection system further includes:
[0168] a light source, for providing illumination of a preset color during the shooting process of the camera;
[0169] The installation height of the light source is greater than the highest height of the robot arm during the handling process.
[0170] In some application scenarios, the system may further include a light source, which may include, for example, a light bulb, a light strip, etc. In these application scenarios, the light source may provide illumination in colors such as white, blue, etc.
[0171] Furthermore, the installation height of the light source can be close to the object to be detected, and is limited to the maximum height that does not collide with the robot arm.
[0172] It should be noted that the number of light sources can be the same as the number of cameras, or can be more than the number of cameras, and there is no limitation here.
[0173] In this implementation, the contrast between the adhesive strip and the object to be detected can be improved, making the adhesive strip more distinct in the image to be detected, thereby improving the accuracy of detection to a certain extent.
[0174] See also Fig.19 , which shows a schematic diagram of two robots, three cameras and two light sources (i.e., light sources 10) working together. Fig.19 In the embodiment, the first robot 1 is used to carry the middle partition 6 of the battery, and the second robot 2 is used to carry the side panels of the battery. When the camera shoots the side panels, three images to be detected can be obtained. For example, the three images to be detected can be Fig. 20 Presented in the detection device 9. Among them, the CCD1 image can be regarded as the image taken by the first camera 3, the CCD2 image can be regarded as the image taken by the second camera 4, and the CCD3 image can be regarded as the image taken by the third camera 5.
[0175] Furthermore, the camera can take multiple images of any detection part of any object to be detected, so that multiple images to be detected can be obtained, and then the detection device 9 can view the multiple images to be detected. Fig.21 As shown, the detection device 9 can obtain the corresponding detection result for the image to be detected obtained by the 12th shooting. Among them, CCD1 image 1, CCD2 image 1, and CCD3 image 1 are Fig.19 CCD1 image 2, CCD2 image 2, and CCD3 image 2 are the detection results of the second surface of the middle partition 6 after it is flipped by the robot. Or, Fig. 22 As shown, the detection device 9 can obtain the corresponding detection result for the image to be detected obtained by the 34th shooting. Among them, CCD1 image 3, CCD2 image 3, and CCD3 image 3 are Fig.19 The detection result of the first side plate 7 in; CCD1 image 4, CCD2 image 4, CCD3 image 4 are Fig.19 The detection result of the second side plate 8 in FIG.
[0176] See also Fig.23 , which shows a schematic diagram of a robot, a camera, and a light source 10 working together. Fig.23 In the example, the second robot 2 is used to carry the two side panels of the battery. Each side panel can be photographed twice by the first camera 3. That is, the first camera 3 can first photograph a part of the first side panel 7, and then the second robot 2 moves the first side panel 7 to photograph the other part, and then continues to photograph the second side panel 8 until both side panels are photographed. In this way, the detection device 9 can, for example, only display the following Fig.24 The CCD1 image shown is an image obtained by a camera shooting the second side plate 8; it can also be displayed once as shown in FIG. Fig.25 Among them, CCD1 image 1, CCD1 image 2, CCD1 image 3, and CCD1 image 4 are the detection results corresponding to the multiple images to be detected taken by the camera.
[0177] In some application scenarios, if the detection device 9 needs to perform multiple detection processes simultaneously, it can be displayed as follows Fig.26 The interface shown in the figure is used to display the corresponding test data of each test process in different partitions. Fig.26 The image to be detected shown can display its various preset threshold data, and the detection items are the number of glue vertices data, glue width data, glue strip number data and other related data.
[0178] In some application scenarios, the detection device 9 can also display the current related data or historical related data in a targeted manner according to the viewing instruction. The display process can be as follows: Fig. 27 shown.
[0179] In some application scenarios, the above-mentioned preset thresholds can be set by the corresponding data of the compliant rubber strip. The compliant rubber strip can be one or more. In this way, the detection device 9 can collect images of compliant rubber strips multiple times. Further, the detection device 9 can use different thresholds to determine whether the rubber strip is compliant according to relevant instructions. Fig.28 As shown, the detection device 9 can, for example, view the compliant adhesive strip image taken for the first time (ie, the first template image) according to the instruction, or can view other compliant adhesive strip images taken (eg, the second template image) according to the instruction.
[0180] In some application scenarios, the detection device 9 may also provide, for example Fig.29 The options shown include the log saving path, image saving days, PLC IP address (Internet Protocol Address, IP address for short), etc., and the operations corresponding to the options can be performed according to the relevant instructions.
[0181] In some application scenarios, the relative positions of the robot, camera and light source can remain unchanged, so that the camera can capture the image to be detected at a fixed relative position, so that the image position, image size, strip position, etc. obtained each time are relatively fixed, thereby improving the missed detection situation.
[0182] It should be noted that those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the system described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
[0183] In addition, there are multiple data and / or multiple buttons in the drawings corresponding to the above system, which are only for exemplary purposes and should not be understood as the present application only having these data and / or buttons, or only this display method.
[0184] Please refer to Fig.30 , which shows a structural block diagram of a glue detection device provided in an embodiment of the present application. The glue detection device can be a module, program segment or code on an electronic device. It should be understood that the device is similar to the above Figure 1 The method embodiment corresponds to and can be executed Figure 1 The various steps involved in the method embodiment and the specific functions of the device can be found in the above description. To avoid repetition, the detailed description is appropriately omitted here.
[0185] Optionally, the above-mentioned glue detection device includes a receiving module 3001, a detection module 3002 and a determination module 3003. The receiving module 3001 is used to receive a glue detection instruction; the glue detection instruction is used to indicate whether the glue strip coated on the object to be detected is compliant; the detection module 3002 is used to detect the shape parameters of the glue strip in the detection area in the image to be detected according to the glue detection instruction; the image to be detected includes the object to be detected coated with the glue strip; the determination module 3003 is used to determine that the glue strip is compliant when the shape parameters of the glue strip meet the coating requirements.
[0186] Optionally, the shape parameters include a maximum width; and the detection module 3002 is further used to: for each glue point on the rubber strip, detect the distance from the glue point to the boundary of the rubber strip; determine the maximum width based on the glue point position corresponding to the maximum distance; wherein, when the maximum width of the rubber strip is less than a preset maximum width threshold, it is determined that the shape parameters of the rubber strip do not meet the coating requirements.
[0187] Optionally, the detection module 3002 is further used to: for each glue dot, use an image distance function to calculate the image distance of the glue dot; determine the two-dimensional value obtained after converting the image distance as the distance from the glue dot to the boundary of the glue strip; and determine the maximum width based on the glue dot position corresponding to the maximum distance, including: determining the maximum width as the double value of the largest two-dimensional value.
[0188] Optionally, the shape parameters include a minimum width; and the detection module 3002 is further used to: separate the upper contour coordinates and the lower contour coordinates of the rubber strip; for each contour coordinate, calculate the coordinate distance from the contour coordinate to the other side contour coordinate; wherein the minimum coordinate distance is the minimum width; and when the minimum width is greater than a preset minimum width threshold, determine that the shape parameters of the rubber strip do not meet the coating requirements.
[0189] Optionally, the detection module 3002 is further used to: determine all contour coordinates of the rubber strip by extracting a curve function; separate the contour coordinates located on the same side according to the horizontal position relationship and arrangement direction of the contour coordinates; separate the upper contour coordinates and the lower contour coordinates of the rubber strip according to a distinction rule; the distinction rule represents that for two contour coordinates with the same horizontal position, the contour coordinate with a larger vertical distance is determined as the upper contour coordinate.
[0190] Optionally, the shape parameters include peak parameters and trough parameters; and the detection module 3002 is further used to: separate the upper contour coordinates and the lower contour coordinates of the rubber strip; detect the upper contour coordinates by a peak detection function to obtain the peak parameters; detect the lower contour coordinates by a trough detection function to obtain the trough parameters; wherein, when the peak parameters are not within a preset peak parameter range, and / or the trough parameters are not within a preset trough parameter range, it is determined that the shape parameters do not meet the coating requirements.
[0191] Optionally, the detection module 3002 is further used to: determine all contour coordinates of the rubber strip by extracting a curve function; separate the contour coordinates located on the same side according to the size relationship and arrangement direction of the contour coordinates; separate the upper contour coordinates and the lower contour coordinates of the rubber strip according to a distinction rule; the distinction rule represents that for two contour coordinates with the same horizontal position, the contour coordinate with a larger vertical distance is determined as the upper contour coordinate.
[0192] Optionally, the shape parameters include a glue shape offset; and the detection module 3002 is further used to: when an edge straight line of the image to be detected is detected, determine the distance of the glue strip relative to the edge straight line as the glue shape offset; when the edge straight line of the image to be detected is not detected, determine the edge distance of the glue strip relative to a preset offset detection area as the glue shape offset; wherein, when the glue shape offset is not within a preset offset range, it is determined that the shape parameters do not meet the coating requirements.
[0193] Optionally, the detection module 3002 is further used to: separate the upper contour coordinates and the lower contour coordinates of the rubber strip before detecting the edge straight line; determine the left contour coordinate corresponding to the minimum horizontal coordinate value and the right contour coordinate corresponding to the maximum horizontal coordinate value; and the rubber shape offset includes: the upper average value of the distance from the upper contour coordinate to the upper edge straight line; the lower average value of the distance from the lower contour coordinate to the lower edge straight line; the left distance from the left contour coordinate to the left edge straight line; the right distance from the right contour coordinate to the right edge straight line; wherein, when the upper average value is not within the preset upper average value range, the lower average value is not within the preset lower average value range, the left distance is not within the preset left distance range and / or the right distance is not within the preset right distance range, it is determined that the shape parameters do not meet the coating requirements.
[0194] Optionally, the device also includes a target particle determination module, which is used to: after receiving the glue coating detection instruction, filter the glue strip particles included in the image to be detected according to a width filtering rule; the width filtering rule includes filtering the glue strip particles whose width exceeds the standard in the detection area, and foreign particles that are not adhered to the glue strip particles in the detection area; expand the area of the detection area, and repeatedly filter the remaining glue strip particles according to the width filtering rule in the expanded detection area to obtain the target glue strip; and the detection module 3002 is further used to: detect the shape parameters of the target glue strip in the detection area.
[0195] Optionally, the device further comprises an ignoring module, the ignoring module being used for: before detecting the shape parameters of the adhesive strip in the detection area in the image to be detected according to the glue coating detection instruction, marking an ignoring area in the image to be detected according to an area setting instruction; and
[0196] The detection module 3002 is further configured to: during the process of detecting the shape parameters of the rubber strip, detect the shape parameters of the rubber strip portion outside the ignored area.
[0197] Optionally, the device also includes an adjustment module, which is used to: before detecting the shape parameters of the rubber strip in the detection area in the image to be detected, if the rubber strip is not entirely located in the detection area, adjust the position of the detection area so that the rubber strip is entirely located in the detection area.
[0198] It should be noted that those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the device described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
[0199] Please refer to Fig.31 , Fig.31 A schematic diagram of the structure of an electronic device for executing a glue coating detection method provided in an embodiment of the present application, the electronic device may include: at least one processor 3101, such as a CPU, at least one communication interface 3102, at least one memory 3103 and at least one communication bus 3104. Among them, the communication bus 3104 is used to realize direct connection and communication between these components. Among them, the communication interface 3102 of the device in the embodiment of the present application is used to communicate signaling or data with other node devices. The memory 3103 can be a high-speed RAM memory or a non-volatile memory (non-volatile memory), such as at least one disk storage. The memory 3103 can optionally be at least one storage device located away from the aforementioned processor. Computer-readable instructions are stored in the memory 3103. When the computer-readable instructions are executed by the processor 3101, the electronic device can execute the above-mentioned Figure 1 The method process is shown.
[0200] Understandably, Fig.31 The structure shown is for illustration only, and the electronic device may also include Fig.31 More or fewer components as shown, or with Fig.31 Different configurations are shown. Fig.31 Each component shown in the figure can be implemented by hardware, software or a combination thereof.
[0201] The present application embodiment provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the following can be performed: Figure 1 The method process in the method embodiment shown is executed by the electronic device.
[0202] An embodiment of the present application provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by a computer, the computer can execute the methods provided by the above-mentioned method embodiments. For example, the method may include: receiving a glue detection instruction; the glue detection instruction is used to indicate whether a glue strip coated on an object to be detected is compliant; according to the glue detection instruction, detecting shape parameters of the glue strip in a detection area in an image to be detected; the image to be detected includes an object to be detected coated with a glue strip; and determining that the glue strip is compliant when the shape parameters of the glue strip meet the coating requirements.
[0203] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.
[0204] In addition, the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0205] Furthermore, the functional modules in the various embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
[0206] In this document, relational terms such as first and second, etc. are used merely to distinguish one entity or operation from another entity or operation, but do not necessarily require or imply any such actual relationship or order between these entities or operations.
[0207] The above description is only an embodiment of the present application and is not intended to limit the protection scope of the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A method for detecting glue coating, characterized in that: include: Receive a glue coating detection instruction; the glue coating detection instruction is used to indicate whether the glue strip coated on the object to be detected is compliant; According to the glue coating detection instruction, the shape parameters of the glue strip are detected in the detection area of the image to be detected; the image to be detected includes the object to be detected coated with the glue strip; When the shape parameters of the rubber strip meet the coating requirements, the rubber strip is determined to be compliant.
2. The method according to claim 1, characterized in that The shape parameters include a maximum width; as well as The detecting the shape parameters of the adhesive strip in the detection area in the image to be detected includes: For each glue point on the adhesive strip, the distance from the glue point to the adhesive strip boundary is detected; The maximum width is determined according to the glue point position corresponding to the maximum distance; wherein, when the maximum width of the glue strip is less than a preset maximum width threshold, it is determined that the shape parameters of the glue strip do not meet the coating requirements.
3. The method according to claim 2, characterized in that The step of detecting the distance from each glue point on the glue strip to the glue strip boundary includes: For each glue point, the image distance of the glue point is calculated using the image distance function; Determine the two-dimensional value obtained after the image distance conversion as the distance from the glue point to the glue strip boundary; and The determining the maximum width according to the glue point position corresponding to the maximum distance includes: The maximum width is determined as twice the value of the largest two-dimensional value.
4. The method according to claim 1, characterized in that: The shape parameters include a minimum width; and The detecting the shape parameters of the adhesive strip in the detection area in the image to be detected includes: Separating the upper contour coordinates and the lower contour coordinates of the rubber strip; For each contour coordinate, calculate the coordinate distance from the contour coordinate to the contour coordinate on the other side; The minimum coordinate distance is the minimum width; and when the minimum width is greater than a preset minimum width threshold, it is determined that the shape parameters of the rubber strip do not meet the coating requirements.
5. The method according to claim 4, characterized in that The upper contour coordinates and the lower contour coordinates of the separated rubber strips include: Determine all contour coordinates of the rubber strip by extracting a curve function; Separating the contour coordinates located on the same side according to the horizontal position relationship and arrangement direction of the contour coordinates; The upper contour coordinates and the lower contour coordinates of the rubber strip are separated according to a distinction rule; the distinction rule indicates that for two contour coordinates at the same horizontal position, the contour coordinate with the larger vertical distance is determined as the upper contour coordinate.
6. The method according to claim 1, characterized in that The shape parameters include peak parameters and trough parameters; as well as The detecting the shape parameters of the adhesive strip in the detection area in the image to be detected includes: Separating the upper contour coordinates and the lower contour coordinates of the rubber strip; Detect the upper contour coordinates by using a peak detection function to obtain the peak parameters; Detect the lower contour coordinates by using a trough detection function to obtain the trough parameters; Wherein, when the wave crest parameter is not within the preset wave crest parameter range, and / or the wave trough parameter is not within the preset wave trough parameter range, it is determined that the shape parameter does not meet the coating requirement.
7. The method according to claim 6, characterized in that The upper contour coordinates and the lower contour coordinates of the separated rubber strips include: Determine all contour coordinates of the rubber strip by extracting the curve function; Separating the contour coordinates located on the same side according to the size relationship and arrangement direction of the contour coordinates; The upper contour coordinates and the lower contour coordinates of the rubber strip are separated according to a distinction rule; the distinction rule indicates that for two contour coordinates at the same horizontal position, the contour coordinate with the larger vertical distance is determined as the upper contour coordinate.
8. The method according to claim 1, characterized in that The shape parameters include a gel shape offset; as well as The detecting the shape parameters of the adhesive strip in the detection area in the image to be detected includes: When an edge straight line of the image to be detected is detected, the distance of the adhesive strip relative to the edge straight line is determined as the adhesive strip offset; In the case that the edge straight line of the image to be detected is not detected, the edge distance of the adhesive strip relative to the preset offset detection area is determined as the adhesive strip offset; Wherein, when the offset of the glue shape is not within the preset offset range, it is determined that the shape parameter does not meet the coating requirement.
9. The method according to claim 8, characterized in that Before detecting the edge straight line, detecting the shape parameters of the rubber strip in the detection area in the image to be detected further includes: Separating the upper contour coordinates and the lower contour coordinates of the rubber strip; Determine the left contour coordinate corresponding to the minimum horizontal coordinate value and the right contour coordinate corresponding to the maximum horizontal coordinate value; and The glue shape offset includes: The upper average value of the distance from the upper contour coordinate to the upper edge straight line; The lower average value of the lower distance from the lower contour coordinate to the lower edge straight line; The left distance from the left contour coordinate to the left edge straight line; The right distance from the right contour coordinate to the right edge straight line; Among them, when the upper side average value is not within the preset upper side average value range, the lower side average value is not within the preset lower side average value range, the left side distance is not within the preset left side distance range and / or the right side distance is not within the preset right side distance range, it is determined that the shape parameters do not meet the coating requirements.
10. The method according to any one of claims 1 to 9, characterized in that: After receiving the glue coating detection instruction, the method further includes: Filtering the rubber strip particles included in the image to be detected according to a width filtering rule; the width filtering rule includes filtering the rubber strip particles with width exceeding the standard in the detection area and the foreign particles that are not adhered to the rubber strip particles in the detection area; Expanding the area of the detection region, and repeatedly filtering the remaining rubber strip particles according to the width filtering rule in the expanded detection region to obtain the target rubber strip; and The detecting the shape parameters of the adhesive strip in the detection area in the image to be detected includes: The shape parameters of the target rubber strip are detected in the detection area.
11. The method according to any one of claims 1 to 9, characterized in that: Before detecting the shape parameters of the adhesive strip in the detection area in the image to be detected according to the adhesive coating detection instruction, the method further includes: According to the area setting instruction, marking the ignored area in the image to be detected; and The detecting the shape parameters of the adhesive strip in the detection area in the image to be detected includes: In the process of detecting the shape parameters of the rubber strip, the shape parameters of the rubber strip portion outside the ignored area are detected.
12. The method according to claim 1, characterized in that Before detecting the shape parameters of the adhesive strip in the detection area in the image to be detected, the method further includes: In the case that the adhesive strip is not completely located within the detection area, the position of the detection area is adjusted so that the adhesive strip is completely located within the detection area.
13. A glue coating detection system, characterized in that: include: A robot, used to carry the object to be inspected coated with the adhesive strip into the camera's field of view; A camera is used to photograph the object to be detected to obtain an image to be detected; A detection device, used to execute the method according to any one of claims 1 to 12 to determine whether the adhesive strip is compliant.
14. The system according to claim 13, characterized in that Also includes: a light source, for providing illumination of a preset color during the shooting process of the camera; The installation height of the light source is greater than the highest height of the robot arm during the handling process.
15. A glue coating detection device, characterized in that: include: A receiving module, used for receiving a glue coating detection instruction; the glue coating detection instruction is used for indicating whether the glue strip coated on the object to be detected is compliant; A detection module, configured to detect shape parameters of the adhesive strip in a detection area in an image to be detected according to the adhesive coating detection instruction; the image to be detected includes an object to be detected coated with an adhesive strip; The determination module is used to determine that the rubber strip is compliant when the shape parameters of the rubber strip meet the coating requirements.
16. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory stores computer-readable instructions. When the computer-readable instructions are executed by the processor, the method according to any one of claims 1 to 12 is executed.
17. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 12 is performed.
Citation Information
Cited By
Drip-proof self-adaptive fluid dispensing control method and system
CN121806448A