Compression of digital images of scanned documents
AssigneeI.R.I.S.
InventorsMichel DAUW, Pierre De Muelenaere
Life of this patent
Estimating the term…
Abstract
A method for creating a binary mask image from an inputted digital image of a scanned document, including the steps of creating a binarized image by binarizing the inputted digital image, detecting first text regions representing light text on a dark background, and inverting the first text regions, such that the inverted first text regions are interpretable in the same way as dark text on a light background. A method for comparing in a binary image a first pixel blob with a second pixel blob to determine whether they represent matching symbols, including the steps of detecting a line in one blob not present in the other and/or determining if one of the blobs represents an italicized symbol where the other does not.
Claims13
A method for creating a binary mask image from an inputted digital image of a scanned document, comprising the steps of:
- a) creating a binarized image by binarizing said inputted digital image,
- b) detecting in said binarized image first text regions representing light text on a dark background in said inputted digital image,
- c) inverting said first text regions in said binarized image, such that a transformed binary image is formed in which the inverted first text regions are interpretable in the same way as dark text on a light background,
- wherein the step of inverting the first text regions comprises the following steps:
- creating from the binarized image a first image by keeping only first large black blobs with a number of pixels above a predetermined first minimum;
- inverting the first image to create a second image;
- combining with a logical AND the binarized image with the second image to form a third image in which the first large blobs are removed;
- creating from the second image a fourth image by keeping only second large black blobs with a number of pixels above a predetermined second minimum;
- inverting the fourth image to create a fifth image;
- combining with a logical AND the fifth image with the second image to create a sixth image in which the second large black blobs are removed;
- and
- combining with a logical XOR the third image with the sixth image to form the transformed binary image.
A compression method for compressing an inputted digital image of a scanned document, said compression method comprising the steps of:
- a) segmenting said inputted digital image into multiple image layers comprising a foreground image containing color information for foreground elements of said document, a background image containing color information for background elements of said document and a binary mask image for selecting between pixels in said foreground image and said background image upon decompressing said compressed digital image, and
- b) compressing each of the image layers by means of a suitable compression technique, thereby obtaining a compressed digital image,
- wherein creating the binary mask image comprises the steps of:
- creating a binarized image by binarizing said inputted digital image,
- detecting in said binarized image first text regions representing light text on a dark background in said inputted digital image,
- inverting said first text regions in said binarized image, such that a transformed binary image is formed in which the inverted first text regions are interpretable in the same way as dark text on a light background, and
- wherein the step of inverting said first text regions comprises the following subsequent steps:
- creating from the binarized image a first image by keeping only first large black blobs with a number of pixels above a predetermined first minimum;
- inverting the first image to create a second image;
- combining with a logical AND the binarized image with the second image to form a third image in which the first large blobs are removed;
- creating from the second image a fourth image by keeping only second large black blobs with a number of pixels above a predetermined second minimum;
- inverting the fourth image to create a fifth image;
- combining with a logical AND the fifth image with the second image to create a sixth image in which the second large black blobs are removed;
- and
- combining with a logical XOR the third image with the sixth image to form the transformed binary image.
A computer program product directly loadable into a non-transitory memory of a computer, comprising software code portions for performing the following steps when said product is run on a computer:
- a) segmenting an inputted digital image of a scanned document into multiple image layers comprising a foreground image containing color information for foreground elements of said document, a background image containing color information for background elements of said document and a binary mask image for selecting between pixels in said foreground image and said background image upon decompressing said compressed digital image, and
- b) compressing each of the image layers by means of a suitable compression technique, thereby obtaining a compressed digital image,
- wherein creating the binary mask image comprises the steps of:
- creating a binarized image by binarizing said inputted digital image,
- detecting in said binarized image first text regions representing light text on a dark background in said inputted digital image,
- inverting said first text regions in said binarized image, such that a transformed binary image is formed in which the inverted first text regions are interpretable in the same way as dark text on a light background,
- wherein the step of inverting said first text regions comprises the following subsequent steps:
- creating from the binarized image a first image by keeping only first large black blobs with a number of pixels above a predetermined first minimum;
- inverting the first image to create a second image;
- combining with a logical AND the binarized image with the second image to form a third image in which the first large blobs are removed;
- creating from the second image a fourth image by keeping only second large black blobs with a number of pixels above a predetermined second minimum;
- inverting the fourth image to create a fifth image;
- combining with a logical AND the fifth image with the second image to create a sixth image in which the second large black blobs are removed;
- and
- combining with a logical XOR the third image with the sixth image to form the transformed binary image.
Dependencies are inferred from the claim text.