Character segmentation device and method

By calculating the accumulated energy matrix and finding the pixel thin slits, the problem of inaccurate hyphen segmentation in the prior art is solved, and accurate segmentation and recognition of multiple characters is achieved.

CN113971802BActive Publication Date: 2025-05-30CHINA TELECOM CLOUD TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202010646684.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-07-07
Publication Date
2025-05-30
Estimated Expiration
2040-07-07

AI Technical Summary

Technical Problem

The prior art is difficult to accurately segment multiple characters in an image, especially hyphen, resulting in the accuracy of character recognition being affected.

Method used

By calculating the accumulated energy matrix of the pixel value matrix, find the pixel slit with the smallest accumulated energy value throughout the entire image, and use the slit for character segmentation.

Benefits of technology

Accurate segmentation of sticky and non-adhesive hyphens is achieved, improving character recognition accuracy, and suitable for a variety of character images, including skewed and distorted characters.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113971802B_ABST
    Figure CN113971802B_ABST
Patent Text Reader

Abstract

The present disclosure relates to a character segmentation device and method. A character segmentation device is provided, including: a processing circuit configured to: receive a pixel value matrix V = V(i, j) of a binarized image including at least two characters, where each character does not include two character parts that are disconnected in the left-right direction, the pixel value of the pixel at the position where the character exists is 1, and the other pixel values are 0, 1 ≤ i ≤ M, 1 ≤ j ≤ N, M is the number of rows, N is the number of columns, and i, j, M, and N are integers; calculate an accumulated energy matrix E = E(i, j) of the matrix, including: when 1 < i ≤ M and 1 < j < N, making E(i, j) equal to the sum of the minimum value among E(i - 1, j - 1), E(i - 1, j), and E(i - 1, j + 1) and V(i, j); in the obtained accumulated energy matrix, find a pixel slit that runs through all rows, where each pixel in the slit is the pixel with the minimum accumulated energy value in the row where the pixel is located; and use the slit to separate one character from other characters.
Need to check novelty before this filing date? Find Prior Art

Claims

1. A character segmentation device, comprising: one or more processors; a memory storing executable instructions, which when executed by the one or more processors cause the one or more processors to: receive a pixel value matrix V = V(i, j) of a binarized character image including at least two characters or character parts, where each character or character part does not include two character parts that are disconnected in the left - right direction, and in the matrix, the pixel value of a pixel at a position where there is a character is 1, and the pixel value of other pixels is 0, where 1 ≤ i ≤ M, 1 ≤ j ≤ N, M is the number of rows of the matrix, N is the number of columns of the matrix, and i, j, M, and N are all positive integers; calculate an accumulated energy matrix E = E(i, j) of the matrix, including: when i = 1, let the accumulated energy value E(i, j) be equal to V(i, j); when 1 < i ≤ M and j = 1, let E(i, j) be equal to the sum of the smaller value of E(i - 1, j) and E(i - 1, j + 1) and V(i, j); when 1 < i ≤ M and 1 < j < N, let E(i, j) be equal to the sum of the minimum value among E(i - 1, j - 1), E(i - 1, j), and E(i - 1, j + 1) and V(i, j); when 1 < i ≤ M and j = N, let E(i, j) be equal to the sum of the smaller value of E(i - 1, j - 1) and E(i - 1, j) and V(i, j); in the calculated accumulated energy matrix E = E(i, j), find a pixel slit that runs through all rows from the first row to the M - th row, where each pixel in the pixel slit is the pixel with the minimum accumulated energy value in the row where the pixel is located; and use the pixel slit to separate one character or character part from the at least two characters or character parts from other characters or character parts.

2. The character segmentation device according to claim 1, wherein, calculating the accumulated energy matrix E = E(i, j) of the matrix further includes: for 1 < i ≤ M, each time calculating E(i, j), record position information indicating which one of E(i - 1, j - 1), E(i - 1, j), and E(i - 1, j + 1) the accumulated energy value of the previous row added to V(i, j) comes from, and the finding of the pixel slit that runs through all rows from the first row to the M - th row includes: starting from the last row of the accumulated energy matrix E = E(i, j), searching upward for the pixel slit passing through the pixels indicated by the position information.

3. The character segmentation device according to claim 1 or 2, wherein, the pixel slit includes only one pixel in each row of the accumulated energy matrix E = E(i, j).

4. The character segmentation device according to claim 2, wherein, for 1 < i ≤ M and 1 < j < N, each time calculating E(i, j), if the three values of E(i - 1, j - 1), E(i - 1, j), and E(i - 1, j + 1) are equal, then the recording includes recording the position information indicating E(i - 1, j).

5. The character segmentation device according to claim 2, wherein, For 1 < i ≤ M and 1 < j < N, each time E(i, j) is calculated, if E(i - 1, j - 1) and E(i - 1, j + 1) are equal and less than E(i - 1, j), then the record includes the position information representing E(i - 1, j - 1).

6. The character segmentation device according to claim 2, wherein, For 1 < i ≤ M and 1 < j < N, each time E(i, j) is calculated, if E(i - 1, j - 1) and E(i - 1, j) are equal and less than E(i - 1, j + 1), or if E(i - 1, j + 1) and E(i - 1, j) are equal and less than E(i - 1, j - 1), then the record includes the position information representing E(i - 1, j).

7. The character segmentation device according to claim 3, wherein, If the last row of the cumulative energy matrix E = E(i, j) includes more than one pixel with the minimum cumulative energy value, then finding the pixel slit passing through all rows from the first row to the M-th row includes: starting from the leftmost pixel with the minimum cumulative energy value in the last row and searching upward for the pixel slit passing through the pixel represented by the position information.

8. The character segmentation device according to claim 1, wherein, The at least two characters or character parts include two adhered characters or character parts, and the pixel slit separates the two adhered characters or character parts.

9. The character segmentation device according to claim 1, wherein, The left and right boundaries of the binary character image are respectively located at the left or right edge of a character or character part.

10. A character segmentation method, comprising: Receiving the pixel value matrix V = V(i, j) of a binary character image including at least two characters or character parts, where each of the characters or character parts does not include two character parts that are disconnected in the left - right direction. In the matrix, the pixel value of the pixel at the position where there is a character is 1, and the pixel value of other pixels is 0, where 1 ≤ i ≤ M, 1 ≤ j ≤ N, M is the number of rows of the matrix, N is the number of columns of the matrix, and i, j, M, and N are all positive integers; Calculating the cumulative energy matrix E = E(i, j) of the matrix, including: When i = 1, making the cumulative energy value E(i, j) equal to V(i, j); When 1 < i ≤ M and j = 1, making E(i, j) equal to the sum of the smaller value of E(i - 1, j) and E(i - 1, j + 1) and V(i, j); When 1 < i ≤ M and 1 < j < N, making E(i, j) equal to the sum of the minimum value among E(i - 1, j - 1), E(i - 1, j), and E(i - 1, j + 1) and V(i, j); When 1 < i ≤ M and j = N, making E(i, j) equal to the sum of the smaller value of E(i - 1, j - 1) and E(i - 1, j) and V(i, j); In the calculated cumulative energy matrix E = E(i, j), finding the pixel slit passing through all rows from the first row to the M-th row, where each pixel in the pixel slit is the pixel with the minimum cumulative energy value in the row where the pixel is located; and Use the pixel slit to separate one of the at least two characters or character parts from the other characters or character parts.

11. The method according to claim 10, wherein, Calculating the cumulative energy matrix E = E(i, j) of the matrix further includes: For 1 < i ≤ M, each time E(i, j) is calculated, record the position information indicating which one of E(i - 1, j - 1), E(i - 1, j), and E(i - 1, j + 1) the cumulative energy value of the previous row added to V(i, j) comes from, and The searching for the pixel slit passing through all rows from the first row to the M-th row includes: Starting from the last row of the cumulative energy matrix E = E(i, j), search upward for the pixel slit passing through the pixels represented by the position information.

12. The method according to claim 10 or 11, wherein, The pixel slit includes only one pixel in each row of the cumulative energy matrix E = E(i, j).

13. The method according to claim 11, wherein, For 1 < i ≤ M and 1 < j < N, each time E(i, j) is calculated, if the three values of E(i - 1, j - 1), E(i - 1, j), and E(i - 1, j + 1) are equal, then record the position information indicating E(i - 1, j).

14. The method according to claim 11, wherein, For 1 < i ≤ M and 1 < j < N, each time E(i, j) is calculated, if E(i - 1, j - 1) and E(i - 1, j + 1) are equal and less than E(i - 1, j), then record the position information indicating E(i - 1, j - 1).

15. The method according to claim 11, wherein, For 1 < i ≤ M and 1 < j < N, each time E(i, j) is calculated, if E(i - 1, j - 1) and E(i - 1, j) are equal and less than E(i - 1, j + 1), or if E(i - 1, j + 1) and E(i - 1, j) are equal and less than E(i - 1, j - 1), then record the position information indicating E(i - 1, j).

16. The method according to claim 12, wherein, If the last row of the cumulative energy matrix E = E(i, j) includes more than one pixel with the minimum cumulative energy value, then starting from the leftmost pixel with the minimum cumulative energy value in the last row, search upward for the pixel slit passing through the pixels represented by the position information.

17. The method according to claim 10, wherein, The at least two characters or character parts include two adhered characters or character parts, and the pixel slit separates the two adhered characters or character parts.

18. The method according to claim 10, wherein, The left and right boundaries of the binarized character image are respectively located at the left or right edge of a character or character part.

19. A readable storage medium, including executable instructions, which when executed by an information processing device, cause the information processing device to execute the character segmentation method according to any one of claims 10 - 18.

Citation Information

Patent Citations

  • Character-touching graph verification code recognition method

    CN104252620A

  • Segmentation method and device for handwritten adhering string and electronic equipment

    CN107341429A