CN115797440A - Battery cell positioning method, controller and computer readable storage medium - Google Patents

Battery cell positioning method, controller and computer readable storage medium Download PDF

Info

Publication number
CN115797440A
CN115797440A CN202211480119.4A CN202211480119A CN115797440A CN 115797440 A CN115797440 A CN 115797440A CN 202211480119 A CN202211480119 A CN 202211480119A CN 115797440 A CN115797440 A CN 115797440A
Authority
CN
China
Prior art keywords
image
cell
similarity
template
region
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211480119.4A
Other languages
Chinese (zh)
Inventor
请求不公布姓名
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Lyric Robot Automation Co Ltd
Original Assignee
Guangdong Lyric Robot Intelligent Automation Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Lyric Robot Intelligent Automation Co Ltd filed Critical Guangdong Lyric Robot Intelligent Automation Co Ltd
Priority to CN202211480119.4A priority Critical patent/CN115797440A/en
Publication of CN115797440A publication Critical patent/CN115797440A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02EREDUCTION OF GREENHOUSE GAS [GHG] EMISSIONS, RELATED TO ENERGY GENERATION, TRANSMISSION OR DISTRIBUTION
    • Y02E60/00Enabling technologies; Technologies with a potential or indirect contribution to GHG emissions mitigation
    • Y02E60/10Energy storage using batteries

Abstract

The application provides a battery core positioning method, a controller and a computer readable storage medium, comprising: acquiring a shot image, and determining an interested area image from the shot image; segmenting the interested region image based on a threshold segmentation algorithm to obtain a first cell image, and calculating a first similarity between the first cell image and the cell template image; matching the interested region images based on a template matching algorithm to obtain a second cell image, and calculating a second similarity between the second cell image and the cell template image; and selecting the first cell image or the second cell image as the cell image to be detected according to the first similarity and the second similarity. According to the method and the device, the threshold segmentation algorithm and the template matching algorithm are combined, the image with high similarity is selected from the first battery cell image and the second battery cell image to serve as the battery cell image to be detected, the interference of environment and battery cell difference on battery cell positioning can be reduced, the accuracy of battery cell position positioning is improved, and the overall detection rate of the battery cell is improved.

Description

Battery cell positioning method, controller and computer readable storage medium
Technical Field
The application belongs to the technical field of battery detection, and particularly relates to a battery cell positioning method, a controller and a computer readable storage medium.
Background
At present, in the production process of a battery, a battery cell is often required to be shot, then a cell area is located from an obtained shot image, and finally appearance detection is performed based on the cell area so as to detect the defect problem on the surface of the cell. However, in an actual detection process, due to the problem of the detection environment or the difference of the battery cells to be detected, the battery cells may be positioned inaccurately, so that the overall detection rate of the battery cells is low.
Disclosure of Invention
The following is a summary of the subject matter described in detail herein. This summary is not intended to limit the scope of the claims.
The embodiment of the application provides a battery cell positioning method, a controller and a computer-readable storage medium, which can improve the accuracy of battery cell position positioning, thereby improving the overall detection rate of a battery cell.
In a first aspect, an embodiment of the present application provides an electrical core positioning method, including: acquiring a shot image, and determining an interested area image from the shot image; segmenting the interested region image based on a threshold segmentation algorithm to obtain a first cell image, and calculating a first similarity between the first cell image and a cell template image; matching the interested region images based on a template matching algorithm to obtain a second cell image, and calculating a second similarity between the second cell image and the cell template image; and selecting the first cell image or the second cell image as a cell image to be detected according to the first similarity and the second similarity.
In some embodiments, the segmenting the first cell image from the region of interest based on the threshold segmentation algorithm includes: carrying out gray level processing on the image of the region of interest to obtain a gray level image; segmenting the gray level image based on a preset threshold value to obtain an initial binary image; and acquiring the cell area coordinate of the initial binary image, and intercepting the region-of-interest image to obtain a first cell image corresponding to the cell area coordinate.
In some embodiments, before the obtaining the cell region coordinates of the initial binarized image, the cell positioning method further includes: and determining an interference region smaller than a preset area in the initial binary image, and removing the interference region.
In some embodiments, the calculating a first similarity between the first cell image and the cell template image includes: performing binarization processing on the first battery cell image to obtain a first battery cell binarization image, and determining a first area of a target color area in the first battery cell binarization image; performing binarization processing on the battery cell template image to obtain a battery cell template binarization image, and determining a reference area of a target color area in the battery cell template binarization image; and calculating a first similarity between the first cell image and the cell template image according to the first area and the reference area.
In some embodiments, the obtaining, by matching from the region of interest image based on a template matching algorithm, a second cell image includes: acquiring an image of a cell template; sliding traversing the battery cell template image on the region-of-interest image to obtain a plurality of return values; determining a target return value from a plurality of said return values; and determining a corresponding sliding region in the region-of-interest image according to the target return value, and taking the image of the sliding region as a second cell image.
In some embodiments, the performing a sliding traversal on the cell template image on the region of interest image includes: performing sliding traversal on the battery cell template image on the region-of-interest image based on a preset matching function;
determining a target return value from the plurality of return values comprises determining the target return value from the plurality of return values according to a matching parameter in the preset matching function.
In some embodiments, the calculating a second similarity between the second cell image and the cell template image includes: performing binarization processing on the second battery cell image to obtain a second battery cell binarization image, and determining a second area of a target color area in the second battery cell binarization image; performing binarization processing on the battery cell template image to obtain a battery cell template binarization image, and determining a reference area of a target color area in the battery cell template binarization image; and calculating a second similarity between the second cell image and the cell template image according to the second area and the reference area.
In some embodiments, the selecting, according to the first similarity and the second similarity, the first cell image or the second cell image as the cell image to be detected includes at least one of: when the first similarity is larger than the second similarity, selecting the first cell image as a cell image to be detected; when the first similarity is smaller than the second similarity, selecting the second cell image as a cell image to be detected; and when the first similarity is equal to the second similarity, selecting the first cell image or the second cell image as a cell image to be detected.
In a second aspect, an embodiment of the present application further provides a controller, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, where when the processor executes the computer program, the method for positioning a cell according to the first aspect is performed.
In a third aspect, an embodiment of the present application further provides a computer-readable storage medium, where computer-executable instructions are stored, and the computer-executable instructions are configured to execute the battery cell positioning method according to the first aspect.
The technical scheme of the embodiment of the application includes but is not limited to the following technical effects: firstly, a shot image is obtained, and an interested area image is determined from the shot image; then, the embodiment of the application segments the region-of-interest image based on a threshold segmentation algorithm to obtain a first cell image, and calculates a first similarity between the first cell image and the cell template image; in addition, a second cell image is obtained by matching from the interested region image based on a template matching algorithm, and a second similarity between the second cell image and the cell template image is calculated; finally, according to the first similarity and the second similarity, the first cell image or the second cell image is selected as the cell image to be detected. According to the method and the device, the threshold segmentation algorithm and the template matching algorithm are combined, the image with higher similarity is selected from the first battery cell image and the second battery cell image to serve as the battery cell image to be detected, the interference of the detection environment and the battery cell difference problem to battery cell positioning can be reduced, the embodiment of the application has the advantages that the universality is strong, the positioning parameters do not need to be adjusted, the accuracy of battery cell position positioning can be improved, and the overall detection rate of the battery cell is improved.
Additional features and advantages of the application will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by the practice of the application. The objectives and other advantages of the application may be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
Drawings
The accompanying drawings are included to provide a further understanding of the invention, and are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the example serve to explain the principles of the invention.
Fig. 1 is a schematic diagram of a system architecture platform for performing a cell positioning method according to an embodiment of the present application;
fig. 2 is a flowchart of a cell positioning method according to an embodiment of the present application;
fig. 3 is a flowchart of a cell positioning method according to another embodiment of the present application;
fig. 4 is a flowchart of a cell positioning method according to another embodiment of the present application;
fig. 5 is a flowchart of a cell positioning method according to another embodiment of the present application;
fig. 6 is a flowchart of a cell positioning method according to another embodiment of the present application;
fig. 7 is a flowchart of a cell positioning method according to another embodiment of the present application;
fig. 8 is a flowchart of a cell positioning method according to another embodiment of the present application;
fig. 9 is a flowchart of a cell positioning method according to another embodiment of the present application;
fig. 10 is a flowchart of a cell positioning method according to another embodiment of the present application;
fig. 11 is a flowchart of a cell positioning method according to another embodiment of the present application;
FIG. 12 is a schematic illustration of a captured image provided by one embodiment of the present application;
FIG. 13 is a schematic illustration of an image of a region of interest provided by an embodiment of the present application;
FIG. 14 is a schematic diagram of an initial binarized image provided by an embodiment of the present application;
FIG. 15 is a schematic diagram of an initial binarized image after an interference region is removed according to an embodiment of the present application;
fig. 16 is a schematic diagram of a first cell image provided by an embodiment of the present application;
fig. 17 is a schematic diagram of a cell template image provided in an embodiment of the present application;
fig. 18 is a schematic diagram of a second cell image according to an embodiment of the present application.
Detailed Description
Reference will now be made in detail to embodiments of the present application, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the drawings are exemplary only for the purpose of explaining the present application and are not to be construed as limiting the present application.
In the description of the present application, it is to be understood that the positional descriptions, such as the directions of up, down, front, rear, left, right, etc., referred to herein are based on the directions or positional relationships shown in the drawings, and are only for convenience of description and simplification of description, and do not indicate or imply that the referred device or element must have a specific direction, be constructed and operated in a specific direction, and thus, should not be construed as limiting the present application.
In the description of the present application, the meaning of a plurality is one or more, the meaning of a plurality is two or more, and larger, smaller, larger, etc. are understood as excluding the present number, and larger, smaller, inner, etc. are understood as including the present number. If the first and second are described for the purpose of distinguishing technical features, they are not to be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated or implicitly indicating the precedence of the technical features indicated.
In the description of the present application, unless otherwise specifically limited, terms such as set, installed, connected and the like should be understood broadly, and those skilled in the art can reasonably determine the specific meanings of the above terms in the present application in combination with the specific contents of the technical solutions.
In some cases, in a production process of a battery, a battery cell often needs to be photographed, a cell area is located from an obtained photographed image, and finally appearance detection is performed based on the cell area to detect a defect problem on a cell surface. However, in an actual detection process, due to the problem of the detection environment or the difference of the battery cells to be detected, the battery cells may be positioned inaccurately, so that the overall detection rate of the battery cells is low.
Based on the foregoing situation, embodiments of the present application provide a battery cell positioning method, a controller, and a computer-readable storage medium, which can improve accuracy of battery cell position positioning, thereby improving an overall detection rate of a battery cell.
The embodiments of the present application will be further explained with reference to the drawings.
As shown in fig. 1, fig. 1 is a schematic diagram of a system architecture platform for executing a cell positioning method according to an embodiment of the present disclosure.
The system architecture platform 100 of the present embodiment includes one or more processors 110 and a memory 120, and fig. 1 illustrates one processor 110 and one memory 120 as an example.
The processor 110 and the memory 120 may be connected by a bus or other means, such as by a bus in FIG. 1.
The memory 120, which is a non-transitory computer readable storage medium, may be used to store non-transitory software programs as well as non-transitory computer executable programs. Further, the memory 120 may include high speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, memory 120 optionally includes memory 120 located remotely from processor 110, which may be connected to system architecture platform 100 via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
Those skilled in the art will appreciate that the device architecture shown in fig. 1 does not constitute a limitation of system architecture platform 100, and may include more or fewer components than shown, or some components in combination, or a different arrangement of components.
In the system architecture platform 100 shown in fig. 1, the processor 110 may be configured to call a cell positioning program stored in the memory 120, so as to implement the cell positioning method.
Based on the hardware structure of the system architecture platform, various embodiments of the battery cell positioning method are provided.
As shown in fig. 2, fig. 2 is a flowchart of a cell positioning method according to an embodiment of the present application. The battery cell positioning method includes, but is not limited to, step S100, step S200, step S300, and step S400.
S100, acquiring a shot image, and determining an interested area image from the shot image;
s200, segmenting the image of the region of interest based on a threshold segmentation algorithm to obtain a first cell image, and calculating a first similarity between the first cell image and the cell template image;
step S300, matching the images in the region of interest based on a template matching algorithm to obtain a second cell image, and calculating a second similarity between the second cell image and the cell template image;
and S400, selecting the first cell image or the second cell image as a cell image to be detected according to the first similarity and the second similarity.
In an embodiment, the battery is photographed in the embodiment of the present application, and since interference items such as jigs, manipulators, backgrounds, and the like around the battery are also photographed during photographing, as shown in fig. 12, an area of interest is first defined from a photographed image in the embodiment of the present application, so as to determine an area of interest image, as shown in fig. 13, and then the electric core can be subsequently positioned in a set range, thereby reducing the amount of calculation; then, the embodiment of the application simultaneously adopts a threshold segmentation algorithm and a template matching algorithm to process the images of the region of interest, so as to respectively obtain a first cell image and a second cell image; then, calculating the similarity between the first cell image and the second cell image and the cell template image respectively; and finally, selecting an image with higher similarity from the first cell image and the second cell image as a cell image to be detected.
According to the technical scheme of the embodiment of the application, the threshold segmentation algorithm and the template matching algorithm are combined, the image with higher similarity is selected from the first battery cell image and the second battery cell image to serve as the battery cell image to be detected, the interference of the detection environment and the battery cell difference problem on battery cell positioning can be reduced, the embodiment of the application has strong universality, positioning parameters do not need to be adjusted, the accuracy of battery cell position positioning can be improved, and the overall detection rate of the battery cell is improved.
In addition, as shown in fig. 3, fig. 3 is a flowchart of a cell positioning method provided in another embodiment of the present application. Regarding the step S200 of segmenting the first cell image from the region of interest based on the threshold segmentation algorithm, the method may include, but is not limited to, step S510, step S520, and step S540.
Step S510, carrying out gray processing on the image of the region of interest to obtain a gray image;
step S520, segmenting the gray level image based on a preset threshold value to obtain an initial binary image;
and S540, obtaining the cell area coordinates of the initial binary image, and intercepting a first cell image corresponding to the cell area coordinates from the region-of-interest image.
In an embodiment, for a threshold segmentation algorithm, gray processing is performed on an image of an area of interest first to obtain a gray image, wherein each pixel point in the gray image corresponds to a gray value, and the value range of the gray value can be 0 to 255; then, in the embodiment of the present application, a preset threshold is set, where the preset threshold is located between 0 and 255, and the gray image is segmented by using the preset threshold, so that the gray value of the pixel point whose gray value in the gray image is greater than the preset threshold is set to 255, and the gray value of the pixel point whose gray value in the gray image is less than the preset threshold is set to 0, so as to obtain an initial binary image, as shown in fig. 14; since the initial binarized image may have a white region and a black region, for example, the white region is a cell region, and the black region is an interference item region, then the embodiment of the present application may obtain coordinates of the cell region, and map the coordinates into an image of a region of interest, and intercept a corresponding first cell image in the image of the region of interest, as shown in fig. 16.
In addition, as shown in fig. 4, fig. 4 is a flowchart of a cell positioning method according to another embodiment of the present application. Before step S540, the method may further include, but is not limited to, step S530.
And step S530, determining an interference area smaller than a preset area in the initial binary image, and removing the interference area.
In one embodiment, after obtaining the initial binary image, the embodiment of the present application may remove some interference terms, such as a small white spot and an edge undetected region, i.e., remove a white region with a small area, as shown in fig. 15.
In addition, as shown in fig. 5, fig. 5 is a flowchart of a cell positioning method provided in another embodiment of the present application. Regarding the calculating of the first similarity between the first cell image and the cell template image in step S200, the calculating may include, but is not limited to, step S610, step S620, and step S630.
Step S610, performing binarization processing on the first battery cell image to obtain a first battery cell binarization image, and determining a first area of a target color area in the first battery cell binarization image;
step S620, carrying out binarization processing on the cell template image to obtain a cell template binarization image, and determining a reference area of a target color area in the cell template binarization image;
step S630, calculating a first similarity between the first cell image and the cell template image according to the first area and the reference area.
In an embodiment, a process of calculating the first similarity between the first cell image and the cell template image specifically includes the following steps: firstly, binarizing a first battery cell image to obtain a first battery cell binarized image, and then calculating a first area of a white area in the first battery cell binarized image, namely the area of a battery cell area; the battery cell template image is binarized to obtain a battery cell template binarized image, and then the reference area of a white area in the battery cell template binarized image, namely the area of a battery cell area, is calculated; finally, the first area and the reference area are compared, for example, the area difference or the area ratio between the first area and the reference area is calculated, and then the first similarity between the first cell image and the cell template image is obtained.
In addition, as shown in fig. 6, fig. 6 is a flowchart of a cell positioning method according to another embodiment of the present application. Regarding the step S300 of obtaining the second cell image from the region of interest based on the template matching algorithm, the steps may include, but are not limited to, step S710, step S720, step S730, and step S740.
Step S710, obtaining an electric core template image;
s720, traversing the cell template image on the interested area image in a sliding manner to obtain a plurality of return values;
step S730, determining a target return value from the plurality of return values;
and step S740, determining a corresponding sliding region in the region-of-interest image according to the target return value, and taking the image of the sliding region as a second cell image.
In an embodiment, first, a cell template image needs to be created in the embodiment of the present application, as shown in fig. 17, specifically, an area to be located is cut out as a template, for example, after a sample diagram of a cell of the model is obtained, the size of the sample diagram is cut according to a set size of a result diagram, and the cell area is approximately located at the center of the template; then, sliding the cell template image on the region-of-interest image, and traversing all pixels one by one to complete matching, wherein when the cell template image slides to a position, the embodiment of the application calculates the matching degree, namely a return value, between the cell template image and the image at the position, and as the embodiment of the application traverses all pixels, a plurality of return values are obtained; then, because the numerical value of each return value represents different matching degrees, the return value corresponding to the highest matching degree is screened from the multiple return values as the target return value in the embodiment of the application; finally, a slip region during the initial pass is determined from the target return value, and then an image of the slip region is cut out as a second cell image, as shown in fig. 18.
In addition, as shown in fig. 7, fig. 7 is a flowchart of a cell positioning method provided in another embodiment of the present application. The obtaining of the second cell image from the region of interest image based on the template matching algorithm in step S300 may include, but is not limited to, step S810, step S820, step S830, and step S840.
Step S810, acquiring a cell template image;
step S820, performing sliding traversal on the cell template image on the region-of-interest image based on a preset matching function to obtain a plurality of return values;
step S830, determining a target return value from the multiple return values according to the matching parameters in the preset matching function;
and step 840, determining a corresponding sliding region in the region-of-interest image according to the target return value, and taking the image of the sliding region as a second cell image.
In an embodiment, first, a cell template image needs to be created, specifically, an area to be located is cut out as a template, for example, after a sample diagram of a cell of the model is obtained, the size of the sample diagram is cut according to a set size of a result diagram, and the cell area is approximately located in the center of the template; then, sliding the cell template image on the image of the region of interest based on a preset matching function, and traversing all pixels one by one to complete matching, wherein when the cell template image slides to a position, the embodiment of the application can calculate the matching degree between the cell template image and the image at the position, namely a return value, and as the embodiment of the application can traverse all pixels, a plurality of return values can be obtained; then, because the value of each return value represents different matching degrees, and because the matching parameters in the preset matching function are different, the value of the return value also represents different matching degrees; therefore, in the embodiment of the application, the return value corresponding to the highest matching degree is screened from the multiple return values according to the matching parameters in the preset matching function and is used as the target return value; and finally, determining a sliding area during the initial pass according to the target return value, and then intercepting an image of the sliding area as a second cell image.
The template matching method is a method of matching a portion most similar to the image B in the current image a, and generally, the image a is referred to as an input image and the image B is referred to as a template image. The template matching method is to slide the template image B on the image a, and traverse all pixels one by one to complete matching. The search is performed by sliding the template image within the input image from the top left corner, traversing the entire input image pixel by pixel to find the best matching portion.
In one embodiment, within OpenCV, template matching is achieved by the function cv2. Matchtemp. The syntax format is:
resu l t = cv2.MatchTemp l ate (image, temp l, method [, mask ]), where image is an original image and must be an 8-bit or 32-bit floating-point type image. temp l is a template image whose size must be smaller than or equal to the original image and of the same type as the original image. method is a matching method, and this parameter is implemented by Temp l ateMatchModes, with a variety of possible values. mask is a template image mask, and it must be of the same type and size as the template image temp l, and normally this value is a default value. Currently, this parameter only supports two values, TM _ SQD I FF and TM _ CCORR _ normal.
The return value resp l t of the function cv2.Matchtemp l ate () is a result set. The type is a single channel 32-bit floating point type. Is formed by the comparison of each position.
For the matching principle, the following is specific:
if the size of the input image (original image) is W H and the size of the template is W H, the size of the return value is (W-W + 1) × (H-H + 1). When template matching is performed, the template is traversed within the original image.
In the horizontal direction: the initial coordinate of traversal is the 1 st pixel value (the sequence number starts from 1) from the left of the original image, and the last comparison is that when the template image is located at the rightmost side of the original image, the position of the pixel point at the upper left corner is W-W +1, so that the size of the return value resu l t in the horizontal direction is W-W +1 (the number of comparisons in the horizontal direction).
In the vertical direction: the initial coordinate of traversal starts from the 1 st pixel at the top of the original image, and the last comparison is that when the template image is located at the lowest end of the original image, the position of the pixel point at the upper left corner is H-H +1. Therefore, the size of the return value resu l t in the vertical direction is H-H +1 (the number of comparisons in the vertical direction).
If the original image size is W H and the stencil size is W H, the size of the returned value is (W-W + 1) × (H-H + 1). That is, the template images are compared (W-W + 1) × (H-H + 1) times within the input image.
It should be noted that the function cv2. Matchtemp. l ate () decides to use different lookup methods by the parameter method. The return value resu l t has different meanings for different lookup methods. For example:
when the method values are cv2.TM _ SQD I FF and cv2.TM _ SQD I FF _ NORMED, a resu l t value of 0 indicates the best matching degree, and a larger value indicates a worse matching degree.
When the method has the values of cv2.TM _ CCORR, cv2.TM _ CCORR _ NORMED, cv2.TM _ CCOEFF and cv2.TM _ CCOEFF _ NORMED, a smaller value of resu l t indicates a poorer matching degree, and a larger value indicates a better matching degree.
In addition, as shown in fig. 8, fig. 8 is a flowchart of a cell positioning method according to another embodiment of the present application. Regarding the calculating of the second similarity between the second cell image and the cell template image in step S300, the calculating may include, but is not limited to, step S910, step S920, and step S930.
Step S910, performing binarization processing on the second battery cell image to obtain a second battery cell binarization image, and determining a second area of a target color area in the second battery cell binarization image;
step S920, performing binarization processing on the cell template image to obtain a cell template binarization image, and determining a reference area of a target color area in the cell template binarization image;
step S930, calculating a second similarity between the second cell image and the cell template image according to the second area and the reference area.
In an embodiment, a process of calculating the second similarity between the second cell image and the cell template image specifically includes the following steps: firstly, binarizing a second battery cell image to obtain a second battery cell binarized image, and then calculating a second area of a white area in the second battery cell binarized image, namely the area of a battery cell area; the battery cell template image is binarized to obtain a battery cell template binarized image, and then the reference area of a white area in the battery cell template binarized image, namely the area of a battery cell area, is calculated; finally, the second area and the reference area are compared, for example, the area difference or the area ratio between the second area and the reference area is calculated, and then the second similarity between the second cell image and the cell template image is obtained.
It should be noted that, regarding the selecting of the first cell image or the second cell image as the to-be-detected cell image according to the first similarity and the second similarity in step S400, the three implementation cases in fig. 9 to fig. 11 may include, but are not limited to, the following:
as shown in fig. 9, fig. 9 is a flowchart of a cell positioning method according to another embodiment of the present application. Regarding the above step S400, steps S1010 and S1020 may be included, but not limited thereto.
Step S1010, when the first similarity is larger than the second similarity;
and S1020, selecting the first cell image as a cell image to be detected.
As shown in fig. 10, fig. 10 is a flowchart of a cell positioning method provided in another embodiment of the present application. Regarding the above step S400, steps S1110 and S1120 may be included, but not limited thereto.
Step S1110, when the first similarity is smaller than the second similarity;
and step 1120, selecting the second cell image as the cell image to be detected.
As shown in fig. 11, fig. 11 is a flowchart of a cell positioning method according to another embodiment of the present application. Regarding the above step S400, steps S1210 and S1220 may be included, but not limited thereto.
Step S1210, when the first similarity is equal to the second similarity;
step S1220, selecting the first cell image or the second cell image as a cell image to be detected.
In an embodiment, in the embodiment of the present application, an image with a higher similarity is selected from the first cell image and the second cell image as a cell image to be detected, where the specific conditions are as follows: if the first similarity is greater than the second similarity, that is, it indicates that the intercepted first cell image is closer to the battery template image, the first cell image may be selected as the cell image to be detected in the embodiment of the application. If the first similarity is smaller than the second similarity, that is, the intercepted second cell image is closer to the battery template image, the second cell image is selected as the cell image to be detected in the embodiment of the application. If the first similarity is equal to the second similarity, that is, the intercepted first electrical core image and the intercepted second electrical core image are both equal to and close to the battery template image, the first electrical core image or the second electrical core image may be randomly selected as the electrical core image to be detected in the embodiment of the application.
Based on the above cell positioning method in each embodiment, the following respectively proposes each embodiment of the controller and the computer-readable storage medium of the present application.
In addition, an embodiment of the present application provides a controller including: a processor, a memory, and a computer program stored on the memory and executable on the processor.
The processor and memory may be connected by a bus or other means.
It should be noted that the controller in this embodiment may include a processor and a memory as in the embodiment shown in fig. 1, both belonging to the same application concept, so that both have the same implementation principle and beneficial effects, and are not described in detail herein.
The non-transitory software programs and instructions required to implement the cell positioning method of the above-described embodiment are stored in the memory, and when executed by the processor, the cell positioning method of the above-described embodiment is executed.
According to the technical scheme of the controller, the threshold segmentation algorithm and the template matching algorithm are combined, the image with higher similarity is selected from the first electric core image and the second electric core image to serve as the electric core image to be detected, the interference of the detection environment and the difference problem of the electric core on the electric core positioning can be reduced, the embodiment of the application has strong universality, the positioning parameters do not need to be adjusted, the accuracy of the electric core position positioning can be improved, and the overall detection rate of the electric core is improved.
It is to be noted that, since the controller according to the embodiment of the present application is capable of executing the cell positioning method according to the embodiment described above, reference may be made to the specific implementation and technical effect of the cell positioning method according to any one of the embodiments described above for the specific implementation and technical effect of the controller according to the embodiment of the present application.
In addition, an embodiment of the present application further provides a computer-readable storage medium, where computer-executable instructions are stored, and the computer-executable instructions are configured to execute the above-mentioned cell positioning method. The method steps in fig. 2 to 11 described above are performed by way of example.
According to the technical scheme of the computer-readable storage medium, the threshold segmentation algorithm and the template matching algorithm are combined, the image with higher similarity is selected from the first electric core image and the second electric core image to serve as the electric core image to be detected, interference of the detection environment and the difference problem of the electric core on electric core positioning can be reduced, the embodiment of the application has strong universality, positioning parameters do not need to be adjusted, the accuracy of electric core position positioning can be improved, and therefore the overall detection rate of the electric core is improved.
It is to be noted that, since the computer-readable storage medium according to the embodiment of the present application can implement the cell positioning method according to the embodiment described above, reference may be made to the specific implementation and technical effect of the cell positioning method according to any embodiment described above.
It will be understood by those of ordinary skill in the art that all or some of the steps, systems, and methods disclosed above may be implemented as software, firmware, hardware, or suitable combinations thereof. Some or all of the physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application specific integrated circuit. Such software may be distributed on computer readable media, which may include computer storage media (or non-transitory media) and communication media (or transitory media). The term computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data, as is well known to those skilled in the art. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital Versatile Disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can accessed by a computer. In addition, communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media as known to those skilled in the art.
While the preferred embodiments of the present invention have been described, the present invention is not limited to the above embodiments, and those skilled in the art can make various equivalent modifications or substitutions without departing from the spirit of the present invention, and such equivalent modifications or substitutions are to be included in the scope of the present invention defined by the claims.

Claims (10)

1. A method for positioning a cell, comprising:
acquiring a shot image, and determining an interested area image from the shot image;
segmenting the interested region image based on a threshold segmentation algorithm to obtain a first cell image, and calculating a first similarity between the first cell image and a cell template image;
matching the interested region images based on a template matching algorithm to obtain a second cell image, and calculating a second similarity between the second cell image and the cell template image;
and selecting the first cell image or the second cell image as a cell image to be detected according to the first similarity and the second similarity.
2. The cell positioning method according to claim 1, wherein the segmenting the region of interest into the first cell image based on the threshold segmentation algorithm includes:
carrying out gray level processing on the image of the region of interest to obtain a gray level image;
segmenting the gray level image based on a preset threshold value to obtain an initial binary image;
and acquiring the cell area coordinate of the initial binary image, and intercepting the region-of-interest image to obtain a first cell image corresponding to the cell area coordinate.
3. The cell positioning method according to claim 2, wherein before the obtaining of the cell region coordinates of the initial binarized image, the cell positioning method further comprises:
and determining an interference region smaller than a preset area in the initial binary image, and removing the interference region.
4. The method according to any of claims 1 to 3, wherein the calculating a first similarity between the first cell image and the cell template image comprises:
performing binarization processing on the first battery cell image to obtain a first battery cell binarization image, and determining a first area of a target color area in the first battery cell binarization image;
performing binarization processing on the battery cell template image to obtain a battery cell template binarization image, and determining a reference area of a target color area in the battery cell template binarization image;
and calculating a first similarity between the first cell image and the cell template image according to the first area and the reference area.
5. The cell positioning method according to claim 1, wherein the obtaining a second cell image by matching from the region-of-interest image based on a template matching algorithm includes:
acquiring an image of a cell template;
sliding traversing the battery cell template image on the region-of-interest image to obtain a plurality of return values;
determining a target return value from a plurality of said return values;
and determining a corresponding sliding region in the region-of-interest image according to the target return value, and taking the image of the sliding region as a second cell image.
6. The cell positioning method according to claim 5, wherein the sliding traversal of the cell template image on the region-of-interest image includes: sliding traversing the battery cell template image on the region-of-interest image based on a preset matching function;
determining a target return value from the plurality of return values comprises determining the target return value from the plurality of return values according to a matching parameter in the preset matching function.
7. The method of any of claims 1, 5 and 6, wherein the calculating the second similarity between the second cell image and the cell template image comprises:
performing binarization processing on the second battery cell image to obtain a second battery cell binarization image, and determining a second area of a target color area in the second battery cell binarization image;
performing binarization processing on the battery cell template image to obtain a battery cell template binarization image, and determining a reference area of a target color area in the battery cell template binarization image;
and calculating a second similarity between the second cell image and the cell template image according to the second area and the reference area.
8. The cell positioning method according to claim 1, wherein the selecting, according to the first similarity and the second similarity, the first cell image or the second cell image as the cell image to be detected includes at least one of:
when the first similarity is larger than the second similarity, selecting the first cell image as a cell image to be detected;
when the first similarity is smaller than the second similarity, selecting the second cell image as a cell image to be detected;
and when the first similarity is equal to the second similarity, selecting the first cell image or the second cell image as a cell image to be detected.
9. A controller comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor executes the computer program to perform the cell positioning method according to any one of claims 1 to 8.
10. A computer-readable storage medium, characterized by storing computer-executable instructions for performing the cell positioning method according to any one of claims 1 to 8.
CN202211480119.4A 2022-11-24 2022-11-24 Battery cell positioning method, controller and computer readable storage medium Pending CN115797440A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211480119.4A CN115797440A (en) 2022-11-24 2022-11-24 Battery cell positioning method, controller and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211480119.4A CN115797440A (en) 2022-11-24 2022-11-24 Battery cell positioning method, controller and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN115797440A true CN115797440A (en) 2023-03-14

Family

ID=85440914

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211480119.4A Pending CN115797440A (en) 2022-11-24 2022-11-24 Battery cell positioning method, controller and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN115797440A (en)

Similar Documents

Publication Publication Date Title
CN111627009B (en) Screen detection method and device and head-mounted display equipment
CN110717489B (en) Method, device and storage medium for identifying text region of OSD (on Screen display)
CN109035304B (en) Target tracking method, medium, computing device and apparatus
US8416314B2 (en) Method and system for processing images
EP2660753B1 (en) Image processing method and apparatus
BR102013024545A2 (en) method deployed using a processor, system, and computer-readable device-based device
CN110349086B (en) Image splicing method under non-concentric imaging condition
CN111582054B (en) Point cloud data processing method and device and obstacle detection method and device
CN113362363B (en) Image automatic labeling method and device based on visual SLAM and storage medium
CN111340749B (en) Image quality detection method, device, equipment and storage medium
CN112598922B (en) Parking space detection method, device, equipment and storage medium
CN112597846B (en) Lane line detection method, lane line detection device, computer device, and storage medium
CN115170571B (en) Method for identifying pathological image of hydrothorax and ascites cells, image identification device and medium
CN108960247B (en) Image significance detection method and device and electronic equipment
CN114332233B (en) Laser SLAM loop detection method and system
CN113902932A (en) Feature extraction method, visual positioning method and device, medium and electronic equipment
EP4350638A1 (en) Detection method and system for base-station feeder line, and related apparatus
CN115797440A (en) Battery cell positioning method, controller and computer readable storage medium
CN115564719A (en) Battery detection method, controller and computer-readable storage medium
CN111738085B (en) System construction method and device for realizing automatic driving simultaneous positioning and mapping
CN115830049A (en) Corner point detection method and device
US20240020846A1 (en) Corner point detection method and apparatus
US20240029240A1 (en) Method and device for detecting imaging consistency of system, and computer storage medium
CN110349183B (en) Tracking method and device based on KCF, electronic equipment and storage medium
CN116563233A (en) Cell defect detection method, device and computer readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination