Machine vision detection method, its detection device and its detection system

The machine vision detection method enhances efficiency and accuracy by using three-dimensional image analysis with uniformly distributed sampling and a coordinate system to calculate multiple height differences, addressing detection omissions and ensuring reliable sampling for lithium battery cell components.

JP7702562B2Active Publication Date: 2025-07-03CONTEMPORARY AMPEREX TECHNOLOGY (HONG KONG) LIMITED
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
JP2024501559
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Filing Date
2021-11-30
Publication Date
2025-07-03
Estimated Expiration
2041-11-30

AI Technical Summary

Technical Problem

Conventional machine vision detection methods face limitations in efficiency and accuracy due to structural design and cost issues, leading to detection omissions and insufficient precision, particularly in applications like pre-welding of lithium battery cell components.

Method used

A machine vision detection method that utilizes three-dimensional image analysis with uniformly distributed sampling positions and a coordinate system to calculate multiple height differences, ensuring detection criteria are met without pausing at each position, and incorporates an image preprocessing module to enhance accuracy.

Benefits of technology

The method improves detection speed and accuracy by avoiding detection omissions and ensuring reliable sampling, allowing continuous sampling without pausing at each position, and adapts to different component sizes through adjustable sensors and controllers.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007702562000001
    Figure 0007702562000001
  • Figure 0007702562000002
    Figure 0007702562000002
  • Figure 0007702562000003
    Figure 0007702562000003
Patent Text Reader

Abstract

This application discloses a machine vision detection method, its detection device and its detection system, which includes receiving a three-dimensional image of a part to be measured, determining a number of sampling positions that meet a sampling condition, obtaining first sample data at the sampling positions of a first part and second sample data at the sampling positions of a second part, calculating a first height difference between the number of first sample data and a second height difference between the number of second sample data, calculating a third height difference between the first sample data and the second sample data, and determining that the part to be measured is unqualified if any of the first height difference, the second height difference or the third height difference does not meet a preset detection standard. At the same time, the three different height differences are used to determine whether the part to be measured is acceptable, which can effectively detect the inclination of the placement positions of the first part and the second part, and improve the detection accuracy rate.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of machine vision, and particularly to a machine vision detection method, its detection apparatus, and its detection system.

Background Art

[0002] Machine vision detection is a technology that uses an image acquisition device and an image processing system to perform measurement and judgment instead of humans. Because it has better efficiency and a higher degree of automation than manual detection, it is widely applied, for example, to the detection of the surface flatness of workpieces, the detection of step heights, and the like.

[0003] However, the conventional machine vision detection method is limited by problems such as structural design, cost control, and the matching situation with the actual application scenario, and there are still many defects. Improvements are desired in both its efficiency and detection accuracy.

Summary of the Invention

[0004] In view of the above problems, this application provides a machine vision detection method, its detection apparatus, and its detection system that can improve the efficiency and accuracy of machine vision detection.

[0005] In a first aspect, this application provides a machine vision detection method. The machine vision detection method includes receiving a three-dimensional image of a measurement target part including a first part and a second part, determining a plurality of sampling positions that meet sampling conditions, obtaining first sample data at the sampling positions of the three-dimensional image of the first part and second sample data at the sampling positions of the three-dimensional image of the second part, calculating a first height difference between some of the first sample data and a second height difference between some of the second sample data, calculating a third height difference between the first sample data and the second sample data, and determining that the measurement target part is unqualified if any of the first height difference, the second height difference, or the third height difference does not meet a preset detection criterion.

[0006] In the technical solution of the embodiment of the present application, when detecting a component to be measured, by simultaneously using three different height differences to determine whether the component to be measured is qualified, the risk of laser welding due to the non-uniform arrangement positions of the first component and the second component can be effectively avoided. On the other hand, by selecting and analyzing data of appropriate sampling positions from the provided three-dimensional image, continuous sampling can be supported, there is no need to pause at each sampling position, and the detection speed can be improved.

[0007] In some embodiments, determining several sampling positions that meet the sampling conditions specifically includes installing several first sampling positions uniformly distributed on the first component and installing several second sampling positions uniformly distributed on the second component. Such a sampling position design has good sampling reliability, can make the first height difference, the second height difference and the third height difference obtained by detection more representative, and can show the actual situations of the two components.

[0008] In some embodiments, the first component includes a long side extending in the length direction and a short side extending in the width direction. Installing several first sampling positions uniformly distributed on the first component specifically includes installing several first sampling positions that uniformly divide the long side of the first component.

[0009] In the technical solution of the embodiment of the present application, when the first component has an elongated shape, sampling positions with an average distribution can be installed on its long side with a long length to ensure the reliability of the sampling result.

[0010] In some embodiments, the first component further includes a pair of long sides that are symmetric along an axis, the axis is parallel to the length direction, the second component is located in an internal space surrounded by the first component and has a gap with the first component. Specifically, installing a plurality of first sampling positions that evenly divide the long sides of the first component includes installing N first sampling positions for each long side so as to evenly divide the long side of the first component into N + 1 parts, where N is a positive integer. Installing a plurality of second sampling positions that are evenly distributed on the second component specifically includes installing second sampling positions corresponding to the second component at a preset distance from the first sampling positions along the width direction.

[0011] In the technical solution of the embodiment of the present application, when the second component is a long-shaped structure close to the first component and is surrounded by the first component, when setting the second sampling position, by directly referring to the set first sampling position for setting, a reliable sampling result can be obtained.

[0012] In some embodiments, the method further includes converting the three-dimensional image into a grayscale image, and generating a coordinate system of the grayscale image based on the position and tilt angle of the first component in the three-dimensional image. Such a design can generate an appropriate coordinate system for the image information, which is convenient for the image processing system to perform subsequent image processing operations.

[0013] In some embodiments, the y-axis of the coordinate system is parallel to the long side of the first component, and the x-axis of the coordinate system is parallel to the short side of the first component. Specifically, setting N first sampling positions for each long side of the first component includes determining N division points that evenly divide the long side of the first component into N + 1 parts, setting m as the x-axis coordinates of the N first sampling positions, and setting the y-axis coordinates of the N division points as the y-axis coordinates of the N first sampling positions respectively. Here, m is a value set according to the size of the first component. Setting second sampling positions corresponding to the second component at a preset distance from the first sampling positions along the width direction specifically includes setting n as the x-axis coordinates of the N second sampling positions, and setting the y-axis coordinates of the first sampling positions as the y-axis coordinates of the corresponding second sampling positions. Here, n is a value set according to the size of the second component.

[0014] In the technical solution of the embodiments of the present application, a method for determining the positions of the first sampling positions and the second sampling positions in the coordinate system based on a preset coordinate system with the first component as the basis is provided. Such an installation method can quickly determine the sampling positions that are evenly distributed in the first component and the second component.

[0015] In some embodiments, calculating the third height difference between the first sample data and the second sample data specifically includes calculating the third height difference between the first sample data and the second sample data between each first sampling position and the corresponding second sampling position, determining the maximum value among some of the third height differences, and when the maximum value of the third height difference exceeds a preset threshold, determining that the third height difference does not meet a preset detection criterion. Such a design can ensure that the height differences at each sampling position all meet a preset detection criterion, preferably avoid measurement interference, and provide a more reliable detection result.

[0016] In a second aspect, the present application provides a machine vision detection device. The machine vision detection device includes an image receiving module for receiving a three-dimensional image of a measurement target part including a first part and a second part, a sampling module for determining a plurality of sampling positions that satisfy sampling conditions, a data acquisition module for acquiring first sample data at the sampling positions of the three-dimensional image of the first part and second sample data at the sampling positions of the three-dimensional image of the second part, a height difference calculation module for calculating a first height difference between some of the first sample data, a second height difference between some of the second sample data, and a third height difference between the first sample data and the second sample data, and a determination module for determining that the measurement target part is unqualified if any of the first height difference, the second height difference, or the third height difference does not meet a preset detection criterion.

[0017] In the technical solution of the embodiment of the present application, when detecting a measurement target part, by simultaneously using three different types of height differences to determine whether the measurement target part is qualified, it is possible to effectively avoid detection omission due to the inclination of the arrangement positions of the first part and the second part. In addition, by selecting and analyzing data at appropriate sampling positions from the provided three-dimensional image, continuous sampling can be supported, there is no need to pause at each sampling position, and the detection speed can be improved.

[0018] In some embodiments, the sampling module includes a first sampling unit for installing a plurality of first sampling positions uniformly distributed on the first part and a second sampling unit for installing a plurality of second sampling positions uniformly distributed on the second part. Such a sampling position design has good sampling reliability, can make the first height difference, the second height difference, and the third height difference obtained by detection more representative, and can show the actual situation of the two parts.

[0019] In some embodiments, the first component includes a long side extending in the length direction and a short side extending in the width direction, and the first sampling unit is specifically configured to set a plurality of first sampling positions that evenly divide the long side of the first component.

[0020] In the technical solution of the embodiments of the present application, when the first component has an elongated shape, sampling positions with an even distribution can be set on the long side with a long length, so as to ensure the reliability of the sampling results.

[0021] In some embodiments, the first component further includes a pair of long sides that are symmetric along an axis, the axis is parallel to the length direction, the second component is located in the internal space surrounded by the first component and has a gap from the first component, and the first sampling unit is specifically configured to set N first sampling positions for each long side so as to evenly divide the long side of the first component into N + 1 parts, where N is a positive integer, and the second sampling unit is specifically configured to set corresponding second sampling positions on the second component at a preset distance from the first sampling position along the width direction.

[0022] In the technical solution of the embodiments of the present application, when the second component is an elongated structure close to the first component and is surrounded by the first component, when setting the second sampling position, by directly referring to the set first sampling position, a reliable sampling result can be obtained.

[0023] In some embodiments, it further includes an image preprocessing module for converting the three-dimensional image into a grayscale image and generating a coordinate system of the grayscale image based on the position and tilt angle of the first component in the three-dimensional image. Such a design can generate an appropriate coordinate system for the image information, which is convenient for the image processing system to perform subsequent image processing operations.

[0024] In some embodiments, the y-axis of the coordinate system is parallel to the long side of the first component, the x-axis of the coordinate system is parallel to the short side of the first component. Specifically, the first sampling unit determines N division points that evenly divide the long side of the first component into N + 1 parts, sets m as the x-axis coordinates of the N first sampling positions, and sets the y-axis coordinates of the N division points as the y-axis coordinates of the N first sampling positions respectively. Here, m is configured to be a value set according to the size of the first component. Specifically, the second sampling unit sets n as the x-axis coordinates of the N second sampling positions, and sets the y-axis coordinates of the first sampling positions as the y-axis coordinates of the corresponding second sampling positions. Here, n is configured to be a value set according to the size of the second component.

[0025] In the technical solution of the embodiments of the present application, a method for determining the positions of the first sampling position and the second sampling position in the coordinate system is provided based on a preset coordinate system with the first component as the basis. Such an installation method can quickly determine the sampling positions that are evenly distributed among the first component and the second component.

[0026] In some embodiments, specifically, the height difference calculation module calculates a third height difference between the first sample data and the second sample data between each of the first sampling positions and the corresponding second sampling positions, and is configured to determine the maximum value among some of the third height differences. When the maximum value of the third height difference exceeds a preset threshold, it is determined that the third height difference does not meet the preset detection criteria. Such a design can ensure that the height differences at each sampling position all meet the preset detection criteria, well avoid measurement interference, and provide a more reliable detection result.

[0027] In a third aspect, the present application provides a machine vision detection system. The machine vision detection system includes an image acquisition device for acquiring three-dimensional images of at least some of the parts to be measured, a detection station for accommodating the parts to be measured, and a first controller communicably connected to the image acquisition device and configured to execute the above-described machine vision detection method.

[0028] In the technical solution of the embodiments of the present application, when detecting the parts to be measured, by simultaneously using three different height differences to determine whether the parts to be measured are qualified, it is possible to effectively avoid detection omission due to the inclination of the arrangement positions of the first part and the second part. In addition, the parts to be measured can be detected by a continuous sampling method, without the need to pause at each sampling position, improving the detection speed.

[0029] In some embodiments, the machine vision detection system further includes a second controller. The second controller stores some arrangement information recording a target pitch and a target altitude. Each arrangement information corresponds to at least one part to be measured respectively. The image acquisition device includes two line laser sensors, a sensor bracket, an altitude adjustment module, and a pitch adjustment module. The two line laser sensors are respectively installed on both sides of the sensor bracket. The altitude adjustment module is installed on the sensor bracket and configured to adjust the altitude where the line laser sensor is located. The pitch adjustment module is installed on the sensor bracket and configured to adjust the pitch between the two line laser sensors. The second controller is configured to control the altitude adjustment module and the pitch adjustment module so that the two line laser sensors reach the target pitch and / or the target altitude.

[0030] In the technical solution of the embodiment of the present application, by further installing an additional altitude adjustment module and a pitch adjustment module, the machine vision detection system can be adapted to automatically detect measurement target parts of different model numbers, sizes or outer shapes. Also, according to the arrangement information stored in the second controller, the operator can quickly switch between different measurement target parts.

[0031] In some embodiments, two detection stations are provided, and the image acquisition device further includes a moving mechanism for driving the sensor bracket to reciprocate between the two detection stations. With such a design, the two detection stations can share one image acquisition device, which improves the utilization efficiency of the image acquisition device and is beneficial to reducing the overall cost of the detection system.

[0032] In a fourth aspect, the present application provides an electronic device, including a processor and a memory communicably connected to the processor, wherein the memory stores computer program instructions, and when the computer program instructions are called by the processor, the processor is caused to execute the above machine vision detection method. Such a design can effectively avoid detection omission due to the inclination of the arrangement positions of the first part and the second part by simultaneously using three different height differences to determine whether the measurement target part is qualified when detecting the measurement target part. Also, the measurement target part can be detected in a continuous sampling manner, without the need to pause at each sampling position, improving the detection speed.

[0033] In a fifth aspect, the present application provides a non-volatile computer storage medium, in which computer program instructions are stored. When the computer program instructions are called by a processor, the above machine vision detection method is executed. Such a design can effectively avoid detection omissions due to the inclination of the arrangement positions of the first component and the second component by simultaneously using three different height differences to determine whether the component to be measured is qualified when detecting the component to be measured. In addition, the component to be measured can be detected by a continuous sampling method, without the need to pause at each sampling position, improving the detection speed.

[0034] The above description is only an outline of the technical solution of the present application. In order to understand the technical means of the present application more clearly, it can be implemented according to the content of the specification, and in order to more clearly and easily understand the above and other objects, features and advantages of the present application, specific embodiments of the present application are listed below.

Brief Description of the Drawings

[0035] Various other merits and advantages will become apparent to those skilled in the art by reading the following detailed description of the preferred embodiments. The drawings are only for showing the preferred embodiments and do not limit the present application. And in all the drawings, the same members are denoted by the same reference numerals.

[0036] FIG. 1 is a schematic structural diagram of a machine vision detection system according to some embodiments of the present application.

[0037] FIG. 2 is a schematic structural diagram of an image acquisition device according to some embodiments of the present application.

[0038] FIG. 3 is a schematic structural diagram of a machine vision detection system according to other embodiments of the present application.

[0039] FIG. 4 is a method flowchart of a machine vision detection method according to some embodiments of the present application.

[0040] Figure 5 is a method flowchart of a sampling position setting step according to some embodiments of the present application.

[0041] Figure 6 is a method flowchart of a machine vision detection method according to another embodiment of the present application.

[0042] Figure 7 is a schematic diagram for determining whether a height difference according to some embodiments of the present application meets a predetermined standard.

[0043] Figure 8 is a method flowchart of a detection method for a cell head cover and a cell aluminum case based on machine vision according to some embodiments of the present application.

[0044] Figure 9 is a schematic diagram of a component to be measured according to some embodiments of the present application, showing the cell head cover and the cell aluminum case detected in Figure 8.

[0045] Figure 10 is a schematic diagram of a machine vision detection device according to some embodiments of the present application.

[0046] Figure 11 is a schematic diagram of a machine vision detection device according to another embodiment of the present application.

[0047] Figure 12 is a schematic diagram of an electronic device according to some embodiments of the present application.

Embodiments for Carrying out the Invention

[0048] Hereinafter, embodiments of the technical solution of the present application will be described in detail with reference to the drawings. The following embodiments are used only as an example to more clearly illustrate the technical solution of the present application, and do not limit the protection scope of the present application.

[0049] Unless otherwise defined, all technical and scientific terms used in this specification have the same meaning as commonly understood by one of ordinary skill in the art. The terms used in this specification are for the purpose of describing specific embodiments only and are not intended to limit the present application. The terms "comprising" and "having" and any variations thereof in the specification of the present application and the description of the above drawings are intended to cover a non-exclusive "comprising".

[0050] In the description of the embodiments of the present application, technical terms such as "first" and "second" are used only to distinguish different objects and should not be understood as indicating or implying relative importance, or implicitly indicating the quantity, specific order or primary-secondary relationship of the indicated technical features. Unless otherwise clearly limited, in the description of the embodiments of the present application, the meaning of "a plurality" is two or more.

[0051] As used herein, the term "embodiment" means that a specific feature, structure, or characteristic described in connection with the embodiment may be included in at least one embodiment of the present application. The phrase that appears at each position in the specification does not necessarily refer to the same embodiment, nor is it an exclusive independent or alternative embodiment to other embodiments. One of ordinary skill in the art will explicitly and implicitly understand that the embodiments described in this specification may be combined with other embodiments.

[0052] In the description of the embodiments of the present application, the term "and / or" is only a relationship for explaining related objects, indicating that three types of relationships may exist. For example, A and / or B indicates three situations: A exists alone, A and B exist simultaneously, and B exists alone. Also, the character " / " in this specification generally indicates that the related objects before and after are in an "or" relationship.

[0053] In the description of the embodiments of the present application, the term "a plurality" refers to two or more (including two), similarly, "a plurality of sets" refers to two or more sets (including two sets), and "a plurality of sheets" refers to two or more sheets (including two sheets).

[0054] In the description of the embodiments of the present application, the orientation or positional relationship indicated by technical terms such as "center", "vertical direction", "horizontal direction", "length", "width", "thickness", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", "clockwise", "counterclockwise", "axial direction", "radial direction", "circumferential direction", etc. is based on the orientation or positional relationship shown in the drawings, and is only for the convenience of description and simplification of the description of the embodiments of the present application, and does not indicate or imply that the specified device or element must have a specific orientation and be configured and operated in a specific orientation. Therefore, it should not be understood as a limitation to the embodiments of the present application.

[0055] In the description of the embodiments of the present application, unless otherwise clearly specified and limited, terms such as "attachment", "connection", "connection", "fixation", etc. should be understood in a broad sense. For example, it may be a fixed connection, a removable connection, or an integral one, a mechanical connection, an electrical connection, a direct connection, or an indirect connection through an intermediate medium, or a communication inside two elements or an interaction relationship between two elements. Those skilled in the art can understand the specific meaning of the above terms in the embodiments of the present application according to specific situations.

[0056] Currently, in the production process of lithium battery cells, there is a process called "pre-welding of the top cover" for connecting the top cover of the cell and the aluminum case. Before performing the pre-welding process of the top cover, it is necessary to detect the height difference existing between the top cover and the aluminum case, so as to ensure that the height difference between these two workpieces meets the welding requirements.

[0057] A typical machine vision detection method is to control the image acquisition device to sequentially move to a plurality of preset sampling positions for fixed-point movement to collect and detect image information.

[0058] When the applicant adopts the above machine vision detection method, it should be noted that the image acquisition device needs to trigger the relative movement with the measured workpiece multiple times, the overall operation control is complex, and it takes time. In addition, when the detection area of the sampling position is small and the placement position of the measured workpiece itself is incorrect, detection omission is likely to occur, the subsequent pre-welding process of the top cover fails, and the requirements for detection accuracy cannot be met.

[0059] In order to solve the problems that the above machine vision detection efficiency is low and the detection accuracy is insufficient, the applicant has studied and discovered that by selecting appropriate sampling position data from the collected complete image information, continuous sampling of the image acquisition device can be realized, and the detection efficiency can be improved. In addition, by adding two detection indexes, namely the flatness of the top cover and the aluminum case itself, detection omission can be well avoided, and the requirements for detection accuracy can be ensured.

[0060] In the following embodiments, for the sake of easy explanation, it is described by taking the measured component parts of the embodiments of the present application as the top cover and the aluminum case before the pre-welding process of the top cover as an example. Of course, as can be understood by those skilled in the art, based on the same principle and concept, the machine vision detection system of the embodiments of the present application can also be applied to other measured component parts with similar structural shape characteristics for detection.

[0061] Referring to FIG. 1, FIG. 1 is a schematic structural diagram of a machine vision detection system according to some embodiments of the present application. This machine vision detection system includes an image acquisition device 110, a detection station 120, and a first controller 130.

[0062] Among them, the image acquisition device 110 is a device for acquiring three-dimensional image signals of the measured component parts. Specifically, any appropriate type number and number of line laser sensors can be selected and used, and it has a support structure adapted to the line laser sensor.

[0063] In some embodiments, preferably, as shown in FIG. 2, the image acquisition device 110 may include two line laser sensors 111, a sensor bracket 112, an altitude adjustment module 113, and a pitch adjustment module 114.

[0064] Here, the two line laser sensors 111 are respectively provided on both sides of the sensor bracket 112 and are used to simultaneously collect three-dimensional image signals of the symmetric long sides of both the cell head cover and the cell aluminum case. The line laser sensor can have an appropriate field of view and pixel accuracy as required.

[0065] Both the altitude adjustment module 113 and the pitch adjustment module 114 are provided on the sensor bracket 112. Specifically, any appropriate type of mechanical structure including, but not limited to, a screw, a cylinder, or a gear can be selected and implemented.

[0066] With the altitude adjustment module 113 and the pitch adjustment module 114, both the height and the pitch between the two line laser sensors 111 can be varied within a certain range, meeting the detection needs of cells of different model numbers or sizes. In some embodiments, the pitch L1 between the two laser sensors can be adjusted within the range of 20 - 90 mm. The distance L2 (also called the object distance) between the line laser sensor and the detection target cell may be adjusted within the range of 60 ± 12.5 mm. Such a design can meet the usage needs of measurement target cells with different heights and different widths.

[0067] The detection station 120 is a spatial position for accommodating the part to be measured. It may be composed of an appropriate fixture or other similar mechanisms as long as it is suitable for the part to be measured. For example, the detection station 120 may be a specific area arranged on the conveying line.

[0068] The first controller 130 may be an electronic computing device having a logical operation function, including but not limited to a server or an industrial computer. By establishing a communication connection with the image acquisition device in a wired or wireless manner, it can receive the three-dimensional image signal collected and obtained by the image acquisition device.

[0069] In the operation, the component to be measured located at the detection station 120 (for example, the cell head cover and the cell aluminum case after crimping) can move relative to the image acquisition device 110 at a set speed by the drive of a motor or other appropriate type of power device. The line laser sensor of the image acquisition device 110 can continuously collect and obtain the three-dimensional image signals on the long sides of both sides of the component to be measured according to the acquisition frequency adapted to the relative movement speed by a similar sensor device such as an encoder.

[0070] The three-dimensional image signal collected and obtained by the line laser sensor is provided to the first controller. After a series of steps of machine vision detection methods such as image processing are executed by the first controller, the detection result is output and provided to an external device. Thereby, the unqualified components to be measured can be selected in a timely manner and corresponding processing can be performed.

[0071] One of the advantageous aspects provided by the embodiments of the present application is that the three-dimensional image signal of the component to be measured can be obtained in a manner where the image acquisition device samples and continuously collects. Compared with the mode of collecting images after reaching the target position, the operation frequency of startup and stop can be effectively reduced, and the detection speed can be significantly improved.

[0072] According to some embodiments of the present application, preferably, referring to FIG. 3, FIG. 3 is a schematic structural diagram of a machine vision detection system provided by another embodiment of the present application. The machine vision detection system may further include a second controller 140.

[0073] Here, the second controller 140 stores some arrangement information for recording the target pitch and the target altitude. The arrangement information is data information corresponding to the component to be measured, and can be preset by a technician according to the actual product production situation.

[0074] During operation, when the component to be measured entering the machine vision detection system changes, the technician or operator selects and determines the arrangement information corresponding to the component to be measured that needs to be detected currently. Next, based on the selected arrangement information, the second controller automatically controls the altitude adjustment module 113 and the pitch adjustment module 114 to move the line laser sensor to the target pitch and the target altitude recorded in the arrangement information, and complete the collection of the three-dimensional image signal for the component to be measured.

[0075] For the sake of convenience of description, in the embodiments of the present application, according to the differences in the functions to be executed by the controller, they are described as the "first controller" and the "second controller" respectively. As can be understood by those skilled in the art, the descriptions of the first controller and the second controller are not used to limit the specific implementation of the controller, and they may be different functional modules within the same electronic computing device, or functional modules separately arranged in different electronic computing devices.

[0076] One of the advantageous aspects provided by the embodiments of the present application is that, due to the pre-stored arrangement information, when the component to be measured changes (for example, when the size of the cell to be detected changes), the operator can easily and quickly adjust the machine vision detection system to adapt to the changed component to be measured, effectively improving the detection efficiency and compatibility.

[0077] In some embodiments, preferably, with continued reference to FIG. 3, the machine vision detection system includes two detection stations 120 and an additional movement mechanism 150.

[0078] Among them, the moving mechanism 150 is a power mechanism for driving the image acquisition device 110 to reciprocate between different detection stations 120. Any suitable type of power device can be adopted, including but not limited to cylinders, motors or springs, as long as the usage requirements can be met.

[0079] The two different detection stations 120 can adopt any suitable arrangement form, for example, the parallel arrangement form shown in FIG. 3. Corresponding to the arrangement form of the detection station 120, the moving mechanism 150 may include a guide rail provided across the two detection stations 120, and drive the image acquisition device 110 to reciprocate along the guide rail by a power device such as a motor, a cylinder or a spring.

[0080] In operation, the machine vision detection system can first collect the image signal of the part to be measured at the detection station 120 located on the left side. After the collection of the image signal is completed, the moving mechanism moves the image acquisition device 110 to the detection station 120 located on the right side to collect the image signal of another part to be measured. At this time, the next part to be measured enters the detection station 120 on the left side.

[0081] After the image acquisition device 110 completes the collection of the image signal of the part to be measured at the detection station 120 located on the right side, the moving mechanism is driven again to return to the position of the detection station 120 on the left side to continue the collection of the image signal. At this time, the next part to be measured enters the detection station 120 on the right side.

[0082] By repeating the above steps, the image acquisition device 120 can alternately complete the collection work of the three-dimensional image signals for the parts to be measured at the two detection stations.

[0083] One of the advantageous aspects provided by the embodiments of the present application is that, through an additional movement mechanism, two detection stations can share one image acquisition device and alternately collect image signals. This improves the utilization efficiency of the image acquisition device and the detection efficiency of the machine vision detection system.

[0084] In addition, in the embodiments of the present application, although two detection stations 120 are described as an example, as those skilled in the art can understand, according to the needs of the actual situation, more detection stations 120 can be selected and installed, and adaptive adjustments and changes can be made to the movement mechanism.

[0085] According to some embodiments of the present application, FIG. 4 shows a machine vision detection method according to some embodiments of the present application. The machine vision detection method can be executed by a first controller. Referring to FIG. 4, the machine vision detection method includes the following steps.

[0086] S401, Receive a three-dimensional image of a measured part including a first part and a second part.

[0087] Here, the detected part refers to the one that enters the detection station and waits to detect the workpiece. In this embodiment, the measured part includes a first part and a second part. Specifically, the above three-dimensional image is determined by the shooting area of the image acquisition device. It is possible to shoot only a part of the first part and the second part, or to shoot and collect all the measured parts, as long as the detection needs can be met, and it is not limited here.

[0088] S402, Determine several sampling positions that meet the sampling conditions.

[0089] Here, the sampling position is a position selected based on preset sampling conditions. The sampling conditions may be set by a technician according to actual needs so that the selected sampling position has sufficient representativeness and can improve the accuracy of detection. The number of sampling positions can be determined according to actual needs (for example, the size of the component to be measured), and is not limited here.

[0090] S403. Obtain first sample data at the sampling position of the three-dimensional image of the first component and second sample data at the sampling position of the three-dimensional image of the second component.

[0091] Here, "sample data" refers to three-dimensional data information at specific sampling positions respectively. For example, it is the altitude information at this sampling position. In this embodiment, for the sake of convenience of description, the terms "first sample data" and "second sample data" are used to distinguish the data information located in the first component and the second component. In the subsequent calculation process, only the sample data can be processed, and it is not necessary to process all the collected three-dimensional image signals.

[0092] S404. Calculate a first height difference between some of the first sample data and a second height difference between some of the second sample data.

[0093] Here, the "first height difference" is obtained by calculating the first sample data and represents the height difference between different positions of the first component. Correspondingly, the "second height difference" is obtained by calculating the second sample data, which indicates the height difference between different positions of the second component.

[0094] As can be understood by those skilled in the art, when the surfaces of the first component and the second component are flat (for example, the aluminum case and top cover of a lithium-ion battery), the height difference between different positions of the first component and the second component should be in a small range.

[0095] S405. Calculate the third height difference between the first sample data and the second sample data.

[0096] Here, the "third height difference" is data calculated from the first sample data and the second sample data, indicating the height difference between the first component and the second component. This is a main detection item in the machine vision detection method.

[0097] S406. Determine whether any of the first height difference, the second height difference, or the third height difference fails to meet a preset detection criterion. If so, execute step S407; otherwise, execute step S408.

[0098] Here, the preset detection criterion can be set by the engineer according to actual needs (e.g., process requirements, on-site production experience). In some embodiments, the detection criterion can consist of a series of judgment criteria or thresholds. For example, the first height difference and the second height difference may have the same or different difference thresholds to assist in determining whether there are surface inclination problems with the first component and the second component. Different altitude thresholds are provided for the third height difference to determine whether the step between the first component and the second component is too high.

[0099] S407. Determine that the part to be measured is unqualified.

[0100] Here, when the calculated first height difference or second height difference exceeds the corresponding threshold and does not meet the detection criterion, usually, at this time, it indicates that there are problems with the arrangement or inclination of the first component or the second component. At this time, it can be determined that the part to be measured is unqualified. When the calculated third height difference exceeds the corresponding threshold and does not meet the detection criterion, it indicates that the height difference between the first component and the second component at this time is too large and cannot meet the process requirements. Thus, it may be determined as unqualified.

[0101] S408. Determine that the part to be measured is qualified.

[0102] Here, when all three detection items, namely the first height difference, the second height difference, and the third height difference, can meet the preset detection criteria, it is possible to determine the qualification of the component to be measured, and it will not affect the subsequent processes (for example, the preliminary welding of the top cover).

[0103] One of the advantageous aspects provided by the embodiments of the present application is that when detecting the component to be measured, by simultaneously using three different height differences to determine whether the component to be measured is qualified, it is possible to effectively avoid detection omissions due to the inclination of the arrangement positions of the first component and the second component.

[0104] In some embodiments, preferably, the step S402 of selecting the sampling position specifically includes setting a first sampling position evenly distributed on some of the first components and a second sampling position evenly distributed on some of the second components.

[0105] Here, "evenly distributed" means that the sampling positions are evenly distributed on the first component and the second component. The specific arrangement method may be determined according to the actual situations such as the shapes, dimensions of the first component and the second component, and the number of sampling positions set.

[0106] In this way, the sampling positions set based on the even distribution have better representativeness, ensure that the sample data more realistically reflects the actual situations of the first component and the second component, and can improve the detection accuracy.

[0107] In some embodiments, preferably, when the first component has an elongated structure (for example, a flat cellular case) including a long side extending along the length direction and a short side extending along the width direction, the step of setting sampling positions on the first component may specifically include setting a plurality of first sampling positions that evenly divide the long side of the first component.

[0108] Here, when the first component exhibits a shape having a large length along the axial direction (for example, a long rectangle or a long cylindrical shape), the change situation of the height information in its length direction is the main detection target. The fine inclination of the first component is mainly reflected in the change of the height information in the length direction. Thus, by setting the first sampling positions uniformly distributed along the long side extending in its length direction, the actual situation of the first component can be better shown by the sample data.

[0109] In some embodiments, preferably, when the first component exhibits a structure symmetric along the axis (that is, including a pair of long sides symmetric along the axis parallel to the length direction), and the second component is located in the internal space surrounded by the first component and has a gap with the first component (for example, a cell head cover and a cell aluminum case surrounded outside the cell head cover), as shown in FIG. 5, the first sampling position and the second sampling position may be set by the following steps.

[0110] S4021. Provide N first sampling positions on each long side to evenly divide the long side of the first component into N + 1 parts.

[0111] Here, N is a positive integer, specifically, it can be set by the technician according to the actual needs. For example, N can be set to 4. In this embodiment, the sampling positions are set according to the length of the long side, the pitch between each sampling position is equal, and the long side is evenly divided.

[0112] S4022. Along the width direction, set the second sampling position corresponding to the second component at a predetermined distance from the first sampling position.

[0113] Here, the second component is a component surrounded within the first component, and they have similar outer contours. Thus, the second sampling position can be set with reference to the first sampling position. Starting directly from the first sampling position, after extending a certain distance to reach the second component, it can be determined as the second sampling position.

[0114] The "predetermined distance" may be determined by the gap between the first component and the second component, as long as it can be ensured that the second sampling position can be located within the region where the second component is located.

[0115] One of the advantageous aspects of the embodiments of the present application is that when setting the second sampling position, it can be set by directly referring to the set first sampling position. Such a sampling position setting method contributes to obtaining a more reliable calculation result of the third height difference.

[0116] In some embodiments, preferably, referring to FIG. 6, FIG. 6 is a flowchart of a machine vision detection method provided by some other embodiments of the present application. The machine vision detection method may include the following steps.

[0117] S601, Receive a three-dimensional image of the measurement target component including the first component and the second component.

[0118] Here, step S601 is similar to step S401. Similarly, after the image acquisition device continuously moves with respect to the measurement target component, it receives the three-dimensional image signal collected and obtained.

[0119] S602, Convert the three-dimensional image into a grayscale image.

[0120] Here, the three-dimensional image collected by the line laser sensor is several color images with altitude information marked. In order to facilitate subsequent processing operations, an appropriate type of pixel conversion method can be adopted to convert it into the corresponding grayscale image.

[0121] S603, Generate a coordinate system of the grayscale image based on the position and tilt angle in the three-dimensional image of the first component.

[0122] Here, the "coordinate system" is a reference standard for indicating position information in a grayscale image. It can be set by specifying the origin position and the coordinate axis positions of the coordinate system. Affected by one or more factors in the actual situation, the part to be measured may be in an inclined state in the three-dimensional image. Such a design helps to correct the inclined position state in the image of the part to be measured by reasonably setting the coordinate system, and simplifies the position coordinates of the sampling positions and the subsequent height calculation process.

[0123] In some embodiments, preferably, the y-axis of the coordinate system set in step S603 is parallel to the long side of the first part, and the x-axis of the coordinate system is parallel to the short side of the first part. Continuing to refer to FIG. 6, in the case of such a coordinate system setting, the method for setting the first sampling position and the second sampling position can include the following steps.

[0124] S604. Determine N division points for evenly dividing the long side of the first part into N + 1 parts.

[0125] Here, in the coordinate system, the coordinate positions at both ends of the long side of the first part can be easily determined. Thereby, the position coordinates corresponding to the N division points for evenly dividing the long side are calculated.

[0126] S605. Let m be the x-axis coordinate of the N first sampling positions, and let the y-axis coordinates of the N division points be the y-axis coordinates of the N first sampling positions respectively.

[0127] Here, m is a numerical value set by the engineer according to the dimensions of the first part. As described above, the y-axis and the x-axis of the coordinate system are parallel to the long side and the short side of the first part respectively. Thereby, the x-axis coordinates of the N first sampling positions on the same straight line should be the same, and the engineer can maintain the first sampling positions within the range where the first part is located by setting the numerical value of m.

[0128] The y-axis coordinate of the first sampling position is determined by the division point, ensuring that N sampling positions are evenly distributed along the long side of the first component.

[0129] S606, Let n be the x-axis coordinate of the N second sampling positions, and let the y-axis coordinate of the first sampling position be the y-axis coordinate of the corresponding second sampling position.

[0130] Here, n is a value set by the engineer according to the dimensions of the second component. As described above, the second component has an outer contour and positional relationship close to those of the first component. That is, the y-axis and x-axis of the coordinate system are also substantially parallel to the long side and short side of the second component, respectively. Thereby, the y-axis coordinate of the second sampling position can refer to the corresponding first sampling position, and the engineer can maintain the second sampling position within the range where the second component is located by setting the value of n.

[0131] One of the advantageous aspects of the embodiments of the present application is to provide a method for determining the positions of the first sampling position and the second sampling position in the coordinate system, enabling the rapid determination of the sampling positions that are evenly distributed among the first component and the second component.

[0132] In some embodiments, preferably, referring to FIG. 7, FIG. 7 is a flowchart for calculating the third height difference provided by the embodiments of the present application. When calculating and determining whether the third height difference meets a preset criterion, the following steps can be adopted.

[0133] S701, Calculate the third height difference between the first sample data and the second sample data between the k-th first sampling position and the corresponding second sampling position.

[0134] Here, the initial value of k is 1. k is a number used to indicate the first sampling position and is used to distinguish different first sampling positions. For example, if there are N first sampling positions, numbers from 1 to N can be set as the numbers of each first sampling position.

[0135] The "corresponding second sampling position" means setting the second sampling position with reference to the first sampling position. For example, the second sampling position may be the same as the y-axis coordinate of the first sampling position.

[0136] In S702, it is determined whether k is equal to N. If so, step S703 is executed; otherwise, k = k + 1 and it returns to step S701.

[0137] Here, by comparing the magnitude relationship between k and N, it is possible to determine whether all the first sampling positions have been traversed. If not all have been traversed, by adding 1 to the number k, the third height difference detection process for the next first sampling position and the corresponding second sampling position can be performed again.

[0138] In S703, the maximum value among the N third height differences is output.

[0139] Here, after calculating the height difference between each set of the first sampling position and the second sampling position, the maximum value among the N third height differences can be determined in any appropriate manner and output as the height difference between the first component and the second component.

[0140] In S704, it is determined whether the maximum value of the third height difference output in step S703 exceeds a preset threshold. If so, step S705 is executed; otherwise, step S706 is executed.

[0141] Here, the preset threshold can be set by the engineer according to the actual situation as needed to ensure that the height difference between the first component and the second component meets the requirements of subsequent processes.

[0142] In S705, it is determined that the third height difference does not meet the preset detection criteria.

[0143] Here, when the height difference is too large, it indicates that the measurement target part composed of the first part and the second part at this time is unqualified.

[0144] S706. It is determined that the third height difference meets the preset detection criteria.

[0145] Here, when the traversal detection of all the first sampling positions is completed and the third height difference at any position does not exceed the threshold value, it can be determined that the third height difference between the first part and the second part at this time meets the preset detection criteria.

[0146] One of the advantageous aspects of the embodiments of the present application is that by sequentially detecting the third height differences at multiple positions and determining whether they meet the detection criteria, more accurate detection results can be provided.

[0147] In some embodiments, preferably, referring to FIGS. 8 and 9, FIG. 8 is a method flowchart of the height difference detection method provided by the embodiments of the present application. FIG. 9 is a schematic diagram of a cell after the measurement target part provided by the embodiments of the present application has undergone a crimping process. The steps of the height difference detection method include the following steps.

[0148] S801. Individual cells that have passed through the crimping station flow to the detection station together with the fixtures.

[0149] Here, referring to FIG. 9, the cell includes a cell aluminum case 910 that surrounds the outside, presents a long rectangle, and has symmetric sides, and a cell head cover 920 that is located inside the cell aluminum case and has an outer contour close to the cell aluminum case. There is a certain gap 930 between the cell aluminum case and the cell head cover, and the two can be welded by a method such as laser welding.

[0150] S802. After the detection target cell enters the starting position of the detection station, the controller sends a scanning signal to the image acquisition device.

[0151] Here, specifically, the controller can determine whether the cell enters the starting position of the detection station by any suitable type of sensor (e.g., an infrared sensor). The controller may be a Programmable Logic Controller (PLC) or any other suitable type of electronic processing device.

[0152] S803. While the cell moves relative to the image acquisition device at a speed set by the drive of the drive mechanism, the image acquisition device that receives the scanning signal scans based on the output frequency of the encoder to collect a three-dimensional image signal.

[0153] Here, the cell entering the detection station can move relative to the line laser sensor at a set speed by a drive mechanism such as a motor. The encoder is a component that feeds back the relative transfer speed of the cell to be measured. Thereby, the line laser sensor can scan at a scanning frequency adapted to the moving speed of the cell based on the output frequency of the encoder to obtain a three-dimensional image signal of the cell.

[0154] In some embodiments, continuing to refer to FIG. 9, the line laser sensors may be installed in pairs so as to form a photographing area covering two symmetric long sides of the cell aluminum case 910 and the cell head cover 920 as shown in the dashed frame 940 in the figure.

[0155] S804. Receive the three-dimensional image signal collected by the image acquisition device, perform preprocessing on the three-dimensional image signal, and form a corresponding two-dimensional grayscale image and a coordinate system.

[0156] Here, the above preprocessing operation can be executed by calling one or more algorithms in the corresponding image software system. In some embodiments, a coordinate system can be established based on the positional relationship between the long side and the short side of the cell aluminum case, which is convenient for subsequent calculations and operations.

[0157] For example, after obtaining the long side and the short side of the cell aluminum case, taking the intersection point of the long side and the short side as the positioning point of the coordinate system, and using the rotation angles of the long side and the short side with respect to the coordinate system as the reference angles, a coordinate system can be established in which the y-axis of the coordinate system is parallel to the long side and the x-axis of the coordinate system is parallel to the short side.

[0158] S805. The controller determines eight first sampling positions located on the cell head cover and eight second sampling positions located on the cell aluminum case in the pre-processed two-dimensional grayscale image.

[0159] Here, in this embodiment, the description is given by taking the installation of eight sampling positions as an example. The eight first sampling positions 950 in FIG. 9 are uniformly distributed on the two long sides of the cell aluminum case. The corresponding eight second sampling positions 960 are flush with them and are located within the area where the cell head cover is located.

[0160] In some embodiments, preferably, the image software system can determine the first sampling position and the second sampling position shown in FIG. 9 in the following manner based on the coordinate system set in step S804.

[0161] First, the full length of one long side of the cell aluminum case is determined by a similar image processing algorithm such as a caliper tool. Then, the positions of four division points obtained by uniformly dividing the full length into five parts are determined. Finally, the preset offset amount m is used as the x coordinate of the four first sampling positions on one long side, the preset offset amount n is used as the x coordinate of the corresponding four second sampling positions, and the y coordinates of the four division points are used as the y coordinates of the four first sampling positions and the second sampling positions on one long side.

[0162] Here, both the offset amount m and the offset amount n are preset numerical values, and the technician can determine them based on relevant parameters such as the size of the actual cell to be measured so as to ensure that the first sampling position is located on the cell aluminum case and the second sampling position is located on the cell head cover. The process of determining the first sampling position and the second sampling position on a pair of symmetric long sides on the other side is the same as the aforementioned process, and is omitted here to avoid duplication.

[0163] S806. Based on the altitude values of the eight first sampling positions and the second sampling positions, determine the detection result of the cell to be detected.

[0164] Here, the altitude value of the sampling position can be calculated and obtained by calling relevant algorithms by the image software system based on the three-dimensional data provided by the line laser sensor. In some embodiments, the altitude value of a certain sampling position may also be the average height value within a region range formed by expanding a certain distance outward centered on the coordinate point of the sampling position. Such a method is advantageous for improving the accuracy of the altitude value of the sampling position and avoiding interference.

[0165] The above detection result may include whether the flatness of the cell head cover, the cell aluminum case itself, and the height difference between the two meet the preset criteria. In some embodiments, the flatness of the cell top cover itself may be represented by the difference existing between the maximum value and the minimum value among the altitude values of the eight first sampling positions. The flatness of the cell aluminum case itself may be represented by the difference between the maximum value and the minimum value among the altitude values of the eight second sampling positions. In other words, when determining the flatness of the cell top cover and the cell aluminum case itself, the height difference between the highest position and the lowest position among the sampling positions on either long side is used as the determination criterion.

[0166] In some other embodiments, whether the height difference between the two meets a preset detection criterion is determined by the height difference between the first sampling position and the second sampling position of each group. In this embodiment, the first sampling position and the second sampling position having the same y-axis coordinate are referred to as one group.

[0167] The image processing software system can determine that the height difference between the cell aluminum case and the cell head cover meets the requirement only when the height differences of all 8 groups do not exceed a preset threshold. If the height difference of any one group of sampling positions exceeds the preset threshold, it indicates that the height difference between the two cannot pass the preset detection criterion.

[0168] In some embodiments, preferably, the image processing software system can calculate the height difference between the cell aluminum case and the cell head cover by creating an array queue and detect whether it exceeds a preset threshold. For example, four objects h1, h2, h3, and h4 are respectively set. These four objects can sequentially receive the height differences between the sampling positions of each group. Then, perform a circular traversal to obtain the maximum value therein as the height difference between the cell aluminum case and the cell head cover, and determine whether it exceeds the limit.

[0169] S807. Upload the detection result to the controller and the upper device, and feedback the detection result to the manufacturing execution system (MES) by the upper device.

[0170] Here, if the detection result indicates that any one of the flatness of the cell top cover, the flatness of the cell aluminum case itself, and the height difference between the cell top cover and the cell aluminum case does not meet the detection criterion, it can be determined that all are unqualified. The image information corresponding to these unqualified measured cells may be stored in a specific path for storing abnormal and unknown images, which is convenient for the coordination and communication of each department in the overall production process.

[0171] In some embodiments, in the image information corresponding to the cell to be measured, the height where the position area is located can be displayed using different colors. For example, the height can be divided into four different height ranges, and the different height ranges correspond to four different colors: red, green, blue, and yellow. In the case of image information, it is displayed in the corresponding color according to the height where the position area is located. Such a method can be understood or grasped so as to intuitively show the height information between the components in the component to be measured in the image information.

[0172] S808. The controller controls the moving mechanism to move the image detection device to another detection station.

[0173] Here, after the detection of the cell at one detection station is completed, the controller can drive the image detection device to move to the other detection station and resume the detection.

[0174] One of the advantageous aspects of the embodiments of the present application is a method of selecting and analyzing data of appropriate sampling positions from the provided three-dimensional image, which can support continuous sampling, does not require pausing at each sampling position, and improves the detection speed. Also, when detecting the cell to be measured, by simultaneously using three different height differences to determine whether the component to be measured is qualified, it is possible to effectively avoid detection leakage due to the inclination of the arrangement positions of the cell aluminum case and the cell head cover.

[0175] According to some embodiments of the present application, referring to FIG. 10, FIG. 10 is a machine vision detection device of an embodiment of the present application. The machine vision detection device 1000 includes an image receiving module 1010, a data acquisition module 1020, a sampling module 1030, a height difference calculation module 1040, and a judgment module 1050.

[0176] Here, the image receiving module 1010 is used to receive a three-dimensional image of a component to be measured including a first component and a second component. The sampling module 1020 is used to determine some sampling positions that meet the sampling conditions. The data acquisition module 1030 is used to acquire first sample data at the sampling positions of the three-dimensional image of the first component and second sample data at the sampling positions of the three-dimensional image of the second component. The height difference calculation module 1040 is used to calculate a first height difference between some first sample data, a second height difference between some second sample data, and a third height difference between the first sample data and the second sample data. The determination module 1050 is used to determine that the component to be measured is unqualified when any of the first height difference, the second height difference, or the third height difference does not meet a preset detection criterion.

[0177] In operation, the height difference calculation module 1040 selects and calculates the first sample data and the second sample data at the sampling positions based on the sampling positions determined by the sampling module 1020 to obtain the first height difference, the second height difference, and the third height difference. The determination module 1050 compares the first height difference, the second height difference, and the third height difference with the corresponding detection criteria respectively, and outputs a detection result as to whether the detected component is qualified.

[0178] One of the advantageous aspects of the embodiments of the present application is that when detecting a component to be measured, by simultaneously using three different height differences to determine whether the component to be measured is qualified, it is possible to effectively avoid detection omission due to the inclination of the arrangement positions of the first component and the second component. Also, by the method of selecting and analyzing data at appropriate sampling positions from the provided three-dimensional image, continuous sampling can be supported, there is no need to pause at each sampling position, and the detection speed is improved.

[0179] According to some embodiments of the present application, preferably, referring to FIG. 11, the sampling module 1030 may specifically include a first sampling unit 1031 and a second sampling unit 1032.

[0180] Here, the first sampling unit 1031 is used to set a number of first sampling positions uniformly distributed on the first component. The second sampling unit 1032 is used to set a number of second sampling positions uniformly distributed on the second component. Such a method of setting the sampling positions to be uniformly distributed can ensure the reliability of the sampling data and make the first height difference, the second height difference, and the third height difference obtained by detection more representative.

[0181] According to some embodiments of the present application, preferably, when the first component has a flat and elongated shape and includes a long side extending along the length direction and a short side extending along the width direction, the first sampling unit 1031 is specifically used to set a number of first sampling positions that uniformly divide the long side of the first component. In this way, when the first component has an elongated shape, sampling positions uniformly distributed on the long side with a large length can be provided to ensure the reliability of the sampling result.

[0182] According to some embodiments of the present application, preferably, when the first component further includes a pair of long sides symmetric along an axis parallel to the length direction, the second component is located in the internal space surrounded by the first component, and there is a gap between the first component and the second component, the first sampling unit 1031 is specifically used to uniformly divide the long side of the first component into N + 1 parts, where N is a positive integer, and set N first sampling positions on each of the long sides. The second sampling unit 1032 is specifically used to set second sampling positions corresponding to the second component at a preset distance from the first sampling positions along the width direction. Such a design can contribute to obtaining a more accurate third height difference when the second component has an outer contour close to the first component and is surrounded by the first component.

[0183] According to some embodiments of the present application, preferably, continuing to refer to FIG. 11, the machine vision detection device further includes an image preprocessing module 1060.

[0184] Here, the image preprocessing module 1060 is used to convert a three-dimensional image into a grayscale image, and generate a coordinate system of the grayscale image based on the position and tilt angle in the three-dimensional image of the first component. Such a design can generate an appropriate coordinate system for the image information, correct the tilt position of the first component, and thus provide convenience for subsequent image processing operations.

[0185] According to some embodiments of the present application, preferably, when the y-axis of the coordinate system set by the image preprocessing module 1060 is parallel to the long side of the first component and the x-axis of the coordinate system is parallel to the short side of the first component, the first sampling unit 1031 is specifically used to determine N division points for uniformly dividing the long side of the first component into N + 1 segments, use m as the x-axis coordinates of the N first sampling positions, and use the y-axis coordinates of the N division points as the y-axis coordinates of the N first sampling positions respectively. The second sampling unit 1032 is specifically used to use n as the x-axis coordinates of the N second sampling positions and use the y-axis coordinates of the first sampling positions as the y-axis coordinates of the corresponding second sampling positions.

[0186] Here, m is a value set based on the size of the first component, n is a value set based on the size of the second component, and is used to ensure that the first sampling position is located in the area where the first component is located and the second sampling position is located in the area where the second component is located. Such an installation method can quickly determine the sampling positions that are evenly distributed among the first component and the second component.

[0187] According to some embodiments of the present application, preferably, when calculating the third height difference, specifically, the height difference calculation module 1040 is used to calculate the third height difference between the first sample data and the second sample data between each first sampling position and the corresponding second sampling position. The determination module 1050 is specifically used to determine that the third height difference does not meet the preset detection criteria when any one of the third height differences exceeds the preset threshold.

[0188] In such a design, by sequentially comparing the height differences of each corresponding sampling position with the preset detection criteria, measurement interference can be well avoided, and more reliable detection results can be provided.

[0189] In addition, in the embodiments of the present application, the functional modules of the machine vision detection device are divided according to the method steps to be executed. In some embodiments, one or more functional modules (for example, an image receiving module, a data acquisition module, a sampling module, a height difference calculation module, and a determination module) in the machine vision detection device in the embodiments of the present application can be divided into more functional modules according to the actual situation requirements to execute the corresponding method steps. In some other embodiments, one or more functional modules in the battery replacement device in the embodiments of the present application can be integrated into fewer functional modules to execute the corresponding method steps.

[0190] According to some embodiments of the present application, referring to FIG. 12, FIG. 12 is a structural schematic diagram of an electronic device provided by the embodiments of the present application. The electronic device may be a first controller, a second controller, or any other suitable type of electronic computing platform for executing the above image software system, and its specific implementation is not limited here.

[0191] As shown in FIG. 12, the electronic device may include a processor 1210, a communication interface 1220, a memory 1230, and a communication bus 1240.

[0192] Here, the processor 1210, the communication interface 1220, and the memory 1230 complete communication with each other through the communication bus 1240. The communication interface 1220 is used for communication connections with other devices (for example, an image acquisition device). The processor 1210 is configured to call the program 1250 to execute one or more steps of the machine vision detection method in the foregoing embodiments, or implement one or more functional modules of the machine vision detection device in the foregoing embodiments. Specifically, the program 1250 may include program code or computer operation instructions.

[0193] In this embodiment, according to the type of hardware used, the processor 1210 may be a central processing unit, other general-purpose processors, digital signal processors, application-specific integrated circuits, field programmable gate arrays or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, and the like.

[0194] The memory 1230 is configured to store the program 1250. The memory 1230 may include a high-speed RAM memory and may further include a non-volatile memory such as at least one magnetic disk memory.

[0195] The embodiment of the present application further provides a computer-readable storage medium. The computer-readable storage medium may be a non-volatile computer-readable storage medium. This computer-readable storage medium stores a computer program.

[0196] Here, when a computer program is executed by a processor, one or more method steps of the machine vision detection method in the above embodiments are realized, or one or more functional modules of the machine vision detection device in the above embodiments are realized. A complete computer program product is embodied in one or more computer-readable storage media (including but not limited to magnetic disk memory, CD-ROM, optical memory, etc.) containing the computer program disclosed in the embodiments of the present application.

[0197] Finally, it should be noted that each of the above embodiments is only for explaining the technical solution of the present application and does not limit it. Although the present application has been described in detail with reference to each of the above embodiments, as can be understood by those skilled in the art, it is still possible to modify the technical solutions described in each of the above embodiments, or perform equivalent substitution on some or all of the technical features therein. These modifications or substitutions do not depart from the essence of the corresponding technical solutions from the scope of the technical solutions of each embodiment of the present application, and all should be included in the scope of the claims and the specification of the present application. In particular, each technical feature described in each embodiment can be arbitrarily combined as long as there is no structural contradiction. The present application is not limited to the specific embodiments disclosed in this specification, but includes all technical solutions included in the scope of the claims.

Claims

1. A machine vision detection method for detecting a component to be measured including a cell aluminum case and a cell top cover of a battery, comprising: Receiving a three-dimensional image of the component to be measured including the cell aluminum case and the cell top cover; Determining a plurality of sampling positions that meet sampling conditions; Obtaining first sample data at the sampling positions in the three-dimensional image of the cell aluminum case and second sample data at the sampling positions in the three-dimensional image of the cell top cover; Calculating a first height difference between some of the first sample data and a second height difference between some of the second sample data; Calculating a third height difference between the first sample data and the second sample data; and When any one of the first height difference, the second height difference or the third height difference does not meet a preset detection criterion, determining that the component to be measured is unqualified. A machine vision detection method characterized by the above.

2. Determining a plurality of sampling positions that meet the sampling conditions specifically includes: Setting a plurality of first sampling positions uniformly distributed on the cell aluminum case; and Setting a plurality of second sampling positions uniformly distributed on the cell top cover. The method according to claim 1, characterized by the above.

3. The cell aluminum case includes a long side extending in the length direction and a short side extending in the width direction. Specifically, setting a plurality of first sampling positions uniformly distributed on the cell aluminum case includes setting a plurality of first sampling positions that uniformly divide the long side of the cell aluminum case. The method according to claim 2, characterized by the above.

4. The cell aluminum case further includes a pair of long sides symmetric along an axis, the axis is parallel to the length direction, the cell top cover is located in an internal space surrounded by the cell aluminum case and has a gap with the cell aluminum case. Specifically, setting a plurality of first sampling positions that uniformly divide the long side of the cell aluminum case includes: Setting N first sampling positions for each long side so that the long side of the cell aluminum case is uniformly divided into N + 1 parts, where N is a positive integer. Specifically, setting a plurality of second sampling positions uniformly distributed on the cell top cover includes: including installing a second sampling position corresponding to the cell top cover at a preset distance from the first sampling position along the width direction The method according to claim 3, characterized in that

5. The method includes converting the three-dimensional image into a grayscale image, and further including generating a coordinate system of the grayscale image based on the position and tilt angle of the cell aluminum case in the three-dimensional image The method according to claim 4, characterized in that

6. The y-axis of the coordinate system is parallel to the long side of the cell aluminum case, and the x-axis of the coordinate system is parallel to the short side of the cell aluminum case. Specifically, installing N first sampling positions for each of the long sides determining N division points that evenly divide the long side of the cell aluminum case into N + 1 parts, letting m be the x-axis coordinates of the N first sampling positions, and using the y-axis coordinates of the N division points as the y-axis coordinates of the N first sampling positions respectively, where m is a value set according to the size of the cell aluminum case Specifically, installing a second sampling position corresponding to the cell top cover at a preset distance from the first sampling position along the width direction letting n be the x-axis coordinates of the N second sampling positions, and using the y-axis coordinates of the first sampling positions as the y-axis coordinates of the corresponding second sampling positions respectively, where n is a value set according to the size of the cell top cover The method according to claim 5, characterized in that

7. Specifically, calculating the third height difference between the first sample data and the second sample data calculating the third height difference between the first sample data and the second sample data between each first sampling position and the corresponding second sampling position, determining the maximum value among several of the third height differences, and when the maximum value of the third height difference exceeds a preset threshold, determining that the third height difference does not meet a preset detection criterion The method according to any one of claims 2-6, characterized in that

8. A machine vision detection device for detecting a measurement target component including a cell aluminum case and a cell top cover of a battery An image receiving module for receiving a three-dimensional image of a component to be measured including the cell aluminum case and the cell top cover; A sampling module for determining a plurality of sampling positions that satisfy sampling conditions; A data acquisition module for acquiring first sample data at the sampling positions of the three-dimensional image of the cell aluminum case and second sample data at the sampling positions of the three-dimensional image of the cell top cover; A height difference calculation module for calculating a first height difference between some of the first sample data, a second height difference between some of the second sample data, and a third height difference between the first sample data and the second sample data; and A determination module for determining that the component to be measured is unqualified when any of the first height difference, the second height difference, or the third height difference does not meet a preset detection criterion. A machine vision detection device characterized by the above.

9. The sampling module includes: A first sampling unit for installing a plurality of first sampling positions uniformly distributed on the cell aluminum case; and A second sampling unit for installing a plurality of second sampling positions uniformly distributed on the cell top cover. The device according to claim 8, characterized by the above.

10. The cell aluminum case includes a long side extending in the length direction and a short side extending in the width direction. Specifically, the first sampling unit is configured to install a plurality of first sampling positions that uniformly divide the long side of the cell aluminum case. The device according to claim 9, characterized by the above.

11. The cell aluminum case further includes a pair of long sides symmetric along an axis, the axis is parallel to the length direction, the cell top cover is located in the internal space surrounded by the cell aluminum case and has a gap with the cell aluminum case. Specifically, the first sampling unit is configured to install N first sampling positions for each long side so as to uniformly divide the long side of the cell aluminum case into N + 1 parts, where N is a positive integer. Specifically, the second sampling unit is configured to install corresponding second sampling positions on the cell top cover at a preset distance from the first sampling positions along the width direction. The device according to claim 10, characterized in that.

12. The apparatus further includes an image preprocessing module for converting the three-dimensional image into a grayscale image and generating a coordinate system of the grayscale image based on a position and an inclination angle of the three-dimensional image of the cell aluminum case. The device according to claim 11, characterized in that.

13. The y-axis of the coordinate system is parallel to the long side of the cell aluminum case, and the x-axis of the coordinate system is parallel to the short side of the cell aluminum case. Specifically, the first sampling unit determines N division points that uniformly divide the long side of the cell aluminum case into N + 1 parts, sets m as the x-axis coordinates of the N first sampling positions, and sets the y-axis coordinates of the N division points as the y-axis coordinates of the N first sampling positions, where m is configured to be a value set according to the size of the cell aluminum case. Specifically, the second sampling unit sets n as the x-axis coordinates of the N second sampling positions, and sets the y-axis coordinates of the first sampling positions as the y-axis coordinates of the corresponding second sampling positions, where n is configured to be a value set according to the size of the cell top cover. The device according to claim 12, characterized in that.

14. Specifically, the height difference calculation module calculates a third height difference between the first sample data and the second sample data between each of the first sampling positions and the corresponding second sampling positions, and is configured to determine a maximum value among some of the third height differences. Specifically, when the maximum value of the third height difference exceeds a preset threshold, the determination module is configured to determine that the third height difference does not meet a preset detection criterion. The device according to any one of claims 9-13, characterized in that.

15. A machine vision detection system, comprising: An image acquisition device for acquiring three-dimensional images of at least some of the measured target parts; A detection station for accommodating the measured target parts; A first controller communicably connected to the image acquisition device and configured to execute the machine vision detection method according to any one of claims 1-7. The machine vision detection system, characterized in that.

16. Further including a second controller. The second controller stores some arrangement information for recording a target pitch and a target altitude, and each piece of arrangement information corresponds to at least one measurement target part, respectively. The image acquisition device includes two line laser sensors, a sensor bracket, an altitude adjustment module, and a pitch adjustment module. The two line laser sensors are respectively installed on both sides of the sensor bracket. The altitude adjustment module is installed on the sensor bracket and is configured to adjust the altitude where the line laser sensor is located. The pitch adjustment module is installed on the sensor bracket and is configured to adjust the pitch between the two line laser sensors. The second controller is configured to control the altitude adjustment module and the pitch adjustment module so that the two line laser sensors reach the target pitch and / or the target altitude. The system according to claim 15, characterized in that.

17. Two detection stations are provided. The image acquisition device further includes a moving mechanism for driving the sensor bracket to reciprocate between the two detection stations. The system according to claim 16, characterized in that.

18. Including a processor and a memory communicably connected to the processor, the memory stores computer program instructions, and when the computer program instructions are called by the processor, the processor executes the machine vision detection method according to any one of claims 1-7. An electronic device, characterized in that.

19. A non-volatile computer storage medium, The non-volatile computer storage medium stores computer program instructions, and when the computer program instructions are called by a processor, the machine vision detection method according to any one of claims 1-7 is executed. A non-volatile computer storage medium, characterized in that.

Citation Information

Patent Citations

  • Weld zone inspection method, and welding support system

    JP2005014026A

  • Three-dimensional image inspection device, three-dimensional image inspection method, three-dimensional image inspection program, and computer-readable recording medium and recorded device

    JP2017151067A