A method, device and system for measuring tab residual material

By combining the grayscale threshold method and morphological calculation method, the polar ear image is segmented and boundary fitted to generate a rectangular detection area, solving the problem of the risk of missed and oversized in the existing technology, and achieving full detection of polar ear oversized materials and high stability measurement effects.

CN119722782BActive Publication Date: 2025-05-16GUANGZHOU EHOLLY INTELLIGENT EQUIP CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510221291.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-02-27
Publication Date
2025-05-16
Estimated Expiration
2045-02-27

AI Technical Summary

Technical Problem

The existing X-Ear excess material measurement technology has the risk of missing or overkill, and it cannot adapt to X-Ear appearance changes.

Method used

Through the grayscale threshold method and morphological calculation method, the polar ear image is segmented and bounded fitted, the boundary line of the polar ear region is determined, and the boundary edge points where the lines intersect are generated, a rectangular detection area is generated, covering all boundaries of the polar ear region.

Benefits of technology

The complete inspection of excess material of the pole ear is achieved, avoiding missed and under-tested conditions, is suitable for different shapes of pole ears, and improves the stability of measurement and reduces system overhead.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119722782B_ABST
    Figure CN119722782B_ABST
Patent Text Reader

Abstract

The present invention provides a method, device and system for measuring the residual material of a tab. Based on the grayscale threshold method and the morphological method, the tab region of the tab image is first located, and then the tab vertex shape is determined based on the position coordinates of the tab region in the tab image, and then the boundary reference line of each boundary of the tab region is generated. According to the intersection position between the boundary reference lines, multiple detection areas that can cover each boundary line of the tab region are generated, and then the grayscale threshold method and morphological operations are performed in the detection area to obtain the residual material boundary and shape of each boundary. The method for measuring the residual material of the tab of the present invention only requires an image acquisition device to capture the image of the tab to be detected, and the residual material measurement of the corresponding tab can be completed, and the determination of the residual material and the measurement of the residual material size can be completed. In addition, the detection process determines the tab boundary through the grayscale threshold, so that the detection and measurement of tabs of different shapes can be satisfied.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of residual material measurement of a tab image, and in particular to the technical field of a method, device and system for measuring residual material of a tab. Background Art

[0002] The tab residual material measurement technology uses image processing methods to detect the produced tabs, and screens out the tabs with abnormalities such as burrs and protrusions during the production process, thereby improving the quality of tab production.

[0003] The existing partial residual material measurement technology completes the residual material measurement by fitting the outer rectangle of the tab and determining that the black part outside the outer rectangle is the residual material. However, this method has the following shortcomings:

[0004] 1. When the circumscribed rectangle is not close to the edge of the tab, there will be a risk of missing the remaining material;

[0005] 2. When the circumscribed rectangle is too close, there will be a risk of overkill;

[0006] 3. When the shape of the tab changes, the existing residual material measurement technology is no longer applicable. Summary of the invention

[0007] In view of the defects of the prior art, the present invention provides a method, device and system for measuring the residual material of a tab, which can solve at least one defect of the existing residual material measurement technology. Specifically, the present invention is implemented by the following technical solutions:

[0008] In one aspect, the present invention provides a method for measuring tab residual material, comprising:

[0009] S10: segmenting a tab image according to a gray threshold method to obtain multiple connected domains, and taking the connected domain with the largest area as the main connected domain;

[0010] S20: calculating the minimum fitting rectangle of the main connected domain, and performing difference calculation between the fitting rectangle and the main connected domain, and obtaining a region with the largest difference area as the tab region;

[0011] S30: obtaining a boundary line of each boundary of the tab region according to the positional features of the tab region;

[0012] S40: determining a plurality of boundary edge points according to intersection points between extension lines of two boundary lines;

[0013] S51: construct multiple detection areas away from the tab area by using the coordinates of each boundary edge point, clip each detection area to the boundary of the tab area, and obtain the tab boundary residual material by screening the gray threshold of the boundary;

[0014] S52: Generate an R corner detection area according to the boundary edge point closest to the R corner position and a horizontal inward intensity parameter, perform cropping grayscale threshold and morphological operation processing on the R corner detection area, and obtain the tab R corner residual material.

[0015] Furthermore, the step S30 includes:

[0016] S301: Calculating the center coordinates, vertex angle, width and height of the tab region according to the tab region as position features of the tab region;

[0017] S302: calculating the center coordinates, width and height of the tab region according to the tab region, and determining a reference line of each boundary of the tab region;

[0018] S303: generating a plurality of rectangular frames on a reference line of each boundary of each tab region;

[0019] S304: According to the grayscale threshold, the points where the grayscale mutation occurs in each rectangular frame are obtained, and all the points where the grayscale mutation occurs on each edge are connected and fitted into a straight line according to the least square method to obtain the boundary line of each boundary of the tab area.

[0020] Furthermore, the step S51 includes:

[0021] S511: connecting each of the boundary edge points on one side of the tab boundary to obtain a first extended reference line of each boundary;

[0022] S512: translating each first extended reference line toward a side away from the tab region by a preset length to obtain a second extended reference line corresponding to each first extended reference line;

[0023] S513: Connecting the endpoint coordinates of the first extended reference line of each boundary with the endpoint coordinates of its corresponding second extended reference line to obtain a detection area of ​​each boundary;

[0024] S514: Crop the boundary of the corresponding tab area in each detection area, and obtain the tab boundary residual material through screening through the gray threshold of the boundary.

[0025] Furthermore, the horizontal inward strength parameter is obtained by the following steps:

[0026] Obtain the coordinates of the intersection of the R angle of the pole lug and the boundary line of the top of the pole lug in the pole lug image, and calculate the difference between the coordinates of the intersection and the boundary edge point closest to the intersection coordinates to obtain the coordinate vectors in two directions;

[0027] A coordinate vector whose vector value is not 0 is used as a horizontal inward strength parameter, wherein the horizontal inward strength parameter includes a vector value and a vector direction.

[0028] Furthermore, after generating the plurality of rectangular frames in step S303, the method further includes:

[0029] According to all the grayscale mutation points on each edge, the correct number of grayscale mutation points in the rectangular box is obtained by counting;

[0030] The correct proportion of rectangular frames is calculated according to the correct number of rectangular frames. When the correct proportion of rectangular frames is greater than an edge threshold, the least square method is used to perform straight line fitting, otherwise the rectangular frames are regenerated.

[0031] Furthermore, before step S52, the method further includes:

[0032] Determine whether the vertex angle of the tab area is 90°, if not, execute step S52.

[0033] On the other hand, the present invention also provides a tab residual material measuring device, comprising:

[0034] Tab image segmentation unit: used to segment a tab image according to the gray threshold method to obtain multiple connected domains, and the connected domain with the largest area is used as the main connected domain;

[0035] Tab area differential unit: used to calculate the minimum fitting rectangle of the main connected domain, and perform differential calculation between the fitting rectangle and the main connected domain to obtain the area with the largest differential area as the tab area;

[0036] The tab boundary line generating unit is used to obtain the boundary line of each boundary of the tab area according to the position characteristics of the tab area;

[0037] The ear boundary line extension unit is used to determine multiple boundary edge points according to the intersection points between the extension lines of the two boundary lines;

[0038] Tab boundary residual material measurement unit: used to construct multiple detection areas away from the tab area by using the coordinates of each boundary edge point, clip each detection area to the boundary of the corresponding tab area, and obtain the tab boundary residual material by screening the grayscale threshold of the boundary;

[0039] Tab R corner residual material measurement unit: used to generate an R corner detection area according to the boundary edge point closest to the R corner position and a horizontal inward intensity parameter, and perform cropping grayscale threshold and morphological operation processing on the R corner detection area to obtain the tab R corner residual material.

[0040] Furthermore, the tab boundary residual material measuring unit comprises:

[0041] Boundary edge point connection subunit: used to connect the boundary edge points on one side of the pole ear boundary in pairs to obtain the first extended reference line of each boundary;

[0042] The extended reference line translation subunit is used to translate each first extended reference line to a side away from the tab area by a preset length to obtain a second extended reference line corresponding to each first extended reference line;

[0043] The detection area generating subunit connects the endpoint coordinates of the first extended reference line of each boundary with the endpoint coordinates of the second extended reference line corresponding thereto to obtain the detection area of ​​each boundary;

[0044] Tab boundary residual material measurement subunit: used to clip the boundary of each detection area corresponding to the tab area, and obtain the tab boundary residual material through the grayscale threshold screening of the boundary.

[0045] Furthermore, the tab residual material measuring device also includes: a tab R angle detection and determination unit: used to determine whether the top angle of the tab area is 90°, and if not, start the tab R angle residual material measuring unit.

[0046] On the other hand, the present invention further provides a tab residual material measuring system, which comprises: a storage table, an image acquisition device, and any one of the above-mentioned tab residual material measuring devices;

[0047] The storage table is used for placing the tab to be inspected, and the image acquisition device transmits the acquired image of the tab to be inspected to the tab residual material measuring device.

[0048] The method for measuring the tab residue of the present invention is based on the combination of the grayscale threshold method and the morphological operation method. The tab image to be detected is segmented step by step, the boundary line of the tab area is fitted, and then the extension is set from the boundary line of the tab area. The extended reference line of each boundary is determined by the boundary edge point where the extension line intersects. At this time, the rectangular detection area generated by the extended reference line can cover all areas of the nearest side boundary, that is, there will be no missed detection or under-detection; then, according to the R angle value, the shape of the top angle of the tab is determined, and the special boundary shape is further detected, and finally the full detection of the tab residue, that is, the size measurement and the residual shape measurement, is achieved. In addition, the present invention does not require a standard image, and the combination of the grayscale threshold and the differential operation method can fit the boundary lines of different shapes; it does not require a model to assist in processing image features, so it has high stability and low system overhead.

[0049] For better understanding and implementation, the present invention is described in detail below with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] Figure 1 A structural block diagram of an exemplary tab residual material measuring device provided by the present invention;

[0051] Figure 2 for Figure 1 The execution flow chart of the tab residual material measuring device shown;

[0052] Figure 3-Figure 13 1 is a state diagram of each stage in an exemplary embodiment of measuring the tab residue of the present invention. DETAILED DESCRIPTION

[0053] The present invention analyzes the existing tab residual material measurement technology, which can screen the tab residual material to a certain extent by fitting the tab circumscribed rectangle, but when the tab top angle position is an arc, the abnormality at the top angle cannot be screened out, and only using the grayscale threshold method to determine the boundary information is prone to errors when the boundary threshold is too high or too low; other tab detection and measurement methods that use standard images for comparison cannot meet the simultaneous measurement of residual materials of different tabs, and require a larger model to achieve fast feature matching, and the system overhead of calculation is large, resulting in a waste of resources.

[0054] The method, device and system for measuring the residual material of the tab of the present invention are based on the grayscale threshold method and the morphological operation method. First, the tab area of ​​the tab image is determined, and then the tab vertex shape is determined based on the position coordinates of the tab area in the tab image. Then, the boundary reference line of each boundary of the tab area is generated. According to the intersection position between the boundary reference lines, multiple detection areas that can cover each boundary line of the tab area are generated, and then the grayscale threshold method and the morphological method are operated in the detection area to obtain the residual material boundary and shape of each boundary. The method for measuring the residual material of the tab of the present invention only needs the image acquisition device to shoot the tab image to be detected to complete the residual material measurement of the corresponding tab. In addition, the detection process determines the tab boundary through the grayscale threshold, so that the detection and measurement of tabs of different shapes can be satisfied.

[0055] In the present invention, the tab residual material measurement system includes an image acquisition device, a storage platform and a tab residual material measurement device. The tab to be detected is placed on the storage platform, and the image acquisition device transmits the acquired tab image to be detected to the tab residual material measurement device for processing. Figure 1 , Figure 1 This is a structural block diagram of an exemplary tab residual material measuring device provided by the present invention, which includes: a tab image segmentation unit 10, a tab area difference unit 20, a tab boundary line generation unit 30, a tab boundary line extension unit 40, a tab boundary residual material measuring unit 51 and a tab R corner residual material measuring unit 52. Please also refer to Figure 2 , which is Figure 1 The execution flow chart of the tab residual material measuring device shown in the figure explains the execution flow of each unit of the tab residual material measuring device by measuring the residual material of the tab image to be detected:

[0056] After acquiring the tab image to be detected, the tab image segmentation unit 10 is used to execute step S10: segmenting a tab image according to a gray threshold method to obtain multiple connected domains, and taking the connected domain with the largest area as the main connected domain.

[0057] Grayscale thresholding is an image segmentation technique. Its core idea is to use the grayscale characteristics of an image to segment it into different regions. This method divides the grayscale of an image into several parts by setting one or more thresholds, and considers that pixels belonging to the same part are the same object. The main connected domain obtained by segmenting an ear image using the grayscale thresholding method is shown in the figure below. Figure 3 Although the gray threshold method can obtain edge information, it is prone to errors, resulting in unsatisfactory segmentation results.

[0058] The tab region difference unit 20 is used to execute step S20: calculate the minimum fitting rectangle of the main connected domain, and perform difference calculation between the fitting rectangle and the main connected domain to obtain a region with the largest difference area as the tab region.

[0059] according to Figure 3 As shown in , the minimum fitting rectangle of the main connected domain is a rectangle with the bottom of the pole ear as the side length. After the difference operation, the area of ​​one side of the pole ear and the area of ​​the side away from the pole ear in the pole ear image are obtained. The area with the largest difference is the pole ear area M. At this time, the boundary and area of ​​the pole ear area have been determined. The area after the difference is cropped to obtain the pole ear area, as shown in Figure 4 shown.

[0060] The tab boundary line generating unit 30 is used to execute step S30: according to the characteristics of the tab area, obtain the boundary line of each boundary of the tab area. Specifically, step S30 includes:

[0061] S301: Calculating the center coordinates, vertex angle, width and height of the tab region according to the tab region as position features of the tab region;

[0062] In this embodiment, the horizontal axis of the image is used as the y-axis and the vertical axis of the image is used as the x-axis to determine the center position (C0x, C0y), the vertex angle R0, the width W0 and the height H0 of the tab region M. The vertex angle is used to determine whether to perform R corner residual material measurement.

[0063] S302: calculating the center coordinates, width and height of the tab region according to the tab region, and determining a reference line of each boundary of the tab region;

[0064] According to the positional relationship, the coordinates of the endpoints of the reference line of each boundary are determined. In the present application, the coordinates of the two points of the reference line of the upper boundary are ((C0x-0.5W0, C0y-0.5*H0), (C0x+0.5*W0, C0y-0.5*H0+100)); the coordinates of the two end points of the reference line of the lower boundary are ((C0x-0.5*W0, C0y+0.5*H0), (C0x+0.5*W0, C0y+0.5*H0-100)); the coordinates of the two end points of the reference line of the right boundary are ((C0x+0.5*W0, C0y-0.5*H0), (C0x+0.5*W0, C0y+0.5*H0)); the endpoints are connected by coordinates to obtain the reference line of each boundary of the tab area.

[0065] S303: Generate multiple rectangular frames on the reference line of each boundary of each tab region.

[0066] S304: According to the grayscale threshold, the points where the grayscale mutation occurs in each rectangular frame are obtained, and all the points where the grayscale mutation occurs on each edge are connected and fitted into a straight line according to the least square method to obtain the boundary line of each boundary of the tab area.

[0067] like Figure 5 As shown, multiple rectangular boxes are generated, and within the set rectangular box, intersections with obvious grayscale transitions are found. These points should be in the center of the rectangular box. When the center deviation of the rectangular box is too large, they need to be deleted. Therefore, after the rectangular box is generated in step S303, it is also included, based on all the points on each side where grayscale mutations occur, the correct number of grayscale mutation points in the rectangular box is obtained by counting; the correct proportion of the rectangular boxes is calculated based on the correct number of rectangular boxes, and when the correct proportion of the rectangular boxes is greater than an edge threshold, the least squares method is used for straight line fitting, otherwise the rectangular box is regenerated. - Each rectangular box represents a point, and the grayscale intersections in the rectangular box are calculated according to the least squares method to obtain a correct rectangular box. Then the ratio of the correct rectangular box is calculated. When the ratio is greater than 0.7, it means that the edge of the detection band is detected. By counting the correct proportion of grayscale mutation points, the position of the rectangular box is continuously calibrated to ensure the accuracy of the boundary line of each boundary of the ear area; finally, the center point is fitted to obtain the following Figure 6 Boundary lines shown.

[0068] The tab boundary line extension unit 40 is used to execute step S40: determining a plurality of boundary edge points according to intersection points between extension lines of two boundary lines.

[0069] Extend the upper boundary line and the right boundary line respectively, and the two intersect at point P1; extend the lower boundary line and the right boundary line, and the two intersect at point P2, such as Figure 7 As shown. At this time, the connecting line of P1 and P2 can completely cover the right edge of the tab area. Prepare to measure the remaining material at the edge.

[0070] The measurement of the tab boundary residual material is divided into boundary detection and top angle and root detection. When the top angle and root R angle are 90 degrees, the tab is rectangular, and only the boundary detection is required. However, when the top angle and root R angle are not 90 degrees, there is an arc at the top angle root, and the top angle and root need to be detected separately. Therefore, the measurement of the tab boundary residual material and the measurement of the tab R angle residual material are explained in two parts:

[0071] The tab boundary residual material measurement unit 51 is used to execute step S51: construct multiple detection areas away from the tab area by using the coordinates of each boundary edge point, clip each detection area to the boundary of the tab area, and obtain the tab boundary residual material by filtering the grayscale threshold of the boundary. It includes:

[0072] S511: Connecting each of the boundary edge points on one side of the tab boundary to obtain a first extended reference line of each boundary.

[0073] S512: translating each first extended reference line toward a side away from the tab region by a preset length to obtain a second extended reference line corresponding to each first extended reference line;

[0074] Taking the measurement of the remaining material at the right boundary as an example, P1 and P2 are connected to obtain the first right extended reference line, the grayscale thresholds on both sides of the first right extended reference line are detected, and the side with a smaller grayscale threshold is selected to translate by a preset length to obtain the second right extended reference line.

[0075] S513: sequentially connect the endpoint coordinates of the first extended reference line of each boundary with the endpoint coordinates of the corresponding second extended reference line to obtain a detection area of ​​each boundary;

[0076] Connect the two endpoints of the first right extended reference line and the two endpoints of the second right extended reference line in sequence to form a detection rectangle, such as Figure 8 shown.

[0077] S514: Crop the boundary of the corresponding tab area in each detection area, and obtain the tab boundary residual material through screening through the gray threshold of the boundary.

[0078] The right image is cropped according to the detection area, and the connected domain with a grayscale threshold higher than the preset threshold is selected according to the grayscale threshold, and the Fig. 9 The remaining material is shown.

[0079] When the R angle of the top angle and the root is not 90 degrees, the tab R angle residual material measuring unit 52 performs step S52:

[0080] According to the boundary edge point closest to the R corner position and a horizontal inward intensity parameter, an R corner detection area is generated, and the R corner detection area is clipped with grayscale threshold and morphological operation processing to obtain the tab R corner residual material.

[0081] The horizontal inward strength parameters can be preset or obtained through the following steps:

[0082] Obtain the coordinates of the intersection of the R angle of the pole lug and the boundary line of the top of the pole lug in the pole lug image, and calculate the difference between the coordinates of the intersection and the boundary edge point closest to the intersection coordinates to obtain the coordinate vectors in two directions;

[0083] The coordinate vector in which the vector value is not 0 is used as the horizontal inward strength parameter, which includes the vector value and direction.

[0084] Taking the measurement of the residual material at the top corner as an example, the intersection PP(x3,y3) of the upper arc and the right edge in the tab area is recorded. At this time, the horizontal strength parameter is M=y3-y1. It includes value and direction (i.e., the generation direction of the detection area).

[0085] The upper R corner detection area is obtained by fitting the two points (x1-100, y1-100) and (x1+100, y1+M), and the lower R corner detection area is obtained by fitting the two points (x2-100, y1-M) and (x1+100, y1+100); Fig.10 shown.

[0086] At this time, the upper R corner detection area M-upR and the lower R corner detection area M-dnR are cropped; the bright spot is selected by grayscale threshold, and the area M-UD is obtained according to the connected domain. Fig.11 result.

[0087] The area M-UD is closed using an arc to obtain the area M-temp, as shown below: Fig.12 The structure of M-temp and M-UD is subtracted, and the obtained area contains the residual material, and the residual material is screened according to the preset area and height. Fig.13 The segmentation results are shown.

[0088] The method for measuring the tab residue of the present invention is based on the combination of the grayscale threshold method and the morphological operation method. The tab image to be detected is segmented step by step, the boundary line of the tab area is fitted, and then the extension is set from the boundary line of the tab area. The extended reference line of each boundary is determined by the boundary edge point where the extension line intersects. At this time, the rectangular detection area generated by the extended reference line can cover all areas of the nearest side boundary, that is, there will be no missed detection or under-detection; then, according to the R angle value, the shape of the top angle of the tab is determined, and the special boundary shape is further detected, and finally the full detection of the tab residue, that is, the size measurement and the residual shape measurement, is achieved. In addition, the present invention does not require a standard image, and the combination of the grayscale threshold and the differential operation method can fit the boundary lines of different shapes; it does not require a model to assist in processing image features, so it has high stability and low system overhead.

[0089] An embodiment of the present application further provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, a method for measuring tab residual material described in any one of the above embodiments is implemented.

[0090] The present invention may take the form of a computer program product implemented on one or more storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing program code. Computer-readable storage media include permanent and non-permanent, removable and non-removable media, and information storage can be achieved by any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include but are not limited to: phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, read-only compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, disk storage or other magnetic storage devices or any other non-transmission medium that can be used to store information that can be accessed by a computing device.

[0091] The above-mentioned embodiments only express several implementation methods of the present invention, and the description is relatively specific and detailed, but it cannot be understood as limiting the scope of the invention patent. It should be pointed out that for ordinary technicians in this field, several modifications and improvements can be made without departing from the concept of the present invention, and the present invention is also intended to include these modifications and modifications.

Claims

1. A method for measuring tab residual material, characterized in that: include: S10: segmenting a tab image according to a gray threshold method to obtain multiple connected domains, and taking the connected domain with the largest area as the main connected domain; S20: calculating the minimum fitting rectangle of the main connected domain, and performing difference calculation between the fitting rectangle and the main connected domain, and obtaining a region with the largest difference area as the tab region; S30: Obtaining a boundary line of each boundary of the tab region according to the positional features of the tab region; wherein the step S30 includes: S301: Calculating the center coordinates, vertex angle, width and height of the tab region according to the tab region as position features of the tab region; S302: calculating the center coordinates, width and height of the tab region according to the tab region, and determining a reference line of each boundary of the tab region; S303: generating a plurality of rectangular frames on a reference line of each boundary of each tab region; S304: according to the grayscale threshold, obtaining the points where the grayscale mutation occurs in each rectangular frame, connecting all the points where the grayscale mutation occurs on each edge according to the least square method and fitting them into a straight line, so as to obtain the boundary line of each boundary of the tab area; S40: determining a plurality of boundary edge points according to intersection points between extension lines of two boundary lines; S511: connecting each of the boundary edge points on one side of the tab boundary to obtain a first extended reference line of each boundary; S512: translating each first extended reference line toward a side away from the tab region by a preset length to obtain a second extended reference line corresponding to each first extended reference line; S513: Connecting the endpoint coordinates of the first extended reference line of each boundary with the endpoint coordinates of its corresponding second extended reference line to obtain a detection area of ​​each boundary; S514: cutting the boundary of the corresponding tab area from each detection area, and obtaining the tab boundary residual material by screening the gray threshold of the boundary; S52: Generate an R corner detection area according to the boundary edge point closest to the R corner position and a horizontal inward intensity parameter, perform cropping grayscale threshold and morphological processing on the R corner detection area, and obtain the tab R corner residual material.

2. The method for measuring the tab residue according to claim 1, characterized in that: The horizontal inward strength parameter is obtained by the following steps: Obtain the coordinates of the intersection of the R angle of the pole lug and the boundary line of the top of the pole lug in the pole lug image, and calculate the difference between the coordinates of the intersection and the boundary edge point closest to the intersection coordinates to obtain the coordinate vectors in two directions; A coordinate vector whose vector value is not 0 is used as a horizontal inward strength parameter, wherein the horizontal inward strength parameter includes a vector value and a vector direction.

3. The method for measuring the tab residue according to claim 2, characterized in that: After generating the plurality of rectangular frames in step S303, the method further includes: According to all the grayscale mutation points on each edge, the correct number of grayscale mutation points in the rectangular box is obtained by counting; The correct proportion of rectangular frames is calculated according to the correct number of rectangular frames. When the correct proportion of rectangular frames is greater than an edge threshold, the least square method is used to perform straight line fitting, otherwise the rectangular frames are regenerated.

4. The method for measuring the tab residual material according to any one of claims 1 to 3, characterized in that: Before step S52, the method further includes: Determine whether the vertex angle of the tab area is 90°, if not, execute step S52.

5. A device for measuring residual material of a tab, characterized in that: include: Tab image segmentation unit: used to segment a tab image according to the gray threshold method to obtain multiple connected domains, and the connected domain with the largest area is used as the main connected domain; Tab area differential unit: used to calculate the minimum fitting rectangle of the main connected domain, and perform differential calculation between the fitting rectangle and the main connected domain to obtain the area with the largest differential area as the tab area; The tab boundary line generating unit is used to obtain the boundary line of each boundary of the tab area according to the position characteristics of the tab area; The ear boundary line extension unit is used to determine multiple boundary edge points according to the intersection points between the extension lines of the two boundary lines; A tab boundary residual material measuring unit, the tab boundary residual material measuring unit comprising: Boundary edge point connection subunit: used to connect the boundary edge points on one side of the pole ear boundary in pairs to obtain the first extended reference line of each boundary; The extended reference line translation subunit is used to translate each first extended reference line to a side away from the tab area by a preset length to obtain a second extended reference line corresponding to each first extended reference line; The detection area generating subunit connects the endpoint coordinates of the first extended reference line of each boundary with the endpoint coordinates of the second extended reference line corresponding thereto to obtain the detection area of ​​each boundary; Tab boundary residual material measurement subunit: used to clip the boundary of the tab area corresponding to each detection area, and obtain the tab boundary residual material through the grayscale threshold screening of the boundary; Tab R corner residual material measurement unit: used to generate an R corner detection area according to the boundary edge point closest to the R corner position and a horizontal inward intensity parameter, and perform cropping grayscale threshold and morphological operation processing on the R corner detection area to obtain the tab R corner residual material.

6. The tab residual material measuring device according to claim 5, characterized in that: Also includes: Tab R angle detection and determination unit: used to determine whether the top angle of the tab area is 90°. If not, the tab R angle residual material measurement unit is started.

7. A tab residual material measurement system, characterized in that: include: A storage table, an image acquisition device, and a tab residual material measuring device according to any one of claims 5 to 6; The storage table is used for placing the tab to be inspected, and the image acquisition device transmits the acquired image of the tab to be inspected to the tab residual material measuring device.

Citation Information

Patent Citations

  • Lead detection device

    CN108426524A

  • Tab imaging device and tab size detection method

    CN114018160A