Method, device, equipment and medium for locating the center of a light spot based on image projection

Through image projection-based methods, including image projection and Gaussian fitting, the problems of complex and inefficient calculation of traditional spot center positioning methods are solved, and fast and efficient spot center positioning is achieved.

CN118411407BActive Publication Date: 2025-04-08TIMACO (BEIJING) IND TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410412962.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-04-07
Publication Date
2025-04-08
Estimated Expiration
2044-04-07

AI Technical Summary

Technical Problem

Traditional methods are used for the complex calculation process of spot center positioning and large data volume, which leads to low detection efficiency and is difficult to meet the needs of rapid positioning during battery winding.

Method used

Using an image projection-based method, by obtaining the battery pole image, extracting the effective detection area of ​​the center of the spot, performing longitudinal and horizontal projection, obtaining a one-dimensional pixel grayscale array, and obtaining the center coordinates of the center of the spot through Gaussian fitting.

Benefits of technology

It effectively reduces the amount of data in the detection process, improves the efficiency of spot center position detection, and meets the demand for rapid positioning of the battery production line.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118411407B_ABST
    Figure CN118411407B_ABST
Patent Text Reader

Abstract

The present invention belongs to the field of image processing, and provides a method, device, equipment and medium for locating the center of a light spot based on image projection. The method includes: obtaining a battery pole piece image, extracting an effective detection area of ​​the center of the light spot; locating the center of the light spot in the effective detection area to obtain a bright area of ​​the light spot; determining the center of the bright area of ​​the light spot, taking the center of the area as the target center position, and demarcating a projection area; longitudinally projecting the projection area to obtain a first pixel grayscale array; transversely projecting the projection area to obtain a second pixel grayscale array; Gaussian fitting the first pixel grayscale array and the second pixel grayscale array respectively to obtain the center coordinates of the center of the light spot. Since the two-dimensional image is converted into a one-bit array, the amount of data in the detection process is effectively reduced, the problem of low detection efficiency of the traditional detection method is solved, and the detection efficiency is improved while ensuring that the accuracy of locating the center of the light spot meets the requirements of the battery production line.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image processing technology, and in particular to a method, device, equipment and medium for locating the center of a light spot based on image projection. Background Art

[0002] On the battery production line, during the winding process of the wound battery, in order to prevent the pole tab from folding and rolling into the inside of the battery cell, a sensor is generally installed to detect whether the pole tab is folded. In order to ensure that the sensor is in the correct installation position, it is necessary to detect the distance from the sensor light spot to the edge of the pole piece. In this process, the position of the center of the light spot needs to be located first.

[0003] In the related technology, two-dimensional Gaussian surface fitting method or centroid method is usually used to detect the position of the center of the light spot, but the calculation process of the above traditional methods is complicated and the amount of data based on the calculation is large. Therefore, the efficiency of the detection of the center of the light spot is low, and it is difficult to meet the demand for rapid positioning of the center of the light spot during the battery winding process. Summary of the invention

[0004] The present invention provides a method, device, equipment and medium for locating the center of a light spot based on image projection, so as to solve the defects of the traditional method that the calculation process is complicated and the amount of data based on which the calculation is based is large, resulting in low efficiency in detecting the center of the light spot.

[0005] In one aspect, the present invention provides a method for locating the center of a light spot based on image projection, comprising:

[0006] Acquire a battery pole piece image, and extract an effective detection area of ​​the center of the light spot from the battery pole piece image;

[0007] Positioning the center of the light spot in the effective detection area to obtain a bright area of ​​the light spot;

[0008] Determine the center of the bright area of ​​the light spot, and use the center of the area as the target center position to delineate a projection area; wherein the projection area is a rectangular area whose length is greater than the circular diameter of the bright area of ​​the light spot and whose width is less than the circular diameter;

[0009] Performing longitudinal projection on the projection area to obtain a first pixel grayscale array;

[0010] Performing horizontal projection on the projection area to obtain a second pixel grayscale array;

[0011] Gaussian fitting is performed on the first pixel grayscale array and the second pixel grayscale array respectively to obtain the center coordinates of the center of the light spot.

[0012] According to the method for locating the center of a light spot based on image projection provided by the present invention, locating the center of the light spot in the effective detection area to obtain a bright area of ​​the light spot includes:

[0013] Compare the grayscale value of each pixel in the effective detection area with a preset grayscale threshold to determine the target pixel whose grayscale value is less than the preset grayscale threshold;

[0014] All the target pixel points are defined as a bright spot area including the center of the spot circle.

[0015] According to the method for locating the center of a light spot based on image projection provided by the present invention, before comparing the gray value of each pixel point in the effective detection area with a preset gray threshold, the method further includes:

[0016] The effective detection area is binarized to convert the original image corresponding to the effective detection area into a binarized image.

[0017] According to the method for locating the center of a light spot based on image projection provided by the present invention, the projection area is longitudinally projected to obtain a first pixel grayscale array, including:

[0018] Calculate the average grayscale value of each column of pixels in the projection area to obtain the column grayscale average value corresponding to each column;

[0019] The grayscale average values ​​of all the columns are constructed into a one-dimensional first pixel grayscale array.

[0020] According to the method for locating the center of a light spot based on image projection provided by the present invention, the projection area is horizontally projected to obtain a second pixel grayscale array, including:

[0021] Calculate the average grayscale value of each row of pixels in the projection area to obtain the row grayscale average value corresponding to each row;

[0022] The grayscale average values ​​of all the rows are constructed into a one-dimensional second pixel grayscale array.

[0023] According to the method for locating the center of a light spot based on image projection provided by the present invention, performing Gaussian fitting on the first pixel grayscale array and the second pixel grayscale array respectively to obtain the center coordinates of the center of the light spot includes:

[0024] Performing Gaussian fitting on the first pixel grayscale array to obtain a first Gaussian curve;

[0025] Determining the ordinate of the center of the light spot according to the center point of the first Gaussian curve;

[0026] Performing Gaussian fitting on the second pixel grayscale array to obtain a second Gaussian curve;

[0027] Determining the horizontal coordinate of the center of the light spot according to the center point of the curve in the second Gaussian curve;

[0028] Based on the ordinate and the abscissa, the center coordinates of the center of the light spot are obtained.

[0029] According to the method for locating the center of a light spot based on image projection provided by the present invention, before performing Gaussian fitting on the first pixel grayscale array and the second pixel grayscale array respectively, the method further includes:

[0030] respectively extracting abnormal data points in the first pixel grayscale array and the second pixel grayscale array;

[0031] The abnormal data point is corrected based on data points adjacent to the abnormal data point.

[0032] On the other hand, the present invention also provides a light spot center positioning device based on image projection, comprising:

[0033] An acquisition module, used to acquire a battery pole piece image and extract an effective detection area of ​​the center of the light spot from the battery pole piece image;

[0034] A positioning module, used to locate the center of the light spot in the effective detection area to obtain a bright area of ​​the light spot;

[0035] A delineation module, used to determine the center of the bright area of ​​the light spot, and use the center of the area as the target center position to delineate a projection area; wherein the projection area is a rectangular area whose length is greater than the circular diameter of the bright area of ​​the light spot and whose width is less than the circular diameter;

[0036] A longitudinal projection module, used for performing longitudinal projection on the projection area to obtain a first pixel grayscale array;

[0037] A lateral projection module, used for performing lateral projection on the projection area to obtain a second pixel grayscale array;

[0038] The fitting module is used to perform Gaussian fitting on the first pixel grayscale array and the second pixel grayscale array respectively to obtain the center coordinates of the center of the light spot.

[0039] On the other hand, the present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, a method for locating the center of a light spot based on image projection as described above is implemented.

[0040] On the other hand, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements any of the above-described methods for locating the center of a light spot based on image projection.

[0041] The method, device, equipment and medium for locating the center of a light spot based on image projection provided by the present invention extract the effective detection area of ​​the center of the light spot from the battery pole piece image, locate the center of the light spot in the effective detection area, obtain the bright area of ​​the light spot, determine the area center of the bright area of ​​the light spot, and use the area center as the target center position to delineate the projection area, perform longitudinal and longitudinal projection on the projection area to obtain the first pixel grayscale array and the second pixel grayscale array, perform Gaussian fitting on the first pixel grayscale array and the second pixel grayscale array respectively, and obtain the center coordinates of the center of the light spot. Since the projection area is delineated and the two-dimensional image is converted into a one-bit array by means of horizontal and longitudinal projection, the amount of data in the detection process can be effectively reduced, the problem of low detection efficiency of the traditional detection method is solved, and the detection efficiency of the center position of the light spot is effectively improved while ensuring that the positioning accuracy of the center of the light spot meets the requirements of the battery production line. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0043] Figure 1 is a schematic flow chart of a method for locating the center of a light spot based on image projection provided by an embodiment of the present invention;

[0044] Figure 2 is a schematic diagram of the distribution of effective detection areas in a battery electrode image in an embodiment of the present invention;

[0045] Figure 3 is a schematic diagram of the distribution of the bright area of ​​the light spot in an embodiment of the present invention;

[0046] Figure 4 is a schematic diagram of the distribution of projection areas in an embodiment of the present invention;

[0047] Figure 5 is a structural schematic diagram of a light spot center positioning device based on image projection provided by an embodiment of the present invention;

[0048] Figure 6 It is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0049] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0050] Combine the following Figures 1 to 6 The detailed scheme of the method, device, equipment and medium for locating the center of a light spot based on image projection provided by an embodiment of the present invention is described.

[0051] Figure 1 It is a flow chart of a method for locating the center of a light spot based on image projection provided in an embodiment of the present invention.

[0052] like Figure 1 As shown, the method for locating the center of a light spot based on image projection provided by an embodiment of the present invention can be performed by an electronic device having data receiving and sending and data processing functions. The method mainly includes the following steps:

[0053] Step 110: Acquire a battery pole piece image, and extract an effective detection area of ​​the center of the light spot from the battery pole piece image.

[0054] In this embodiment, the battery pole piece image can be captured by an industrial camera, and the captured battery pole piece image includes the pole ear on the battery pole piece. In practical applications, the industrial camera can upload the captured battery pole piece image to the execution subject corresponding to the method of this embodiment, thereby realizing accurate acquisition of the battery pole piece image.

[0055] In some embodiments, the size and position of the effective detection area of ​​the center of the light spot can be pre-selected by the user. For example, the user can manually locate the approximate position of the center of the light spot in the human-computer interaction interface and frame the effective detection area. The effective detection area can be a rectangular area of ​​a pre-set size. Figure 2 The effective detection area 210 in the battery pole piece image is exemplarily shown.

[0056] Step 120: locate the center of the light spot in the effective detection area to obtain the bright area of ​​the light spot.

[0057] In this embodiment, the center of the light spot can be located according to the grayscale difference of each pixel point in the effective detection area. Since the grayscale value of the center of the light spot is relatively low, the area with a smaller grayscale value can be determined as the bright area of ​​the light spot by setting a grayscale threshold.

[0058] It can be understood that the bright area of ​​the light spot is the approximate position of the center of the light spot. Since the grayscale value in the effective detection area has a certain change rule, it usually decreases gradually from the edge of the area to the inside, so the bright area of ​​the light spot is usually a circular area.

[0059] Step 130: determine the center of the bright area of ​​the light spot, and use the center of the area as the target center position to delineate a projection area; wherein the projection area is a rectangular area whose length is greater than the circular diameter of the bright area of ​​the light spot and whose width is less than the circular diameter.

[0060] In this embodiment, after determining the bright area of ​​the light spot, the regional center of the bright area of ​​the light spot can be further determined according to the circle center positioning method. In actual situations, the center of the light spot circle may be the center of the area or a pixel point near the center of the area. In order to further accurately locate the position of the center of the light spot circle, this embodiment uses the center of the area as the target center position and delineates a projection area. The center of the projection area is the center of the area. The projection area is a rectangular area that runs through the bright area of ​​the light spot, and the length of the rectangular area is much greater than its width.

[0061] Step 140: Perform longitudinal projection on the projection area to obtain a first pixel grayscale array.

[0062] Step 150: Perform horizontal projection on the projection area to obtain a second pixel grayscale array.

[0063] In this embodiment, the two-dimensional image can be converted into a one-dimensional array by means of longitudinal projection and transverse projection. By reducing the data dimension, the calculation complexity can be further reduced and the efficiency of locating the center of the light spot can be improved.

[0064] Step 160: Perform Gaussian fitting on the first pixel grayscale array and the second pixel grayscale array respectively to obtain the center coordinates of the light spot circle.

[0065] The solution provided in this embodiment can effectively reduce the amount of data in the detection process by demarcating the projection area and converting the two-dimensional image into a one-bit array through horizontal and vertical projection, thereby solving the problem of low detection efficiency of traditional detection methods, and effectively improving the detection efficiency of the center of the light spot while ensuring that the positioning accuracy of the center of the light spot meets the requirements of the battery production line.

[0066] In one embodiment, the center of the light spot in the effective detection area is located to obtain the bright area of ​​the light spot, which specifically includes:

[0067] Compare the grayscale value of each pixel in the effective detection area with the preset grayscale threshold to determine the target pixel whose grayscale value is less than the preset grayscale threshold;

[0068] All target pixels are defined as the bright area of ​​the light spot containing the center of the light spot.

[0069] In this embodiment, a preset grayscale threshold can be pre-set based on the historical grayscale values ​​of the pixels at the edge of the center of the light spot, and then the target pixels in the effective detection area whose grayscale values ​​are less than the preset grayscale threshold are determined, and all the target pixels are defined as the bright area of ​​the light spot. Figure 3 The distribution of the bright area 310 of the light spot is shown as an example.

[0070] In practical applications, after the bright area of ​​the light spot is preliminarily delineated, there may be some noise points caused by environmental interference during shooting. Subsequently, the preliminarily determined bright area of ​​the light spot can be opened to remove the noise points to ensure the accuracy of the bright area of ​​the light spot.

[0071] In one embodiment, before comparing the grayscale value of each pixel in the effective detection area with the preset grayscale threshold, the method further includes:

[0072] The effective detection area is binarized to convert the original image corresponding to the effective detection area into a binarized image.

[0073] It is understandable that the binarization process can set the grayscale value of the pixel points in the effective detection area to 0 or 255, so that the processed image will only display black and white, forming an obvious black and white effect. This process can be achieved by defining a grayscale processing threshold. When the grayscale value of the pixel point is greater than the grayscale processing threshold, the pixel point is set to white, and the pixel point less than the grayscale processing threshold is set to black.

[0074] The setting of the grayscale processing threshold depends on the specific application requirements. It can be adaptively adjusted according to the grayscale distribution of the target area and the background area in the effective detection area so as to highlight the outline of the target area more clearly. The subsequent division of the bright area of ​​the light spot can be performed on the basis of the binary image corresponding to the effective detection area to simplify the subsequent image analysis and processing tasks.

[0075] In some embodiments, it is assumed that the coordinates of the center of the bright area of ​​the light spot are ( x 1 , y 1 ),by( x 1 , y 1 ) generates a rectangular area with a length that runs through the entire bright area of ​​the light spot and a width that is smaller than the circular diameter of the bright area of ​​the light spot for the target center position, namely the projection area. In practical applications, the width of the projection area can be preset, for example, set to 20 mm. Figure 4The distribution of the projection area 410 is shown as an example.

[0076] In one embodiment, performing longitudinal projection on the projection area to obtain a first pixel grayscale array specifically includes:

[0077] Calculate the average grayscale value of each column of pixels in the projection area to obtain the column grayscale average value corresponding to each column;

[0078] The average grayscale values ​​of all columns are constructed into a one-dimensional grayscale array of the first pixel.

[0079] In this embodiment, the longitudinal projection can be understood as a process of averaging the grayscale values ​​of each column of pixels in the projection area, so that each column corresponds to a column grayscale average value, thereby realizing one-dimensional conversion of longitudinal data.

[0080] In practical applications, in the process of calculating the average grayscale value of each column of pixels in the projection area, a weighted average method can be used. According to the variation law of the pixel grayscale in the column direction, the weighted value of each pixel in the column direction can be set specifically. For example, the grayscale value of the pixel in the column direction can be in the form of from trough to peak and then from peak to trough, which is consistent with the variation law of the grayscale value of the pixel in the column direction.

[0081] In one embodiment, performing horizontal projection on the projection area to obtain a second pixel grayscale array specifically includes:

[0082] Calculate the average grayscale value of each row of pixels in the projection area to obtain the row grayscale average value corresponding to each row;

[0083] The average grayscale values ​​of all rows are constructed into a one-dimensional second pixel grayscale array.

[0084] In this embodiment, the horizontal projection can be understood as a process of averaging the grayscale values ​​of each row of pixels in the projection area, so that each row corresponds to a row grayscale average value, thereby realizing one-dimensional conversion of horizontal data.

[0085] In practical applications, in the process of calculating the average grayscale value of each row of pixels in the projection area, a weighted average method can be used. According to the variation law of the pixel grayscale in the row direction, the weighted value of each pixel in the row direction can be set specifically. For example, the grayscale value of the pixel in the row direction can be in the form of from trough to peak and then from peak to trough, which is consistent with the variation law of the grayscale value of the pixel in the row direction.

[0086] In one embodiment, Gaussian fitting is performed on the first pixel grayscale array and the second pixel grayscale array respectively to obtain the center coordinates of the center of the light spot, specifically including:

[0087] On the one hand, firstly, Gaussian fitting is performed on the first pixel grayscale array to obtain a first Gaussian curve.

[0088] Then, the ordinate of the center of the light spot is determined according to the center point of the first Gaussian curve.

[0089] In practical applications, since the data change law of the first pixel grayscale array is not completely consistent with the change law of the Gaussian curve, in order to facilitate the determination of the vertical coordinate of the center of the light spot after fitting, all positive numbers in the first pixel grayscale array can be transformed into negative numbers by adding negative signs to obtain a first negative grayscale array. After Gaussian fitting is performed on the first negative grayscale array, the peak position of the first Gaussian curve obtained is the center point of the curve.

[0090] On the other hand, first, Gaussian fitting is performed on the second pixel grayscale array to obtain a second Gaussian curve.

[0091] Then, the abscissa of the center of the light spot is determined according to the center point of the curve in the second Gaussian curve.

[0092] In practical applications, since the data change law of the second pixel grayscale array is not completely consistent with the change law of the Gaussian curve, in order to facilitate the determination of the horizontal coordinate of the center of the light spot after fitting, all positive numbers in the second pixel grayscale array can be transformed into negative numbers by adding negative signs to obtain a second negative grayscale array. After Gaussian fitting is performed on the second negative grayscale array, the peak position of the obtained second Gaussian curve is the center point of the curve.

[0093] Finally, based on the ordinate and abscissa, the coordinates of the center of the light spot are obtained.

[0094] The method for locating the center of the light spot provided in this embodiment can directly realize the positioning of the center of the light spot through one-dimensional Gaussian fitting. Compared with the two-dimensional Gaussian fitting method, the amount of data calculation is effectively reduced and the positioning efficiency is significantly improved.

[0095] In one embodiment, before performing Gaussian fitting on the first pixel grayscale array and the second pixel grayscale array respectively, the method further includes:

[0096] Extract abnormal data points in the first pixel grayscale array and the second pixel grayscale array respectively;

[0097] The abnormal data point is corrected based on the data points adjacent to the abnormal data point.

[0098] In this embodiment, considering that there may be abnormal data points in the first pixel grayscale array and the second pixel grayscale array due to measurement errors or calculation errors, the presence of abnormal data points will affect the Gaussian fitting effect, and further affect the positioning accuracy of the center of the light spot. Therefore, this embodiment can reduce the impact of abnormal data points by extracting abnormal data points and correcting them.

[0099] In some embodiments, after extracting an abnormal data point, if the abnormal data point is a discontinuous data point, the previous data point before the abnormal data point and the next data point after the abnormal data point can be obtained, and the grayscale values ​​of the previous data point and the next data point are used to calculate the grayscale mean, and the current grayscale value of the abnormal data point is replaced by the obtained grayscale mean to achieve correction of the abnormal data point.

[0100] In some other embodiments, after the abnormal data points are extracted, if the abnormal data points are multiple continuous data points, the multiple continuous abnormal data points can be taken as an abnormal array, and the first N data points before the abnormal array and the last N data points after the abnormal array are obtained, where N is equal to the number of the multiple continuous abnormal data points. The grayscale values ​​of the first N data points are calculated as the grayscale mean, and the grayscale values ​​of the last N data points are calculated as the grayscale mean. The current grayscale value of the first abnormal data point in the abnormal array is replaced by the grayscale mean obtained from the first N data points, and the current grayscale value of the last data point in the abnormal array is replaced by the grayscale mean obtained from the last N data points.

[0101] Afterwards, a plurality of grayscale values ​​are randomly selected between the grayscale values ​​of the first data point and the last data point in the abnormal array after the preliminary replacement, so as to replace the grayscale values ​​of the abnormal data points between the first data point and the last data point in the abnormal array, thereby achieving correction of each abnormal data point in the entire abnormal array.

[0102] In practical applications, after obtaining the center coordinates of the light spot circle, in order to further verify the accuracy of the obtained center coordinates of the light spot circle, the following operations can be performed:

[0103] First, taking the center coordinate of the circle as the center, at least one pixel ring adjacent to the center coordinate of the circle is obtained, wherein the pixel ring is a circular line surrounded by a plurality of pixel points.

[0104] Then, it is determined whether the grayscale value of each pixel point in each pixel ring is greater than the grayscale value corresponding to the coordinates of the circle center to obtain a determination result.

[0105] Finally, according to the judgment result, it can be determined whether the current center coordinates are correct. Specifically, if the judgment result is yes, it means that the grayscale values ​​of the pixels around the center coordinates are higher than the grayscale value at the center coordinates, indicating that the location of the center coordinates is the brightest position, which proves that the current center coordinates are correct. If the judgment result is no, it means that there are pixels around the center coordinates with a lower grayscale value than the center coordinates, indicating that the location of the center coordinates is not the brightest position, which proves that the current center coordinates may be wrong, and it is necessary to further determine more accurate center coordinates.

[0106] For example, it is possible to determine one by one whether a pixel point whose grayscale value is lower than the current center coordinate is an abnormal data point. For example, a preset number of pixels around the pixel point can be obtained, and whether there is a certain regularity in the change of grayscale values ​​between the pixel point and the preset number of surrounding pixels. If the grayscale value changes irregularly, or the grayscale value of the pixel point is significantly reduced at the current position, it can be determined that the pixel point is an abnormal data point, which further proves that the pixel point does not affect the center coordinates of the light spot circle center obtained by the previous positioning.

[0107] In this embodiment, by verifying the center coordinates of the light spot center obtained by positioning, the accuracy of the light spot center position finally positioned can be further guaranteed. If there is a positioning error, the current center coordinates can be corrected based on the pixel points whose grayscale values ​​are lower than the current center coordinates during the verification process to ensure the positioning accuracy of the light spot center.

[0108] Based on the same general inventive concept, the present invention also protects a light spot center positioning device based on image projection. The light spot center positioning device based on image projection provided by the present invention is described below. The light spot center positioning device based on image projection described below and the light spot center positioning method based on image projection described above can be referenced to each other.

[0109] Figure 5 It is a structural schematic diagram of a light spot center positioning device based on image projection provided by an embodiment of the present invention.

[0110] like Figure 5 As shown, the light spot center positioning device based on image projection provided by an embodiment of the present invention specifically includes:

[0111] The acquisition module 510 is used to acquire the battery pole piece image and extract the effective detection area of ​​the center of the light spot from the battery pole piece image.

[0112] The positioning module 520 is used to locate the center of the light spot in the effective detection area to obtain the bright area of ​​the light spot.

[0113] The demarcation module 530 is used to determine the center of the bright area of ​​the light spot, and use the center of the area as the target center position to demarcate the projection area; wherein the projection area is a rectangular area whose length is greater than the circular diameter of the bright area of ​​the light spot and whose width is less than the circular diameter.

[0114] The longitudinal projection module 540 is used to perform longitudinal projection on the projection area to obtain a first pixel grayscale array.

[0115] The transverse projection module 550 is used to perform transverse projection on the projection area to obtain a second pixel grayscale array.

[0116] The fitting module 560 is used to perform Gaussian fitting on the first pixel grayscale array and the second pixel grayscale array respectively to obtain the center coordinates of the center of the light spot.

[0117] In one embodiment, the positioning module 520 specifically includes:

[0118] A comparison unit, used to compare the gray value of each pixel in the effective detection area with a preset gray threshold, and determine a target pixel whose gray value is less than the preset gray threshold;

[0119] The demarcation unit is used to demarcate all target pixel points as a light spot bright area containing the center of the light spot circle.

[0120] In one embodiment, the positioning module 520 may further include:

[0121] The binarization unit is used to perform binarization processing on the effective detection area to convert the original image corresponding to the effective detection area into a binarized image.

[0122] In one embodiment, the vertical projection module 540 is specifically used for:

[0123] Calculate the average grayscale value of each column of pixels in the projection area to obtain the column grayscale average value corresponding to each column;

[0124] The average grayscale values ​​of all columns are constructed into a one-dimensional grayscale array of the first pixel.

[0125] In one embodiment, the lateral projection module 550 is specifically used for:

[0126] Calculate the average grayscale value of each row of pixels in the projection area to obtain the row grayscale average value corresponding to each row;

[0127] The average grayscale values ​​of all rows are constructed into a one-dimensional second pixel grayscale array.

[0128] In one embodiment, the fitting module 560 specifically includes:

[0129] The first fitting unit is used to perform Gaussian fitting on the first pixel grayscale array to obtain a first Gaussian curve.

[0130] The first determining unit is used to determine the ordinate of the center of the light spot according to the center point of the curve in the first Gaussian curve.

[0131] The second fitting unit is used to perform Gaussian fitting on the second pixel grayscale array to obtain a second Gaussian curve.

[0132] The second determining unit is used to determine the horizontal coordinate of the center of the light spot according to the center point of the curve in the second Gaussian curve.

[0133] The processing unit is used to obtain the center coordinates of the center of the light spot based on the ordinate and the abscissa.

[0134] In one embodiment, the fitting module 560 may further include:

[0135] The extraction unit is used to extract abnormal data points in the first pixel grayscale array and the second pixel grayscale array respectively.

[0136] The correction unit is used to correct the abnormal data point based on data points adjacent to the abnormal data point.

[0137] The light spot center positioning device based on image projection provided by the embodiment of the present invention extracts the effective detection area of ​​the light spot center from the battery pole piece image, locates the light spot center in the effective detection area, obtains the light spot bright area, determines the area center of the light spot bright area, and uses the area center as the target center position, delineates the projection area, performs longitudinal projection and longitudinal projection on the projection area, obtains the first pixel grayscale array and the second pixel grayscale array, performs Gaussian fitting on the first pixel grayscale array and the second pixel grayscale array respectively, and obtains the center coordinates of the light spot center. Since the projection area is delineated and the two-dimensional image is converted into a one-bit array by means of horizontal and longitudinal projection, the amount of data in the detection process can be effectively reduced, the problem of low detection efficiency of the traditional detection method is solved, and the detection efficiency of the light spot center position is effectively improved while ensuring that the positioning accuracy of the light spot center meets the requirements of the battery production line.

[0138] Figure 6 It is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention.

[0139] like Figure 6As shown, the electronic device may include: a processor 610, a communication interface 620, a memory 630 and a communication bus 640, wherein the processor 610, the communication interface 620 and the memory 630 communicate with each other through the communication bus 640. The processor 610 may call the logic instructions in the memory 630 to execute a method for locating the center of a light spot based on image projection, the method comprising: acquiring a battery pole piece image, and extracting an effective detection area of ​​the center of the light spot from the battery pole piece image; locating the center of the light spot in the effective detection area to obtain a bright area of ​​the light spot; determining the center of the bright area of ​​the light spot, and taking the center of the area as the target center position to delineate a projection area; wherein the projection area is a rectangular area whose length is greater than the circular diameter of the bright area of ​​the light spot and whose width is less than the circular diameter; performing longitudinal projection on the projection area to obtain a first pixel grayscale array; performing transverse projection on the projection area to obtain a second pixel grayscale array; performing Gaussian fitting on the first pixel grayscale array and the second pixel grayscale array respectively to obtain the center coordinates of the center of the light spot.

[0140] In addition, the logic instructions in the above-mentioned memory 630 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.

[0141] On the other hand, the present invention also provides a computer program product, which includes a computer program, which can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the method for locating the center of a light spot based on image projection provided in the above-mentioned embodiments, and the method includes: acquiring a battery pole piece image, and extracting an effective detection area of ​​the center of a light spot from the battery pole piece image; locating the center of the light spot in the effective detection area to obtain a bright area of ​​the light spot; determining the center of the bright area of ​​the light spot, and using the center of the area as the target center position to delineate a projection area; wherein the projection area is a rectangular area whose length is greater than the circular diameter of the bright area of ​​the light spot and whose width is less than the circular diameter; performing longitudinal projection on the projection area to obtain a first pixel grayscale array; performing transverse projection on the projection area to obtain a second pixel grayscale array; performing Gaussian fitting on the first pixel grayscale array and the second pixel grayscale array, respectively, to obtain the center coordinates of the center of the light spot.

[0142] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method for locating the center of a light spot based on image projection provided in the above-mentioned embodiments, the method comprising: acquiring a battery pole piece image, and extracting an effective detection area of ​​the center of the light spot from the battery pole piece image; locating the center of the light spot in the effective detection area to obtain a bright area of ​​the light spot; determining the center of the bright area of ​​the light spot, and using the center of the area as the target center position to delineate a projection area; wherein the projection area is a rectangular area whose length is greater than the circular diameter of the bright area of ​​the light spot and whose width is less than the circular diameter; performing longitudinal projection on the projection area to obtain a first pixel grayscale array; performing transverse projection on the projection area to obtain a second pixel grayscale array; performing Gaussian fitting on the first pixel grayscale array and the second pixel grayscale array, respectively, to obtain the center coordinates of the center of the light spot.

[0143] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0144] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0145] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for locating the center of a light spot based on image projection, characterized in that: include: Acquire a battery pole piece image, and extract an effective detection area of ​​the center of the light spot from the battery pole piece image; Positioning the center of the light spot in the effective detection area to obtain a bright area of ​​the light spot; Determine the center of the bright area of ​​the light spot, and use the center of the area as the target center position to delineate a projection area; wherein the projection area is a rectangular area whose length is greater than the circular diameter of the bright area of ​​the light spot and whose width is less than the circular diameter; Performing longitudinal projection on the projection area to obtain a first pixel grayscale array, and converting all positive numbers in the first pixel grayscale array into negative numbers by adding negative signs; Performing horizontal projection on the projection area to obtain a second pixel grayscale array, and converting all positive numbers in the second pixel grayscale array into negative numbers by adding negative signs; Performing Gaussian fitting on the first pixel grayscale array and the second pixel grayscale array respectively to obtain the center coordinates of the center of the light spot; The step of performing longitudinal projection on the projection area to obtain a first pixel grayscale array includes: Calculate the average grayscale value of each column of pixels in the projection area to obtain the column grayscale average value corresponding to each column; Constructing all the column grayscale averages into a one-dimensional first pixel grayscale array; The step of performing horizontal projection on the projection area to obtain a second pixel grayscale array includes: Calculate the average grayscale value of each row of pixels in the projection area to obtain the row grayscale average value corresponding to each row; Constructing a one-dimensional second pixel grayscale array by taking all the row grayscale average values; Furthermore, in the process of calculating the average grayscale value of each column of pixels in the projection area, a weighted average method is adopted; wherein the weighted value of the pixels in the column direction is consistent with the change rule of the grayscale value of the pixels in the column direction; In the process of calculating the average grayscale value of each row of pixels in the projection area, a weighted averaging method is adopted; wherein the weighted value of the pixels in the row direction is consistent with the variation rule of the grayscale value of the pixels in the row direction.

2. The method for locating the center of a light spot based on image projection according to claim 1, characterized in that: The positioning of the center of the light spot in the effective detection area to obtain the bright area of ​​the light spot includes: Compare the grayscale value of each pixel in the effective detection area with a preset grayscale threshold to determine the target pixel whose grayscale value is less than the preset grayscale threshold; All the target pixel points are defined as a bright spot area including the center of the spot circle.

3. The method for locating the center of a light spot based on image projection according to claim 2, characterized in that: Before comparing the grayscale value of each pixel in the effective detection area with a preset grayscale threshold, the method further includes: The effective detection area is binarized to convert the original image corresponding to the effective detection area into a binarized image.

4. The method for locating the center of a light spot based on image projection according to claim 1, characterized in that: The performing Gaussian fitting on the first pixel grayscale array and the second pixel grayscale array respectively to obtain the center coordinates of the center of the light spot includes: Performing Gaussian fitting on the first pixel grayscale array to obtain a first Gaussian curve; Determining the ordinate of the center of the light spot according to the center point of the first Gaussian curve; Performing Gaussian fitting on the second pixel grayscale array to obtain a second Gaussian curve; Determining the horizontal coordinate of the center of the light spot according to the center point of the curve in the second Gaussian curve; Based on the ordinate and the abscissa, the center coordinates of the center of the light spot are obtained.

5. The method for locating the center of a light spot based on image projection according to claim 1, characterized in that: Before performing Gaussian fitting on the first pixel grayscale array and the second pixel grayscale array respectively, the method further includes: respectively extracting abnormal data points in the first pixel grayscale array and the second pixel grayscale array; The abnormal data point is corrected based on data points adjacent to the abnormal data point.

6. A light spot center positioning device based on image projection, characterized in that: include: An acquisition module, used to acquire a battery pole piece image and extract an effective detection area of ​​the center of the light spot from the battery pole piece image; A positioning module, used to locate the center of the light spot in the effective detection area to obtain a bright area of ​​the light spot; A delineation module, used to determine the center of the bright area of ​​the light spot, and use the center of the area as the target center position to delineate a projection area; wherein the projection area is a rectangular area whose length is greater than the circular diameter of the bright area of ​​the light spot and whose width is less than the circular diameter; A longitudinal projection module, used for performing longitudinal projection on the projection area to obtain a first pixel grayscale array, and converting all positive numbers in the first pixel grayscale array into negative numbers by adding negative signs; A transverse projection module, used for performing transverse projection on the projection area to obtain a second pixel grayscale array, and converting all positive numbers in the second pixel grayscale array into negative numbers by adding negative signs; A fitting module, used for performing Gaussian fitting on the first pixel grayscale array and the second pixel grayscale array respectively to obtain the center coordinates of the center of the light spot; The projected area is projected longitudinally to obtain a first pixel grayscale array, including: Calculate the average grayscale value of each column of pixels in the projection area to obtain the column grayscale average value corresponding to each column; Constructing all the column grayscale averages into a one-dimensional first pixel grayscale array; The projection area is horizontally projected to obtain a second pixel grayscale array, including: Calculate the average grayscale value of each row of pixels in the projection area to obtain the row grayscale average value corresponding to each row; Constructing a one-dimensional second pixel grayscale array by taking all the row grayscale average values; Furthermore, in the process of calculating the average grayscale value of each column of pixels in the projection area, a weighted average method is adopted; wherein the weighted value of the pixels in the column direction is consistent with the change rule of the grayscale value of the pixels in the column direction; In the process of calculating the average grayscale value of each row of pixels in the projection area, a weighted averaging method is adopted; wherein the weighted value of the pixels in the row direction is consistent with the variation rule of the grayscale value of the pixels in the row direction.

7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the method for locating the center of a light spot based on image projection as described in any one of claims 1 to 5 is implemented.

8. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for locating the center of a light spot based on image projection as claimed in any one of claims 1 to 5 is implemented.

Citation Information

Patent Citations

  • Crane track laser measurement light spot center positioning method

    CN112288802A

  • Method and device for positioning center of light spot in atmospheric turbulence

    CN117315011A