Skip to main content

4.5 Data Structure

Facsimile image data is created using a high- resolution raster scanner, so that the original picture can be reproduced faithfully. The facsimile data represents binary images, in monochrome, with two levels of intensity, belonging to the data type of bit-mapped graphics.

The simplest representation is the bit-map itself. The bits, each of which corresponds to a single picture element, are arranged in the same order as that in which the original picture is scanned, 1s standing for black pixels and 0s for white ones. Operations on the picture are easily carried out. For example, two images represented in the bit-map format can be merged together by using a simple logic OR operation. Any specific pixel can be retrieved by a simple calculation. However, its size is usually large because of the high resolution. This makes it almost unrealistic for storage or transmission.

Facsimile image data should therefore be compressed to reduce its redundancy, so that the efficient storage and transmission can be achieved.

Run-length encoding is a useful compression scheme. Instead of the pattern, the counts of consecutive black and white runs are used to represent the image.

Vector representation, in which the run-lengths are coded as integers or bytes, is a useful internal representation of images. Not only is it reasonably compressed, but it is also quite easy for processing. Chopping, scaling and mask-scanning are examples of the processing operations which may be performed. Furthermore, a conversion between different compression schemes may have to be carried out in such a way that the data is first decompressed into the vector format and then recompressed. The difficulty in retrieval can be overcome by means of line index, which gives the pointers to each lines of the image.

A higher compression rate leads to a more efficient transmission. But this is at the expense of ease of processing. An example of this is the use of Huffman Code in the CCITT 1-dimensional compression scheme. While the data can be compressed more efficiently, it is rather difficult to manipulate the data direcltly.

Taking the correlation between adjacent lines into account, 2-dimensional compression can achieve an even higher compression rate. CCITT 2-dimensional compression and the DACOM facsimile machine use this method.

It is desirable to integrate facsimile images with other data types, such as text and geometric graphics; the structure of these other types must then be incorporated in the system. At present, only text structure is available, while the structure for geometric graphics is a topic for the further study.

In the facsimile system, the following data structures are supported. The corresponding descriptions, if any, are listed as well and they can be found in Appendix 3 (except of dacom(device)).

type    structure       compression     description

bit-map bit-map - -
vector 1D run-length vector(fax)
dacom block 2D run-length dacom(device)
CCITT T4 1D run-length t4(fax)
2D run-length t4(fax)

text text - text(fax)

As an internal data structure, vector format is widely used for data transfer between task processes. The set of interface routines has been extended by introducing two subroutines, namely getl() and putl(), which read and write line vectors directly through the Clean and Simple interface. These two routines can be found in Appendix 3 (getl(fax) and putl(fax))

In order to check the validity of a vector file, a check task process check() is provided which works as a data sink in a command string. It can also dump the vector elements of the specific lines.