Document image segmentation based on pixel classification
First Claim
1. A method implemented in a data processing apparatus for segmenting a document image containing a plurality of types of contents into multiple image segments, each image segment containing only one type of content, the method comprising:
- (a) initializing a segmentation map having a size identical to that of the document image, by classifying each pixel of the document image into one of a plurality of pixel types based on content of the document image and assigning each pixel of the segmentation map a pixel type identical to the pixel type of the corresponding pixel of the document image, wherein the plurality of pixel types include at least a background pixel type, a first pixel type, and a second pixel type;
(b) defining a working map, the working map being identical to the segmentation map as initialized in step (a);
(c) for each of a plurality of pixel blocks in the working map, evaluating the pixels in the block, and based on the evaluation, assigning a pixel value to a pixel of a combined map corresponding to the block of the working map and assigning pixel values to pixels of a pixel block of the segmentation map that corresponds to the pixel of the combined map, including;
(c1) when the plurality of pixels in the block of the working map include only the background pixel type, assigning the background pixel type to the corresponding pixel of the combined map, and keeping the pixel type of each pixel in the corresponding block of the segmentation map unchanged,(c2) when the plurality of pixels in the block of the working map include only the first pixel type or include only the first pixel type and the background pixel type, assigning the first pixel type to the corresponding pixel of the combined map, and assigning the first pixel type to each pixel in the corresponding block of the segmentation map,(c3) when the plurality of pixels in the block of the working map include only the second pixel type or include only the second pixel type and the background pixel type, assigning the second pixel type to the corresponding pixel of the combined map, and assigning the second pixel type to each pixel in the corresponding block of the segmentation map, and(c4) when the plurality of pixels in the block of the working map include both the first pixel type and the second pixel type or include an unknown pixel type, assigning the unknown pixel type to the corresponding pixel of the combined map, and keeping the pixel type of each pixel in the corresponding block of the segmentation map unchanged,whereby the combined map is generated and the segmentation map is modified;
(d) repeatedly performing step (c) a number of rounds, each round using the combined map obtained from the last round as the working map, wherein in each round that step (c) is performed, the combined map is smaller in size than in the last round and each pixel block of the segmentation map that corresponds to a pixel of the combined map is larger in size than in the last round;
(e) after step (d), changing pixel types of any pixels of the segmentation map that have the background type to one of the other types of the plurality of pixel types; and
(f) segmenting the document image into the multiple image segments based on the segmentation map obtained in step (e), wherein each image segment corresponds to an area in the segmentation map that has only one type of pixels.
1 Assignment
0 Petitions
Accused Products
Abstract
In a document image segmentation method, pixels of the image are classified into different types such as background, text, table, etc., to generate an initial segmentation map. The initial segmentation map is processed multiple rounds. In each round, a working map is divided into 2×2 pixel blocks; based on pixel types in the block, a corresponding pixel in a combined map is assigned a type, and pixels in a corresponding block in the segmentation map are modified either to change some background pixels to other types or keep them unchanged. The initial segmentation map is used as the working map in the first round, and the combined map of the last round is used as the working map for the next round. After a number of rounds, remaining background pixels of the segmentation map are changed to other types based on the types of their neighboring areas.
9 Citations
14 Claims
-
1. A method implemented in a data processing apparatus for segmenting a document image containing a plurality of types of contents into multiple image segments, each image segment containing only one type of content, the method comprising:
-
(a) initializing a segmentation map having a size identical to that of the document image, by classifying each pixel of the document image into one of a plurality of pixel types based on content of the document image and assigning each pixel of the segmentation map a pixel type identical to the pixel type of the corresponding pixel of the document image, wherein the plurality of pixel types include at least a background pixel type, a first pixel type, and a second pixel type; (b) defining a working map, the working map being identical to the segmentation map as initialized in step (a); (c) for each of a plurality of pixel blocks in the working map, evaluating the pixels in the block, and based on the evaluation, assigning a pixel value to a pixel of a combined map corresponding to the block of the working map and assigning pixel values to pixels of a pixel block of the segmentation map that corresponds to the pixel of the combined map, including; (c1) when the plurality of pixels in the block of the working map include only the background pixel type, assigning the background pixel type to the corresponding pixel of the combined map, and keeping the pixel type of each pixel in the corresponding block of the segmentation map unchanged, (c2) when the plurality of pixels in the block of the working map include only the first pixel type or include only the first pixel type and the background pixel type, assigning the first pixel type to the corresponding pixel of the combined map, and assigning the first pixel type to each pixel in the corresponding block of the segmentation map, (c3) when the plurality of pixels in the block of the working map include only the second pixel type or include only the second pixel type and the background pixel type, assigning the second pixel type to the corresponding pixel of the combined map, and assigning the second pixel type to each pixel in the corresponding block of the segmentation map, and (c4) when the plurality of pixels in the block of the working map include both the first pixel type and the second pixel type or include an unknown pixel type, assigning the unknown pixel type to the corresponding pixel of the combined map, and keeping the pixel type of each pixel in the corresponding block of the segmentation map unchanged, whereby the combined map is generated and the segmentation map is modified; (d) repeatedly performing step (c) a number of rounds, each round using the combined map obtained from the last round as the working map, wherein in each round that step (c) is performed, the combined map is smaller in size than in the last round and each pixel block of the segmentation map that corresponds to a pixel of the combined map is larger in size than in the last round; (e) after step (d), changing pixel types of any pixels of the segmentation map that have the background type to one of the other types of the plurality of pixel types; and (f) segmenting the document image into the multiple image segments based on the segmentation map obtained in step (e), wherein each image segment corresponds to an area in the segmentation map that has only one type of pixels. - View Dependent Claims (2, 3, 4, 5, 6, 7)
-
-
8. A computer program product comprising a computer usable non-transitory medium having a computer readable program code embedded therein for controlling a data processing apparatus, the computer readable program code configured to cause the data processing apparatus to execute a process for segmenting a document image containing a plurality of types of contents into multiple image segments, each image segment containing only one type of content, the process comprising:
-
(a) initializing a segmentation map having a size identical to that of the document image, by classifying each pixel of the document image into one of a plurality of pixel types based on content of the document image and assigning each pixel of the segmentation map a pixel type identical to the pixel type of the corresponding pixel of the document image, wherein the plurality of pixel types include at least a background pixel type, a first pixel type, and a second pixel type; (b) defining a working map, the working map being identical to the segmentation map as initialized in step (a); (c) for each of a plurality of pixel blocks in the working map, evaluating the pixels in the block, and based on the evaluation, assigning a pixel value to a pixel of a combined map corresponding to the block of the working map and assigning pixel values to pixels of a pixel block of the segmentation map that corresponds to the pixel of the combined map, including; (c1) when the plurality of pixels in the block of the working map include only the background pixel type, assigning the background pixel type to the corresponding pixel of the combined map, and keeping the pixel type of each pixel in the corresponding block of the segmentation map unchanged, (c2) when the plurality of pixels in the block of the working map include only the first pixel type or include only the first pixel type and the background pixel type, assigning the first pixel type to the corresponding pixel of the combined map, and assigning the first pixel type to each pixel in the corresponding block of the segmentation map, (c3) when the plurality of pixels in the block of the working map include only the second pixel type or include only the second pixel type and the background pixel type, assigning the second pixel type to the corresponding pixel of the combined map, and assigning the second pixel type to each pixel in the corresponding block of the segmentation map, and (c4) when the plurality of pixels in the block of the working map include both the first pixel type and the second pixel type or include an unknown pixel type, assigning the unknown pixel type to the corresponding pixel of the combined map, and keeping the pixel type of each pixel in the corresponding block of the segmentation map unchanged, whereby the combined map is generated and the segmentation map is modified; (d) repeatedly performing step (c) a number of rounds, each round using the combined map obtained from the last round as the working map, wherein in each round that step (c) is performed, the combined map is smaller in size than in the last round and each pixel block of the segmentation map that corresponds to a pixel of the combined map is larger in size than in the last round; (e) after step (d), changing pixel types of any pixels of the segmentation map that have the background type to one of the other types of the plurality of pixel types; and (f) segmenting the document image into the multiple image segments based on the segmentation map obtained in step (e), wherein each image segment corresponds to an area in the segmentation map that has only one type of pixels. - View Dependent Claims (9, 10, 11, 12, 13, 14)
-
Specification