Apparatus and method of analyzing layout of document, and computer product
First Claim
1. A computer-readable medium storing instructions for analyzing a layout of a document, which, when executed by a computer, causes the computer to perform operations comprising:
- extracting continuous black pixels as black pixel linkage components based on data for an image of the document;
setting a circumscribed rectangle for each of the black pixel components, the circumscribed rectangle being circumscribed to each of the black pixel components and used as a character candidate;
classifying character sizes for each of the circumscribed rectangles into three categories of large, standard and small based on a value of a long side thereof;
integrating a first circumscribed rectangle having a small character size with a second circumscribed rectangle having a different character size from the first circumscribed rectangle when the first circumscribed rectangle and the second circumscribed rectangle overlap each other, and when a circumscribed rectangle formed from the first circumscribed rectangle and the second circumscribed rectangle is determined to be approximately square;
selecting two circumscribed rectangles having a shortest Euclidian distance between barycenters of the two circumscribed rectangles from a group of circumscribed rectangles;
setting integration of the two selected circumscribed rectangles as a character candidate element when the integration of the two circumscribed rectangles is determined to be approximately square;
extracting character candidate elements from the black pixel linkage components;
extracting a plurality of the character candidate elements as a line element, among character candidate elements aligned in line orientation, each amount of displacement of the extracted character candidate elements in orientation perpendicular to the line orientation being smaller than or equal to a threshold value;
generating a line rectangle as a line candidate in the line orientation based on the extracted character candidate elements; and
segmenting the line rectangle into two line rectangles, in response to the line rectangle overlapping another line rectangle, before and after the another line rectangle.
1 Assignment
0 Petitions
Accused Products
Abstract
In an apparatus for analyzing a layout of a document, a character candidate element generator generates character candidate elements from black pixel linkage components of a document image. A horizontally oriented line rectangle generator sets a plurality of character candidate elements as a line candidate rectangle, among character candidate elements aligned in horizontal line orientation, when each amount of displacement of the set character candidate elements in a vertical orientation with respect to the horizontal line orientation, is smaller than or equal to a threshold value. A horizontally oriented paragraph-box generator sets a plurality of line candidate elements having approximately the same length as each other in the vertical orientation, as a paragraph candidate element.
13 Citations
33 Claims
-
1. A computer-readable medium storing instructions for analyzing a layout of a document, which, when executed by a computer, causes the computer to perform operations comprising:
-
extracting continuous black pixels as black pixel linkage components based on data for an image of the document; setting a circumscribed rectangle for each of the black pixel components, the circumscribed rectangle being circumscribed to each of the black pixel components and used as a character candidate; classifying character sizes for each of the circumscribed rectangles into three categories of large, standard and small based on a value of a long side thereof; integrating a first circumscribed rectangle having a small character size with a second circumscribed rectangle having a different character size from the first circumscribed rectangle when the first circumscribed rectangle and the second circumscribed rectangle overlap each other, and when a circumscribed rectangle formed from the first circumscribed rectangle and the second circumscribed rectangle is determined to be approximately square; selecting two circumscribed rectangles having a shortest Euclidian distance between barycenters of the two circumscribed rectangles from a group of circumscribed rectangles; setting integration of the two selected circumscribed rectangles as a character candidate element when the integration of the two circumscribed rectangles is determined to be approximately square; extracting character candidate elements from the black pixel linkage components; extracting a plurality of the character candidate elements as a line element, among character candidate elements aligned in line orientation, each amount of displacement of the extracted character candidate elements in orientation perpendicular to the line orientation being smaller than or equal to a threshold value; generating a line rectangle as a line candidate in the line orientation based on the extracted character candidate elements; and segmenting the line rectangle into two line rectangles, in response to the line rectangle overlapping another line rectangle, before and after the another line rectangle. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11)
-
-
12. An apparatus for analyzing a layout of a document comprising:
-
a black pixel linkage component extracting unit that extracts continuous black pixels as black pixel linkage components based on data for an image of the document; a circumscribed rectangle setting unit that sets a circumscribed rectangle for each of the black pixel components, the circumscribed rectangle being circumscribed to each of the black pixel components and used as a character candidate; a character size classifying unit that classifies character sizes for each of the circumscribed rectangles into three categorizes of large, standard and small based on a value of a long side thereof; an integrating unit that integrates a first circumscribed rectangle having a small character size with a second circumscribed rectangle having a different character size from the first circumscribed rectangle when the first circumscribed rectangle and the second circumscribed rectangle overlap each other, and when a circumscribed rectangle formed from the first circumscribed rectangle and the second circumscribed rectangle is determined to be approximately square; a selecting unit that selects two circumscribed rectangles having a shortest Euclidian distance between barycenters of the two circumscribed rectangles from a group of circumscribed rectangles; a setting unit that sets integration of the two selected circumscribed rectangles as a character candidate element when the integration of the two circumscribed rectangles is determined to be approximately square; a character candidate element extracting unit that extracts character candidate elements from the black pixel linkage components; a line element extracting unit that extracts a plurality of the character candidate elements as a line element, among character candidate elements aligned in line orientation, each amount of displacement of the extracted character candidate elements in orientation perpendicular to the line orientation being smaller than or equal to a threshold value; a line rectangle generating unit that generates a line rectangle as a line candidate in the line orientation based on the extracted character candidate elements; and a line rectangle segmenting unit that segments the line rectangle into two line rectangles, in response to the line rectangle overlapping another line rectangle, before and after the another line rectangle. - View Dependent Claims (13, 14, 15, 16, 17, 18, 19, 20, 21, 22)
-
-
23. A method of analyzing a layout of a document comprising steps of:
-
extracting continuous black pixels as black pixel linkage components based on data for an image of the document; setting a circumscribed rectangle for each of the black pixel components, the circumscribed rectangle being circumscribed to each of the black pixel components and used used as a character candidate; classifying character sizes for each of the circumscribed rectangles into three categories of large, standard and small based on a value of a long side thereof; integrating a first circumscribed rectangle having a small character size with a second circumscribed rectangle having a different character size from the first circumscribed rectangle when the first circumscribed rectangle and the second circumscribed rectangle overlap each other, and when a circumscribed rectangle formed from the first circumscribed rectangle and the second circumscribed rectangle is determined to be approximately square; selecting two circumscribed rectangles having a shortest Euclidian distance between barycenters of the two circumscribed rectangles from a group of circumscribed retangles; setting integration of the two selected circumscribed rectangles as a character candidate element when the integration of the two circumscribed rectangles is determined to be approximately square; extracting character candidate elements from the black pixel linkage components; extracting a plurality of the character candidate elements as a line element, among character candidate elements aligned in line orientation, each amount of displacement of the extracted character candidate elements in orientation perpendicular to the line orientation being smaller than or equal to a threshold value; generating a line rectangle as a line candidate in the line orientation based on the extracted character elements; and segmenting the line rectangle into two line rectangles, in response to the line rectangle overlapping another line rectangle, before and after the another line rectangle. - View Dependent Claims (24, 25, 26, 27, 28, 29, 30, 31, 32, 33)
-
Specification