IP Library Granted Patent US 12,045,974
Granted Patent B2
US 12,045,974 · App. 18/306,657 · Granted Jul 23, 2024

Tab bending detection method and apparatus, electronic device, and storage medium

Inventors: Qiangwei Huang (Ningde, CN); Guannan Jiang (Ningde, CN); Zhiyu Wang (Ningde, CN)
Assignee: CONTEMPORARY AMPEREX TECHNOLOGY CO., LIMITED
G06T7/0006G06T7/11G06T7/187G06T7/194G06T7/60G06T2207/30108G06T2207/30242
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12,045,974
App. No.
18/306,657
Granted
Jul 23, 2024
Kind
B2
Abstract

A tab bending detection method and apparatus, an electronic device, and a storage medium are provided. The method includes: performing skeleton extraction on a sectional image of multiple layers of tabs to obtain a skeleton image of the multiple layers of tabs; merging damaged connected components in the skeleton image to obtain a merged connected component, where the damaged connected components are connected components on which breaking occurs in a same tab section; calculating a target number of the multiple layers of tabs based on the merged connected component and an undamaged connected component; and detecting, based on the target number and a preset number, whether any tab in the multiple layers of tabs is in a bending state. The damaged connected components are merged to obtain the merged connected component.

Claims (46)

1. A tab bending detection method, comprising:

performing a skeleton extraction on a sectional image of multiple layers of tabs, to obtain a skeleton image of the multiple layers of tabs;

merging damaged connected components in the skeleton image to obtain a merged connected component, wherein the damaged connected components are connected components on which breaking occurs in a same tab section;

calculating a target number of the multiple layers of tabs based on the merged connected component and an undamaged connected component; and

detecting, based on the target number and a preset number, whether any tab in the multiple layers of tabs is in a bending state;

wherein merging the damaged connected components in the skeleton image to obtain a merged connected component comprises:

under a condition that an endpoint of a connected component is in a preset region of the skeleton image, determining, based on the endpoint, a first foreground point and a second foreground point that are adjacent to the endpoint, wherein the endpoint, the first foreground point, and the second foreground point are in different connected components; and

merging the connected component in which the endpoint is located, a first connected component in which the first foreground point is located, and a second connected component in which the second foreground point is located, to obtain the merged connected component.

2. The method according to claim 1 , wherein the merging the connected component in which the endpoint is located, a first connected component in which the first foreground point is located, and a second connected component in which the second foreground point is located, to obtain the merged connected component comprises:

determining a first distance between the endpoint and the first foreground point and a second distance between the endpoint and the second foreground point; and

under a condition that the first distance is less than the second distance, merging the first connected component in which the first foreground point is located and the connected component in which the endpoint is located to obtain the merged connected component; or

under a condition that the second distance is less than the first distance, merging the second connected component in which the second foreground point is located and the connected component in which the endpoint is located to obtain the merged connected component.

3. The method according to claim 1 , wherein the calculating a target number of the multiple layers of tabs based on the merged connected component and an undamaged connected component comprises:

traversing each third connected component of the merged connected component and the undamaged connected component to calculate the number of tabs in each third connected component;

adding the numbers of tabs in all third connected components together to obtain a first target number; and

determining the target number of the multiple layers of tabs based on the first target number and the numbers of endpoints in a preset region of the merged connected component and the undamaged connected component.

4. The method according to claim 3 , wherein the determining the target number of the multiple layers of tabs based on the first target number and the numbers of endpoints in a preset region of the merged connected component and the undamaged connected component comprises:

under a condition that the numbers of endpoints in a preset region are the same as the preset number, using the number of endpoints in a preset region as the target number; or

under a condition that the numbers of endpoints in a preset region are different from the preset number, determining a greatest value of the numbers of endpoints in a preset region and the first target number; and

determining the target number based on the greatest value and the preset number.

5. The method according to claim 4 , wherein the determining the target number based on the greatest value and the preset number comprises:

under a condition that the greatest value is less than or equal to the preset number, using the greatest value as the target number; or

under a condition that the greatest value is greater than the preset number, traversing each fourth connected component among the damaged connected components and the undamaged connected component to calculate the number of tabs in each fourth connected component;

adding the numbers of tabs in all fourth connected components together to obtain a second target number; and

using the second target number as the target number.

6. The method according to claim 3 , wherein the calculating the number of tabs in each third connected component comprises:

determining sample points in each third connected component;

in a preset horizontal direction, sorting, based on a position of each third connected component, the sample points in each third connected component to obtain a sorting result; and

determining the number of tabs in each third connected component based on the sorting result and a preset threshold.

7. The method according to claim 6 , wherein the determining the number of tabs in each third connected component based on the sorting result and a preset threshold comprises:

determining, based on the sorting result, whether a distance between two adjacent sample points is greater than the preset threshold;

if greater, determining the number of tabs on a vertical section between the two adjacent sample points; and

determining the number of tabs in each third connected component based on the numbers of tabs on the vertical section between the two adjacent sample points.

8. The method according to claim 3 , wherein the determining sample points in each third connected component comprises:

determining branchpoints, first-type endpoints, and second-type endpoints in each third connected component;

removing burr points from the first-type endpoints and the second-type endpoints to obtain processed endpoints; and

using the processed endpoints and the branchpoints as the sample points.

9. An electronic device, comprising a memory and a processor, wherein the memory stores a computer program for execution by the processor, and the computer program comprises instructions for:

performing a skeleton extraction on a sectional image of multiple layers of tabs, to obtain a skeleton image of the multiple layers of tabs;

merging damaged connected components in the skeleton image to obtain a merged connected component, wherein the damaged connected components are connected components on which breaking occurs in a same tab section;

calculating a target number of the multiple layers of tabs based on the merged connected component and an undamaged connected component; and

detecting, based on the target number and a preset number, whether any tab in the multiple layers of tabs is in a bending state;

wherein the instructions for merging the damaged connected components in the skeleton image to obtain a merged connected component comprises instructions for:

under a condition that an endpoint of a connected component is in a preset region of the skeleton image determining, based on the endpoint, a first foreground point and a second foreground point that are adjacent to the endpoint, wherein the endpoint the first foreground point, and the second foreground point are in different connected components; and

merging the connected component in which the endpoint is located, a first connected component in which the first foreground point is located, and a second connected component in which the second foreground point is located, to obtain the merged connected component.

10. A non-transitory computer-readable storage medium storing a computer program thereon for execution by a processor, wherein the computer program comprises instructions for performing the method of claim 1 .

Assignments (2)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Aug 6, 2024
From: CONTEMPORARY AMPEREX TECHNOLOGY CO., LIMITED
To: CONTEMPORARY AMPEREX TECHNOLOGY (HONG KONG) LIMITED
Reel/Frame 068338/0723 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Apr 25, 2023
From: HUANG, QIANGWEI; JIANG, GUANNAN; WANG, ZHIYU
To: CONTEMPORARY AMPEREX TECHNOLOGY CO., LIMITED
Reel/Frame 063434/0539 →
Continuity (2)
Continuation PCTCN2022115577 · Aug 29, 2022
Related Publication 20240095902A1 · Mar 21, 2024