Binary coding of graphic information. In the process of encoding an image, its spatial sampling is performed

In those days, when computers were not as powerful as they are now, there was no question of converting images on paper or on film. Now it is generally accepted that such objects correspond to an analog form. With the advent of new technologies, it has become possible to digitize (for example, using scanners). Thanks to this, the so-called discrete form of images appeared. But how is the transfer of graphics from one form to another? Briefly about the essence of such methods further and will be described as detailed and simple as possible, so that each user understands what is at stake.

What is spatial discretization in computer science?

To begin, consider general concept explaining it in the simplest terms. From one form to another, a graphic image is transformed by spatial discretization. To understand what this is, consider a simple example.

If you take any picture painted with watercolors, it is easy to see that all transitions are smooth (continuous). But in a scanned image that was printed on an inkjet printer, there are no such transitions, since it consists of many small dots called pixels. It turns out that a pixel is a kind of building brick that has certain properties (for example, it has its own color or shade). These bricks form the complete image.

What is the essence of the spatial discretization method?

If we talk about the essence of the method of converting graphics using such technologies, we can give another example that will help you understand how it all works.

Digitized images, both when scanning, when displayed on a computer monitor, and when printed, can also be compared with a kind of mosaic. Only here, a pixel acts as one piece of the mosaic. This is one of the main characteristics of all modern devices. As you might have already guessed, the more such points, and the smaller the size of each of them, the smoother the transitions will be. Ultimately, it is their number for each specific device that determines its resolution. In computer science, for such a characteristic, it is customary to calculate the number of pixels (dots) per inch (dpi - dot per inch), both vertically and horizontally.

Thus, a two-dimensional spatial grid is created, somewhat reminiscent of a conventional coordinate system. For each point in such a system, you can set your own parameters, which will differ from neighboring points.

Factors Affecting Encoding Quality

But not only the above examples fully reflect how spatial discretization works. The coding of graphic information takes into account several more important parameters that affect the quality of the digitized image. They apply not only to the images themselves, but also to graphics rendering devices.

First of all, these include the following characteristics:

  • sampling frequency;
  • color depth.

Sampling frequency

The sampling frequency is the size of the fragments that make up the image. This parameter can equally be found in the characteristics of digitized images, scanners, printers, monitors and graphics cards.

True, there is one catch. The fact is that with an increase in the total number of points, a higher frequency can be obtained. But at the same time, the size of the file of the saved source object changes accordingly. To avoid this, artificial maintenance of the size at one constant level is currently being applied.

The concept of resolution

This option has already been mentioned. However, if you look at the image output devices, the picture is somewhat different.

As an example of the parameters that spatial sampling uses, consider scanners. For example, the specifications of the device indicate a resolution of 1200 x 1400 dpi. Scanning is performed by moving a strip of photosensitive elements along the scanned image. But here the first number indicates the optical resolution of the device itself (the number of scanning elements in one inch of the strip), and the second refers to the hardware resolution and determines the number of “micro-movements” of the strip with scanning elements across the image when passing through one inch of the image.

Color depth

Before us is another important parameter, without taking into account which to fully understand what spatial discretization is. Color depth (or encoding depth) is usually expressed in bits (the same can be applied to sound depth, by the way) and determines the number of colors that were involved in the construction of the image, but ultimately refers to palettes (sets of colors).

For example, if we consider a black and white palette, which contains only two colors (without taking into account grayscale), the amount of information when encoding each point can be calculated using the above formula, given that N is the total number of colors (in our case, N = 2 ), and I is the number of states that each point can take (in our case, I=1, since there can only be two options: either black or white). Thus, N I =2 1 =1 bit.

Quantization

Spatial discretization can also take into account a parameter called quantization. What it is? In a way, this is similar to the interpolation technique.

The essence of the process is that the value of the signal sample is replaced by the nearest neighboring value from a fixed set, which is a list of quantization levels.

To better understand how graphical information is converted, look at the image above. It presents graphics in their original (analog) form, an image with quantization applied, and side distortions called noise. In the second photo from the top you can see peculiar transitions. They are called the quantization scale. If all transitions are the same, the scale is called uniform.

Digital coding

When converting graphical information, it should be taken into account that, unlike an analog signal, a quantum signal can only take on a completely certain fixed number of values. This allows them to be converted into a set of symbols and characters, the sequence of which is called a code. The final sequence is called a code word.

Each code word corresponds to one quantization interval, and a binary code is used for encoding. In this case, sometimes it is also necessary to take into account the data transfer rate, which is the product of the sampling rate and the length of the code word and is expressed in bits per second (bps). Roughly speaking, this is nothing more than the maximum possible number of transmitted binary characters per unit of time.

An example of calculating video memory for displaying a bitmap on a monitor

Finally, one more important aspect, related to what constitutes a spatial discretization. Raster images on the monitor screen are reproduced according to certain rules and require memory.

For example, the monitor is set to graphics mode with a resolution of 800 x 600 dpi and a color depth of 24 bits. The total number of points will be equal to 800 x 600 x 24 bits = 11,520,000 bits, which corresponds to either 1,440,000 bytes, or 1406.25 KB, or 1.37 MB.

Video compression methods

The technology of spatial sampling, as is already clear, is applicable not only to graphics, but also to video images, which in a sense can also be attributed to graphic (visual) information. True, the digitization of such material until some time was made with limited capabilities, since the final files turned out to be so huge that it was impractical to keep them on a computer hard drive (remember at least the original AVI format, once developed by Microsoft specialists).

With the advent of the M-JPEG, MPEG-4 and H.64 algorithms, it became possible to reduce the final files with a size reduction factor of 10-400 times. Many may argue that the compressed video will be of lower quality than the original. In a sense, it is. However, in such technologies, size reduction can be performed both with loss of quality and without loss.

There are two main methods by which compression is performed: intraframe and interframe. Both of these options are based on the exclusion of repeating elements from the image, but do not affect, for example, changes in brightness, color, etc. What is in the first, what is in the second case, the difference between the scenes in one frame or between two adjacent ones is insignificant, so the difference is not particularly noticeable to the eye. But when removing the above elements from the file, the difference in size between the source and final image is very significant.

One of the most interesting, albeit rather complex, methods that spatial sampling uses to compress images is the technology called the discrete cosine transform, proposed by W. Chen in 1981. It is based on a matrix in which, in contrast to the original one, which describes only the values ​​of the readings, the values ​​of the rate of their change are presented.

Thus, it can be considered as a kind of grid of speed changes in the vertical and horizontal directions. The size of each block is determined by JPEG technology and has a size of 8 x 8 pixels. But compression is applied to each individual block, and not to the whole image. Thus, the difference between the source and final material becomes even less noticeable. Sometimes in computer terminology, this technique is also called subsampling.

Further, for brightness and chrominance, the quantization described above can be applied, in which each cosine transform value is divided by a quantization factor, which can be found in special tables obtained on the basis of so-called psychophysical tests.

The tables themselves correspond to strictly defined classes of blocks grouped by activity (uniform image, unstructured image, horizontal or vertical difference, etc.). In other words, for each block its own values ​​are set, which are not applicable to neighboring ones or those that differ in class.

Finally, after quantization based on the Huffman code, redundant coefficients are removed (redundancy reduction), which allows a codeword with a length of less than one bit for each coefficient (VLC) to be obtained for subsequent coding. Next, a linear sequence is formed, for which the zigzag reading method is applied, which groups the values ​​in the final matrix as significant values ​​​​and sequences of zeros. And here's how you can remove them. The remaining combinations are compressed in the standard way.

In general, experts do not particularly recommend encoding graphic information using JPEG technologies, since they have a number of disadvantages. First, repeated resaving of files invariably leads to a deterioration in quality. Second, because JPEG-encoded objects cannot contain transparent areas, you can apply such methods to graphics or scanned artwork only if they are vertically and horizontally no larger than 200 pixels. Otherwise, the deterioration in the quality of the final image will be very pronounced.

True, JPEG algorithms became the basis for MPEG compression technologies, as well as for many conferencing standards like H.26X and H32X.

Instead of an afterword

That's briefly everything that concerns the understanding of issues related to the conversion of the analog form of graphics and video into a discrete one (by analogy, such techniques are also used for sound). The described technologies are quite difficult to understand for an ordinary user, but some important components of the basic techniques can still be understood. It did not consider the issues of setting up monitors to obtain the highest quality picture. However, on the issue of interest to us, it can be noted that it is not always worth setting the maximum possible resolution, since overestimated parameters can lead to the inoperability of the device. The same goes for the screen refresh rate. It is better to use the values ​​recommended by the manufacturer or those that the operating system after installing the appropriate drivers and control software suggests using the default.

As for self-scanning or transcoding information from one format to another, you should use special programs and converters, however, in order to avoid lowering the quality, it is better not to get carried away with the maximum possible compression in order to reduce the size of the final files. Such methods are applicable only when information needs to be stored on media with limited space (for example, CD / DVD-disks). But if there is enough space on the hard drive, or when you need to create a presentation for broadcast on a large screen, or print photos on modern equipment (photo printers do not count), quality should not be neglected.

Rice. 5.13. On the issue of "sufficiency" of the number of digits of the input signal for a nonlinear transformation

Sweeping devices are distinguished by the type of trajectory described by the scanning spot, and by the method of relative movement of the reading spot, the original and the photodetector. Reamers can be electromechanical and wholly or partly electronic (without mechanical movements), with a flat or cylindrical original holder.

In the era of "mechanical" television (until the 40s of the XX century), scanning was carried out according to the method proposed by the German engineer Paul Nipkow: by rotating a disk with holes located on it in a spiral. These holes alternately, line by line, as shown in fig. 5.1(a)
, bypassed the frame on the disk - the projection of the transmitted scene. The light passing through the holes created a video signal current in the FEP located on the reverse side of the disk. In such a scan, there was no reverse motion of the scanning spot both along the line and along the frame, and the lines themselves in the frame were arcs of circles described by the holes of the disk.

A radial trajectory with a reverse beam along the line is used in all-round radar indicators (see Fig. 5.1, b).

In the scans of many printing ECC and photofax machines, the scanning spot describes a helix (see Fig. 5.1, c). The original is mounted on top of the cylinder, and the exposed film is inside it. In the latter case, you provide fast or line scanning by rotating a mirror or lens inside a fixed cylindrical camera, which greatly facilitates the automation of the installation and removal of scanned objects. In a scan of this type, there is no line-by-line reverse, but there is a frame-by-frame reverse code, during which the optical head returns to its original position before reading (writing) the next set of images.

In broadcast television and reproduction devices with a planar arrangement of the scanned object, the scan path is a system of parallel lines with a return of a light spot or a switching cycle (in a matrix reader) from the end of the previous line to the beginning of the next and from the end of the last line of the frame to the beginning of the first, as shown in rice. 5.1(d). In a CRT, such a trajectory is provided by periodic sawtooth currents or voltages (see Fig. 5.2
) that create an electromagnetic or electrostatic field deflecting coils or plates. From the linearity of the growth of these signals depends, as shown in Fig. 5.2, the geometric accuracy of the resulting image. Uniform increase in current during the forward stroke of the sweep, as shown on the left side of fig. 5.2 corresponds to the same width of the squares on the CRT screen. If the rate of this increase at the beginning of the line is higher (the middle part of Fig. 5.2), then the first square is stretched horizontally, and the second, due to a decrease in speed (the gradient of the increase in the deflecting current) at the end of the line, is compressed, since the law of change of the video signal itself, which controls the current the electron beam remains unchanged. With a concave tooth shape of the "sawtooth" deflecting current, the reverse picture takes place. Due to the relatively low resolution, the use of CRT in prepress technology is limited only to the output of text information (phototypesetting machines Digiset, CRTronic, etc.) and video proofing systems.

In general, the signal obtained as a result of progressive scanning is characterized by three "service" frequencies and their corresponding time periods. For the television raster, this is:

- picture element time, determined by the duration of the movement of the reading spot at a distance equal to its size, and the reciprocal of this time - video frequency(6.5 MHz in broadcast television standard);

The period of the line is equal to the time the spot moves from the beginning of the given line to the beginning of the next line, and the reciprocal of this period is - line frequency(16 kHz);

Frame time (fields) and field frequency (50 Hz).

If in a simultaneous system all color separation signals are transmitted in parallel, then in sequential systems, according to these times, they distinguish, in particular, methods of signal transmission and methods of forming color and color separation images. Color separation signals can be transmitted simultaneously or sequentially: by elements, by lines and by frames.

As mentioned above, in experimental, and then in broadcast TV systems, images were initially scanned mechanically using a Nipkow disk. The signal at the output of the FEP was formed only due to the light energy, which had time to arrive at the sensitive layer of the FEP during the displacement of the hole in the disk (decomposition element) at a distance equal to its size, i.e. for the minimum of the above time intervals. Weak and slightly different from the level of interference, the signal did not allow transmission without powerful artificial lighting, to improve image clarity, because. to do this, it was necessary to increase the number of lines per frame with a corresponding increase in the scanning speed. Systems of instantaneous action in the indicated sense are those considered by us above (see Fig. 4.4 and Fig. 4.9) and readers of polygraphic ECC.

Revolutionary in the development of TV technology was the transition in the 30s. to transmitting systems with the accumulation of light energy. 5.3
a CRT television camera (1) using an internal photoelectric effect. The image of object 2 is projected by lens 3 onto target 4. It is a layer of photoconductor deposited on the inner surface of the end glass of the tube over a transparent conductive layer of lead oxide 5. The light flux creates a resistive or (when an external voltage is applied) potential relief on it, which corresponds to the distribution brightness of the transmitted object. The electron beam 6 deflected by the magnetic field of the coils 7 line by line and element by element, as shown in Fig. 5.1 (c) runs around target 4. At each moment of time, the electrical circuit is closed through target element 4, on which there is a scanning spot (electron beam aperture) and load resistance pointer "href="predmetnyi.htm#i800"> and photodiodes, accumulation is used not in the time of the whole frame, but partially, in the time of the line.Modern electronic digital camera with a CCD.

In contrast to television applications, the issues of organizing scanning with the accumulation of light energy are very relevant in terms of light energy and for image recording systems in the prepress process and will be considered below.

A characteristic feature of modern printing systems for processing halftone originals is that both the spatial discretization of the image and the quantization of its tone by level are carried out in them at least twice.

Spatial discretization is the replacement of an image whose tone changes arbitrarily in the X and Y coordinates with an image composed of separate sections - zones within which this parameter is averaged.

In the general case, as already mentioned, the sampling frequency should be at least twice the frequency of the harmonic component of the original image to be reproduced on the copy. This position is illustrated schematically in Fig. 5.4(a) , at position a) of which the initial continuous message is a sinusoidal oscillation u(t) with period T. The spectrum of such a signal is made up of a constant component and the first harmonic:

formula" src="http://hi-edu.ru/e-books/xbook438/files/u0.gif" border="0" align="absmiddle" alt="period T/2, the depth of their modulation by the first harmonic of the original signal is zero, and information about the frequency is completely lost. Only the average value of the pointer "href="predmetnyi.htm#i808">) is transmitted, this spectrum is also limited along the lines by a frequency reciprocal of this spot. fluctuations - the carrier frequency necessary for signal transmission, for example, in television or in analog remote (using electrical communication channels) reproduction.

Two-dimensional (in both coordinates) sampling and quantization take place during the so-called analog-to-digital conversion of the video signal, as a result of which the set of spatial samples of the tone value can be represented by some array of numbers written, for example, in binary code. This representation allows you to abstract from the real scanning time and perform functional transformations of tone, color, small details, contours and other image content as operations on numbers and this array. Computers are now effectively used for such purposes.

Spatial discretization also accompanies rasterization - the representation of an image in the form of a set of sealed and blank elements, the relative area of ​​which is determined by the tone or color of the corresponding sections of the original. In this case, as already mentioned, the frequency of the first sampling, associated with electro-optical analysis and analog-to-digital conversion, is taken, as a rule, twice as high as the lineature of the polygraphic raster, or rather, the frequency of the raster function , within the period of which one or another number of raster images is formed. dots and spaces.

If this condition is met, then when reproducing a system of periodic strokes of an arbitrary spatial phase, the sizes of neighboring points will at least slightly differ from each other in all cases except for one: when the strokes themselves are shifted by exactly half a period relative to the decomposition element 1 and the raster cell . On the print, instead of strokes, a uniform field of identical raster dots with a relative area of ​​50% is formed (see Fig. 5.5, d
), since the reflectance of the original, averaged over the area of ​​the reading spot 1, has the same (intermediate) value for all elements of the raster. Each time, half a stroke and half a space fall into the reference zone 1 (see Fig. 5.5, c). This case is similar to that shown in Fig. 5.4(b).

In all other spatial phases, the contrast of strokes on the reproduction is higher, since the values ​​of neighboring readings and the sizes of the raster dots formed in accordance with them differ. The maximum difference occurs in the opposite extreme case when, as shown in Fig. 5.5 (a, b), the 0.5L frequency strokes are in phase with the raster grating. Here there is an analogy with the case illustrated in Fig. 5.4 (a, c). They are transmitted in a raster twice the lineature, equal to L lines / cm, without loss of contrast. The guarantee of transmission of strokes with full contrast, regardless of their spatial phase, is provided by a decomposition frequency that is twice the raster lineature, as Fig. 5.5 (e).

Since at least two spatial discretizations of the image take place in polygraphic reproduction, it follows from the above simplified example that a two-fold decomposition frequency margin must be provided twice. For the first time, this has to be done when choosing the screen lineature, if the task is to reproduce certain spatial frequencies of the original on the print. A second margin of 2, this time in relation to the selected lineature value, is set for the scan rate of the original. For example, to reproduce strokes that have a frequency of 4 lines / mm on the original, a print lineature of 80 lines / cm is required (as well as the corresponding paper smoothness and other print parameters). It is necessary to read such an original in the scanner already at a frequency of 16 lines / mm.

Along with the spatial frequency, which determines the number of discrete samples and the amount of information processed, the quality of the resulting image is affected by the geometry and orientation of the sampling grating. The raster of a single-color reproduction and the raster of the "drawing" ink in color printing are always oriented at an angle of 45°. The explanation of this generally accepted practice as reducing the visibility of the raster itself can hardly be considered exhaustive, since image quality is improved due to this orientation and at lineatures greater than 60-80 lines/cm, when the problem of "visibility" of the raster described above is not so relevant.

The diagonal orientation of the grating allows you to optimally match the properties of the printing information system, represented in this case by the print and its raster structure, with the properties of the source of information (illustrative original), on the one hand, and with the properties of the recipient of information (his vision), on the other. IN this example these properties lie in the angular anisotropy inherent in the three basic components of the information process.

The first of these anisotropies is found in the statistics of the distribution of contours in directions and is a consequence of the action of the law of gravity in the visually perceived surrounding world, the replicas of which are mostly originals intended for printing reproduction. Vertical and horizontal contours (lines) significantly predominate over inclined ones.

On the other hand, studies of the human visual analyzer have established significant differences in threshold sensitivity and resolution for different directions. They are illustrated by a graph of the boundaries of the spatial-frequency characteristic of vision in Fig. 5.6
. Spatial frequencies on this graph are estimated by the number of lines that are distinguished per unit of angle of view, covering the dashed world presented to the subject. This dimension of the spatial frequency makes it possible, to a certain extent, to abstract from the distance at which the test is considered.

The ability of the eye to distinguish between vertical, horizontal and oblique strokes is in the ratio 1.0:0.8:0.46. This feature of vision can fully explain the visual reaction to the image ("Autumn", B. Riley), shown in fig. 5.7(a) . The discomfort felt during viewing arises from the fact that the image seems to be divided into alternating horizontal stripes. On some sections of the sinusoids, from which the entire image is built, are clearly visible as separate lines, since they are vertical here. On other horizontal stripes, the lines are hardly distinguishable or merge completely, because they are oblique. Focusing on one of the bands with poorly distinguishable lines, let's rotate the image in its plane by 45°. The strip itself and the lines in it that have taken a vertical position become distinct.

It should be noted that the boundary spatial frequencies, marked by the graph in Fig. 5.6, much higher than the frequency of the lines that make up the "curious" image in Fig. 5.7(a). Considered separately from the rest of the image, its part in Fig. 5.7(b) looks quite distinct. At the level of perception, which exceeds the level of the retina, the brain, as it were, redistributes its resources in favor of visually more important than oblique, vertical and horizontal directions.

The features noted above allow us to draw the following conclusions:

Thus, the specifics discussed above visual perception naturally consistent with the properties of images and was formed against the background of anisotropy in the distribution of contours in directions in the visually perceived surrounding world. Such harmony does not apply only to a narrow class of images, which include aerial photographs or images of the earth's surface and its cloud cover obtained from space. For these images, the very concepts of "top", "bottom", "right" and "left" are conditional. At the same time, it is hardly possible to consider such artificially created images as signs of typographic type, works of abstract painting, etc., as isotropic in the indicated sense. Artists choose the strength of lines and contours of various orientations, intuitively considering this feature of vision.

Coordination of the properties of images and vision discussed above with the properties of an intermediate link, which is a system for processing graphic information, is the prerogative of the developer or operator of such a system. In this regard, let us consider the resolution of a regular sampling grating in different directions, not forgetting that spatial sampling takes place in a printing system at least twice: during electro-optical analysis and coding of the original, and then in autotype screening of the image.

In a two-dimensional orthogonal grating, the resolution changes with an angular period of 90° from 100% to 70.7%, while in a hexagonal grating this difference is in the range of 100%-86% and repeats every 60°, as Fig. 5.8
, where the lines for which the resolution is maximum and minimum are indicated as solid or discontinuous, respectively. The last of the lattices is more isotropic, because the accuracy of the transmission of strokes here to a lesser extent depends on their orientation.

For an orthogonal grating, this difference is explained in Fig. 5.9
- model of digital reproduction of a pair of black strokes of the same thickness (see Fig. 5.9, a, b). The spatial phases of the strokes differ on the original by half the lattice period in its horizontal (see Fig. 5.9, a) and diagonal (see Fig. 5.9, b) directions. Two-gradation images are encoded in the so-called line mode. It is provided by a simple two-level operator that assigns a value of "1" if black occupies more than half of the sample area, and "0" otherwise. The "bitmap" obtained in this way is stored and processed in the reproduction system, and is also used to restore the image during its output (see Fig. 5.9, c, d). From a comparison of the original vertical strokes in Fig. 5.9 (a) and their "digital" images in fig. 5.9 (c) it can be seen that the uncertainty in the transmission of the thickness of the stroke, associated with the phase of its position in the lattice, lies within its step.

At the slightest tilt of the strokes to the right or to the left of the vertical, periodic (along the length of the stroke) stepped distortions with a tooth width of a grating pitch are added to the error in the transfer of thickness (see Fig. 5.10, a
). If the width of the stroke itself is also close to the specified step, then the stroke is periodically interrupted on the copy (see Fig. 5.10, b). For the same reasons, a system of thin strokes, as its frequency increases, will initially be transmitted by false patterns, and only then by an average value of brightness (see Fig. 5.10. c). False patterns of this type, due to the interference of the periodic pattern (texture) of the original itself and the carrier grid, are referred to in printing as subject moiré Unlike moire multicolor printing resulting from the interaction of raster structures of color-separated images.

For strokes that have a more significant slope, sampling error into the "href="predmetnyi.htm#i853"> pointer of view when forming irregular raster structures under print resolution constraints, allowing coarser granularity in diagonal directions.

In real systems, comparing the efficiency of different organizations of spatial samples in terms of reproduction quality is difficult due to the difficulty of keeping other conditions equal, an important of which is, in particular, the volume of the signal used. On fig. 5.11
for such a comparison, graphic models of several line images (signs) for orthogonal (b, c) and chess (d, e) discretization are presented. Models (c) and (e) were obtained using two times fewer samples than models (b) and (d) to illustrate the gain in signal volume with the optimal orientation of the sample grid for a given reproduction quality. models of each positions b-d obtained for two positions of the sign in the grid of references, which differ in both coordinates by approximately half of its step. This makes it possible to visually judge the effect of discretization errors by the difference in the thickness of the elements in each of the pairs of signs. With a decrease of 10 times, the models in Fig. 5.11 (b, d) corresponds to a resolution of 40, and fig. 5.11 (c, d) - 25 lines / mm.

In a checkerboard grid (see Fig. 5.11, d, e), phase change has less effect on the transfer of the thickness of vertical and horizontal elements than in an orthogonal one (see Fig. 5.11, b, c). This influence remains at the same level for half as many readings if the raster rotates by 45°, as shown by a comparison of models (b) and (e). At the same time, on model (e), the error in the transfer of diagonal lines and contours to the root is two times higher than on model (b). However, this does not have such a significant effect on the quality due to the features of vision mentioned above. And vice versa, the absence of its consideration in orthogonal sampling significantly worsens reproduction. Models (b) and (e) are much closer to each other in terms of quality than those obtained with the same ratio of the number of samples of models (c) and (d).

Given the limitations of real systems in relation to the volume of processed information, bandwidth information channels, speed and resolution of input / output devices, orthogonal sampling significantly reduces the representativeness of the information used in encoding and playback. Such a sample, as can be seen from the comparison of models (b) and (e), leads to almost twofold redundant information when inputting images. Its subsequent elimination by optimal coding (compression) in the system itself gives only an additional effect.

Rice. 5.12
illustrates the effect of the orientation of the gratings of the first (readout) and second (rasterization) sampling on the quality of lists obtained using digital ECC at a lineature of 60 lines/cm and a scan rate of 12 lines/mm. The quality of stroke transfer on three variants of prints noticeably increases from fig. 5.12 (a) to fig. 5.12(c) to which:

a) reading and screening with both gratings oriented at 0° (common mode for color separations of yellow ink);

b) reading in the same lattice and screening with a screen tilt of 45° (for black ink);

c) reading and screening in a checkerboard grid of readings.

Reading and encoding originals in an orthogonal grid, adopted in scanning devices of prepress systems, with a given file size, unreasonably underestimates the quality of prints. The information content of many multi-element light panels, information boards, printers, liquid crystal displays and other similar devices is also limited to the same, although this is by no means always justified by the specifics of their design.

In this regard, the denial of the hexagonal arrangement of printed elements in the raster by the wide printing practice, despite its obvious advantages in terms of smooth tone reproduction, can also be explained. The hexagonal sampling grid is more isotropic than the orthogonal one, because the angular period between the directions of maximum and minimum resolution is 30 ° in it (see Fig. 5.8, b). Such a structure is in better agreement with natural (for example, photographs taken from space) or artificial scenes that are isotropic in terms of contour orientation statistics. However, by rotating this structure in the image, it is not possible to ensure the same successful matching of its properties with the properties of the recipient, which is obtained by converting the orthogonal grid to a checkerboard one, where the extrema of the eye resolution alternate with a period of 45 ° (see Fig. 5.8, a).

Quantization is understood as the replacement of a continuous interval of tone values ​​that individual elements of an image can take on with one or another series of discrete values ​​\u200b\u200b- the quantization scale.

The continuous voltage range of the video signal received in the FEP and being, for example, an analog of the reflection coefficient averaged over the area of ​​the reading spot, is divided into discrete levels in the process of analog-to-digital conversion. The number of discretes is determined by the dimension of the quantization scale or the bit depth of the digital code. For example, in the ADC of the Magnasken 640 equipment, the analog signal was converted into a 12-bit binary code on a quantization scale with 4096 levels. At the output of the logarithmic unit, an 8-bit (equal-contrast) signal was formed, having 256 possible values ​​proportional to the optical densities of the original. Such a margin in the number of levels at the output of the logarithmator is necessary so that on the steepest (with a large gradient) sections of the amplitude transfer characteristic, each of the output values ​​​​of the logarithmator corresponds to at least one input value (see Fig. 5.13
). Then all output values ​​are informationally significant. A multiple margin on the quantization scale with respect to 256 levels of an eight-bit signal entering the computer is also provided in modern scanners, the ADC of each of the color separation channels can provide a "color depth" of 10, 12, 14 or even 16 bits of a binary code adequate to the interval optical densities of the read originals and the dynamic range of the used photoelectric converter.

An eight-digit equal-contrast scale is considered sufficient for both television and printing systems. Noticeable to the observer so-called. missing. Otherwise (see fig. 5.14, b-d
) they appear in extended areas of the image in the form of false contours running perpendicular to the direction of a smooth change in tone on the original.

To suppress the quantization noise that accompanied six-bit coding (64 levels) in the first digital repro systems. used the so-called. interlevel wobble, or quantization. Background areas of the original with a smooth transition from one quantization level to another were depicted as a mixture of halftone dots of two adjacent levels. By smoothing out the jumps in tone in the areas of its smooth change, this method, on the other hand, prevented the transfer of the pattern, local contrast details of which was close to the quantization step.

The main task of digital coding in the reproduction process is such a representation of color values ​​that ensures the processing, storage, display and exchange of images between various systems and their components. An open (multi-input/multi-output) color reproduction system should have the following important properties:

  • provide for the input of images from a variety of different sources;
  • have the capabilities and means of standardized coding for the storage and effective exchange of this information;
  • conversion of the output signal, taking into account the properties of the display means, should not depend on the specifics of the original source;
  • allow additional processing of the output signal to obtain the optimal result.

These properties provide a carefully thought-out representation of the image parameters and the corresponding schemes for converting its signals.

An illustration file contains a set of values ​​of some image property expressed in digital codes. With regard to the digital representation of images in the modern information environment, the issues related to color systems and formats of illustration files are most discussed.

It is often assumed that the problem of unambiguous interpretation of encoded illustrative information by various systems for its processing and display can be solved by standardizing formats and adopting a single "hardware-independent" color space. However, these two conditions are not sufficient, if only because displaying in different environments using various technologies not only different technical parameters, it should have different colorimetric characteristics.

The use of a unified color system makes it possible to evaluate only color differences in its units in relation to different schemes for converting color values. These schemes themselves, being quite suitable for some reproduction tasks, turn out to be unacceptable for others.

In order for the file information to be unambiguously interpreted during playback, encoding is carried out in accordance with a certain regulation, which establishes:

  • way of presenting the image;
  • the metric of this representation;
  • supporting information placed in the so-called. tags.

The representation method determines what actually or what property of the image is to be encoded. In this capacity, for example, the colors of all points of the image can be selected, in one case, and information about the geometry and the relative location of its graphic elements, in the other case.

The first option includes the so-called. raster graphics, in which each point, for example, a line, two-level image is described by one bit (there is paint - no paint, light - dark), and the entire set of binary values ​​forms the so-called bitmap. There is one byte per point of a tone, multi-level image - an eight-bit binary combination that can designate one of its 256 possible gradations, and for a color one - a code word that includes three or more bytes.

In the second version ( Vector graphics) code combinations contain a mathematical description of the geometric elements that make up the image. Such a representation, especially for a line image, turns out to be more economical in terms of the amount of binary combinations used than a raster one. Another advantage lies in the free interpretation of the size of the graphic element in relation to the dimensions specified for the copy at different output resolutions. Such a compact description of font characters allows, for example, to display these characters in different sizes (size) and with one or another density of scanning lines in different devices display. However, in most cases end result image signal conversion, there remains a bitmap that controls yes / no printing, while for grayscale display systems, for example, on a CRT screen or when recording on color photographic material, a multi-level, "byte map" is used. Therefore, the relative disadvantage of the analytical method of representation is the need for subsequent transformation of the data array to an acceptable form for one or another method of image synthesis. This transformation is the main function of the raster processor - RIP.

Returning to the first option, it should be further answered that if such an image property as its color is to be encoded, then the choice of the method for representing color values ​​remains the most fundamental. It can be densitometric or colorimetric. In the latter case, the standard colorimetry adopted by the CIE can be used, or one of the many so-called. developed colorimeters that take into account certain specific properties of visual perception, ignored by the CIE color standard.

When encoding the parameters of the geometric elements that make up the image, the representation of the latter, in turn, can be further subdivided into vector-contour, using Bezier curves or other analytical line approximations.

The distinction between a mode of presentation and its metric is quite important. If the first determines the essence (meaning and nature) of the encoded information, then the second determines the system of units by which it is expressed. The choice of the method is more fundamental, since if the choice is not appropriate, the system turns out to be inoperable, regardless of the metric adopted in it.

The mode of assignment determines what will be presented, while its metric characterizes only how the presented will be expressed in numerical values. As an analogy, we can talk about the choice of what will be evaluated: speed, time of movement, or distance traveled. When the method is chosen, it is possible, without changing the essence of the measured, to discuss further the metric, which may be different. If, for example, the method consists in evaluating the distance traveled, then the units, without distorting the meaning they represent, can be a meter, a kilometer, a light year, etc.

When CIE colorimetry is used as the representation method, the values ​​themselves can be expressed, for example, in units of color systems such as LAB or LUV. These units, in turn, can be subjected to various types I am also digitally encoded without distorting their meaning. For example, LAB values ​​after normalization and quantization on a linear or non-linear scale can be represented by eight-bit binary numbers. The choice of metric is important in terms of information compression capabilities.

In addition to the method and metrics, the image presentation regulation also includes auxiliary information indicating the file format or the encoding method used. Such features must be specified precisely in order to allow the exchange of information about the image presented in this way and the metric between different systems and software applications. For this purpose are, in particular, tags - subheadings of illustration files. They indicate the size, spatial resolution of the image or the method of compression of information, which allows the digital codes to be properly interpreted.

This identification underlies such standard file formats as TIFF (Tagged Image File Format), which have significant advantages over those that do not specify what the numbers in the array actually are. The TIFF format is designed to represent images exclusively in raster form. It exists in several different versions and, in particular, LW - for dashed (Line Work) and CT - for halftone (Continuous Tone) images, which indicates, respectively, a bit or byte description of a single image element.

The EPS (Encapsulated PostScript) format is a closed data structure, generated by programs layouts for the output of photoforms, printing plates or for digital printing. This format provides for both vector and raster graphics.

In addition to those indicated universal formats in various prepress programs, there are many other specific formats for digital representation of images.

Scanning (scanning) is used to convert an image into electrical signals that represent the brightness of its individual elements.

Scanning photoconverters (rulers and CCD matrices) ensure the accumulation of light energy, which significantly increases the sensitivity of the reading device.

The reading resolution of the original must be four times higher than the frequencies of the latter that are to be reproduced on a raster print without loss of contrast.

The statistics of the distribution of contours in directions in visual objects and their images reveals the predominance of vertical and horizontal details over oblique ones.

Regular gratings have a significant angular resolution enisotropy.

Orientation of the raster on the reproduction at an angle of 45° not only reduces its visibility, but also increases the frequency-contrast characteristics of the image in the most important vertical and horizontal directions.

With the same volume of the read signal, the chess (diagonal) sample is more representative than the orthogonal one.

The loss of information that accompanies the digital representation of images is due to errors in spatial sampling and level quantization.

In order to avoid the loss of gradations and the occurrence of quantization noise during the non-linear conversion of a digital signal, a margin must be provided for the number of quantization levels (bit depth) at the input.

The digital representation of color in a reproduction system should link its inputs and outputs, as well as provide editing, storage and exchange of color information between its modules.

The image coding regulation is determined by the representation method, the metric of values, and auxiliary parameters that characterize, for example, the file format.

The representation method determines the actual meaning of the encoded color values, while their metric involves the choice of a specific color system and numerical units.

5.1. In scanners with one linear scanning FEP, color separation signals are obtained;

a) sequentially by elements;

b) at the same time;

c) sequentially by frames;

d) sequentially in rows.

5.2. There is no reverse motion of the scanning spot across the frame:

a) in a radial scan;

c) in the television raster.

5.3. There is no reverse motion of the scanning spot along the line:

a) in a radial scan;

b) in a reamer on a cylinder or inside it;

c) in the television raster.

5.4. The linearity of the reading spot sweep affects:

a) smooth tone transmission;

b) image clarity;

c) image geometry.

5.5. The limiting frequency of the video signal is determined by the following ratio of the size of the reading spot d and the linear scanning speed V:

a) dV; b) d/V; c) V/d.

5.6. Instantaneous reading systems include:

a) flatbed scanner;

c) a digital camera;

d) television camera.

5.7. Reading systems with the accumulation of light energy include:

a) a system with a Nipkow disk sweep;

b) a scanner with a scan on a cylinder;

c) flatbed scanner.

5.8. The accumulation of light energy on the sensitive element of the photoconverter during the line takes place:

a) in a scanner with a scan on a cylinder;

b) in a flatbed scanner;

c) in a television camera.

5.9. One-dimensional spatial discretization of the image takes place:

a) in a digital flatbed scanner;

b) in an analog DC scanner with a sweep on a cylinder;

c) as a result of analog-to-digital conversion of the video signal;

d) in the broadcasting system of black and white television;

e) when using a projection cross raster.

5.10. At least two times the two-dimensional spatial discretization of the image takes place:

a) a digital camera

b) in a photo-reproduction chamber with contact screening;

c) in an analog electronic engraving machine;

d) in digital systems obtaining raster photoforms of tone originals.

5.11. The spatial-frequency properties of vision are the lowest in relation to the strokes located on the image:

a) obliquely;

b) vertically;

c) horizontally.

5.12. In the presence of details of a different orientation in the neighborhood, vision is concentrated on details located:

a) obliquely;

b) vertically;

c) horizontally.

5.13. Angular anisotropy in the statistics of the distribution of contours in directions is not inherent:

a) landscape painting;

b) aerial photographs;

c) abstract paintings;

d) newspaper illustrations;

e) fonts.

5.14. The most pronounced angular anisotropy of resolution has a discretization grating, the structure of which is:

a) linear;

b) orthogonal;

c) hexagonal;

d) irregular.

5.15. The least pronounced angular anisotropy of resolution has a discretization grating, the structure of which is:

c) linear;

b) orthogonal;

c) hexagonal.

5.16. In an orthogonal sampling lattice with the least stepwise distortions, strokes are reproduced, the orientation of which is close:

a) to the diagonal;

b) to vertical;

c) to the horizontal.

5.17. Object moire does not include the result of the interference interaction of spatial frequencies:

a) color separations;

b) original and polygraphic screen;

c) original and reader.

5.18. The spatial-frequency characteristics of the original, the printing system, and vision are optimally matched in terms of their angular anisotropy when the orthogonal sampling grating is oriented at an angle:

a) 0°; b) 15°; c) 30°; d) 45°.

5.19. Tone value quantization noise appears in the image:

a) a decrease in its overall contrast;

b) stepped distortion of contours;

c) the appearance of false contours;

d) interruption of thin strokes;

e) reduced clarity.

5.20. An equal-contrast signal is displayed by a smooth change in tone over the entire range of gradations, if the bit depth of its binary code is at least:

a) 5; b) 6; at 7; d) 8; e) 16.

5.21. When playing a tone original in a printing system with a digital printing machine its spatial discretization and tone quantization by level take place at least:

a) once;

b) twice;

three times;

Spatial Discretization.

In the process of encoding an image, its spatial sampling is performed. Spatial discretization of an image can be compared to the construction of an image from a mosaic (a large number of small multi-colored glasses). The image is divided into separate small fragments (points), and each fragment is assigned the value of its color, that is, a color code (red, green, blue, and so on).

Sampling- This converting graphic information from analog to discrete form, that is, dividing a continuous graphic image into separate elements.

The quality of image encoding depends on:

1) sample rate, i.e. the size of the fragments into which the image is divided. The quality of image coding is the higher, the smaller the size of the dot and, accordingly, the greater the number of dots makes up the image.

The choice of sampling rate is always a compromise between the quality of reproduction of fine details and the degree of information reduction. As a rule, in the process of discretization of an image, its "format" is determined, as they say, i.e. the number of its constituent elements. In this case, of course, the size of the image also changes. Therefore, in order to exclude the influence of this additional factor (image size) on the parameter under study, an artificial trick is used in this work: when the sampling conditions change, the image size is artificially kept constant.

2) coding depth, i.e. number of flowers. The greater the number of colors, that is, the greater the number of possible states of the image point, is used, the better the image is encoded (each point carries more information). The set of colors used in the set forms the color palette.

Graphic information on the monitor screen is presented in the form bitmap, which is formed from a certain number of lines, which in turn contain a certain amount of dots (pixels).

Pixel- the minimum area of ​​the image, the color of which can be set independently.

Each color can be considered as a possible state of a point, then the number of colors displayed on the monitor screen can be calculated by the formula: N = 2i, where i is the color depth: (if color depth (I) = 8, then 2^8 = 256)

Task 1. Let us consider the formation of a bitmap image on the monitor screen, consisting of 600 lines of 800 points in each line (480,000 points in total). In the simplest case (black and white image without grayscale), each screen point can have one of two states - “black ” or “white”, that is, 1 bit is needed to store its state.

TASK 2. Calculate the required amount of video memory for one of the graphics modes, for example, with a resolution of 800 x 600 pixels and a color depth of 24 bits per pixel.

Total dots on the screen: 800,600 = 480,000. Required video memory: 24 bits 480,000 = 11,520,000 bits = 1,440,000 bytes = 1406.25 KB = 1.37 MB.


Spatial discretization. In the process of encoding an image, its spatial sampling is performed. The image is divided into separate small fragments - dots. each fragment is assigned its color value, that is, the color code (red, green, blue, and so on). The quality of image encoding depends on two parameters: dot size - the image encoding quality is higher, the smaller the dot size and, accordingly, the greater the number of dots makes up the image. the number of colors - the greater the number of colors used, the better the image is encoded (each point carries more information). The set of colors used in the set forms the color palette.


Formation of a raster image. Graphic information on the monitor screen is presented as a bitmap image, which is formed from a certain number of lines, which in turn contain a certain number of dots (pixels). Image quality is determined by the resolution of the monitor, i.e. the number of points from which it is composed. The greater the resolution, that is, the greater the number of raster lines and dots per line, the higher the image quality. In modern personal computers, three main screen resolutions are usually used: 800 x 600, 1024 x x A black and white image without grayscale consists of 600 lines of 800 points in each line (total points), then each point of the screen can have one of two states "black" or "white", that is, 1 bit is needed to store its state. Color images are formed in accordance with the binary color code of each point, stored in the video memory. Color images can have different color depths, which are given by the number of bits used to encode the color of a point. The most common color depths are 8, 16, 24 or 32 bits.


Quality binary encoding images are determined by screen resolution and color depth. Each color can be considered as a possible state of a point, then the number of colors displayed on the monitor screen can be calculated by the formula N = 2 I, where I is the color depth


Color Depth and Number of Colors Displayed Color Depth (I)Number of Colors Displayed (N) 82 8 = (High Color)2 16 = (True Color)2 24 = (True Color)2 32 = The color image on the monitor screen is formed by blending three basic colors: red, green and blue. This color model is called the RGB model after the first letters of the English color names (Red, Green, Blue). To obtain a rich palette of colors, the base colors can be given different intensities. For example, with a color depth of 24 bits, 8 bits are allocated for each of the colors, that is, for each of the colors, N = 2 8 = 256 intensity levels are possible, specified by binary codes (from minimum to maximum)


Color Formation at 24-bit Color Depth Color Name Intensity RedGreenBlue Black Red Green Blue Cyan Yellow White


Graphic mode. The graphic mode for displaying an image on the monitor screen is determined by the resolution and color depth. In order for an image to be formed on the monitor screen, information about each of its dots (dot color code) must be stored in the computer's video memory. Example 1 Let's calculate the required amount of video memory for one of the graphics modes, for example, with a resolution of 800 x 600 pixels and a color depth of 24 bits per pixel. Total dots per screen: = Required video memory: 24 bits = bits = bytes = 1406.25 KB = 1.37 MB. Similarly, the required amount of video memory is calculated for other graphics modes. Windows provides the ability to select the graphics mode and adjust the settings for the computer's video system, which includes the monitor and video adapter.


Example 2 A color image of cm size is scanned. The scanner resolution is 600 dpi and the color depth is 32 bits. What information volume will the received graphic file have.


Solution Let's translate the resolution of the scanner from dots per inch to dots per centimeter: 600 dpi: 2, dots/cm Therefore, the size of the image in dots will be dots. The total number of pixels in the image is: = Information volume of the file is: 32 bits = 21.25 MB bits


Questions 1. What is the essence of the method of spatial discretization? 2.Explain the principle of forming a bitmap. 3. What parameters set the graphics mode in which images are displayed on the monitor screen? Jobs Uses graphics modes with color depths of 8, 16, 24, and 32 bits. Calculate the amount of video memory required to implement these color depths at various screen resolutions.