Method and system for detecting number of tabs and computer program product

Through the methods of polar ear image acquisition and Gaussian line feature extraction, the problems of low detection efficiency and poor adaptability of lithium battery electrode number are solved, and fast and accurate detection results are achieved, and the detection effect with strong anti-interference in complex environments is strong.

CN119130922APending Publication Date: 2024-12-13GUANGDONG AOPUTE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411127467.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-15
Publication Date
2024-12-13

AI Technical Summary

Technical Problem

The existing lithium battery ear number detection method relies on manual labor, has low efficiency and high error rate, and the deep learning model-based methods cannot adapt to different detection environments and needs in real time.

Method used

The methods of polar ear image acquisition, ROI area determination, single-channel image extraction, Gaussian line feature extraction, noise sub-contour removal and sub-contour merging are used to determine whether the number of polar ears meets the preset standards and realize automated detection.

Benefits of technology

It realizes fast and accurate detection of extreme ear quantity, adapts to various detection environments and needs, has strong noise resistance, and the results are stable and accurate.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119130922A_ABST
    Figure CN119130922A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of visual inspection, and discloses a tab number detection method and system and a computer program product. The detection method comprises the following steps: carrying out single-channel extraction on an image in an ROI (Region of Interest) region of a tab image, and converting the image from multiple channels into a single channel; performing Gaussian line feature extraction on the converted single-channel image to obtain a center line contour of the tab; connecting the collinear sub-contours in the center line contour, and combining the sub-contours into new sub-contours; and judging whether the total number of the existing sub-contours in the center line contour is equal to a preset qualified number or not. According to the invention, the tab image is taken as a processing object, and the number of tabs can be rapidly detected; sample training is not needed, and various different detection environments and detection requirements can be met; the influence of noise is small, Gaussian lines can be detected in a complex environment, and the anti-interference performance is high; moreover, the method can be used for detecting the complete center line of the tab, so that the stability and the accuracy of the result are ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of visual inspection technology, and in particular to a method, system and computer program product for detecting the number of tabs. Background Art

[0002] In the production process of lithium batteries, the detection of the number of battery tabs is mostly done manually, which not only has low detection efficiency but also has a high error rate. People with different experience may have different detection speeds and test results, and the standards are not clear and unified, which reduces the product qualification rate.

[0003] With the development of image processing technology, more and more industrial processes use image processing to improve production efficiency and product qualification rate. The Chinese patent with application number "202310864164.8" and titled "A method and system for detecting the number of tabs of lithium batteries" introduces a deep learning model and combines the learning model with image processing to avoid errors caused by human misjudgment and mechanical equipment precision limitations. It uses automated image processing and deep learning to quickly complete the number of tabs in the image.

[0004] However, the accuracy of deep learning is more dependent on the diversity of samples, and for different detection objects (batteries), a large amount of corresponding sample data needs to be collected or constructed in advance for model training and adjustment. Therefore, the above-mentioned tab detection method based on deep learning model cannot adapt to various different detection environments and detection requirements in real time.

[0005] In view of the above problems, how to quickly and accurately detect the number of tabs and adapt to various different detection environments and detection requirements in real time has become an urgent problem to be solved by technical personnel in this field. Summary of the invention

[0006] The object of the present invention is to provide a method, system and computer program product for detecting the number of tabs, so as to solve or at least partially solve the technical problems mentioned in the above background technology.

[0007] To achieve this object, the present invention adopts the following technical solutions:

[0008] In a first aspect, the present invention provides a method for detecting the number of tabs, comprising:

[0009] Collecting the pole lug image of the pole piece assembly to be inspected, and determining the ROI area of ​​the pole lug image;

[0010] Perform single-channel extraction on the image within the ROI area, and convert the image from multi-channel to single-channel;

[0011] Perform Gaussian line feature extraction on the converted single-channel image to obtain the centerline contour of the tab;

[0012] Connect the sub-contours that are colinear in the centerline contour and merge them into a new sub-contour;

[0013] Determine whether the total number of existing sub-contours in the centerline contour is equal to the preset qualified number;

[0014] If yes, the electrode assembly to be tested is determined to be a qualified product;

[0015] If not, the electrode assembly to be tested is determined to be a defective product.

[0016] Optionally, before connecting the colinear sub-contours in the centerline contour to form a new sub-contour, the method further includes:

[0017] Eliminate the noise sub-contours in the centerline contour; specifically include:

[0018] Get the number of points of all sub-contours in the centerline contour;

[0019] C k represents the sub-contour, N k Represents subcontour C k The number of points, if the subcontour C k The number of points in N k Less than or equal to the preset number threshold N min , determine the sub-contour C k is the noise subcontour, and the subcontour C k Eliminate from centerline profile.

[0020] Optionally, the connecting of the colinear sub-contours in the centerline contour to form a new sub-contour specifically includes:

[0021] Sub-contour C i As the reference contour, subcontour C i and the adjacent subcontour C j Constitute a pair of contours (C i , C j );

[0022] Calculate subcontour C i The fitting line L i and subcontour C j The fitting line L j ;

[0023] Determine subcontour C i With subcontour C j Whether the preset collinearity condition is met; if so, merge the sub-contours C i With subcontour C j ; If not, then subcontour C i With subcontour C jNo merger can be carried out;

[0024] The preset collinearity condition is: m <D1,d m / L max <D2,θ<θ max , S max ; where d m C i In L i The projection point P on i With C j In L i The projection point P on j The distance between max C i In L i The projection length on the i With L j The angle between them, S is C j To L i The maximum vertical distance; D1, D2, θ max , S max These are all pre-set thresholds;

[0025] L i With L j The calculation method of the angle θ between them is:

[0026]

[0027] Among them, m i For L i The slope, m j For L j The slope of .

[0028] Optionally, the centerline profile of the tab includes a plurality of sub-profiles distributed in an orderly manner;

[0029] The judgment sub-contour C i With subcontour C j Whether the preset collinearity condition is met also includes:

[0030] For each sub-contour retained after removing the noise sub-contour, extract its contour start point and contour end point;

[0031] The merged sub-contour C i With subcontour C j , specifically including:

[0032] According to the sub-contour C i The contour endpoint A and subcontour C j The contour endpoint B of the subcontour C is used to calculate the expression of the straight line where AB is located; where the contour endpoint A is the subcontour C​i on, closer to subcontour C j The contour endpoint B is the subcontour C. j on, closer to subcontour C i one end point of

[0033] According to the expression of the straight line where AB is located, the contour points between the two points AB are calculated by fitting, and then the two end points of AB are connected with the contour points obtained by fitting calculation.

[0034] Optionally, performing Gaussian line feature extraction on the converted single-channel image to obtain the centerline profile of the tab specifically includes:

[0035] Gaussian filtering is performed on the single-channel image, and the sub-pixel position of the light strip center is calculated based on the Hessian matrix;

[0036] According to the calculated sub-pixel position of the center of the light strip, a point set of the centerline contour of the pole ear is obtained.

[0037] Optionally, performing Gaussian filtering on the single-channel image and calculating the sub-pixel position of the center of the light strip based on the Hessian matrix specifically includes:

[0038] Treat a single-channel image as a binary function f(x,y), use σ to construct Gaussian module convolution and calculate its first-order partial derivative and second-order partial derivative;

[0039] Construct the Hessian matrix based on the calculated second-order partial derivatives;

[0040] The center position of the light strip is determined according to the eigenvalue and eigenvector of the Hessian matrix, and the grayscale distribution function is obtained by applying Taylor polynomial expansion to the pixel grayscale in the normal direction;

[0041] Calculate the sub-pixel position of the light strip center through the grayscale distribution function;

[0042] Among them, the expressions of Gaussian module convolution and its first-order partial derivative and second-order partial derivative are:

[0043]

[0044] The expression of the Hessian matrix is: Among them, r xx 、r xy 、r xy and r yy The expression is as follows:

[0045]

[0046] The expression of grayscale distribution function is:

[0047] Taking (x0, y0) as the reference point, the sub-pixel position of the center of the light bar (P x , P y )=(x0+tn x ,y0+tn y );in (n x ,n y ) represents the eigenvector corresponding to the maximum eigenvalue of the Hessian matrix.

[0048] Optionally, before extracting Gaussian line features from the converted single-channel image to obtain the centerline profile of the tab, the method further includes:

[0049] The converted single-channel image is enhanced to enhance the contrast of the pole piece.

[0050] In a second aspect, the present invention further provides a lug quantity detection system, comprising:

[0051] A tab image acquisition device is used to acquire the tab image of the pole piece assembly to be inspected;

[0052] ROI area selection module, used to select the ROI area as the target area to be detected;

[0053] An image preprocessing module is used to extract a single channel of the image in the ROI area and convert the image from multi-channel to single channel;

[0054] The contour extraction module is used to extract Gaussian line features from the converted single-channel image to obtain the centerline contour of the tab;

[0055] The contour processing module is used to connect the colinear sub-contours in the centerline contour and merge them into a new sub-contour;

[0056] The product quality identification module is used to determine whether the total number of existing sub-contours in the centerline contour is equal to the preset qualified number. If so, the pole piece assembly to be tested is determined to be a qualified product; if not, the pole piece assembly to be tested is determined to be an unqualified product.

[0057] Optionally, the contour processing module is further used to remove noise sub-contours in the centerline contour;

[0058] The step of removing the noise sub-contour in the centerline contour specifically includes:

[0059] Get the number of points of all sub-contours in the centerline contour;

[0060] C k represents the sub-contour, N k Represents subcontour C kThe number of points, if the subcontour C k The number of points in k Less than or equal to the preset number threshold N min , determine the sub-contour C k is the noise subcontour, and the subcontour C k Eliminate from centerline profile.

[0061] Optionally, the connecting of the colinear sub-contours in the centerline contour to form a new sub-contour specifically includes:

[0062] Sub-contour C i As the reference contour, subcontour C i and the adjacent subcontour C j Constitute a pair of contours (C i , C j );

[0063] Calculate subcontour C i The fitting line L i and subcontour C j The fitting line L j ;

[0064] Determine subcontour C i With subcontour C j Whether the preset collinearity condition is met; if so, merge the sub-contours C i With subcontour C j ; If not, then subcontour C i With subcontour C j No merger can be carried out;

[0065] The preset collinearity condition is: m <D1,d m / L max <D2,θ<θ max , S max ; where d m C i In L i The projection point P on i With C j In L i The projection point P on j The distance between max C i In L i The projection length on the i With L j The angle between them, S is C j To L i The maximum vertical distance; D1, D2, θ max , S max These are all pre-set thresholds;​

[0066] L i With L j The calculation method of the angle θ between them is:

[0067]

[0068] Among them, m i For L i The slope, m j For L j The slope of .

[0069] Optionally, the centerline profile of the tab includes a plurality of sub-profiles distributed in an orderly manner;

[0070] The contour processing module is also used to extract the contour starting point and contour end point of each sub-contour retained after removing the noise sub-contour;

[0071] The merged sub-contour C i With subcontour C j , specifically including:

[0072] According to the sub-contour C i The contour endpoint A and subcontour C j The contour endpoint B of the subcontour C is used to calculate the expression of the straight line where AB is located; where the contour endpoint A is the subcontour C i on, closer to subcontour C j The contour endpoint B is the subcontour C. j on, closer to subcontour C i one end point of

[0073] According to the expression of the straight line where AB is located, the contour points between the two points AB are calculated by fitting, and then the two end points of AB are connected with the contour points obtained by fitting calculation.

[0074] Optionally, the contour extraction module is specifically used to perform Gaussian filtering on a single-channel image and calculate the sub-pixel position of the light strip center based on the Hessian matrix; and to obtain a point set of the centerline contour of the pole ear based on the calculated sub-pixel position of the light strip center.

[0075] Optionally, performing Gaussian filtering on the single-channel image and calculating the sub-pixel position of the center of the light strip based on the Hessian matrix specifically includes:

[0076] Treat a single-channel image as a binary function f(x,y), use σ to construct Gaussian module convolution and calculate its first-order partial derivative and second-order partial derivative;

[0077] Construct the Hessian matrix based on the calculated second-order partial derivatives;

[0078] The center position of the light strip is determined according to the eigenvalue and eigenvector of the Hessian matrix, and the grayscale distribution function is obtained by applying Taylor polynomial expansion to the pixel grayscale in the normal direction;

[0079] Calculate the sub-pixel position of the light strip center through the grayscale distribution function;

[0080] Among them, the expressions of Gaussian module convolution and its first-order partial derivative and second-order partial derivative are:

[0081]

[0082] The expression of the Hessian matrix is: Among them, r xx 、r xy 、r xy and r yu The expression is as follows:

[0083]

[0084] The expression of grayscale distribution function is:

[0085] Taking (x0, y0) as the reference point, the sub-pixel position of the center of the light bar (P x , P y )=(x0+tn x ,y0+tn y );in (n x ,n y ) represents the eigenvector corresponding to the maximum eigenvalue of the Hessian matrix.

[0086] Optionally, the image preprocessing module is also used to perform image enhancement on the converted single-channel image to enhance the pole piece contrast.

[0087] In a third aspect, the present invention further provides a computer program product, including a computer program / instruction, characterized in that when the computer program / instruction is executed by a processor, the above-mentioned method for detecting the number of tabs is implemented.

[0088] Compared with the prior art, the present invention has the following beneficial effects:

[0089] The present invention proposes a method for detecting the number of pole lugs, which takes the pole lug image as the processing object and can quickly detect the number of pole lugs; it does not require sample training and can adapt to various detection environments and detection requirements; it is less affected by noise and can detect Gaussian lines in complex environments and has strong anti-interference ability; and the method can detect the complete pole lug center line, ensuring the stability and accuracy of the results. BRIEF DESCRIPTION OF THE DRAWINGS

[0090] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only 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.

[0091] Figure 1 A flow chart of a method for detecting the number of tabs provided in an embodiment of the present invention.

[0092] Figure 2 A system architecture diagram for detecting the number of tabs provided in an embodiment of the present invention.

[0093] Figure 3 A side view image of a pole lug captured by a pole lug image capture device provided in an embodiment of the present invention.

[0094] Figure 4 This is a single-channel image of the side view of the pole lug provided in an embodiment of the present invention.

[0095] Figure 5 The centerline profile image of the pole lug obtained by Gaussian line feature extraction provided in an embodiment of the present invention.

[0096] Figure 6 for Figure 5 A partial enlarged view of .

[0097] Figure 7 The centerline profile image of the pole lug after merging the sub-profiles provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0098] In order to make the purpose, features and advantages of the present invention more obvious and easy to understand, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described below are only 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.

[0099] Embodiment 1:

[0100] Please refer to Figure 1 , Figure 1 A flow chart of a method for detecting the number of tabs provided by an embodiment of the present invention, the method specifically comprising:

[0101] Step 110 , collecting a tab image of the pole piece assembly to be inspected, and determining a ROI region of the tab image.

[0102] In this step, the ROI (Region of Interest) is manually specified to determine the target area to be detected; Figure 3 As shown, Figure 3 A side view image of a pole lug captured by a pole lug image capture device provided in an embodiment of the present invention.

[0103] Step 120: Perform single-channel extraction on the image in the ROI area to convert the image from multi-channel to single-channel.

[0104] like Figure 4 As shown, Figure 4 A single-channel image of the side view image of the pole ear provided in an embodiment of the present invention; in this embodiment, the collected side view image of the pole ear is a three-channel image, and step 120 is to perform single-channel extraction in the ROI area selected in step 110 to convert the image from three channels to a single channel, which can simplify data processing and improve processing efficiency; it can be understood that in this field, the technology of single-channel extraction is a conventional technical means in this field, so it will not be repeated in this embodiment;

[0105] Since the detection focus of this embodiment is the number of pole lugs, in order to make the image processing result more targeted, the image can be enhanced to enhance the contrast of the pole piece, specifically:

[0106] Before step 130, the method further includes:

[0107] Step 1301: Perform image enhancement on the converted single-channel image to enhance the contrast of the pole piece.

[0108] Step 130: Perform Gaussian line feature extraction on the converted single-channel image to obtain the centerline profile of the tab.

[0109] Step 130 specifically includes:

[0110] Step 131, performing Gaussian filtering on the single-channel image, and calculating the sub-pixel position of the center of the light strip based on the Hessian matrix;

[0111] Step 132: Obtain a point set of the centerline contour of the pole lug according to the calculated sub-pixel position of the center of the light strip.

[0112] Step 131 specifically includes:

[0113] Step 1311: consider the single-channel image as a binary function f(x, y), use σ to construct Gaussian module convolution and calculate its first-order partial derivative and second-order partial derivative.

[0114] Step 1312: Construct a Hessian matrix based on the calculated second-order partial derivatives.

[0115] Step 1313: determine the center position of the light strip according to the eigenvalues ​​and eigenvectors of the Hessian matrix, apply Taylor polynomial expansion to the pixel grayscale in its normal direction, and obtain the grayscale distribution function.

[0116] Step 1314: Calculate the sub-pixel position of the center of the light strip through the grayscale distribution function.

[0117] Among them, the expressions of Gaussian module convolution and its first-order partial derivative and second-order partial derivative are:

[0118]

[0119] The expression of the Hessian matrix is: Among them, r xx 、r xy 、r xy and r yy The expression is as follows:

[0120] The expression of grayscale distribution function is:

[0121] Taking (x0, y0) as the reference point, the sub-pixel position of the center of the light bar (P x , P y )=(x0+tn x ,y0+tn y );in (n x ,n y ) represents the eigenvector corresponding to the maximum eigenvalue of the Hessian matrix.

[0122] For example, taking the midpoint (2270,791) of the image as an example, the original pixel value is 255, and after Gaussian filtering, the pixel value becomes 242;

[0123] Set the sigma coefficient σ to 0.7, and use sigma to construct the Gaussian template convolution to calculate its first-order partial derivative and second-order partial derivative. The specific calculation process is as follows:

[0124] g x,σ (x,y)=g′ σ (x)g σ (y) = r x =1.6375

[0125] g y,σ (x,y)=g σ (x)g′ σ (y) = ry =-17.222

[0126] f(x,y)*g xx,σ (x,y)=g σ (x)g σ (y) = r xx =-3.2734

[0127] g xy,σ (x,y)=g′ σ (x)g′ σ (y) = r xy =-3.5438

[0128] g yy,σ (x,y)=g σ (x)g″ σ (y) = r yy =-33.349

[0129] Construct the Hessian matrix according to the second-order partial derivative, that is:

[0130]

[0131] Because the eigenvector corresponding to the Hessian matrix with the largest absolute eigenvalue is the direction in which the light intensity changes fastest, we can find the pixel point (center point) with the strongest light intensity along this direction. By calculating its eigenvalues ​​and eigenvectors, we can get the maximum eigenvalue λ max is 33.761, the eigenvector (n x ,n y )The result is (0.11546,0.99331);

[0132] By setting the hysteresis high threshold to 9.48, it is determined whether λ is satisfied. max >9.48; if satisfied, the point is recorded as a point on the contour;

[0133] The grayscale distribution function is obtained by applying Taylor polynomial expansion to the pixel grayscale in the normal direction, and its mathematical expression is:

[0134]

[0135] Insert (tn x ,tn y ), such that:

[0136]

[0137] make The solution is:

[0138]

[0139] Therefore, the sub-pixel (x0+tn x ,y0+tn y ), that is, (x0-05785, y0-49774). In this way, the point set of the contour is obtained; among them, (x0, y0) is the reference point, (n x ,n y ) represents the eigenvector corresponding to the maximum eigenvalue of the Hessian matrix.

[0140] The conversion of sub-pixel points into contours in step 132 is also a commonly used technical means in the art, so its principle will not be described here in detail. In short, that is:

[0141] The first step is to mark the endpoints of the calculated sub-pixel image.

[0142] For example, for an isolated point, there is no edge point in its 8-domain; its gray value is set to 0;

[0143] For the starting point and the end point: there is only one edge point in the 8-domain; set its gray value to 128;

[0144] For intersection points: There are at least 3 edge points in the 8-domain. Set its grayscale value to 64.

[0145] In the second step, when the gray value of a pixel detected in the image is 128, the point is judged as a potential starting point of the contour point, and a pixel with a gray value of 255 is searched in the 8-neighborhood of the starting point, which represents a clear contour point;

[0146] If a pixel with a grayscale value of 64 is detected in the 8-neighborhood, it means that the point is a contour intersection or bifurcation point.

[0147] This point is marked as a potential intersection point and multi-path tracing is started simultaneously. After contour tracing is completed, the algorithm stores all traced paths as separate contours.

[0148] According to the above example, the ear contour detected by Gaussian line features is as follows Figure 5 As shown, Figure 5 The centerline profile image of the pole lug obtained by Gaussian line feature extraction provided by the embodiment of the present invention; Figure 5 In the figure, the center line contour is marked in green, and the center line contour of the tab can be accurately extracted by Gaussian line detection, with a total of 288 orderly arranged contours; more specifically, this embodiment adopts.

[0149] Step 140: Connect the colinear sub-contours in the centerline contour and merge them into a new sub-contour.

[0150] like Figure 6 As shown, Figure 6 for Figure 5A partial enlarged view of Figure 6 It can be seen that the calculated centerline profile has incomplete and discontinuous problems, such as Figure 6 As shown in the sub-outline within the box;

[0151] It should be noted that when converting the sub-pixel points to the centerline contour, the sub-contours in the centerline contour have been sorted from left to right and from top to bottom.

[0152] Specifically, before step 140, the method further includes:

[0153] Step 141, removing the noise sub-contour in the centerline contour; Step 141 specifically includes:

[0154] Step 1411, obtaining the number of points of all sub-contours in the centerline contour;

[0155] Step 1412: C k represents the sub-contour, N k Represents subcontour C k The number of points, if the subcontour C k The number of points in k Less than or equal to the preset number threshold N min , determine the sub-contour C k is the noise subcontour, and the subcontour C k Eliminate from the centerline contour. Pre-eliminating the noise sub-contour can further improve data processing efficiency and accuracy.

[0156] Step 140 specifically includes:

[0157] Step 1401: Sub-contour C i As the reference contour, subcontour C i and the adjacent subcontour C j Constitute a pair of contours (C i , C j );

[0158] Step 1402: Calculate sub-contour C i The fitting line L i and subcontour C j The fitting line L j ;

[0159] Step 1403: Determine sub-contour C i With subcontour C j Whether the preset collinearity condition is met; if so, execute step 1404 j ; If not, execute step 1405;

[0160] Step 1404: Merge sub-contours C i With subcontour Cj ;

[0161] Step 1405: Determine sub-contour C i With subcontour C j The merge cannot be performed, and the process returns to step 1401;

[0162] In this embodiment, the preset collinearity condition is: m <D1,d m / L max <D2,θ<θ max , S max ; where d m C i In L i The projection point P on i With C j In L i The projection point P on j The distance between max C i In L i The projection length on the i With L j The angle between them, S is C j To L i The maximum vertical distance; D1, D2, θ max , S max These are all pre-set thresholds;

[0163] L i With L j The calculation method of the angle θ between them is:

[0164]

[0165] Among them, m i For L i The slope, m j For L j The slope of .

[0166] More specifically, the centerline profile of the tab includes a plurality of sub-profiles distributed in an orderly manner;

[0167] Before step 1403, the method further includes:

[0168] Step 1406: for each sub-contour that remains after removing the noise sub-contour, extract its contour start point and contour end point;

[0169] Step 1404 specifically includes:

[0170] Step 1407: According to sub-contour C i The contour endpoint A and subcontour C j ​For the contour endpoint B, calculate the expression of the straight line where AB lies; among them, the contour endpoint A is on the sub - contour C i and is closer to one endpoint of the sub - contour C j ; the contour endpoint B is on the sub - contour C j and is closer to one endpoint of the sub - contour C i .

[0171] Step 1408: According to the expression of the straight line where AB lies, fit and calculate the contour points between points A and B, and then connect the two endpoints A and B with the contour points obtained by fitting calculation.

[0172] Exemplarily, first for each contour C i , check the number of its points N i , observe the number of extracted contours, and set the number threshold N min to 20. If N i is less than or equal to N min , then regard it as a noise contour and剔除 it. After剔除, the number of contours is 250. For each remaining contour C i , extract the starting point P i1 and the ending point P i2 . For each pair of contours (C i , C j ), assuming that C i is the reference contour, calculate the reference fitting line L i of C i and the projection points P i of C j on C i and P i on L j . Calculate the projection length d m . Set the maximum projection length threshold D1 to 150. If d m < D1, then calculate the maximum projection length L i of the contour C max on the fitting line. If d m / L max < D2, where D2 is the set maximum projection ratio, set to 5; then further calculate the angle between them. If the angle θ is less than the set θ max = 30°, then consider them to be collinear;

[0173] When the above conditions are all met, it is considered that the two contours can be connected. Under the condition of meeting the requirements, check the maximum vertical distance D3 from the contour C j to the reference fitting line L i . If D3 is less than the set S max Note: The Chinese character "剔除" is directly transliterated here as "剔除" because there is no exact English equivalent in the context. If there is a more appropriate English expression, it can be adjusted accordingly.=36, that is, to meet all the collinearity conditions, the contours that meet the conditions can be connected to form a new, continuous contour. This process is achieved by merging endpoints and linear interpolation fitting. The number of contours merged by contour fitting is n, which is 25. The final connected contour is as follows Figure 7 The outline changes are as follows: the array length changes from 288 to 25, the minimum value changes from 5 to 1005, and the maximum value changes from 1141 to 1410.

[0174] In this embodiment, the order of sub-contour collinearity detection is performed in sequence according to the order of the sub-contours in the centerline contour. For example, the sub-contour with sequence number 1 and the sub-contour with sequence number 2 are first detected for collinearity. If they are collinear, the sub-contour with sequence number 1 and the sub-contour with sequence number 2 are connected. After connecting the sub-contour with sequence number 1 and the sub-contour with sequence number 2, a new sub-contour with sequence number 1 and a sub-contour with sequence number 3 are compared for collinearity. If the sub-contour with sequence number 1 and the sub-contour with sequence number 2 are not collinear, it is continued to be determined whether the sub-contour with sequence number 2 and the sub-contour with sequence number 3 are collinear. The collinearity detection is performed in this way in sequence.

[0175] Step 150 , determine whether the total number of existing sub-contours in the centerline contour is equal to a preset qualified number; if so, execute step 151 ; if not, execute step 152 .

[0176] Step 151: Determine whether the electrode assembly to be tested is a qualified product.

[0177] Step 152: Determine whether the electrode assembly to be tested is a defective product.

[0178] Exemplarily, for example, following the above example, the qualified number n is set to 25 according to actual needs, and whether the total number m of merged sub-contours is equal to n is determined to determine whether the group of pole pieces is qualified.

[0179] It can be understood that in the above formulas or expressions, the setting range of some thresholds or parameters can be set according to actual application requirements. For example, the threshold of the angle θ is generally set to be less than 90 degrees, such as 30 degrees as shown in the example above; for example, the qualified number n is set to 25 in this embodiment, but in some other application scenarios, such as pole piece assemblies with more pole ears, the n value can be increased accordingly, and so on.

[0180] The method for detecting the number of pole lugs proposed in this embodiment takes the pole lug image as the processing object and can quickly detect the number of pole lugs; the method does not adopt a learning model of a neural network, so there is no need to train samples. It can detect the number of pole lugs of different types of pole pieces in real time through a specific detection method or calculation method, and can adapt to various detection environments and detection requirements; the detection method can detect Gaussian lines in complex environments, has strong anti-interference ability, and is less affected by noise; and the method can detect the complete center line of the pole lug, ensuring the stability and accuracy of the results.

[0181] Embodiment 2:

[0182] Please refer to Figure 2 , Figure 2 A system architecture diagram for detecting the number of tabs provided in an embodiment of the present invention. The tab number detection system includes:

[0183] The pole lug image acquisition device 10 is used to acquire the pole lug image of the pole piece assembly to be inspected;

[0184] The ROI region selection module 20 is used to select the ROI region as the target region to be detected;

[0185] An image preprocessing module 30 is used to perform single-channel extraction on the image in the ROI region, and convert the image from multi-channel to single-channel;

[0186] The contour extraction module 40 is electrically connected to the image preprocessing module 30 and is used to extract Gaussian line features from the converted single-channel image to obtain the centerline contour of the tab;

[0187] The contour processing module 50 is electrically connected to the contour extraction module 40, and is used to connect the sub-contours on the same line in the centerline contour to merge them into a new sub-contour;

[0188] The product quality identification module 60 and the electrical connection contour processing module 50 are used to determine whether the total number of existing sub-contours in the centerline contour is equal to the preset qualified number. If so, the pole piece assembly to be tested is determined to be a qualified product; if not, the pole piece assembly to be tested is determined to be an unqualified product.

[0189] Specifically, the contour processing module 50 is also used to remove noise sub-contours in the centerline contour;

[0190] Eliminate the noise sub-contours in the centerline contour, including:

[0191] Get the number of points of all sub-contours in the centerline contour;

[0192] C k represents the sub-contour, N k Represents subcontour C kThe number of points, if the subcontour C k The number of points in N k Less than or equal to the preset number threshold N min , determine the sub-contour C k is the noise subcontour, and the subcontour C k Eliminate from centerline profile.

[0193] Specifically, the sub-contours on the same line in the centerline contour are connected and merged into a new sub-contour, which includes:

[0194] Sub-contour C i As the reference contour, subcontour C i and the adjacent subcontour C j Constitute a pair of contours (C i , C j );

[0195] Calculate subcontour C i The fitting line L i and subcontour C j The fitting line L j ;

[0196] Determine subcontour C i With subcontour C j Whether the preset collinearity condition is met; if so, merge the sub-contours C i With subcontour C j ; If not, then subcontour C i With subcontour C j No merger can be carried out;

[0197] The default collinearity condition is: d m <D1,d m / L max <D2,θ<θ max , S max ; where d m C i In L i The projection point P on i With C j In L i The projection point P on j The distance between max C i In L i The projection length on the i With L j The angle between them, S is C j To L i The maximum vertical distance; D1, D2, θ max , S max These are all pre-set thresholds;​

[0198] L i With L j The calculation method of the angle θ between them is:

[0199]

[0200] Among them, m i For L i The slope, m j For L j The slope of .

[0201] Specifically, the centerline profile of the tab includes a plurality of sub-profiles distributed in an orderly manner;

[0202] The contour processing module 50 is also used to extract the contour start point and contour end point of each sub-contour retained after removing the noise sub-contour;

[0203] Merge subcontours C i With subcontour C j , specifically including:

[0204] According to the sub-contour C i The contour endpoint A and subcontour C j The contour endpoint B of the subcontour C is used to calculate the expression of the straight line where AB is located; where the contour endpoint A is the subcontour C i on, closer to subcontour C j The contour endpoint B is the subcontour C. j on, closer to subcontour C i one end point of

[0205] According to the expression of the straight line where AB is located, the contour points between the two points AB are calculated by fitting, and then the two end points of AB are connected with the contour points obtained by fitting calculation.

[0206] Specifically, the contour extraction module 40 is specifically used to perform Gaussian filtering on the single-channel image and calculate the sub-pixel position of the light strip center based on the Hessian matrix; and to obtain the point set of the centerline contour of the pole ear according to the calculated sub-pixel position of the light strip center.

[0207] Specifically, a Gaussian filter is performed on the single-channel image, and the sub-pixel position of the center of the light strip is calculated based on the Hessian matrix, which specifically includes:

[0208] Treat a single-channel image as a binary function f(x,y), use σ to construct Gaussian module convolution and calculate its first-order partial derivative and second-order partial derivative;

[0209] Construct the Hessian matrix based on the calculated second-order partial derivatives;

[0210] The center position of the light strip is determined according to the eigenvalue and eigenvector of the Hessian matrix, and the grayscale distribution function is obtained by applying Taylor polynomial expansion to the pixel grayscale in the normal direction;

[0211] Calculate the sub-pixel position of the light strip center through the grayscale distribution function;

[0212] Among them, the expressions of Gaussian module convolution and its first-order partial derivative and second-order partial derivative are:

[0213]

[0214] The expression of the Hessian matrix is: Among them, r xx 、r xy 、r xy and r yy The expression is as follows:

[0215]

[0216] The expression of grayscale distribution function is:

[0217] Taking (x0, y0) as the reference point, the sub-pixel position of the center of the light bar (P x , P y )=(x0+tn x ,y0+tn y );in (n x ,n y ) represents the eigenvector corresponding to the maximum eigenvalue of the Hessian matrix.

[0218] Specifically, the image preprocessing module 50 is also used to perform image enhancement on the converted single-channel image to enhance the contrast of the pole piece.

[0219] One of the main purposes of image enhancement is to improve the contrast of the image. By adjusting the brightness range of the image, the dark parts of the image are made darker and the bright parts are made brighter, thereby improving the dynamic range and visual effect of the image. Contrast enhancement is one of the commonly used techniques in image enhancement, which aims to enhance the differences between different objects and areas in the image, making the image more vivid and clear.

[0220] The pole lug number detection system proposed in this embodiment takes the pole lug image as the processing object, and can quickly detect the number of pole lugs. Through a specific detection method or calculation method, it can detect the number of pole lugs of different types of pole pieces in real time, can adapt to various detection environments and detection requirements, and can fit the complete pole lug center line according to the image, thereby ensuring the stability and accuracy of the detection results.

[0221] Based on the same concept, an embodiment of the present invention further provides a computer-readable storage medium, in which at least one instruction is stored. The instruction is loaded and executed by a processor to implement a tab quantity detection method provided by an embodiment of the present invention.

[0222] Any combination of one or more computer-readable media may be used. A computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium. A computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination thereof. More specific examples (a non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In this document, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in conjunction with an instruction execution system, device, or device.

[0223] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, which carry computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0224] Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.

[0225] Computer program code for performing the operations of the present invention may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).

[0226] Based on the same concept, an embodiment of the present invention further provides a computer program product, including a computer program / instruction. When the computer program / instruction is executed by a processor, a tab quantity detection method provided by an embodiment of the present invention is implemented.

[0227] The computer program product may be loaded on a computer device, the components of which may include but are not limited to: one or more processors or processing units, a system memory, and a bus connecting different system components (including the system memory and the processing unit).

[0228] Computer devices typically include a variety of computer system readable media. These media can be any available media that can be accessed by the computer device, including volatile and non-volatile media, removable and non-removable media.

[0229] The system memory may include computer system readable media in the form of volatile memory, such as random access memory (RAM) and / or cache memory. The computer device may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, the storage system may be used to read and write non-removable, non-volatile magnetic media. The computer program product has a set (e.g., at least one) of program modules that are configured to perform the functions of various embodiments of the present invention.

[0230] A program / utility having a set (at least one) of program modules may be stored, for example, in a memory, such program modules including but not limited to an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment. The program modules generally perform the functions and / or methods of the embodiments described herein.

[0231] The computer device can also communicate with one or more external devices (such as keyboards, pointing devices, displays, etc.), and can also communicate with one or more devices that enable users to interact with the computer device, and / or communicate with any device (such as a network card, a modem, etc.) that enables the computer device to communicate with one or more other computing devices. This communication can be carried out through an input / output (I / O) interface. In addition, the computer device can also communicate with one or more networks (such as a local area network (LAN), a wide area network (WAN) and / or a public network, such as the Internet) through a network adapter. As shown in the figure, the network adapter communicates with other modules of the computer device through a bus. It should be understood that other hardware and / or software modules can be used in conjunction with the computer device, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, etc.

[0232] The processing unit executes various functional applications and data processing by running the programs stored in the system memory, for example, implementing a tab quantity detection method provided in an embodiment of the present invention.

[0233] Those skilled in the art can understand that all or part of the steps of the above embodiments can be completed by hardware, or by a program to instruct the relevant hardware to complete, and the program can be stored in a computer-readable storage medium, and the storage medium mentioned above can be a read-only memory, a disk or an optical disk, etc. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or all or 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.

[0234] As described above, the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features thereof may be replaced by equivalents. 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 detecting the number of tabs, It is characterized in that include: Collecting the pole lug image of the pole piece assembly to be inspected, and determining the ROI area of ​​the pole lug image; Perform single-channel extraction on the image within the ROI area, and convert the image from multi-channel to single-channel; Perform Gaussian line feature extraction on the converted single-channel image to obtain the centerline contour of the tab; Connect the sub-contours that are colinear in the centerline contour and merge them into a new sub-contour; Determine whether the total number of existing sub-contours in the centerline contour is equal to the preset qualified number; If yes, the electrode assembly to be tested is determined to be a qualified product; If not, the electrode assembly to be tested is determined to be a defective product.

2. A method for detecting the number of tabs according to claim 1, It is characterized in that Before connecting the sub-contours on the same line in the centerline contour to form a new sub-contour, the method further includes: Eliminate the noise sub-contours in the centerline contour; specifically include: Get the number of points of all sub-contours in the centerline contour; C k represents the sub-contour, N k Represents subcontour C k The number of points, if the subcontour C k The number of points in N k Less than or equal to the preset number threshold N min , determine the sub-contour C k is the noise subcontour, and the subcontour C k Eliminate from centerline profile.

3. A method for detecting the number of tabs according to claim 2, It is characterized in that The step of connecting the sub-contours on the same line in the centerline contour to form a new sub-contour specifically includes: Sub-contour C i As the reference contour, subcontour C i and the adjacent subcontour C j Constitute a pair of contours (C i , C j ); Calculate subcontour C i The fitting line L i and subcontour C j The fitting line L j ; Determine subcontour C i With subcontour C j Whether the preset collinearity condition is met; if so, merge the sub-contours C i With subcontour C j ; If not, then subcontour C i With subcontour C j No merger can be carried out; The preset collinearity condition is: m <D 1 , d m / L max <D 2 , θ<θ max , S max ; where d m C i In L i The projection point P on i With C j In L i The projection point P on j The distance between max C i In L i The projection length on the i With L j The angle between them, S is C j To L i Maximum vertical distance; D 1 , D 2 ,θ max , S max These are all pre-set thresholds;​ L i With L j The calculation method of the angle θ between them is: Among them, m i For L i The slope, m j For L j The slope of .

4. A method for detecting the number of tabs according to claim 3, It is characterized in that The centerline profile of the tab includes a plurality of sub-profiles distributed in an orderly manner; The judgment sub-contour C i With subcontour C j Whether the preset collinearity condition is met also includes: For each sub-contour retained after removing the noise sub-contour, extract its contour start point and contour end point; The merged sub-contour C i With subcontour C j , specifically including: According to the sub-contour C i The contour endpoint A and subcontour C j The contour endpoint B of the subcontour C is used to calculate the expression of the straight line where AB is located; where the contour endpoint A is the subcontour C i on, closer to subcontour C j The contour endpoint B is the subcontour C. j on, closer to subcontour C i one end point of According to the expression of the straight line where AB is located, the contour points between the two points AB are calculated by fitting, and then the two end points of AB are connected with the contour points obtained by fitting calculation.

5. A method for detecting the number of tabs according to claim 1, It is characterized in that The Gaussian line feature extraction is performed on the converted single-channel image to obtain the center line profile of the tab, specifically including: Gaussian filtering is performed on the single-channel image, and the sub-pixel position of the light strip center is calculated based on the Hessian matrix; According to the calculated sub-pixel position of the center of the light strip, a point set of the centerline contour of the pole ear is obtained.

6. A method for detecting the number of tabs according to claim 5, It is characterized in that The Gaussian filtering is performed on the single-channel image, and the sub-pixel position of the center of the light strip is calculated based on the Hessian matrix, specifically including: Treat a single-channel image as a binary function f(x,y), use σ to construct Gaussian module convolution and calculate its first-order partial derivative and second-order partial derivative; Construct the Hessian matrix based on the calculated second-order partial derivatives; The center position of the light strip is determined according to the eigenvalue and eigenvector of the Hessian matrix, and the grayscale distribution function is obtained by applying Taylor polynomial expansion to the pixel grayscale in the normal direction; Calculate the sub-pixel position of the light strip center through the grayscale distribution function; Among them, the expressions of Gaussian module convolution and its first-order partial derivative and second-order partial derivative are: The expression of the Hessian matrix is: Among them, r xx 、r xy 、r xy and r yy The expression is as follows: g x,σ (x,y)=g′ σ (x)g σ (y)=r x g y,σ (x,y)=g σ (x)g′ σ (y)=r y f(x,y)*g xx,σ (x,y)=g″ σ (x)g σ (y)=r xx ; g xy,σ (x,y)=g′ σ (x)g′ σ (y)=r xy g yy,σ (x,y)=g σ (x)g″ σ (y)=r yy The expression of grayscale distribution function is: With (x 0 ,y 0 ) is the reference point, and the sub-pixel position of the light bar center (P x , P y )=(x 0 +tn x ,y 0 +tn y );in (n x ,n y ) represents the eigenvector corresponding to the maximum eigenvalue of the Hessian matrix.

7. A method for detecting the number of tabs according to claim 5, It is characterized in that Before extracting Gaussian line features from the converted single-channel image to obtain the centerline profile of the tab, the method further includes: The converted single-channel image is enhanced to enhance the contrast of the pole piece.

8. A lug quantity detection system, It is characterized in that include: A tab image acquisition device is used to acquire the tab image of the pole piece assembly to be inspected; ROI area selection module, used to select the ROI area as the target area to be detected; An image preprocessing module is used to extract a single channel of the image in the ROI area and convert the image from multi-channel to single channel; The contour extraction module is used to extract Gaussian line features from the converted single-channel image to obtain the centerline contour of the tab; The contour processing module is used to connect the colinear sub-contours in the centerline contour and merge them into a new sub-contour; The product quality identification module is used to determine whether the total number of existing sub-contours in the centerline contour is equal to the preset qualified number. If so, the pole piece assembly to be tested is determined to be a qualified product; if not, the pole piece assembly to be tested is determined to be an unqualified product.

9. A tab quantity detection system according to claim 8, It is characterized in that The contour processing module is also used to remove noise sub-contours in the centerline contour; The step of removing the noise sub-contour in the centerline contour specifically includes: Get the number of points of all sub-contours in the centerline contour; C k represents the sub-contour, N k Represents subcontour C k The number of points, if the subcontour C k The number of points in k Less than or equal to the preset number threshold N min , determine the sub-contour C k is the noise subcontour, and the subcontour C k Eliminate from centerline profile.

10. A tab quantity detection system according to claim 8, It is characterized in that The step of connecting the sub-contours on the same line in the centerline contour to form a new sub-contour specifically includes: Sub-contour C i As the reference contour, subcontour C i and the adjacent subcontour C j Constitute a pair of contours (C i , C j ); Calculate subcontour C i The fitting line L i and subcontour C j The fitting line L j ; Determine subcontour C i With subcontour C j Whether the preset collinearity condition is met; if so, merge the sub-contours C i With subcontour C j ; If not, then subcontour C i With subcontour C j No merger can be carried out; The preset collinearity condition is: m <D 1 , d m / L max <D 2 , θ<θ max , S max ; where d m C i In L i The projection point P on i With C j In L i The projection point P on j The distance between max C i In L i The projection length on the i With L j The angle between them, S is C j To L i Maximum vertical distance; D 1 , D 2 ,θ max , S max These are all pre-set thresholds;​ L i With L j The calculation method of the angle θ between them is: Among them, m i For L i The slope, m j For L j The slope of .

11. A tab quantity detection system according to claim 10, It is characterized in that The centerline profile of the tab includes a plurality of sub-profiles distributed in an orderly manner; The contour processing module is also used to extract the contour starting point and contour end point of each sub-contour retained after removing the noise sub-contour; The merged sub-contour C i With subcontour C j , including: According to the sub-contour C i The contour endpoint A and subcontour C j The contour endpoint B of the subcontour C is used to calculate the expression of the straight line where AB is located; where the contour endpoint A is the subcontour C i on, closer to subcontour C j The contour endpoint B is the subcontour C. j on, closer to subcontour C i one end point of According to the expression of the straight line where AB is located, the contour points between the two points AB are calculated by fitting, and then the two end points of AB are connected with the contour points obtained by fitting calculation.

12. A tab quantity detection system according to claim 8, It is characterized in that The contour extraction module is specifically used to perform Gaussian filtering on a single-channel image and calculate the sub-pixel position of the light strip center based on the Hessian matrix; and to obtain a point set of the centerline contour of the pole ear according to the calculated sub-pixel position of the light strip center.

13. A tab quantity detection system according to claim 12, It is characterized in that The Gaussian filtering is performed on the single-channel image, and the sub-pixel position of the center of the light strip is calculated based on the Hessian matrix, specifically including: Treat a single-channel image as a binary function f(x,y), use σ to construct Gaussian module convolution and calculate its first-order partial derivative and second-order partial derivative; Construct the Hessian matrix based on the calculated second-order partial derivatives; The center position of the light strip is determined according to the eigenvalue and eigenvector of the Hessian matrix, and the grayscale distribution function is obtained by applying Taylor polynomial expansion to the pixel grayscale in the normal direction; Calculate the sub-pixel position of the light strip center through the grayscale distribution function; Among them, the expressions of Gaussian module convolution and its first-order partial derivative and second-order partial derivative are: The expression of the Hessian matrix is: Among them, r xx 、r xy 、r xy and r yy The expression is as follows: g x,σ (x,y)=g′ σ (x)g σ (y)=r x g y,σ (x,y)=g σ (x)g′ σ (y)=r y f(x,y)*g xx,σ (x,y)=g″ σ (x)g σ (y)=r xx ; g xy,σ (x,y)=g′ σ (x)g′ σ (y)=r xy g yy,σ (x,y)=g σ (x)g″ σ (y)=r yy The expression of grayscale distribution function is: With (x 0 ,y 0 ) is the reference point, and the sub-pixel position of the light bar center (P x , P y )=(x 0 +tn x ,y 0 +tn y );in (n x , n y ) represents the eigenvector corresponding to the maximum eigenvalue of the Hessian matrix.

14. A tab quantity detection system according to claim 12, It is characterized in that The image preprocessing module is also used to perform image enhancement on the converted single-channel image to enhance the contrast of the pole piece.

15. A computer program product comprising a computer program / instructions, It is characterized in that When the computer program / instructions are executed by the processor, a method for detecting the number of tabs as described in any one of claims 1 to 7 is implemented.