CA2019133C - Method for high quality compression of binary text images - Google Patents

Method for high quality compression of binary text images

Info

Publication number
CA2019133C
CA2019133C CA002019133A CA2019133A CA2019133C CA 2019133 C CA2019133 C CA 2019133C CA 002019133 A CA002019133 A CA 002019133A CA 2019133 A CA2019133 A CA 2019133A CA 2019133 C CA2019133 C CA 2019133C
Authority
CA
Canada
Prior art keywords
compression
pixels
data
accordance
vicinity
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
CA002019133A
Other languages
French (fr)
Other versions
CA2019133A1 (en
Inventor
Dan Shmuel Chevion
Ehud Dov Karnin
Eugeniusz Walach
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
International Business Machines Corp
Original Assignee
International Business Machines Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by International Business Machines Corp filed Critical International Business Machines Corp
Publication of CA2019133A1 publication Critical patent/CA2019133A1/en
Application granted granted Critical
Publication of CA2019133C publication Critical patent/CA2019133C/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N1/00Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
    • H04N1/41Bandwidth or redundancy reduction
    • H04N1/411Bandwidth or redundancy reduction for the transmission or storage or reproduction of two-tone pictures, e.g. black and white pictures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T9/00Image coding

Abstract

The invention relates to a method for the compression and decompression of binary text images. The method distinguishes between large low-frequency areas and small high-frequency areas in the original frame. For the low-frequency areas, a scheme for lossy compression is used, whereas for the high-frequency areas, a scheme permitting lossless compression is applied. The compression/ decompression process involves the following five stages - (1) prefiltering to remove all black patches (e.g. by removing all black pixels, except where they belong to a large black segment; (2) fast evaluation of compressibility by partitioning the images into mutually exclusive segments and applying different compression modes to each segment; (3) connectivity oriented subsampling to reduce the resolution in horizontal and vertical directions (the image is segmented into blocks, and a 1-pixel representation for each block is determined); (4) lossless compression and decompression where the reduced file is compressed by conventional techniques; and (5) reconstruction by sequence reversal (lossless decompression will retrieve the subsampled file, expansion of the subsampled file through replacement of each pixel by a block having equal value, postfiltering).

Description

2~91 33 jZ9-89-002 ~- 1 -METHOD FOR HIGH-QUALITY COMPRESSION OF BINARY TEXT IMAGES

DESCRIPTION

This invention relates to a method for compressing binary image information, in particular in cases where the image comprises text, i.e. only black or white areas. This invention is, therefore, applicable in the electronic processing of information presented on printed or handwritten documents, where the storage of the information while the various processing steps are being performed, the storage for future reference or retrieval and the treansmission over data links present space and/or time problems.

The handling of paper documents is a daily routine in today s office environments. Considerations having to do with the care for the natural resources required for manufacturing the paper used for the documents, the speed of preparing and handling the documents to make them serve their purpose, and their storage and possible later retrieval, have resulted in efforts to reduce the number of documents circulated and to leave the working with the documents to automatic record handling devices. The physical handling of the documents is one important aspect in this connection, the other, possibly more important aspect is the treatment of the information contained in the documents.

The treatment of the information contained in documents generally involves the acquisition of the information by some reading device, the transformation of the acquired information into a machine-readable code, the storing of the coded information for later, and possibly repeated processing, the actual processing of the information, and finally the output of the results of the processing, or simply of the unprocessed original information. This _,Z9-89-002 - 2 _ 2~1 91 33 output may take visual form, as on a display unit, or in print, or be purely electronic.

The acquisition of the information by a reading device, such as an optical scanner, should be performed with a reasonably high resolution lest the information content should become mutilated or partially lost. Accordingly, the reading device will produce a high volume of scan data which in turn require a large memory capacity for storage. As a typical example, a page of the A4 size (297 x 210 mm), scanned at 100 pels/cm (where "pel" stands for picture element and is either a white or black dot), requires about 700 kBytes of storage space. Even a rather modest number of documents, say a couple of thousands, would call for an unreasonably big memory.

To alleviate this problem, known document scanning systems are provided with data compression routines which save about one order of magnitude so that the compressed data of a scanned A4 page can be accommodated on 25 to 75 kBytes of storage space, depending, of course, on the content of the scanned page. Very clever algorithms, based on arithmetic coding, can achieve a further reduction of about 16%. See, for example, R. Arps, T.
Friedman, G. Langdon and T. Truong, " Adaptive Binary Image Compression: Chip Status and Applications", Image ITL, May 1986.

It goes without saying that any compression system must permit later decompression of the information, be it for processing or output. Whether the compressing or decompressing can be done with a certain loss of information, or degradation of quality, depends on the purpose for which the output is needed, and on the amount of redundancy contained in the original image.

In a number of applications where very large volumes of documents must be handled, such as, e.g., in connection with a census, it is essential to increase the _;Z9-89-002 - 3 ~

compression ratio to its limits, at least by another order of magnitude.

One possible approach to this problem is described in "Combined Symbol Matching Facsimile Data Compression System" by W.K. Pratt, P.J. Capitant, W. Chen, E.R.
Hamilton and R.H. Wallis., in Proc. IEEE, Vol. 68, No.7, July 1980. There it was proposed to feed binary images into a character matching process. Recognized characters will be represented very efficiently by means of their alphanumeric form. Then the remaining residue information will be compressed separately as a conventional binary image. This amounts to an about two-fold increase in compression ratio, although the efficiency of this scheme largely depends on the percentage of recognized characters and on the degree of digitization noise.

An improved technique is disclosed in US-A-4,499,499 Brickman et al., where instead of single character recognition the matching of large symbols, such as individual words in the text, is considered. This technique requires, however, the storing of an addressable library of facsimile symbols, or words, and it does not work for words not found in that library.

It is an object of the present invention to propose a method for the compression of image data with a compression ratio considerably larger than offered by conventional compression methods. The inventive method is based on the cognition that this cannot be achieved if one was to insist on lossless compression, i.e.
compression that would permit an exact reconstruction of the original information. Actually, in the majority of practical applications involving text images, lossless compression is not essential. It suffices to have a legible text which subjectively is indistinguishable from the original.

_,Z9-89-002 - 4 ~ 2~9~33 A trivial approach to this would be to reduce the resolution of the scanning. Indeed, many conventional scanners and facsimile devices do allow this option.
However, while this approach might be acceptable for some types of image, such as large handwritten text, it would mean unacceptable distortion for other types, like those containing small print. Even for medium-sized text, simple reduction of resolution would cause image quality deterioration which might be annoying to the user.

In contrast, the present invention attempts to solve this problem through a method featuring an overall high compression ratio by means of "lossy" encoding where this is tolerable, and by means of "lossless" encoding where this is essential in maintaining the reproduction quality. This proposal, accordingly, involves the use of variable compression ratios which depend on an evaluation of the nature of the binary image at hand, with lossy compression being limited to large low-frequency areas (where quality deterioration is subjectively unnoticeable, and with small high-frequency areas being compressed losslessly.

The method of the invention will even go one step further: Even in areas where lossy compression is found feasible, it will not be applied indiscriminately.
Instead, the compression ratio to be used will in each particular case be adapted to the preservation of the continuity and smoothness of the lines in order to guarantee an overa]l excellent image quality.

Details of the invention will now be described by way of example with reference to the drawing in which:

Fig. 1 is an original, completed form with a colored background;

Fig. 2 is the form of Fig. 1 after filtering;

20~gl33 SZg-89-002 - 5 -ig. 3 is a flow chart showing the determination of the compressibility;
ig. 4 is a reconstruction of a conventionally compressed handwritten text;
ig. 5 is a reconstruction of the text of Fig. 4 compressed in accordance with the invention.

The method in accordance with the invention essentially comprises the following five discrete steps:
Prefiltering, Evaluation of Compressibility, Connectivity-oriented Subsampling, Lossless Compression and Decompression, and Reconstruction. Each of these steps will hereinafter be reviewed in detail.

1. Prefiltering Prior to the actual evaluation for compressibility, the scanning data must be "cleaned" by removing all small superfluous black patches which might result either from the scanning noise or from a non-uniformity of the document background. There is a wide variety of filters available which may be used. Reference is made to T. Kimoto and R.G. Casey, "Edge Smoothing Algorithms for Horizontal and Vertical Line Patterns in Binary Images", IBM
Research Report RJ 4156, November 1984, and F.M.
Wahl, "A Binary Image Processor for Document quality Improvement and Data Reduction" IBM Research Report RZ 1438, December 1985.

The optimum choice of the filter depends on the character of the specific application and on the availability of the computational power. One preferred filter which is both, fast and effective for a great variety of practical applications, operates on the principle of removing from the _SZ9-89-002 - 6 - ~ ~ ~

binary image all of the black pixels ("pixel" stands for 'picture element'), except for those which either belong to a large black segment or which are adjacent to such segment. A large segment in this context is defined as a run of three black pixels in a row, either horizontal or vertical. If the following information pattern (Array 1) ... 11111111111111...................... 1 ..... 1........ 111........ 11...... 1..... 1 .............. 111........ 1...... 1..... 1 ............ 1.1111..................... 1 is passed through such a filter, the result will be as follows (Array 2):

... 11111111111111...................... 1 .............. 111...................... 1 .............. 111...................... 1 .............. 1111 .................... 1 ............................................

Clearly, as a result of the filtering step, small features, which human vision tends to interpret as noise, will disappear. At the same time, written characters, even if they are only one pixel wide, will remain unaltered.

As an example for the efficiency of this approach, reference is made to Figs. 1 and 2. Fig. 1 is a copy of an original form having a colored background created by a diffused grid of colored dots. After scanning, the data are overloaded with a great deal of noise stemming from the colored background. This noise is, of course, subjectively annoying, but it also consumes a lot of valuable storage space, and 2~19133 ~Z9-89-002 - 7 -in addition prevents efficient compression. Having passed the scanning data through a filter of the characteristics mentioned above, the background noise has disappeared from the data, as shown by Fig. 2 which is a reconstruction generated from the filtered data.

While the filter described above was assumed to be designed for the removal only of small black patches on a white background, a similar filter can be constructed for the removal of small white patches on a black background, such as white noise on a normally black line element. Preferably, both types of filter might be chained up to be able to deal with black and white noise areas.

2. Evaluation of the Degree of Compressibility Of course, in order to save processing time and storage space, one would prefer to apply lossy compression to the entirety of the data representing a scanned binary text image. However, any binary image comprises areas with a high information density, and other areas where the information content is low. Lossy compression, therefore, when applied to high-density information, will inevitably lead to a degradation of the intelligibility of such information. The method of the invention, therefore, pretends to apply the lossy compression only to those parts of the information where the intelligibility is not in danger of being noticeably degraded. Thus, lossy compression should be applied only in the low-frequency areas where characters are drawn by relatively wide fines, and with large distances between words.

To do this, the image will be partitioned into mutually exclusive segments, and an individual Z(~19133 _ SZ9-89-002 - 8 -compression ratio will be assigned to each of the segments. The partitioning may be made in an arbitrary manner governed, of course, by the desire to have the smallest segments for which a statistical compression scheme is still meaningful.

This task is similar to the differentiation between image and text segments of a data array, for which a proposal was made by K.Y. Wong, R.C. Casey and F.M.
Wahl, "Document Analysis System", IBM Journal of Research & Development, Vol. 11, November 1982, pp.
647-656. However, the specific nature of the problem tackled with the present invention requires a solution quite different from the one proposed in this reference.

It will be clear to those skilled in the art that the feasibility of performing lossy compression depends on the widths of white and black intervals in the original text image. It is, therefore, necessary to have a quantitative measure of the relative width of these intervals, with an absolute width value governing the threshold beyond which the discrimination commences. Two alternative approaches may be considered:

a. The Pixel-Based Approach The idea is to scan the image line by line and to determine, for each block, the average length for all, black and white intervals. For the sake of simplicity, in the following discussion it will be assumed that always two consecutive lines constitute one block. Naturally, the existence of large black or white areas, such as wide page margins, should have no impact on the determination of the compressibility.

2~9~33 _~Z9-89-002 - 9 -The partitioning procedure will now be explained with reference to the flowchart of Fig. 3. In its first step, the procedure ensures that the registers designated as m and n are cleared. These registers may, for example, simply be two places in the main memory that accommodate two integer numbers. It is then determined whether the end of the segment under evaluation has already been reached. If so, a branch is made to a check of the value for n. If it exceeds a predetermined threshold nt, say 5, then a new segment will be addressed. If it does not exceed that threshold, a new run of black (1) or white (0) is taken into consideration to determine its uninterrupted length w.

A check is then made as to whether the length w exceeds the threshold wt. In one embodiment of the invention, a threshold value of wt = 12 was found to be appropriate. If that threshold is exceeded, new run is addressed. If not, the value of n is incremented by 1, the value of m is increased by w.
This process continues until the end of the segment is encountered. If n is still smaller than the threshold nt, lossy compression is performed on that segment. If n is larger than nt, lossy compression is performed only if m ~m n > ~n /t~

which may be set to 4, for example.

It is to be noted that the choice of the design parameters, such as the threshold values referred to above, is a matter of experimentation. The values given herein were determined empirically, but they are not meant to be limiting in any way. The values _ SZ9-89-002 - 10 - 2~1 91 33 may be varied as necessary in order to increase or decrease the share of the compressed areas, and to, thus, choose the trade off between image quality and desired degree of compression.

b. The Byte-Based Approach While the pixel-based approach outlined under 1) above performs quite well, it might under certain circumstances turn out to be computationally cumbersome. This can be improved by packing, or re-packing, the pixels into a larger "containment".
Indeed, in the majority of practical applications, image data are packed in the byte mode, where one byte represents eight consecutive pixels. Hence, considerable time will be required for the translation of the data to the "normal" raster mode in order to compute the length of all the black and white intervals. In this context, "normal" means that a single number is assigned to each pixel.
Thus, if one has to perform arithmetic operations on pixel values, one has to first translate each byte into the corresponding 8-pixel values. This could, e.g. be done by using a look-up table with 256 entries, one for each possible byte value, and eight output ports, one for each pixel.

The preferred procedure comprises the following four steps:

1) The number m of non-zero bytes is first computed.

2) Each byte is translated into a binary number.
This binary number equals 1 if the given byte contains a small black or white run, and it equals 0 in all other cases. A byte is determined to actually contain such a small black or white run if it does not equal either 00000000 or 11111111, when, at the same time, the first pixel of the byte equals the last one.
3) The number n of pairs of consecutive "l"-s is computed.
4) Lossy compression is initiated if n is smaller than a certain predetermined threshold (which may be 3, for example), or if n is smaller than a given fraction of m (say less than 5%). The mentioned threshold and fraction depend on the specific application and should be determined experimentally.

While the horizontal and vertical distances are generally of the same order of magnitude, it might be advantageous in certain cases to apply the test mentioned before to the transposed version of the original image: Then vertical distances will be considered. Moreover, it might be useful to develop the compressibility criterion from a combination of the regular and transposed versions of the original image, although the experiments carried out suggest that in most practical cases the consideration of the horizontal distances, as described above, is sufficient.

It should be further noted that it might be useful to apply the test to two consecutive lines simultaneously, where the length of the short run would be defined as the larger of two consecutive intervals. As a result, the impact of one-pixel wide noise will be mitigated. This refers in particular to cases where a pixel is located at a line edge.
Then either a 1 or 0 value can be obtained. Hence, at the edges of straight lines one can see a one-pixel layer of scanning noise. This is, of course, not the only possible noise effect, but it is very important from the point of view of the compressibility test.

SZ9-89-002 - 12 _ Z~19133 Consider, for example, the following long horizontal line (Array 3):

Obviously, it can be subjected to a lossy compression without any discernible image quality degradation, however, on the edge (third and sixth lines from the top) a lot of short black and white sequences might cause the decision that this area is incompressible.

3. Connectivity-Oriented Subsampling In the connectivity-oriented subsampling of the original image, the aim is to reduce the resolution by some factor in both horizontal and vertical directions. Assuming the factor is chosen to be 2, the image will have to be partitioned into 2 x 2 blocks, and a one-pixel representation for each block will have to be found.

Blocks having less than two black pixels will be regarded as white. Their average representative value will be 0. Blocks having more than two black pixels will be considered as black, and their average representative value will be l.-The question is what would be the most appropriate decision for blocks having exactly two black pixels? One obvious approach would be to use some arbitrary decision mode. For example, "problematic" blocks will be assigned either always O or always 1. Unfortunately, _SZ9-89-002 - 13 - ~19133 if such an approach were to be adopted, it would either cause the disappearance of all narrow (one pixel wide) lines or would merge some originally disjoint lines. In any case, the deterioration in image quality would be unacceptable.

A preferred approach is based on the consideration of the vicinity of each "problematic" block. Under this scheme, a value O is assigned to each block having two black pixels, except for those cases where such an assignment would break a connection between two lines. In this last case, the assignment would be switched to 1. One possible embodiment of such an assignment scheme would be the following iterative procedure (still assuming that the factor of reduction is 2):

a. The original binary image array O is partitioned into mutually exclusive 2 x 2 blocks.

b. The final array r (i.e. the one with reduced resolution) is created by setting to 1 all pixels which correspond to the blocks of O and where the number of black pixels exceeds 2.

c. Traverse the original array O on a block-by-block basis, for each block having exactly two black pixels. Denote by A through H all neighboring pixels (in array r) as depicted below, with the pixel under consideration being designated "X" (Array 4):

A B C
D X E
F G H

d. If B=D=E=G=l, then X constitutes a narrow opening on the black background. Accordingly, X is set to 0, and the consideration is shifted to the next pixel of 0 (or to the corresponding Block of O) .

e. If all of the pixels A through H in the vicinity of X are white (0) , then we are dealing with a narrow black line. X is then set to 1, and the next pixel is taken into consideration.

f. If D=E=0, and in 0 there is a connection from B
to G, then X is set to 1, and the next test below is performed.

The existence of the connection between B and G will be established by taking, from 0, a 6 x 6 array T
which consists of the pixels belonging to the block under consideration and its eight nearest neighbors, i.e. all the pixels belonging to the blocks in the scheme above. Per definition, the connection exists if each line of T has at least one black pixel.

g. If B=G=0, and in 0 there is a connection between D and E, then X is set to 1, and the scheme proceeds to the next test below.

The existence of the connection between D and E will be established by considering the array T which was defined in the previous stage. The connection exists if each column of T has at least one black pixel.

h. At this stage of the process there remain only three possibilities: Between the pixels B, D, E, G
there are one, two or three black pixels. For each ZOlgl3~

_ . .

of these cases, the decision logic will be as follows:

1) Between B, D, E, and G there is exactly one black pixel.

This case is applicable mainly to the pixels located on the edges of of relatively thick lines.
Accordingly, an arbitrary decision mode may be adopted. However, in order to preserve the line width, X was chosen as X = 1 for lines coming from the top and left directions, and X = 0 for lines coming from the right and from the bottom.
Accordingly, a) If B = 1, and D=E=G=0, then set X to 1 b) If D = 1, and B=E=0, then set X to 1.

c) Else, set X to 0 and proceed to the next pixel.

2) Between B, D, E and G t*here are exactly two black pixels.

a) If the black pixels are located opposite one another (B=G=1, or D=E=1), then set X to 1.

b) If the black pixels are adjacent to each other, i.e., if B=D=l, for example, then X
should be set to l provided the number of black pixels in the original image within the block corresponding to B (or D) does not exceed 2.

c) Else, set X to 0.

3) Between B, D, E and G there are exactly three black pixels.

SZ9-89-002 - 16 - 201913~

In this case, A should be set to 1 unless it is located in the vicinity of a curved line (say in the form of the character "c") so that improved image quality will be obtained by assigning X=O.

The decision regarding the curvature of the line in the vicinity of X can be reached with consideration being given to the 4 x 3 array T, defined as follows (Array 5):

A B C
F G H
A D F
C E H

It is customary to say that the curvature is high (i.e. X = O) if in each line of T1 there is at least one black pixel.

4. Lossless Compression and Decompression of the Subsampled Image The reduced original file r will be compressed and stored utilizing any of the conventional techniques for lossless compression of binary files, like MMR
(Modified Modified Read) or Arithmetic Coder.
Naturally, since the file r contains only a quarter of the number of pixels as compared to the original file 0, it can be coded more efficiently. It has been found experimentally that the subsampled file r can be represented by a code two times shorter than that necessary for encoding the original file 0.
5. Reconstruction of the Original Image and Postfiltering The reconstruction of the original file will be performed by reversing the stages explained above.
First, by lossless decompression, subsampled file r Z019~33 _ SZ9-89-002 - 17 -will be retrieved. Then an expanded version 0 will be obtained such that each pixel of r will be replaced by the 2 x 2 block of pixels having equal value.

Since the subsampling procedure of the invention is designed in a way to preserve the connectivity of the original file, the reconstructed file 0 will for practical purposes be as legible as the original 0.
However, since the subsampling causes a increase in effective pixel size, certain lines might have a somewhat "rugged appearance".

Consider, for example, the following short section of the subsampled image r (Array 6):

Such a configuration might have resulted from a diagonal line in the original image 0, as depicted below (Array 7):

..... 1 1 1 . . . . 1 1 1 .
. . . 1 1 1 . .
. . 1 1 1 . . .
. 1 1 1 . . . .
1 1 1 . . . . .
1 1 ......

After subsampling and subsequent expansion of the image above, the array shown below will result (Array 8):

201S~ 33 _ _ SZ9-89-002 - 18 -Clearly, the original line is smooth while the reconstructed line is flawed by a noticeable "staircase effect" One obvious approach to solve this problem would be to expand segments of the type (Array 9):

into a filtered array like the one following (Array 10):

. 1 1 1 1 1 1 .
1 1 . .

While this technique is adequate for the example shown above, it might cause quality deterioration in certain areas of the image, particularly at right-angle intersections of two lines, as shown in the next array (Array 11):

2~i9~ 33 ~Z9-89-002 - 19 -.... 1 1 1 1 . ~. . . 1 1 1 1 .. 1 1 ....

.. 1 1 ....

.. 1 1 ....

.. 1 1 ....

In this case, an indiscriminate transformation of the before-last Array 6 of r into Array 10 in 0 will distort sharp angles. Therefore, the simple solution outlined above will be unacceptable in practical applications. An alternative approach in accordance with the invention uses post-filtering of the expanded image 0 in order that diagonal lines (like the one of Array 7) will look smooth, and at the same time sharp angles will remain unaltered so as to maintain the subjective impression of a crisp image. This approach is computationally simple enough for the majority of the pixels so as to permit its execution on PC-based systems, with more sophisticated test being required only for relatively few "problematic" areas. The filtering logic proposed in this connection is the following:

a. Traverse the image r' making no changes unless a "problematic" area (Array 12) is located:

or wherein A or B, or both equal 0.

b. Consider the array shown below (Array 13). The discussion will be limited to a single array of this type although, in practice, one must consider all ofthe possible orientations this array can have.

A B C D
E F
G H

1) If C=1 and B=F=H=0, then we are dealing with a small curve, and Array 13 should be transformed to the following Array 14:

A A . . 1 1 D D
A A . . 1 1 D D
E E
E E
G G
G G

2) If C=D=E=F=0, then we are dealing with a diagonal line and the array should be transformed to the following (Array 15):

A A
A A

. . . J H
G G H H
G G H H

wherein J=1 if both G and H equal 1.

3) Else, we are dealing with the right angle between the two lines and no further action need to be taken, i.e. one proceeds to the next pixel.

Possible Substitution of the Five Stages of the Method The description so far dealt with the preferred embodiments of the five stages of the inventive method.

2~9~33 _ ~Z9-89-002 - 21 However, each stage may be modified in a certain way in order to better match the specific needs of any particular application. Some of these possible modifications will be described hereafter.

1. The prefiltering stage as described herein may be changed to another technique capable of reducing the scanning noise, like the one taught by T. Kimoto and R.G. Casey, "Edge Smoothing Algorithms for Horizontal and Vertical Line Patterns in Binary Images" IBM Research Report RJ 4156 (45944) November 1984, or F.M. Wahl, "A Binary Image Processor for Document Quality Improvement and Data Reduction", IBM Research Report RZ 1438 (52141) December 1985.
In certain cases, e.g., where the noise is very low, or where there is little time and one is willing to trade performance quality for enhanced running time, it might be advisable to discard this stage altogether.

2. Regarding the fast evaluation of the degree of compressibility, two alternative approaches have been described above: one pixel-based, the other byte-based. In both approaches, one can, of course, modify the various decision thresholds. Moreover, it is conceivable that in applications where the compressibility can be taken as granted, like compression of handwritten texts, this stage is entirely superfluous.

3. As far as the subsampling stage is concerned, it is important to perform this operation in order to guarantee that connectivity be preserved and that no disjoint features will be merged unintentionally.
The discussion above of this step was based on the specific example of a subsampling factor of 2, both in x- and y-directions. While this subsampling factor is believed to be the most preferable, the factor may as well be chosen to be ~ 2. In cases Z~)19133 where a very high compression ration is desired, the subsampling operation may be performed in an iterative manner, with the effective subsampling factor being 2, 4, 8, etc.

4. To perform lossless compression, a variety of conventional coding schemes are available, such as Huffman, MMR or Arithmetic Codec.

5. An alternative to the postfiltering described above would be the use of the filter described in the Kimoto et al. reference mentioned before in connection with the prefiltering step. Again, in certain cases one might be willing to accept some degree of image quality degradation and, therefore, skip the postfiltering procedure.

The hardware implementation of the various operations involved in the inventive method does not require an inventive step: Those skilled in the art will immediately realize that there are various conventional ways to implement the design logic required. One preferred way is the use of look-up tables (LUT). For example, in the subsampling operation, there are three cases to be considered. The differentiation between them is based on the values of certain four pixels (here denoted by B, D, E and G). It will be easy for a skilled person to construct a LUT with 16 (24) rows and three columns, which would provide a fast way to determine which case is valid at any given time.

The inventive method is advantageous over the existing lossless compression techniques in the sense that it provides a considerable increase in compressi-on ratio. An improvement by a factor of 2 is by no means exaggerated.
Of course, this improvement is achieved at the expense of some deterioration of image quality. However, owing to the associative approach of the method of the invention, i.e., the compression scheme used on each particular image element being adapted to the characteristics thereof, the reconstructed binary texts are subjectively almost indistinguishable from the original from which they were derived.

As an example, consider the handwritten text of Fig. 4.
Uncompressed, the text requires 80,080 bytes of storage space. After conventional lossless compression, the same text can be represented by only 2217 bytes. Fig. 4 shows the text so compressed. With the compression scheme of the inventive method, the same text can be compressed to mere 718 bytes. The image reconstructed from those 718 bytes is shown in Fig. 5. Although a more than three-fold higher compression was performed as compared to the conventional lossless compression, the legibility of both, the conventionally compressed image of Fig. 4 and of the reconstructed image of Fig. 5 compressed in accordance with this invention, is virtually the same.

It is pointed out that owing to the specific nature of the inventive method, its implementation is very simple from a hardware point of view. Also, most present-day personal computers provide sufficient computing power to accommodate this method.

Claims (12)

1. Method for high-quality compression of binary text images for storage and possible future processing including transmission over data links, involving the scanning thereof on the record carrier on which they are presented in a pixel-by-pixel raster scan and deriving a string of digital data from the scanner output, characterized by the step of determining the degree of compressibility of the individual features of the original image based on the nature of the scan data derived from a specific vicinity of pixels in the original image, and, depending on the frequency of the information content of the data from said vicinity, assigning one of at least two different compression ratios to the data from each vicinity, and compressing said data in accordance with said one compression ratio.
2. Method in accordance with claim 1, characterized in that those vicinities of pixels having a high information content are assigned a first compression ratio corresponding to lossless compression, and that those vicinities of pixels having a low information content are assigned a second compression ratio corresponding to lossy compression.
3. Method in accordance with claim 1, characterized in that the said vicinity of pixels are defined by partitioning the entire image area into mutually exclusive segments of uniform size, that for each segment the average length (w) of intervals comprising pixels with a "1" and "0" value is determined, that if, for any one segment, the said length exceeds a predetermined value (wt), the next segment is interrogated, otherwise, the contents of a previously cleared pair of registers (m, n) is incremented by 1, and m by w, and that at the end of the segment the feasibility of compression is determined by checking whether n is lower than a predetermined first threshold (nt), or whether the ratio m/n exceeds a predetermined second threshold ([m/n]t), in which cases lossy compression is performed while in all other cases lossless compression is performed.
4. Method in accordance with claim 3, characterized in that the said vicinity are defined as 2 x 2 blocks of pixels, and that for each such block a 1-bit representation is developed by assigning a "0"-value to all blocks having less than two black pixels, a "1"-value to all blocks having more than two black pixels and a "0"-value to all blocks having exactly two black pixels, provided assigning "0"-value for two black pixels does not break a connection between two lines and does not distort line curvature, if it does, a "1"-value is assigned to all blocks having exactly two black pixels.
5. Method in accordance with claim 1, characterized in that said step of determining the degree of compressibility of the individual features of the original image is preceded by a prefiltering step involving the filtering of the scan data prior to compression through forced changing of all isolated "1" pixels as well as all horizontal and vertical sequences of "1" pixels to "0" if the said sequences are shorter than a predetermined length.
6. Method in accordance with claim 5, characterized in that the said predetermined length is set to three pixels.
7. Method in accordance with claim 3, characterized in that the said predetermined length value (wt) is 12, that said first threshold (nt) is 5, and that said second threshold ([m/n]t) is 4.
8. Method for high-quality compression of binary text images for storage and possible future processing including transmission over data links, involving the scanning thereof on the record carrier on which they are presented in a pixel-by-pixel raster scan and deriving a string of digital data from the scanner output, characterized by the step of determining the degree of compressibility of the individual features of the original image based on the nature of the scan data and depending on the frequency of the information content of the data derived from a specific vicinity of pixels in the original document, said vicinity of pixels are defined by partitioning the entire image area into mutually exclusive segments of uniform size, that for each segment the number (m) of nonzero bytes is counted and each such byte is translated into a binary number which equals 1 if the byte under consideration contains a small black or white interval, that is, that byte does not equal either 00000000 or 11111111 and the first bit of the byte equals the last one, and which equals 0 in all other cases, that the number (n) of pairs of consecutive "1's" is counted, and that lossy compression is performed if n is smaller than a predetermined threshold and/or if n is smaller than a predetermined fraction of m, assigning one of at least two different compression ratios to the data from each vicinity, and compressing said data in accordance with said one compression ratio.
9. Method in accordance with claim 8, characterized in that the said threshold is 3, and that said predetermined fraction equals 5%.
10. Method in accordance with claim 8, characterized in that the said segments each correspond to a line of scan of the original binary text image.
11. Method in accordance with claim 8, characterized in that the said segments each correspond to two consecutive lines of scan of the original binary text image.
12. Method for high-quality compression of binary text images for storage and possible future processing including transmission over data links, involving the scanning thereof on the record carrier on which they are presented in a pixel-by-pixel raster scan and deriving a string of digital data from the scanner output, characterized by the step of determining the degree of compressibility of the individual features of the original image based on the nature of the scan data derived from a specific vicinity of pixels in the original image, and depending on the frequency of the information content of the data from said vicinity, assigning one of at least two different compression ratios to the data from each vicinity, and compressing said data in accordance with said one compression ratio, with a compression ratio being determining by a compression operation involving a reconstruction and postfiltering step applicable to vicinities in accordance with an array of the type A B C D
E F . 1 which is executed as follows:

if C=1 and G=F=H=0 (case of a small curve), then said array should be transformed to the following new array:

A A . . 1 1 D D
A A . . 1 1 D D
E E . . . 1 1 1 E E . . . 1 1 1 G G . . 1 1 I I
G G . . 1 1 I I
and if C=D=E=F=0 (case of a diagonal line), then said array should be transformed to the following new array:

A A . . . . . .
A A . . . . . .
. . . . . . 1 1 . . . J H 1 1 1 in order to preserve curves and sharp angles between lines, and to smooth the reconstructions of diagonal lines.
CA002019133A 1989-08-04 1990-06-15 Method for high quality compression of binary text images Expired - Fee Related CA2019133C (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
IL91221 1989-08-04
IL9122189A IL91221A (en) 1989-08-04 1989-08-04 Method for the compression of binary text

Publications (2)

Publication Number Publication Date
CA2019133A1 CA2019133A1 (en) 1991-02-04
CA2019133C true CA2019133C (en) 1995-05-30

Family

ID=11060248

Family Applications (1)

Application Number Title Priority Date Filing Date
CA002019133A Expired - Fee Related CA2019133C (en) 1989-08-04 1990-06-15 Method for high quality compression of binary text images

Country Status (7)

Country Link
US (1) US5204756A (en)
EP (1) EP0411232B1 (en)
JP (1) JP2531840B2 (en)
CA (1) CA2019133C (en)
DE (1) DE68925281T2 (en)
ES (1) ES2081859T3 (en)
IL (1) IL91221A (en)

Families Citing this family (72)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5353132A (en) * 1989-02-06 1994-10-04 Canon Kabushiki Kaisha Image processing device
JP2978208B2 (en) * 1990-05-18 1999-11-15 シチズン時計株式会社 Font data compression method for character generator
US5414530A (en) * 1991-03-12 1995-05-09 Canon Kabushiki Kaisha Image recording method and apparatus
JP2639517B2 (en) * 1991-03-12 1997-08-13 大日本スクリーン製造株式会社 Image area color processing method
JP3297445B2 (en) * 1991-04-23 2002-07-02 キヤノン株式会社 Output method and device
DE69223850T2 (en) * 1991-05-30 1998-05-14 Canon Kk Compression increase in graphic systems
US5838834A (en) * 1991-11-07 1998-11-17 Canon Kabushiki Kaisha Image processing apparatus and method for quantizing image data and quantization errors using single quantizing unit and pluralities of quantization tables
US5500923A (en) * 1992-02-28 1996-03-19 Canon Kabushiki Kaisha Image processing apparatus utilizing the JBIG method, having a compression/expansion circuit to manage memory more effectively
JPH0654203A (en) * 1992-07-30 1994-02-25 Canon Inc Facsimile equipment and image processor
US6028961A (en) * 1992-07-31 2000-02-22 Canon Kabushiki Kaisha Image processing method and apparatus
US5721788A (en) 1992-07-31 1998-02-24 Corbis Corporation Method and system for digital image signatures
EP0586074B1 (en) * 1992-07-31 2001-11-14 Canon Kabushiki Kaisha Image processing apparatus and method suitable for multistage compression
US5379122A (en) * 1992-10-02 1995-01-03 Xerox Corporation Decompression of standard ADCT-compressed images
FR2700036B1 (en) * 1992-11-17 1995-03-03 Jean Barda Method and device for storing and viewing large images.
US5602976A (en) * 1993-02-23 1997-02-11 Adobe Systems Incorporated Method and apparatus for saving printer memory
US5351046A (en) * 1993-05-28 1994-09-27 Adcox Thomas A Method and system for compacting binary coded decimal data
CN1092446C (en) * 1993-05-31 2002-10-09 佳能株式会社 Image processing method and apparatus
US5432871A (en) * 1993-08-04 1995-07-11 Universal Systems & Technology, Inc. Systems and methods for interactive image data acquisition and compression
US5793887A (en) * 1993-11-16 1998-08-11 International Business Machines Corporation Method and apparatus for alignment of images for template elimination
US7171016B1 (en) 1993-11-18 2007-01-30 Digimarc Corporation Method for monitoring internet dissemination of image, video and/or audio files
US5748763A (en) 1993-11-18 1998-05-05 Digimarc Corporation Image steganography system featuring perceptually adaptive and globally scalable signal embedding
ATE237197T1 (en) * 1993-11-18 2003-04-15 Digimarc Corp IDENTIFICATION/CREDITION CODING METHOD AND APPARATUS
US5768426A (en) 1993-11-18 1998-06-16 Digimarc Corporation Graphics processing system employing embedded code signals
US6983051B1 (en) 1993-11-18 2006-01-03 Digimarc Corporation Methods for audio watermarking and decoding
CA2134255C (en) * 1993-12-09 1999-07-13 Hans Peter Graf Dropped-form document image compression
US5668897A (en) * 1994-03-15 1997-09-16 Stolfo; Salvatore J. Method and apparatus for imaging, image processing and data compression merge/purge techniques for document image databases
US5552898A (en) * 1994-07-06 1996-09-03 Agfa-Gevaert Lossy and lossless compression in raster image processor
US6560349B1 (en) 1994-10-21 2003-05-06 Digimarc Corporation Audio monitoring using steganographic information
US6215904B1 (en) * 1994-11-30 2001-04-10 Xerox Corporation Apparatus and method for selecting encoding schemes based upon image content
US5870036A (en) * 1995-02-24 1999-02-09 International Business Machines Corporation Adaptive multiple dictionary data compression
US5778374A (en) * 1995-08-03 1998-07-07 International Business Machines Corporation Compressed common file directory for mass storage systems
US5787446A (en) * 1995-08-03 1998-07-28 International Business Machines Corporation Sub-volume with floating storage space
JPH0970044A (en) * 1995-08-31 1997-03-11 Sony Corp Image signal processor and method therefor
US6341178B1 (en) 1995-12-04 2002-01-22 Xerox Corporation Method and apparatus for lossless precompression of binary images
US6229924B1 (en) * 1996-05-16 2001-05-08 Digimarc Corporation Method and apparatus for watermarking video images
US6269190B1 (en) 1996-09-24 2001-07-31 Electronics For Imaging, Inc. Computer system for processing images using a virtual frame buffer
DE69835133T8 (en) * 1997-12-03 2007-05-16 Kabushiki Kaisha Toshiba, Kawasaki Image information processing method and method for preventing counterfeiting of certificates and the like
WO2000013144A1 (en) * 1998-08-31 2000-03-09 Antique Books, Inc. Graphical display system and method
US6507671B1 (en) 1998-12-11 2003-01-14 International Business Machines Corporation Method and system for dropping template from a filled in image
US6624761B2 (en) 1998-12-11 2003-09-23 Realtime Data, Llc Content independent data compression method and system
US6269193B1 (en) 1998-12-21 2001-07-31 Eastman Kodak Company Method for statistically lossless compression of digital projection radiographic images
US6460044B1 (en) * 1999-02-02 2002-10-01 Jinbo Wang Intelligent method for computer file compression
US6604158B1 (en) * 1999-03-11 2003-08-05 Realtime Data, Llc System and methods for accelerated data storage and retrieval
US6601104B1 (en) 1999-03-11 2003-07-29 Realtime Data Llc System and methods for accelerated data storage and retrieval
US6728426B1 (en) 1999-08-23 2004-04-27 International Business Machines Corporation Compression of form images in gray-level
US20010047473A1 (en) 2000-02-03 2001-11-29 Realtime Data, Llc Systems and methods for computer initialization
US20030191876A1 (en) 2000-02-03 2003-10-09 Fallon James J. Data storewidth accelerator
GB0004427D0 (en) * 2000-02-24 2000-04-12 Xeikon Nv Cleaning device
JP3904370B2 (en) * 2000-04-12 2007-04-11 富士通株式会社 Data compression processing method and apparatus
US6778703B1 (en) 2000-04-19 2004-08-17 International Business Machines Corporation Form recognition using reference areas
US6760490B1 (en) 2000-09-28 2004-07-06 International Business Machines Corporation Efficient checking of key-in data entry
US9143546B2 (en) * 2000-10-03 2015-09-22 Realtime Data Llc System and method for data feed acceleration and encryption
US7417568B2 (en) * 2000-10-03 2008-08-26 Realtime Data Llc System and method for data feed acceleration and encryption
US8692695B2 (en) 2000-10-03 2014-04-08 Realtime Data, Llc Methods for encoding and decoding data
US7386046B2 (en) 2001-02-13 2008-06-10 Realtime Data Llc Bandwidth sensitive data compression and decompression
US6937276B2 (en) * 2001-08-22 2005-08-30 Benq Corporation Digital camera with low memory usage
US6592523B2 (en) * 2001-11-21 2003-07-15 Ge Medical Systems Global Technology Company, Llc Computationally efficient noise reduction filter for enhancement of ultrasound images
US7728048B2 (en) 2002-12-20 2010-06-01 L-1 Secure Credentialing, Inc. Increasing thermal conductivity of host polymer used with laser engraving methods and compositions
US7181617B2 (en) * 2002-06-10 2007-02-20 Kelley Wise Remote virtual medical diagnostic imaging viewer
US20040199669A1 (en) * 2003-04-04 2004-10-07 Riggs Nicholas Dale Apparatus and method for efficiently and securely transferring files over a communications network
EP1614064B1 (en) 2003-04-16 2010-12-08 L-1 Secure Credentialing, Inc. Three dimensional data storage
US20050206937A1 (en) * 2004-03-22 2005-09-22 Kabushiki Kaisha Toshiba Image forming apparatus
US8462030B2 (en) * 2004-04-27 2013-06-11 Texas Instruments Incorporated Programmable loop filter for use with a sigma delta analog-to-digital converter and method of programming the same
WO2007026484A1 (en) * 2005-07-27 2007-03-08 Matsushita Electric Industrial Co., Ltd. Device, method, and program for generating and executing execution binary image, and computer-readable recording medium containing the execution binary image execution program
US11625457B2 (en) 2007-04-16 2023-04-11 Tailstream Technologies, Llc System for interactive matrix manipulation control of streamed data
US9325682B2 (en) 2007-04-16 2016-04-26 Tailstream Technologies, Llc System for interactive matrix manipulation control of streamed data and media
US8648858B1 (en) * 2009-03-25 2014-02-11 Skyfire Labs, Inc. Hybrid text and image based encoding
US8438558B1 (en) 2009-03-27 2013-05-07 Google Inc. System and method of updating programs and data
US8825409B2 (en) * 2010-09-08 2014-09-02 International Business Machines Corporation Tracing seismic sections to convert to digital format
CA2936485C (en) 2014-01-29 2020-09-01 Relican Analytics, Inc. Optimized data condenser and method
JP6742692B2 (en) * 2015-01-30 2020-08-19 富士通株式会社 Encoding program and decompression program
CN113365071B (en) * 2021-06-08 2023-01-17 北京数科网维技术有限责任公司 Image layered compression method and image layered compression device

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US3700797A (en) * 1969-12-31 1972-10-24 Electronic Image Systems Corp Facsimile noise deletion and coding system
JPS5418617A (en) * 1977-07-13 1979-02-10 Oki Electric Ind Co Ltd Compressing system for facsimile information
JPS5451731A (en) * 1977-10-03 1979-04-23 Hitachi Ltd Correction system for magnified character
US4229768A (en) * 1978-03-30 1980-10-21 Canon Kabushiki Kaisha Information processing apparatus
GB2030823B (en) * 1978-10-02 1982-11-03 Ibm Image data manipulation apparatus
JPS58111564A (en) * 1981-12-25 1983-07-02 Mitsubishi Electric Corp Jitter processing method
JPS58148565A (en) * 1982-02-26 1983-09-03 Mitsubishi Electric Corp Encoding method of multi-gradation picture signal
JPS58168387A (en) * 1982-03-29 1983-10-04 Fujitsu Ltd Compressing system of picture signal
JPH0767140B2 (en) * 1983-12-23 1995-07-19 三菱電機株式会社 Equipment
US4646355A (en) * 1985-03-15 1987-02-24 Tektronix, Inc. Method and apparatus for input picture enhancement by removal of undersired dots and voids
JP2603220B2 (en) * 1986-02-13 1997-04-23 キヤノン株式会社 Image information transmission method

Also Published As

Publication number Publication date
IL91221A0 (en) 1990-03-19
CA2019133A1 (en) 1991-02-04
ES2081859T3 (en) 1996-03-16
EP0411232B1 (en) 1995-12-27
DE68925281T2 (en) 1996-07-11
EP0411232A2 (en) 1991-02-06
EP0411232A3 (en) 1992-01-29
IL91221A (en) 1995-03-30
JP2531840B2 (en) 1996-09-04
JPH03165181A (en) 1991-07-17
DE68925281D1 (en) 1996-02-08
US5204756A (en) 1993-04-20

Similar Documents

Publication Publication Date Title
CA2019133C (en) Method for high quality compression of binary text images
US7120297B2 (en) Segmented layered image system
KR100937542B1 (en) Segmented layered image system
US6272255B2 (en) Method and apparatus for pre-processing mixed raster content planes to improve the quality of a decompressed image and increase document compression ratios
US5432870A (en) Method and apparatus for compressing and decompressing images of documents
US7376265B2 (en) Segmentation-based hybrid compression scheme for scanned documents
US6320981B1 (en) Image processing system and image processing method
EP0833519B1 (en) Segmentation and background suppression in JPEG-compressed images using encoding cost data
JP3843581B2 (en) Image encoding device, image decoding device, image processing device, image encoding method, image decoding method, and image processing method
US6608928B1 (en) Generic pre-processing of mixed raster content planes
US8452112B2 (en) Image encoding apparatus and method of controlling the same
JP2001223903A (en) Method for compressing scanned document with color and gray scale
US5442459A (en) Process for encoding a half tone image considering similarity between blocks
JPH0870386A (en) Selecting method for compression procedure
US5461682A (en) Image filing apparatus providing image data suitable for several input/output devices
US6163625A (en) Hybrid image compressor
Tischer et al. Context-based lossless image compression
US8023756B2 (en) Image encoding apparatus and method of controlling same
JP3108133B2 (en) Adaptive coding of color document images
EP1006714A2 (en) Method of processing mixed raster content planes
Fung et al. Color, complex document segmentation and compression
JPH04222171A (en) Coding of picture data
EP1006711A2 (en) Method and apparatus for processing a pixel map
JPH04326668A (en) Color picture processing method
Kurosu Evaluation of effective data reduction methods for MMR coding

Legal Events

Date Code Title Description
EEER Examination request
MKLA Lapsed