Patent Document ID: 9230383
Application ID: 13730757
Patent Status: 1

Claim One:
1. A method for compressing a binary image representing a document containing text regions, the method comprising: (a) segmenting the text regions into a plurality of symbol images, each symbol image representing a symbol of text, each symbol image being bound by a bounding box having a location and a size; (b) classifying each symbol image obtained in step (a) into one of a plurality of classes, each class being represented by a template image and a class index, including, for each symbol image being classified: (b1) comparing the symbol image with each template image to determine whether they match each other, including comparing at least two features of the symbol image with the corresponding at least two features of the template image, the at least two features including a first feature and a second feature, the comparing step including, for each template image being compared: calculating a first and a second difference number representing, respectively, a number of the first feature and a number of the second feature of the symbol image that are different from corresponding features of the template image, wherein the symbol image and the template image are determined to match each other if the first difference number is smaller than or equal to a first threshold value and the second difference number is smaller than or equal to a second threshold value; (b2) if a match is found in step (b1), recording the class index corresponding to the matched template in association with the symbol image being classified; and (b3) if no match is found in step (b1), adding a new class to the plurality of classes, by using the image of the symbol image being classified as the template image of the new class and assigning a class index to the new class, and recording the class index in association with the symbol image being classified; (c) resizing the template image of each class to a final size; and (d) storing, as compressed image data, the resized template image for each of the plurality of classes along with its class index, the bounding box location and size for each symbol image obtained in step (a), and the class index for each symbol image obtained in step (b2) or (b3); wherein in step (c), the final sizes for at least some template images are different from each other, wherein step (c) includes: (c1) calculating a similarity measure between each template image with each other template image; (c2) determining a final size for each template image based on the calculated similarity measure with other template images; and (c3) resizing each template image to the final size determined in step (c2).