Battery cell size measuring method, device and system
1. A cell size measurement method is characterized by comprising the following steps:
acquiring a top view image of a battery cell to be tested;
acquiring the type of the battery cell to be tested based on the overlook image;
acquiring a left view image of the battery cell to be tested under the condition that the type of the battery cell to be tested is a cylindrical battery cell;
acquiring size information of the to-be-detected battery cell based on the overlook image of the to-be-detected battery cell and the left view image of the to-be-detected battery cell;
the size information of the battery cell to be tested comprises the length and the diameter of the battery cell to be tested.
2. The cell size measurement method according to claim 1, further comprising, after the obtaining the type of the cell to be measured based on the overhead view image,:
under the condition that the type of the battery cell to be tested is a soft package battery cell, acquiring size information of the battery cell to be tested based on an overlook image of the battery cell to be tested;
the size information of the battery cell to be tested comprises the total length of the battery cell to be tested and the length of the lug.
3. The method of measuring the cell size of claim 1 or 2, further comprising, before the obtaining the top view image of the cell to be measured:
acquiring a first conversion coefficient corresponding to the overlook image of the battery cell to be tested;
and acquiring a second conversion coefficient corresponding to the left view image of the battery cell to be tested.
4. The method according to claim 3, wherein the obtaining of the size information of the to-be-measured electrical core based on the top view image of the to-be-measured electrical core and the left view image of the to-be-measured electrical core specifically includes:
acquiring a first pixel distance of the battery cell to be tested based on the overlook image of the battery cell to be tested, and acquiring a second pixel distance of the battery cell to be tested based on the left view image of the battery cell to be tested;
and acquiring the length of the battery cell to be tested based on the first pixel distance and the first conversion coefficient, and acquiring the diameter of the battery cell to be tested based on the second pixel distance and the second conversion coefficient.
5. The method according to claim 3, wherein, when the type of the electric core to be measured is a soft-package electric core, acquiring the size information of the electric core to be measured based on the overlook image of the electric core to be measured specifically includes:
acquiring a third pixel distance and a fourth pixel distance of the battery cell to be tested based on the overlook image of the battery cell to be tested;
and acquiring the total length of the battery cell to be tested based on the third pixel distance and the first conversion coefficient, and acquiring the tab length of the battery cell to be tested based on the fourth pixel distance and the first conversion coefficient.
6. The method according to claim 4, wherein the obtaining a first pixel distance of the electrical core to be measured based on the top view image of the electrical core to be measured specifically includes:
extracting the outline of the overlook image of the battery cell to be detected to obtain a first outline;
acquiring a first pixel distance of the battery cell to be tested based on the first profile;
and based on the left view image of the battery cell to be tested, acquiring a second pixel distance of the battery cell to be tested, specifically comprising:
extracting the outline of the left view image of the battery cell to be detected to obtain a second outline;
and acquiring a second pixel distance of the electric core to be tested based on the second profile.
7. A cell size measurement device, comprising:
the overlook image acquisition module is used for acquiring an overlook image of the battery cell to be detected;
the type identification module is used for acquiring the type of the battery cell to be tested based on the overlook image;
the left view image acquisition module is used for acquiring a left view image of the battery cell to be tested under the condition that the type of the battery cell to be tested is a cylindrical battery cell;
the first size information acquisition module is used for acquiring the size information of the to-be-detected battery cell based on the overlook image of the to-be-detected battery cell and the left view image of the to-be-detected battery cell;
and the size information comprises the length and the diameter of the battery cell to be tested.
8. A cell size measurement system comprising a first camera, a second camera, and the cell size measurement apparatus of claim 7;
the first camera is in communication connection with the cell size measuring device and is used for shooting an overlook image of the cell to be measured;
the second camera is in communication connection with the battery cell size measuring device and is used for shooting a left view image of the battery cell to be measured.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the steps of the cell size measuring method according to any one of claims 1 to 6 when executing the program.
10. A non-transitory computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the cell sizing method according to any of claims 1 to 6.
Background
The battery cell refers to a single electrochemical battery cell containing a positive electrode and a negative electrode, and is generally not used directly. The battery is different from a battery which comprises a protection circuit and a shell and can be directly used.
The battery cell is a storage part in the rechargeable battery, and the size of the battery cell is required to be ensured to be in accordance with the specification in the process of assembling the rechargeable battery. Generally, the cell size needs to be manually measured, but the manual measurement may cause inaccurate measured data due to operation errors of an operator, and the measurement efficiency of the manual measurement is low.
Disclosure of Invention
The invention provides a method, a device and a system for measuring the size of a battery cell, which are used for solving the defect of low accuracy of manual measurement in the prior art and realizing high-precision size measurement of the battery cell to be measured in a picture according to the acquired picture.
The invention provides a method for measuring the size of a battery cell, which comprises the following steps:
acquiring a top view image of a battery cell to be tested;
acquiring the type of the battery cell to be tested based on the overlook image;
acquiring a left view image of the battery cell to be tested under the condition that the type of the battery cell to be tested is a cylindrical battery cell;
acquiring size information of the to-be-detected battery cell based on the overlook image of the to-be-detected battery cell and the left view image of the to-be-detected battery cell;
the size information of the battery cell to be tested comprises the length and the diameter of the battery cell to be tested.
According to the cell size measuring method provided by the present invention, after the obtaining the type of the cell to be measured based on the overhead view image, the method further includes:
under the condition that the type of the battery cell to be tested is a soft package battery cell, acquiring size information of the battery cell to be tested based on an overlook image of the battery cell to be tested;
the size information of the battery cell to be tested comprises the total length of the battery cell to be tested and the length of the lug.
According to the cell size measuring method provided by the invention, before the obtaining of the overlook image of the cell to be measured, the method further comprises the following steps:
acquiring a first conversion coefficient corresponding to the overlook image of the battery cell to be tested;
and acquiring a second conversion coefficient corresponding to the left view image of the battery cell to be tested.
According to the method for measuring the size of the battery cell, the obtaining of the size information of the battery cell to be measured based on the overlook image of the battery cell to be measured and the left view image of the battery cell to be measured specifically includes:
acquiring a first pixel distance of the battery cell to be tested based on the overlook image of the battery cell to be tested, and acquiring a second pixel distance of the battery cell to be tested based on the left view image of the battery cell to be tested;
and acquiring the length of the battery cell to be tested based on the first pixel distance and the first conversion coefficient, and acquiring the diameter of the battery cell to be tested based on the second pixel distance and the second conversion coefficient.
According to the method for measuring the size of the battery cell provided by the invention, when the type of the battery cell to be measured is a soft package battery cell, the method for obtaining the size information of the battery cell to be measured based on the overlook image of the battery cell to be measured specifically comprises the following steps:
acquiring a third pixel distance and a fourth pixel distance of the battery cell to be tested based on the overlook image of the battery cell to be tested;
and acquiring the total length of the battery cell to be tested based on the third pixel distance and the first conversion coefficient, and acquiring the tab length of the battery cell to be tested based on the fourth pixel distance and the first conversion coefficient.
According to the method for measuring the size of the battery cell, the obtaining of the first pixel distance of the battery cell to be measured based on the overlook image of the battery cell to be measured specifically includes:
extracting the outline of the overlook image of the battery cell to be detected to obtain a first outline;
acquiring a first pixel distance of the battery cell to be tested based on the first profile;
and based on the left view image of the battery cell to be tested, acquiring a second pixel distance of the battery cell to be tested, specifically comprising:
extracting the outline of the left view image of the battery cell to be detected to obtain a second outline;
and acquiring a second pixel distance of the electric core to be tested based on the second profile.
The invention also provides a cell size measuring device, which comprises:
the overlook image acquisition module is used for acquiring an overlook image of the battery cell to be detected;
the type identification module is used for acquiring the type of the battery cell to be tested based on the overlook image;
the left view image acquisition module is used for acquiring a left view image of the battery cell to be tested under the condition that the type of the battery cell to be tested is a cylindrical battery cell;
the first size information acquisition module is used for acquiring the size information of the to-be-detected battery cell based on the overlook image of the to-be-detected battery cell and the left view image of the to-be-detected battery cell;
and the size information comprises the length and the diameter of the battery cell to be tested.
The invention also provides a battery cell size measuring system, which comprises a first camera, a second camera and any one of the battery cell size measuring devices;
the first camera is in communication connection with the cell size measuring device and is used for shooting an overlook image of the cell to be measured;
the second camera is in communication connection with the battery cell size measuring device and is used for shooting a left view image of the battery cell to be measured.
The invention also provides an electronic device, which includes a memory, a processor and a computer program stored in the memory and executable on the processor, and is characterized in that the processor implements the steps of the cell size measuring method according to any one of the above items when executing the program.
The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, wherein the computer program is configured to, when executed by a processor, implement the steps of the cell size measuring method according to any one of the above-mentioned embodiments.
According to the embodiment of the invention, the type of the battery cell is identified through the overlook image of the battery cell to be detected, and if the type of the battery cell is the cylindrical battery cell, the left view image of the battery cell to be detected is obtained. And performing image processing on the overlook image and the left view image of the battery cell to be detected to obtain the length and the diameter of the battery cell to be detected of the type. Furthermore, under the condition that the cell type is identified, the accuracy of the cell size measurement of the type can be improved, and errors caused by manual measurement can be effectively avoided.
Drawings
Fig. 1 is a schematic flow chart of a cell size measurement method according to an embodiment of the present invention;
fig. 2 is a general flow chart of a cell size measurement method according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a cell size measurement apparatus provided in an embodiment of the present invention;
fig. 4 is a schematic physical structure diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is obvious that the described embodiments are some, but not all embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In the description of the present invention, it should be noted that the terms "first", "second", "third", and the like are used for descriptive purposes only and are not to be construed as indicating or implying relative importance, unless otherwise stated.
Fig. 1 is a schematic flow chart of a cell size measurement method provided by the present invention. As shown in fig. 1, a method for measuring a cell size according to an embodiment of the present invention includes: step 101, obtaining a top view image of a battery cell to be tested.
It should be noted that the main body of the cell size measuring method provided by the embodiment of the present invention is a cell size measuring apparatus.
The measurement object of the cell size measurement device is a cell to measure the actual size of the cell.
In an actual working condition, the overlook image of the battery cell to be measured refers to a picture which is obtained by shooting from top to bottom through a camera which is arranged above the battery cell to be measured in parallel.
Specifically, when the battery cell to be measured is measured, the battery cell size measuring device receives an overhead image of the battery cell to be measured, which is acquired by the upper camera.
And 102, acquiring the type of the battery cell to be tested based on the overlook image.
It should be noted that there are many classification ways of the battery cells, which may be based on the packaging form or the anode material.
Preferably, the cell types classified according to the packaging form are mainly two types:
the first type is a cylindrical battery cell, the battery cell is packaged into a cylinder, and two bottom surfaces of the cylinder are respectively the positive and negative poles of the cylindrical battery cell.
The second type is a soft-packaged battery cell, which is packaged into a relatively flat cuboid, and is externally provided with a layer of flexible polymer shell and conductors (such as metal conductors) which lead out the positive and negative poles from the battery cell, namely tabs.
Specifically, the cell size measuring apparatus performs recognition and judgment processing according to the top view image in step 101, and may obtain that the type of the cell to be measured in the top view image in step 101 is a cylindrical cell or a soft package cell.
The identification and determination method may be a minimum distance classification method, Fisher (Fisher) discrimination, or an image classification method such as an SVM support vector machine, which is not specifically limited in the embodiment of the present invention.
For example, when the top-view image is determined by the minimum distance classification method, the distance between the feature vector extracted for the top-view image and the feature vector of the rectangle is smaller than a predetermined threshold.
Or after training based on the SVM support vector machine method and the sample battery core (including two battery core types), obtaining a recognition model capable of recognizing the battery core type, and further applying the recognition model to the battery core to be tested to obtain the type of the battery core to be tested.
And 103, acquiring a left view image of the battery cell to be tested under the condition that the type of the battery cell to be tested is a cylindrical battery cell.
It should be noted that, in an actual working condition, the left view image of the electrical core to be measured refers to a picture obtained by shooting from left to right of another camera on the same horizontal plane as the electrical core to be measured.
Specifically, if the type of the electric core identified in step 102 is a cylindrical electric core, the electric core size measurement device drives another camera on the same horizontal plane as the electric core to be measured to capture an image, and the electric core size measurement device can receive a left-view image of the electric core to be measured, which is to be captured by the camera.
And step 104, acquiring the size information of the to-be-detected battery cell based on the overlook image of the to-be-detected battery cell and the left view image of the to-be-detected battery cell.
It should be noted that, because the packaging forms of the different types of battery cells are different, the corresponding size information is different.
The size of the battery cell to be tested refers to that the physical size of the battery cell to be tested in an actual environment is actually the actual physical size of the cylinder because the appearance of the cylindrical battery cell is a complete cylinder under the condition that the battery cell to be tested is the cylindrical battery cell.
Specifically, under the condition that the type of the battery cell to be measured is a cylindrical battery cell, the battery cell size measuring device performs image processing through the image information of the battery cell to be measured contained in the overlooking image and the left view image of the battery cell to be measured respectively, and the sizes of the battery cell to be measured in the two pictures are converted into the actual physical sizes of the battery cell to be measured observed from two different directions respectively. And the dimension information of the battery cell to be measured is formed by the actual physical dimensions of the battery cell obtained from two different observation directions and is used for reflecting the dimension of the battery cell to be measured in an actual environment from different dimensions.
The size information of the battery cell to be tested comprises the length and the diameter of the battery cell to be tested.
It should be noted that, in the case that the type of the battery cell to be tested is a cylindrical battery cell, since the package shape is cylindrical, the cylindrical height and bottom diameter, that is, the length and diameter of the cylindrical battery cell, can be obtained.
Specifically, the size information of the battery cell to be measured, which can be acquired by the battery cell size measuring apparatus in step 104, includes the length and the diameter of the cylindrical battery cell.
According to the embodiment of the invention, the type of the battery cell is identified through the overlook image of the battery cell to be detected, and if the type of the battery cell is the cylindrical battery cell, the left view image of the battery cell to be detected is obtained. And performing image processing on the overlook image and the left view image of the battery cell to be detected to obtain the length and the diameter of the battery cell to be detected of the type. Furthermore, under the condition that the cell type is identified, the accuracy of the cell size measurement of the type can be improved, and errors caused by manual measurement can be effectively avoided.
Fig. 2 is a general flow chart of a cell size measurement method according to an embodiment of the present invention. Based on the content of any embodiment, as shown in fig. 2, after the obtaining the type of the battery cell to be tested based on the top view image, the method further includes:
and 105, acquiring the size information of the battery cell to be tested based on the overlook image of the battery cell to be tested under the condition that the type of the battery cell to be tested is a soft package battery cell.
It should be noted that, the appearance of soft-packaged electrical core is different from the appearance of cylinder electricity core, and soft-packaged electrical core is the flat package, and its bottom surface is irregular figure, so this diameter that need not to acquire soft-packaged electrical core. Therefore, if it is determined in step 102 that the type of the battery cell to be measured is a soft package battery cell, the battery cell size measuring apparatus does not drive another camera to obtain a left view image of the battery cell to be measured.
The size of the battery cell to be tested refers to that the battery cell to be tested is a soft-package battery cell, and the soft-package battery cell comprises a battery cell body and a metal conductor led out from the battery cell body, so that the physical size of the battery cell to be tested in the actual environment also comprises the length of the metal conductor led out from the battery cell body except the length of the battery cell.
Specifically, if the type of the electrical core identified in step 102 is a soft package electrical core, the electrical core size measuring device may perform image processing through image information of the electrical core to be measured included in the top view image of the electrical core to be measured, convert the total size of the electrical core to be measured in the top view image into an actual physical size, search for a non-continuous linear shape edge of the processed image, where the non-continuous portion is a tab of the soft package electrical core, and convert the size of the protruding portion of the non-continuous linear shape edge in the top view image into the actual physical size of the tab of the electrical core to be measured. The size information of the battery cell to be tested is formed by the actual physical sizes of different parts of the two battery cells to be tested and is used for reflecting the size of the battery cell to be tested in the actual environment.
The size information of the battery cell to be tested comprises the total length of the battery cell to be tested and the length of the lug.
It should be noted that, when the type of the battery cell to be tested is a soft-package battery cell, the sizes of different components of the soft-package battery cell, that is, the total length of the battery cell and the length of the tab on the battery cell, can be obtained.
Specifically, the size information of the battery cell to be measured, which can be acquired by the battery cell size measuring apparatus in step 105, includes the total length of the soft-package battery cell and the length of the tab.
According to the embodiment of the invention, the overlook image of the battery cell to be tested is subjected to image processing under the condition that the battery cell type is identified to be the soft package battery cell, so that the total length and the tab length of the battery cell to be tested of the type can be obtained. Furthermore, under the condition that the battery cell to be measured is a soft package battery cell, the accuracy of the battery cell size measurement of the type can be improved, and errors caused by manual measurement can be effectively avoided.
Based on the content of any embodiment, before obtaining the overhead view image of the electric core to be measured, the method further includes: and acquiring a first conversion coefficient corresponding to the overlook image of the battery cell to be measured.
It should be noted that the first conversion factor is used for converting between the size of the cell to be measured in the top view image and the size in the actual environment.
Specifically, the cell size measuring device obtains a first conversion coefficient for converting in combination with an overhead view image of the cell to be measured.
The first scaling factor may be obtained directly or indirectly through calculation, which is not limited in the present invention.
For example, before the measurement of the cell size, calibration may be performed in the same shooting environment, a 10mm scale is imaged by a camera arranged in parallel above the cell to be measured, and the scale image is refined after binarization processing. Then, the pixel distance of coordinate points at two ends of the straight line in the processed image is solved through a formula, wherein the formula can be expressed as follows:
wherein distance1Representing the pixel distance between two end points of a straight line, the pixel coordinate of one end point is (x)1,y1) The pixel coordinate of the other end point is (x)2,y2)。
Obtaining a first scaling factor corresponding to the top-view image by taking the quotient of the known actual scale size and the pixel size of the scale in the image, can be expressed as:
k1 = 10 / distance1
wherein k is1Is a first scaling factor.
And acquiring a second conversion coefficient corresponding to the left view image of the battery cell to be tested.
It should be noted that the second conversion coefficient is used for converting the size of the cell to be measured in the left-view image and the size of the cell to be measured in the actual environment.
Specifically, the cell size measuring device obtains a second conversion coefficient for conversion in combination with the left view image of the cell to be measured.
The second scaling factor may be obtained directly or indirectly through calculation, which is not limited in the present invention.
For example, except that the second scaling factor k may be calculated indirectly by calibration as described above2In this way, the conversion coefficient between the pixel and the actual size, i.e. the second conversion coefficient k, may also be directly obtained through the relevant configuration parameters of the camera2。
According to the embodiment of the invention, before the measurement of the cell size is carried out, the conversion coefficient between the pixel and the actual size under different views is obtained. Furthermore, different views are combined with corresponding conversion coefficients, the actual size information of the battery cell to be measured is obtained through the pixel information of the battery cell to be measured in the image, the accuracy of the battery cell size measurement of the type can be improved, and errors caused by manual measurement can be effectively avoided.
Based on the content of any one of the above-mentioned embodiments, based on the overlook image of the electric core to be measured and the left view image of the electric core to be measured, obtain the size information of the electric core to be measured, specifically include: the method comprises the steps of obtaining a first pixel distance of the battery cell to be tested based on a overlook image of the battery cell to be tested, and obtaining a second pixel distance of the battery cell to be tested based on a left view image of the battery cell to be tested.
It should be noted that the first pixel distance is a pixel distance between two ends of the electrical core in the top view of the electrical core to be measured, where pixel row coordinates of the two ends are equal, a column coordinate of one end point is a column number of one short side in the top view of the electrical core, a column coordinate of the other end point is a column number of the other short side in the top view of the electrical core, and a difference between the pixel column coordinates of the two ends is a pixel distance corresponding to the length of the electrical core.
The second pixel distance is the pixel distance of the diameter of the circular bottom surface of the cylindrical battery cell in the left view of the battery cell to be measured, wherein two end points are positioned on the circle, the pixel row coordinates or the pixel column coordinates of the two end points are equal, and the difference of the unequal coordinates is the pixel distance corresponding to the diameter of the battery cell.
Specifically, in step 104, the cell size measurement apparatus obtains, according to the cell length information included in the top view image of the to-be-measured cell, a first pixel distance of a distance between two pixel end points in the to-be-measured cell length information. And meanwhile, acquiring a second pixel distance of the distance between the two pixel end points in the diameter length information of the battery core to be detected according to the diameter length information of the battery core contained in the left view image of the battery core to be detected.
Preferably, the calculation formula of the first pixel distance and the second pixel distance may be expressed as:
wherein, pixel _ distance1 is a first pixel distance, and the coordinates of the pixel points at the two ends of the cell length are (X1, Y1) and (X2, Y2), respectively; pixel _ distance2 is the second pixel distance, and the coordinates of the pixel points at the two ends of the cell diameter length are (X3, Y3) and (X4, Y4), respectively.
It should be noted that there is no fixed logical order of obtaining the first pixel distance and the second pixel distance.
And acquiring the length of the battery cell to be tested based on the first pixel distance and the first conversion coefficient, and acquiring the diameter of the battery cell to be tested based on the second pixel distance and the second conversion coefficient.
Specifically, in step 104, in the case that the type of the battery cell to be measured is determined to be a cylindrical battery cell, the battery cell size measuring apparatus performs an operation according to the first pixel distance and the first conversion coefficient, so as to obtain the actual physical length of the battery cell to be measured. Meanwhile, the cell size measuring device performs operation according to the second pixel distance and the second conversion coefficient, so that the actual physical diameter length of the cell to be measured can be obtained.
Preferably, the calculation formulas of the length and the diameter of the battery cell to be measured are respectively as follows:
wherein, D1 is the length of the battery cell to be tested, and D2 is the diameter length of the battery cell to be tested.
According to the embodiment of the invention, the length and the diameter length of the to-be-measured battery cell of the type of the cylindrical battery cell can be obtained by respectively combining the first conversion coefficient and the second conversion coefficient corresponding to the two views with the pixel size information contained in the top view image and the left view image of the to-be-measured battery cell. Furthermore, the actual size information of the battery cell to be measured is obtained through the pixel size information, the accuracy of the battery cell size measurement of the type can be improved, and errors caused by manual measurement are effectively avoided.
Based on the content of any one of the above-mentioned embodiments, under the condition that the type of the electric core to be measured is soft-package electric core, based on the overlooking image of the electric core to be measured, the size information of the electric core to be measured is acquired, and the method specifically includes: and acquiring a third pixel distance and a fourth pixel distance of the battery cell to be tested based on the overlook image of the battery cell to be tested.
It should be noted that the third pixel distance is a pixel distance between two ends of the soft-package electrical core in the top view of the electrical core to be measured, where pixel row coordinates of the two ends are equal, a column coordinate of one end point is a column number of a continuous short side in the top view of the electrical core, a column coordinate of another end point is a column number of a shorter line segment in another discontinuous short side in the top view of the electrical core, and a difference between pixel column coordinates of the two ends is a pixel distance corresponding to the total length of the electrical core.
The fourth pixel distance refers to the pixel distance between two ends of a tab of a soft-package battery cell in the top view of the battery cell to be tested, wherein the pixel row coordinates of the two ends are equal, the column coordinate of one end point is the column number of the longer line segment in the discontinuous short edge existing in the top view of the battery cell, the column coordinate of the other end point is the column number of the shorter line segment in the discontinuous short edge existing in the top view of the battery cell, and the difference between the pixel column coordinates of the two ends is the pixel distance corresponding to the length of the tab of the battery cell.
Specifically, in step 105, the cell size measurement apparatus obtains, according to the total length of the cell included in the top view image of the cell to be measured, a third pixel distance of a distance between two pixel endpoints in the total length of the cell to be measured. And meanwhile, acquiring a fourth pixel distance of the distance between the two pixel end points in the length information of the battery core tab to be detected according to the length information of the battery core tab contained in the overlooking image of the battery core to be detected.
Preferably, the calculation formula of the third pixel distance and the fourth pixel distance may be expressed as:
wherein, pixel _ distance3 is a third pixel distance, and the coordinates of the pixel points at the two ends of the cell length are (X5, Y5) and (X6, Y6), respectively; pixel _ distance4 is the fourth pixel distance, and the coordinates of the pixel points at the two ends of the cell diameter length are (X7, Y7) and (X8, Y8), respectively.
It should be noted that there is no fixed logical order of the third pixel distance and the fourth pixel distance.
And acquiring the total length of the battery cell to be tested based on the third pixel distance and the first conversion coefficient, and acquiring the lug length of the battery cell to be tested based on the fourth pixel distance and the first conversion coefficient.
Specifically, in step 105, when it is determined that the type of the to-be-measured electric core is the soft package electric core, the electric core size measurement device performs operation according to the third pixel distance and the first conversion coefficient, so as to obtain the total actual physical length of the to-be-measured electric core. Meanwhile, the cell size measuring device performs operation according to the fourth pixel distance and the first conversion coefficient, so that the actual physical length of the cell tab to be measured can be obtained.
Preferably, the calculation formulas of the length and the diameter of the battery cell to be measured are respectively as follows:
wherein, D3 is the total length of the battery cell to be tested, and D4 is the tab length of the battery cell to be tested.
According to the embodiment of the invention, the total length and the tab length of the to-be-tested battery cell with the type of the soft package battery cell can be obtained by respectively calculating the pixel size information of different components contained in the overlook image of the to-be-tested battery cell and the first conversion coefficient corresponding to the combined overlook image. Furthermore, the actual size information of the battery cell to be measured is obtained through the pixel size information, the accuracy of the battery cell size measurement of the type can be improved, and errors caused by manual measurement are effectively avoided.
Based on the content of any one of the above embodiments, based on the overhead view image of the electrical core to be measured, the first pixel distance of the electrical core to be measured is obtained, which specifically includes: and carrying out contour extraction on the overlook image of the battery cell to be detected to obtain a first contour.
The first outline is to extract an edge of the overlook image and extract a frame of the to-be-measured battery cell from the image when it is determined that the to-be-measured battery cell is a cylindrical battery cell.
Preferably, the extracted frame from the top view of the cylindrical battery cell is rectangular.
The method for extracting the edge contour is not particularly limited in this respect.
For example, the edge contour extraction method may be to perform gray processing on the picture, and then extract the frame by using an image gradient algorithm.
Specifically, the cell size measurement device extracts the outline of the overlook image of the cell to be measured, and can acquire a first outline included in the cell to be measured from top to bottom.
And acquiring a first pixel distance of the battery cell to be tested based on the first profile.
It should be noted that the first outline is a rectangle, and a long side of the rectangle corresponds to the length of the battery cell to be tested.
Specifically, the cell size measuring device measures a first pixel distance between pixel points at two ends in the long side of the first outline.
And based on the left view image of the electric core to be detected, acquiring a second pixel distance of the electric core to be detected, specifically comprising: and extracting the outline of the left view image of the battery cell to be detected to obtain a second outline.
It should be noted that the second outline refers to, under the condition that it is determined that the type of the battery cell to be tested is a cylindrical battery cell, performing edge extraction on the left view image, and extracting a frame of the battery cell to be tested from the image.
Preferably, the extracted frame for the left view of the cylindrical cell is circular.
The method for extracting the edge contour is not particularly limited in this respect.
For example, in addition to the above-mentioned method of extracting the edge contour, the frame may be extracted by first performing binarization processing on the picture and then using hough transform.
Specifically, the cell size measurement device extracts the profile of the left view image of the cell to be measured, and can acquire a second profile contained in the cell to be measured from left to right.
And acquiring a second pixel distance of the battery cell to be tested based on the second profile.
It should be noted that the second contour is a circle, where the longest length of the connection line between any two points on the circle corresponds to the diameter length of the to-be-measured battery cell.
Specifically, the cell size measuring device measures a second pixel distance between two pixels having the longest connecting line in the second profile.
It should be noted that, in the case where it is determined that the type of the battery cell to be measured is a soft package battery cell, the battery cell size measurement device also performs the above-mentioned contour extraction processing flow on the received overhead view image. And extracting the outline of the soft package battery cell from the overlook image through different image processing logics. And then, acquiring a third pixel distance and a fourth pixel distance corresponding to different parts according to the contour.
According to the embodiment of the invention, the apparent appearance of the battery cell to be tested can be obtained by preprocessing the image contour extraction of the overlook image and the left view image of the battery cell to be tested, which is of the type of the cylindrical battery cell. Similarly, the battery cell to be tested with the type of the soft package battery cell is also subjected to corresponding pre-processing of profile extraction. For any one type of the battery cell, according to the processed image, the accuracy of obtaining the pixel size of the battery cell to be tested can be improved. Further, by performing conversion calculation corresponding to the accurate pixel size, an actual size with high accuracy can be obtained.
Fig. 3 is a schematic structural diagram of a cell size measurement apparatus according to an embodiment of the present invention. Based on the content of any of the above embodiments, as shown in fig. 3, the apparatus includes a top view image obtaining module 310, a type identifying module 320, a left view image obtaining module 330, and a first size information obtaining module 340, wherein:
the overlook image acquisition module is used for acquiring an overlook image of the battery cell to be detected;
the type identification module is used for acquiring the type of the battery cell to be tested based on the overlook image;
the left view image acquisition module is used for acquiring a left view image of the battery cell to be tested under the condition that the type of the battery cell to be tested is a cylindrical battery cell;
the first size information acquisition module is used for acquiring the size information of the battery cell to be tested based on the overlook image of the battery cell to be tested and the left view image of the battery cell to be tested;
and the size information comprises the length and the diameter of the battery cell to be measured.
Specifically, the overhead image acquiring module 310, the type identifying module 320, the left-view image acquiring module 330, and the first size information acquiring module 340 are electrically connected in sequence.
The overhead view image obtaining module 310 receives an overhead view image of the battery cell to be measured, which is acquired by the upper camera, when the battery cell to be measured is measured.
The type identification module 320 performs identification and judgment processing according to the top view image in the top view image acquisition module 310, so that the type of the battery cell to be tested in the top view image is a cylindrical battery cell or a soft package battery cell.
If the type of the electrical core identified by the type identification module 320 is a cylindrical electrical core, the left-view image acquisition module 330 drives another camera on the same horizontal plane as the electrical core to be measured to capture an image, and receives a left-view image of the electrical core to be measured, which is captured by the camera.
When the type of the battery cell to be measured is a cylindrical battery cell, the first size information acquiring module 340 performs image processing on the battery cell size measuring apparatus through the image information of the battery cell to be measured included in the overlook image and the left view image of the battery cell to be measured, and converts the sizes of the battery cell to be measured in the two pictures into the actual physical sizes of the battery cell to be measured observed from two different directions. And the dimension information of the battery cell to be measured is formed by the actual physical dimensions of the battery cell obtained from two different observation directions and is used for reflecting the dimension of the battery cell to be measured in an actual environment from different dimensions.
The first size information acquiring module 340 is specifically configured to acquire size information of the to-be-detected battery cell, where the size information includes a length and a diameter of the cylindrical battery cell.
The battery cell size measuring device further comprises a second size information acquisition module, wherein:
and the second size information acquisition module is used for acquiring the size information of the battery cell to be tested based on the overlooking image of the battery cell to be tested under the condition that the type of the battery cell to be tested is a soft package battery cell.
And the second size information acquisition module is specifically used for acquiring the size information of the battery cell to be tested, wherein the size information of the battery cell to be tested comprises the total length of the battery cell to be tested and the length of the lug.
The battery cell size measuring device further comprises a first conversion coefficient obtaining module and a second conversion coefficient obtaining module, wherein:
and the first conversion coefficient acquisition module is used for acquiring a first conversion coefficient corresponding to the overlook image of the battery cell to be tested.
And the second conversion coefficient acquisition module is used for acquiring a second conversion coefficient corresponding to the left view image of the battery cell to be tested.
The first size information acquiring module 340 includes a first pixel distance information acquiring module and a first actual size acquiring module, wherein:
the first pixel distance information acquisition module is used for acquiring a first pixel distance of the battery cell to be tested based on the overlook image of the battery cell to be tested, and acquiring a second pixel distance of the battery cell to be tested based on the left view image of the battery cell to be tested.
The first actual size obtaining module obtains the length of the battery cell to be measured based on the first pixel distance and the first conversion coefficient, and obtains the diameter of the battery cell to be measured based on the second pixel distance and the second conversion coefficient.
The second size information acquisition module comprises a second pixel distance information acquisition module and a second actual size acquisition module, wherein:
and the second pixel distance information acquisition module is used for acquiring a third pixel distance and a fourth pixel distance of the battery cell to be detected based on the overlook image of the battery cell to be detected.
And the second actual size acquisition module is used for acquiring the total length of the battery cell to be tested based on the third pixel distance and the first conversion coefficient, and acquiring the tab length of the battery cell to be tested based on the fourth pixel distance and the first conversion coefficient.
The first pixel distance information obtaining module comprises a first contour obtaining module, a first pixel distance obtaining module, a second contour obtaining module and a second pixel distance obtaining module, wherein:
the first contour acquisition module is used for extracting the contour of the overlook image of the battery cell to be detected to obtain a first contour.
And the first pixel distance acquisition module is used for acquiring a first pixel distance of the battery cell to be detected based on the first profile.
The second contour acquisition module is used for extracting a contour of the left view image of the battery cell to be detected to obtain a second contour;
and the second pixel distance acquisition module is used for acquiring a second pixel distance of the battery cell to be detected based on the second profile.
The specific method and flow for implementing the corresponding function by each module included in the battery cell size measuring device provided in the embodiments of the present invention are described in detail in the embodiments of the battery cell size measuring method, and are not described herein again.
The cell size measuring device is used for the cell size measuring method of each embodiment. Therefore, the descriptions and definitions in the cell size measuring method in the foregoing embodiments may be used for understanding the execution modules in the embodiments of the present invention.
According to the embodiment of the invention, the type of the battery cell is identified through the overlook image of the battery cell to be detected, and if the type of the battery cell is the cylindrical battery cell, the left view image of the battery cell to be detected is obtained. And performing image processing on the overlook image and the left view image of the battery cell to be detected to obtain the length and the diameter of the battery cell to be detected of the type. Furthermore, under the condition that the cell type is identified, the accuracy of the cell size measurement of the type can be improved, and errors caused by manual measurement can be effectively avoided.
Based on the content of any embodiment, the cell size measuring system provided by the invention comprises a first camera, a second camera and a cell size measuring device.
The first camera is in communication connection with the battery cell size measuring device and is used for shooting overlook images of the battery cell to be measured.
Specifically, a first camera is arranged above the measurement workbench and is placed in parallel with a certain working distance of the battery cell to be measured. The first camera and the battery cell size measuring device may directly communicate in a wireless communication technology (Wi-Fi), bluetooth, a serial port, or the like, which is not specifically limited in this embodiment of the present invention.
The second camera is in communication connection with the battery cell size measuring device and is used for shooting a left view image of the battery cell to be measured.
Specifically, the second camera is arranged on the left of the measurement workbench and is placed in parallel with the electric core to be measured at a certain working distance. The second camera and the battery cell size measuring device may directly communicate in a wireless communication technology (Wi-Fi), bluetooth, a serial port, or the like, which is not specifically limited in this embodiment of the present invention.
According to the embodiment of the invention, the type of the battery cell is identified through the overlook image of the battery cell to be detected, and if the type of the battery cell is the cylindrical battery cell, the left view image of the battery cell to be detected is obtained. And performing image processing on the overlook image and the left view image of the battery cell to be detected to obtain the length and the diameter of the battery cell to be detected of the type. Furthermore, under the condition that the cell type is identified, the accuracy of the cell size measurement of the type can be improved, and errors caused by manual measurement can be effectively avoided.
Fig. 4 illustrates a physical structure diagram of an electronic device, which may include, as shown in fig. 4: a processor (processor)410, a communication interface (communication interface)420, a memory (memory)430 and a communication bus 440, wherein the processor 410, the communication interface 420 and the memory 430 are communicated with each other via the communication bus 440. The processor 410 may invoke logic instructions in the memory 430 to perform a cell size measurement method, the method comprising: acquiring a top view image of a battery cell to be tested; acquiring the type of the battery cell to be tested based on the overlook image; acquiring a left view image of the battery cell to be tested under the condition that the type of the battery cell to be tested is a cylindrical battery cell; acquiring size information of the battery cell to be tested based on the overlook image of the battery cell to be tested and the left view image of the battery cell to be tested; the size information of the battery cell to be tested comprises the length and the diameter of the battery cell to be tested.
In addition, the logic instructions in the memory 430 may be implemented in the form of software functional units and stored in a computer readable storage medium when the software functional units are sold or used as independent products. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-only memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
In another aspect, the present invention also provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium, the computer program including program instructions, when the program instructions are executed by a computer, the computer being capable of executing the cell size measuring method provided by the above methods, the method including: acquiring a top view image of a battery cell to be tested; acquiring the type of the battery cell to be tested based on the overlook image; acquiring a left view image of the battery cell to be tested under the condition that the type of the battery cell to be tested is a cylindrical battery cell; acquiring size information of the battery cell to be tested based on the overlook image of the battery cell to be tested and the left view image of the battery cell to be tested; the size information of the battery cell to be tested comprises the length and the diameter of the battery cell to be tested.
In yet another aspect, the present invention also provides a non-transitory computer-readable storage medium, on which a computer program is stored, the computer program being implemented by a processor to perform the cell dimension measuring method provided in the above aspects, the method including: acquiring a top view image of a battery cell to be tested; acquiring the type of the battery cell to be tested based on the overlook image; acquiring a left view image of the battery cell to be tested under the condition that the type of the battery cell to be tested is a cylindrical battery cell; acquiring size information of the battery cell to be tested based on the overlook image of the battery cell to be tested and the left view image of the battery cell to be tested; the size information of the battery cell to be tested comprises the length and the diameter of the battery cell to be tested.
The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.
Although the invention has been described in detail hereinabove with respect to a general description and specific embodiments thereof, it will be apparent to those skilled in the art that modifications or improvements may be made thereto based on the invention. Accordingly, such modifications and improvements are intended to be within the scope of the invention as claimed.