Analog and discrete image. Transition from continuous signals and transformations to discrete ones Limiting image sizes

Analog and discrete methods of representing images and sound

A person is able to perceive and store information in the form of images (visual, sound, tactile, gustatory and olfactory). Visual images can be saved in the form of images (drawings, photographs, etc.), and sound images can be recorded on records, magnetic tapes, laser discs, and so on.

Information, including graphic and audio, can be presented in analog or discrete form. With analog representation, a physical quantity takes on an infinite number of values, and its values ​​change continuously. With a discrete representation, a physical quantity takes on a finite set of values, and its value changes abruptly.

Let's give an example of analog and discrete representation information. The position of a body on an inclined plane and on a staircase is specified by the values ​​of the X and Y coordinates. When a body moves along an inclined plane, its coordinates can take on an infinite number of continuously changing values ​​from a certain range, and when moving along a staircase - only a certain set of values, which change abruptly (Fig. .1.6).

An example of an analog representation of graphic information is, for example, a painting, the color of which changes continuously, and a discrete one is an image printed using inkjet printer and consisting of individual dots of different colors. Example of analog storage audio information is vinyl record(the sound track changes its shape continuously), and discrete - an audio compact disc (the sound track of which contains areas with different reflectivity).

Conversion of graphic and sound information from analogue to discrete form is carried out by sampling, that is, partitions of a continuous graphic image and continuous (analog) sound signal into individual elements. The sampling process involves encoding, that is, assigning each element a specific value in the form of a code.

Sampling is the transformation of continuous images and sound into a set of discrete values ​​in the form of codes.

Questions to Consider

1. Give examples of analog and discrete methods of presenting graphic and audio information.

2. What is the essence of the sampling process?

Analog and discrete image. Graphic information can be represented in analog or discrete form. An example of an analogue image is a painting whose color changes continuously, and an example of a discrete image is a pattern printed using an inkjet printer, consisting of individual dots of different colors. Analog (oil painting). Discrete.

Slide 11 from the presentation "Encoding and processing of information". The size of the archive with the presentation is 445 KB.

Computer Science 9th grade

summary of other presentations

“Branching structure algorithms” - IF condition, THEN action. What do we know? Lesson structure. Branching algorithm. Complete the algorithm and fill out the table. The student who scores from 85 to 100 points, inclusive, advances to the second round of the competition. Enter the number of points and determine whether he made it to the second round. Find the largest number between a and b. Write a program in a programming language. A branching algorithm is an algorithm in which, depending on the condition, either one or another sequence of actions is performed.

“Creation of artificial intelligence” - Simulation approach. Approaches to building artificial intelligence systems. Evolutionary approach. Artificial intelligence. Can cohabit with many people, helping to cope with personal problems. Structural approach. Logical approach. Problems during development. Development prospects and areas of application.

“Cyclic programs” - Digital. Loop with precondition. Find the amount. Loop with postcondition. Loop with a parameter. Euclid's algorithm. Cyclic programs. Find the sum of natural numbers. The concept of a cycle. Down payment. Function tabulation. Calculate. Example. Dividers. Informatics. Find the number of numbers. Find. Find the number of three-digit natural numbers. Three-digit numbers. Find the set of function values. Dollar conversion table.

“What is email” - Sender. Email address. Email history. The question of the appearance of e-mail. Letter structure. Mail routing. Letter. Email. Copy. Date. X-mailer. E-mail. How it works e-mail.

“Working with email” - Email address. Mailbox. Email protocol. File sharing network. Address separation. The benefits of email. Mail clients. Inventor of email. Address. E-mail. Software for working with email. How email works. Teleconference. Mail server. File sharing.

“Processing in Photoshop” - Cool guys. How to distinguish a fake. Raster and vector images. Introduction. Prize places. Program Adobe Photoshop. Retouching. Competitions on working with Photoshop. Brightness adjustment. My friends. Practical part. Similar programs. Main part. Design. Unusual animals. Montage of multiple images.

You can replace a continuous image with a discrete one in various ways. You can, for example, choose any system of orthogonal functions and, having calculated the coefficients of image representation using this system (using this basis), replace the image with them. The variety of bases makes it possible to form various discrete representations of a continuous image. However, the most commonly used is periodic sampling, in particular, as mentioned above, sampling with a rectangular raster. This discretization method can be considered as one of the options for using an orthogonal basis that uses shifted -functions as its elements. Next, following mainly, we will consider in detail the main features of rectangular sampling.

Let be a continuous image, and let be the corresponding discrete one, obtained from the continuous one by rectangular sampling. This means that the relationship between them is determined by the expression:

where are the vertical and horizontal steps or sampling intervals, respectively. Fig. 1.1 illustrates the location of samples on the plane with rectangular sampling.

The main question that arises when replacing a continuous image with a discrete one is to determine the conditions under which such a replacement is complete, i.e. is not accompanied by a loss of information contained in the continuous signal. There are no losses if, having discrete signal, you can restore continuous. From a mathematical point of view, the question is therefore to reconstruct a continuous signal in two-dimensional spaces between nodes in which its values ​​are known or, in other words, to perform two-dimensional interpolation. This question can be answered by analyzing the spectral properties of continuous and discrete images.

The two-dimensional continuous frequency spectrum of a continuous signal is determined by a two-dimensional direct Fourier transform:

which corresponds to the two-dimensional inverse continuous Fourier transform:

The last relation is true for any values, including at nodes rectangular lattice . Therefore, for the signal values ​​at the nodes, taking into account (1.1), relation (1.3) can be written as:

For brevity, let us denote by a rectangular section in the two-dimensional frequency domain. The calculation of the integral in (1.4) over the entire frequency domain can be replaced by integration over individual sections and summation of the results:

By replacing variables according to the rule, we achieve independence of the integration domain from the numbers and:

It is taken into account here that for any integer values ​​and . This expression is very close in form to the inverse Fourier transform. The only difference is the incorrect form of the exponential factor. To give it the required form, we introduce normalized frequencies and perform a change of variables in accordance with this. As a result we get:

Now expression (1.5) has the form of an inverse Fourier transform, therefore, the function under the integral sign is

(1.6)

is a two-dimensional spectrum of a discrete image. In the plane of non-standardized frequencies, expression (1.6) has the form:

(1.7)

From (1.7) it follows that the two-dimensional spectrum of a discrete image is rectangularly periodic with periods and along the frequency axes and, respectively. The spectrum of a discrete image is formed as a result of the summation of an infinite number of spectra of a continuous image, differing from each other in frequency shifts and . Fig. 1.2 qualitatively shows the relationship between the two-dimensional spectra of continuous (Fig. 1.2.a) and discrete (Fig. 1.2.b) images.

Rice. 1.2. Frequency spectra of continuous and discrete images

The summation result itself depends significantly on the values ​​of these frequency shifts, or, in other words, on the choice of sampling intervals. Let us assume that the spectrum of a continuous image is nonzero in a certain two-dimensional region in the vicinity of zero frequency, that is, it is described by a two-dimensional finite function. If the sampling intervals are chosen so that for , , then the overlap of individual branches when forming the sum (1.7) will not occur. Consequently, within each rectangular section only one term will differ from zero. In particular, when we have:

at , . (1.8)

Thus, within the frequency domain, the spectra of continuous and discrete images coincide up to a constant factor. In this case, the spectrum of the discrete image in this frequency region contains full information about the spectrum of a continuous image. We emphasize that this coincidence occurs only under specified conditions, determined by a successful choice of sampling intervals. Note that the fulfillment of these conditions, according to (1.8), is achieved at sufficiently small values ​​of sampling intervals, which must satisfy the requirements:

in which are the boundary frequencies of the two-dimensional spectrum.

Relationship (1.8) determines the method of obtaining a continuous image from a discrete one. To do this, it is enough to perform two-dimensional filtering of a discrete image using a low-pass filter with frequency response

The spectrum of the image at its output contains non-zero components only in the frequency domain and is equal, according to (1.8), to the spectrum of a continuous image. This means that the output image of an ideal filter low frequencies coincides with .

Thus, ideal interpolation reconstruction of a continuous image is performed using a two-dimensional filter with a rectangular frequency response (1.10). It is not difficult to write down an explicit algorithm for reconstructing a continuous image. The two-dimensional impulse response of the reconstruction filter, which can be easily obtained using the inverse Fourier transform from (1.10), has the form:

.

The filter product can be determined using a two-dimensional convolution of the input image and a given impulse response. Representing the input image as a two-dimensional sequence of -functions

after performing the convolution we find:

The resulting relationship indicates a method for accurate interpolation reconstruction of a continuous image from a known sequence of its two-dimensional samples. According to this expression, for accurate reconstruction, two-dimensional functions of the form should be used as interpolating functions. Relation (1.11) is a two-dimensional version of the Kotelnikov-Nyquist theorem.

Let us emphasize once again that these results are valid if the two-dimensional spectrum of the signal is finite and the sampling intervals are sufficiently small. The fairness of the conclusions drawn is violated if at least one of these conditions is not met. Real images rarely have spectra with pronounced cutoff frequencies. One of the reasons leading to the unlimited spectrum is the limited image size. Because of this, when summing in (1.7), the action of terms from neighboring spectral zones appears in each of the zones. In this case, accurate restoration of a continuous image becomes completely impossible. In particular, the use of a filter with a rectangular frequency response does not lead to accurate reconstruction.

A feature of optimal image restoration in the intervals between samples is the use of all samples of a discrete image, as prescribed by procedure (1.11). This is not always convenient; it is often necessary to reconstruct a signal in a local area, relying on a small number of available discrete values. In these cases, it is advisable to use quasi-optimal restoration using various interpolating functions. This kind of problem arises, for example, when solving the problem of linking two images, when, due to the geometric detuning of these images, the available samples of one of them may correspond to some points located in the spaces between the nodes of the other. The solution to this problem is discussed in more detail in subsequent sections of this manual.

Rice. 1.3. Effect of sampling interval on image reconstruction

"Fingerprint"

Rice. Figure 1.3 illustrates the effect of sampling intervals on image restoration. The original image, which is a fingerprint, is shown in Fig. 1.3, a, and one of the sections of its normalized spectrum is in Fig. 1.3, b. This image is discrete, and the value is used as the cutoff frequency. As follows from Fig. 1.3, b, the value of the spectrum at this frequency is negligible, which guarantees high-quality reconstruction. In fact, observed in Fig. 1.3.a the picture is the result of restoring a continuous image, and the role of a restoring filter is performed by a visualization device - a monitor or printer. In this sense, the image in Fig. 1.3.a can be considered continuous.

Rice. 1.3, c, d show the consequences of an incorrect choice of sampling intervals. When obtaining them, the “continuous” image was “sampled” in Fig. 1.3.a by thinning out its counts. Rice. 1.3,c corresponds to an increase in the sampling step for each coordinate by three, and Fig. 1.3, g - four times. This would be acceptable if the values ​​of the cutoff frequencies were lower by the same number of times. In fact, as can be seen from Fig. 1.3, b, there is a violation of requirements (1.9), especially severe when the samples are thinned out four times. Therefore, the images restored using algorithm (1.11) are not only defocused, but also greatly distort the texture of the print.

Rice. 1.4. The influence of the sampling interval on the reconstruction of the “Portrait” image

In Fig. 1.4 shows a similar series of results obtained for an image of the “portrait” type. The consequences of stronger thinning (four times in Fig. 1.4.c and six times in Fig. 1.4.d) are manifested mainly in loss of clarity. Subjectively, the quality loss seems less significant than in Fig. 1.3. This is explained by the significantly smaller spectral width than that of a fingerprint image. The sampling of the original image corresponds to the cutoff frequency. As can be seen from Fig. 1.4.b, this value is much higher than the true value. Therefore, the increase in the sampling interval, illustrated in Fig. 1.3, c, d, although it worsens the picture, still does not lead to such destructive consequences as in the previous example.

As a rule, signals enter the information processing system in a continuous form. For computer processing of continuous signals, it is necessary, first of all, to convert them into digital ones. To do this, sampling and quantization operations are performed.

Image sampling

Sampling– this is the transformation of a continuous signal into a sequence of numbers (samples), that is, the representation of this signal according to some finite-dimensional basis. This representation consists of projecting a signal onto a given basis.

The most convenient and natural way of sampling from the point of view of organizing processing is to represent signals in the form of a sample of their values ​​(samples) at separate, regularly spaced points. This method is called rasterization, and the sequence of nodes at which samples are taken is raster. The interval through which the values ​​of a continuous signal are taken is called sampling step. The reciprocal of the step is called sampling rate,

An essential question that arises during sampling: at what frequency should we take signal samples in order to be able to reconstruct it back from these samples? Obviously, if samples are taken too rarely, they will not contain information about a rapidly changing signal. The rate of change of the signal is characterized upper frequency its spectrum. Thus, the minimum allowable width of the sampling interval is related to the highest frequency of the signal spectrum (inversely proportional to it).

For the case of uniform sampling, the following holds true: Kotelnikov's theorem, published in 1933 in the work “On bandwidth ether and wire in telecommunications.” It says: if a continuous signal has a spectrum limited by frequency, then it can be completely and unambiguously reconstructed from its discrete samples taken with a period, i.e. with frequency.

Signal restoration is carried out using the function . Kotelnikov proved that a continuous signal that satisfies the above criteria can be represented as a series:

.

This theorem is also called the sampling theorem. The function is also called sampling function or Kotelnikov, although an interpolation series of this type was studied by Whitaker in 1915. The sampling function has an infinite extension in time and reaches its greatest value, equal to unity, at the point about which it is symmetrical.

Each of these functions can be considered as a response of an ideal low pass filter(low-pass filter) to the delta pulse arriving at time . Thus, to restore a continuous signal from its discrete samples, they must be passed through an appropriate low-pass filter. It should be noted that such a filter is non-causal and physically unrealizable.

The above ratio means the possibility of accurately reconstructing signals with a limited spectrum from the sequence of their samples. Limited Spectrum Signals– these are signals whose Fourier spectrum differs from zero only within a limited portion of the definition area. Optical signals can be classified as one of them, because The Fourier spectrum of images obtained in optical systems is limited due to the limited size of their elements. The frequency is called Nyquist frequency. This is the limiting frequency above which there should be no spectral components in the input signal.

Image quantization

In digital image processing, the continuous dynamic range of brightness values ​​is divided into a number of discrete levels. This procedure is called quantization. Its essence lies in the transformation of a continuous variable into a discrete variable that takes a finite set of values. These values ​​are called quantization levels. In general, the transformation is expressed by a step function (Fig. 1). If the intensity of the image sample belongs to the interval (i.e., when ), then the original sample is replaced by the quantization level, where quantization thresholds. It is assumed that the dynamic range of brightness values ​​is limited and equal to .

Rice. 1. Function describing quantization

The main task in this case is to determine the values ​​of thresholds and quantization levels. The simplest way The solution to this problem is to divide the dynamic range into equal intervals. However, this solution is not the best. If the intensity values ​​of the majority of image counts are grouped, for example, in the “dark” region and the number of levels is limited, then it is advisable to quantize unevenly. In the “dark” region it is necessary to quantize more often, and in the “light” region less often. This will reduce the quantization error.

In digital image processing systems, they strive to reduce the number of quantization levels and thresholds, since the amount of information required to encode an image depends on their number. However, with a relatively small number of levels in the quantized image, false contours may appear. They arise as a result of an abrupt change in the brightness of the quantized image and are especially noticeable in flat areas of its change. False contours significantly degrade the visual quality of the image, since human vision is especially sensitive to contours. When uniformly quantizing typical images, at least 64 levels are required.

Tell and show with an example Pascal: 1) What is absolute and what is it for? 2) What is asm and what is it for? 3) What is

constructor and destructor and what is it for?

4) What is implementation and what is it for?

5) Name the Pascal modules (in the Uses line, for example crt) and what capabilities does this module provide?

6) What type of variable is it: pointer

7) And lastly: what does the symbol @, #, $, ^ mean?

1. What is an object?2. What is a system?3. What is the common name of an object? Give an example.4. What is a single object name? Give an example.5.

Give an example of a natural system.6. Give an example of a technical system.7. Give an example of a mixed system.8. Give an example of an intangible system.9. What is classification?10. What is an object class?

1. Question 23 - list the operating modes of the access database:

Creating a table in design mode;
-creating a table using the wizard;
-creating a table by entering data.

2. what is vector format?

3. can it be attributed to service programs following:
a) disk maintenance programs (copying, disinfecting, formatting, etc.)
b) compression of files on disks (archivers)
c) fighting computer viruses and much more.
I think that the answer here is B - right or wrong?

4. as for the properties of the algorithm (a. discreteness, b. effectiveness c. mass character, d. certainty, d. feasibility and understandability) - here I think that all the options are correct. Right or wrong?

test 7 easy multiple choice questions

13. Processor clock speed is:

A. the number of binary operations performed by the processor per unit time

B. the number of pulses generated per second that synchronize the operation of computer nodes

C. the number of possible processor accesses to RAM per unit of time

D. speed of information exchange between the processor and input/output devices

14. Specify the minimum required set devices designed for computer operation:

A. printer, system unit, keyboard

B. processor, RAM, monitor, keyboard

C. processor, streamer, hard drive

D. monitor, system unit, keyboard

15. What is a microprocessor?

A. integrated circuit, which executes commands received at its input and controls

Computer operation

B. a device for storing data that is often used at work

C. a device for displaying text or graphic information

D. device for outputting alphanumeric data

16.User interaction with software environment carried out using:

A. operating system

B. file system

C. Applications

D. file manager

17.Direct control software the user can carry out with

By:

A. operating system

B. GUI

C. User Interface

D. file manager

18. Methods of storing data on physical media are determined by:

A. operating system

B. application software

C. file system

D. file manager

19. Graphical environment on which objects and controls are displayed Windows systems,

Created for user convenience:

A. hardware interface

B. user interface

C. desktop

D. software interface

20. The speed of a computer depends on:

A. clock frequency processor

B. presence or absence of a connected printer

C. organization of the operating system interface

D. external storage capacity

Share