Tasks for calculating the information volume of a raster graphic image. Does the number of flowers in a bouquet matter? Determine image size by number of colors

When choosing flowers, every person thinks about how many flowers should be in the bouquet. Indeed, in addition to the type and shade of plants, their number also plays a big role in the bouquet. With the help of special developments, scientists were able to find out that already in the 5th - 6th centuries BC, certain numerical symbolism was observed. This fact suggests that numbers have a long-proven meaning, so the number of flowers for a gift must be taken seriously.

Even and odd numbers

According to ancient Slavic traditions, an even number of flowers in a bouquet has the meaning of mourning and charges the bouquet with negative energy.

That is why paired quantities are brought to funerals, graves or monuments. But residents of Eastern, European countries and the USA have a completely different point of view on this matter. An even number is a symbol of luck, happiness and love.

The Germans consider eight to be the happiest number in a bouquet, despite the fact that it is even.

In the USA, 12 flowers are most often given to each other. Residents of Tokyo will be calm if you give them 2 flowers, the main thing is not 4 - this number is considered a symbol of death.

The Japanese, in general, have their own language of plants, and each number has its own meaning. For example, one rose is a sign of attention, three is respect, five is love, seven is passion and adoration, nine is admiration. The Japanese present a bouquet of 9 flowers to their idols, and a bouquet of 7 to their beloved women. In our country, you can also give an even number of plants if there are more than 15 of them in one set.

Language of flowers

Few people know that the language of flowers determines the number of buds in a bouquet. This language needs to be known and taken into account by the person giving the gift, so as not to regret their actions in the future. Suddenly the number of flowers in the bouquet matters to the recipient.

What do the numbers say?

An exception to the rule that prohibits presenting an even number of flowers is roses, there can even be two of them.

There is a separate language for these beautiful plants that defines the meaning for each number:

How to give roses to a girl

Of course, every woman dreams of receiving from her beloved at least once in her life. large number roses that would be difficult to even count.

But a composition of hundreds of elite plants is not always more important in terms of love for your chosen one than one beautiful red rose, especially if it is presented correctly.

You should not wrap the flower in a wrapper, or add extra twigs and plants to it, this will only cheapen its appearance.

A rose decorated with a velvet or satin ribbon will look much better. Sometimes you can pack it in a transparent wrapper, but only without unnecessary shine. The same can be said about a bouquet of three buds. If there are more than 7 flowers in the set, then they must be packaged and tied with ribbons so that the bouquet has beautiful view and didn't fall apart.

Visit almost any photography forum and you're bound to come across a discussion regarding the merits of RAW and JPEG files. One of the reasons why some photographers prefer RAW format- this is a greater bit depth ( color depth)* contained in the file. This allows you to produce photos of greater technical quality than what you can get from a JPEG file.

*Bitdepth(bit depth), or Colordepth(color depth, in Russian this definition is more often used) - the number of bits used to represent color when encoding one pixel raster graphics or video images. Often expressed in units of bits per pixel (bpp). Wikipedia

What is color depth?

Computers (and devices that are controlled by embedded computers, such as digital SLR cameras) use the binary number system. Binary numbering consists of two digits - 1 and 0 (in contrast to the decimal numbering system, which includes 10 digits). One digit in the binary system is called a “bit” (short for “binary digit”).

An eight-bit number in binary looks like this: 10110001 (equivalent to 177 in decimal). The table below demonstrates how this works.

The maximum possible eight-bit number is 11111111 - or 255 in decimal. This is a significant number for photographers because it occurs in many image processing programs as well as older displays.

Digital shooting

Each of the millions of pixels in a digital photograph corresponds to an element (also called a pixel) on the camera's sensor. These elements, when illuminated by light, generate a weak electric current, measured by the camera and recorded as a JPEG or RAW file.

JPEG files

JPEG files record color and brightness information for each pixel in three eight-bit numbers, one number each for the red, green, and blue channels (these color channels(same as the ones you see when plotting a color histogram in Photoshop or on your camera).

Each eight-bit channel records color on a 0-255 scale, providing a theoretical maximum of 16,777,216 shades (256 x 256 x 256). The human eye can distinguish approximately 10-12 million colors, so this number provides a more than satisfactory amount of information to display any object.

This gradient was stored in a 24-bit file (8 bits per channel), which is sufficient to convey a soft gradation of colors.

This gradient was saved as a 16-bit file. As you can see, 16 bits is not enough to convey a soft gradient.

RAW files

RAW files assign more bits to each pixel (most cameras have 12 or 14 bit processors). More bits - more number, and therefore more tones per channel.

This doesn't equate to more colors - JPEG files can already record more colors than the human eye can perceive. But each color is preserved with a much finer gradation of tones. In this case, the image is said to have greater color depth. The table below illustrates how bit depth equates to number of shades.

In-camera processing

When you set your camera to record photos in JPEG mode, the camera's internal processor reads the information received from the sensor at the moment you take a photo, processes it according to the parameters set in the camera menu (white balance, contrast, color saturation, etc.) etc.) and writes it as an 8-bit JPEG file. All additional information, received by the sensor, is discarded and lost forever. As a result, you only use 8 bits out of the 12 or 14 possible that the sensor is capable of capturing.

Post-processing

A RAW file differs from a JPEG in that it contains all the data recorded by the camera sensor during the exposure period. When you process a RAW file using software to convert RAW, the program carries out the conversion, similar topics, which is what the camera's internal processor produces when you shoot in JPEG. The difference is that you set the parameters within the program you are using, and those set in the camera menu are ignored.

The benefit of the RAW file's extra bit depth becomes apparent in post-processing. A JPEG file is worth using if you are not going to do any post-processing and you just need to set the exposure and all other settings while shooting.

However, in reality, most of us want to make at least a few adjustments, even if it's just brightness and contrast. And this is exactly the moment when JPEG files begin to give way. With less information per pixel when you make adjustments to brightness, contrast, or color balance, shades may be visually separated.

The result is most obvious in areas of smooth and continuous gradation, such as blue skies. Instead of a soft gradient from light to dark, you will see stratification into bands of color. This effect is also known as posterisation. The more you adjust, the more it appears in the image.

With a RAW file, you can make much greater changes to color tone, brightness, and contrast before you see a decrease in image quality. This can also be done by some functions of the RAW converter, such as adjusting the white balance and restoring “highlight” areas (highlight recovery).

This photo is obtained from a JPEG file. Even at this size, streaks in the sky are visible as a result of post-processing.

Upon closer examination, a posterization effect is visible in the sky. Working with a 16-bit TIFF file can eliminate, or at least minimize, the banding effect.

16-bit TIFF files

When you process a RAW file, your software gives you the option to save it as an 8-bit or 16-bit file. If you're happy with the processing and don't want to make any more changes, you can save it as an 8-bit file. You won't notice any differences between an 8-bit and a 16-bit file on your monitor or when you print the image. The exception is if you have a printer that recognizes 16-bit files. In this case, you can get a better result from a 16-bit file.

However, if you plan to do post-processing in Photoshop, then it is recommended that you save the image as a 16-bit file. In this case, the image obtained from a 12 or 14-bit sensor will be "stretched" to fill the 16-bit file. You can then work on it in Photoshop, knowing that the extra color depth will help you achieve maximum quality.

Again, when you have completed the processing process, you can save the file as an 8-bit file. Magazines, book publishers, and stockists (and just about any client who buys photos) require 8-bit images. 16-bit files may only be needed if you (or someone else) intend to edit the file.

This is an image I captured using the RAW+JPEG setting on the EOS 350D. The camera saved two versions of the file - a JPEG processed by the camera's processor, and a RAW file containing all the information recorded by the camera's 12-bit sensor.

Here you can see a comparison of the top right corner of the processed JPEG file and the RAW file. Both files were created with the same camera exposure setting, and the only difference between them is the color depth. I was able to “pull out” the “overexposed” details that were not visible in JPEG in the RAW file. If I wanted to work on this image further in Photoshop, I could save it as a 16-bit TIFF file to ensure the highest possible image quality during the processing process.

Why do photographers use JPEG?

Just because not all professional photographers use RAW all the time doesn't mean anything. Both wedding and sports photographers, for example, often work with the JPEG format.

For wedding photographers who may shoot thousands of images at a wedding, this saves time in post-production.

Sports photographers use JPEG files to be able to send photos to their graphics editors during the event. In both cases, the speed, efficiency and smaller file size of JPEG files makes using this file type logical.

Color depth on computer screens

Bit depth also refers to the depth of color that computer monitors are capable of displaying. Readers using modern displays may find this hard to believe, but the computers I used in school could only produce 2 colors - white and black. The “must-have” computer of that time was the Commodore 64, capable of reproducing as many as 16 colors. According to information from Wikipedia, more than 12 units of this computer were sold.


Commodore 64 computer. Photo by Bill Bertram

Sure, you can't edit photos on a 16-color machine (64K of RAM won't cut it anyway), and the invention of 24-bit displays with true-to-life color reproduction is one of the things that did digital photography possible. Displays with true-to-life color reproduction, just like JPEG files, are formed using three colors (red, green and blue), each with 256 shades recorded in an 8-bit digit. Most modern monitors use either 24-bit or 32-bit graphics devices with realistic color reproduction.

HDR files

Many of you know that High Dynamic Range (HDR) images are created by combining multiple versions of the same image captured from different settings exposition. But did you know that the software produces a 32-bit image with more than 4 billion tonal values ​​per channel per pixel—merely a leap from the 256 tones in a JPEG file.

True HDR files may not be displayed correctly on a computer monitor or printed page. Instead, they are trimmed down to 8- or 16-bit files using a process called tone-mapping, which preserves the high dynamic range characteristics of the original image but allows it to be reproduced on low dynamic range devices.

Conclusion

Pixels and bits are the basic elements for constructing a digital image. If you want to get the most good quality image on your camera, you need to understand the concept of color depth and why the RAW format produces better quality images.

Theory

Calculation of information volume of raster graphic image(the amount of information contained in a graphic image) is based on counting the number of pixels in this image and determining the color depth (the information weight of one pixel).

The calculations use the formula V = i * k,

where V is the information volume of the raster graphic image, measured in bytes, kilobytes, megabytes;

k – the number of pixels (dots) in the image, determined by the resolution of the information carrier (monitor screen, scanner, printer);

i – color depth, which is measured in bits per pixel.

Color depth specified by the number of bits used to encode the color of the dot.

Color depth is related to the number of colors displayed by the formula

N=2i, where N is the number of colors in the palette, i is the color depth in bits per pixel.

Examples

1. The computer’s video memory has a capacity of 512Kb, the graphic grid size is 640×200, and the palette has 8 colors. How many screen pages can be simultaneously stored in the computer's video memory?

Solution:

Let's find the number of pixels in the image of one screen page:

k = 640*200=128000 pixels.

Let's find i (color depth, i.e. how many bits are needed to encode one color) N = 2 i, therefore, 8 = 2 i, i = 3.

Find the amount of video memory required to accommodate one page of the screen. V = i * k (bit), V = 3*128000 = 384000 (bit) = 48000 (byte) = 46.875Kb.

Because Since the computer's video memory is 512Kb, it is possible to simultaneously store 512 / 46.875 = 10.923 ≈ 10 whole screen pages in the computer's video memory.

Answer: 10 full pages screen can be simultaneously stored in the computer's video memory

2. As a result of converting a raster graphic image, the number of colors decreased from 256 to 16. How did this change the amount of video memory occupied by the image?

Solution:

We use the formulas V = i * k and N = 2 i.

N 1 = 2 i1 , N 2 = 2 i2 , then V 1 = i 1 * k, V 2 = i 2 * k, therefore,

256 = 2 i1, 16 = 2 i2,

i 1 = 8, i 2 = 4,

V 1 = 8 * k, V 2 = 4 * k.

Answer: The volume of the graphic image will be reduced by half.

3. A color image of standard A4 size (21×29.7 cm2) is scanned. The scanner resolution is 1200dpi (dots per inch) and color depth is 24 bits. What information volume will the resulting graphic file?

Solution:

1inch=2.54 cm

i=24 bits per pixel;

Let's convert the image dimensions into inches and find the number of pixels k: k = (21/2.54)*(29.7/2.54)*1200 2 (dpi) ≈ 139210118 (pixels)

We use the formula V = i * k

V=139210118*24 = 3341042842 (bits) = 417630355bytes = 407842KB = 398MB

Answer: the volume of the scanned graphic image is 398 MB

1. Determine the number of colors in the palette at color depths of 4, 8, 16, 24, 32 bits.

2. In the process of converting a raster graphic image, the number of colors decreased from 65536 to 16. How many times will the information volume of the file decrease?

3. A 256-color drawing contains 120 bytes of information. How many points does it consist of?

4. Is 256 KB of video memory enough to operate the monitor in 640x480 mode and a palette of 16 colors?

5. How much video memory is needed to store two image pages, provided that the display resolution is 640x350 pixels and the number of colors used is 16?

6. How much video memory is needed to store four image pages if bit depth is 24, and the display resolution is 800x600 pixels?

7. Video memory capacity is 2 MB, bit depth is 24, display resolution is 640x480. What is the maximum number of pages that can be used under these conditions?

8. Video memory has a capacity that can store a 4-color image with a size of 640x480. What size image can be stored in the same amount of video memory if you use a 256 color palette?

9. To store a raster image of size 1024×512, 256 KB of memory were allocated. What is the maximum possible number of colors in the image palette?

Problems for calculating the volume of sound information

Theory

The sound may have different volume levels. The number of different levels is calculated by the formula N = 2 i, where i is the sound depth.

Sampling frequency - the number of measurements of the input signal level per unit of time (per 1 second).

The size of a digital mono audio file is calculated using the formula A=D*T*i,

where D is the sampling frequency;

T is the time of sound playing or recording;

i - register bit depth (sound depth).

For a stereo audio file, the size is calculated using the formula A=2*D*T*i

Solution:

If you are recording a stereo signal

A = 2*D*T*i = 44100*120*16 = 84672000bit = = 10584000byte = 10335.9375Kb = 10.094Mb.

If a mono signal is recorded, A = 5MB.

Answer: 10 MB, 5 MB

2. The amount of free memory on the disk is 0.01 GB, the bit depth of the sound card is 16. What is the duration of the sound of a digital audio file recorded with a sampling frequency of 44100 Hz.

Solution:

A = D * T * i

T = 10737418.24/44100/2 = 121.74(sec) = 2.03(min)

Answer: 2.03 min.

Tasks for independent decision

1. Determine the size (in bytes) of a digital audio file whose playing time is 10 seconds at a sampling rate of 22.05 kHz and a resolution of 8 bits. The file is not compressed.

2. The user has a memory capacity of 2.6 MB at his disposal. It is necessary to record a digital audio file with a sound duration of 1 minute. What should the sampling frequency and bit depth be?

3. The amount of free memory on the disk is 0.01 GB, the bit depth of the sound card is 16. What is the duration of the sound of a digital audio file recorded with a sampling frequency of 44100 Hz?

4. One minute of recording a digital audio file takes up 1.3 MB of disk space, the sound card capacity is 8. At what frequency is the sound recorded?

When ordering printing on bags, it is recommended to apply simple images for execution in no more than one to three colors. It is worth noting that when a good designer creates a layout, this will not in any way affect the quality and consumer perception of the advertising information provided, and in addition, it will reduce the cost and time of order production. You should also take into account the possibility of combining colors technologically and select the appropriate equipment. After all, not all applied images are geometrically independent of each other; often some colors are rigidly related to each other and need to be joined.

If you still need a pattern with a large number of different colors, then it is better to use special equipment, which allows you to perform full color printing on bags. The principle of such machines is the presence of ultraviolet drying, since only UV-curable inks can be used for full-color printing. Of course this technology This implies not only the high cost of applying full-color images to the package, but also printing larger dots, so you should not expect the quality of the image as on paper.

Solving coding problems graphic information.

Raster graphics.

Vector graphics.

Introduction

This electronic manual contains a group of tasks on the topic “Coding graphic information.” The collection of problems is divided into types of problems based on the specified topic. Each type of task is considered taking into account a differentiated approach, i.e. tasks of a minimum level (score “3”), general level (score “4”), and advanced level (score “5”) are considered. The given problems are taken from various textbooks (list attached). Solutions to all problems are examined in detail, methodological recommendations are given for each type of problem, and brief theoretical material is given. For ease of use, the manual contains links to bookmarks.

Raster graphics.

Types of tasks:

1. Finding the amount of video memory.

2. Determining screen resolution and setting graphics mode.

3.

1. Finding the amount of video memory

In tasks of this type the following concepts are used:

· video memory volume,

· graphics mode,

· color depth,

· screen resolution,

· palette.

In all such problems, you need to find one or another quantity.

Video memory - this is special RAM, in which a graphic image is formed. In other words, in order to receive a picture on the monitor screen, it must be stored somewhere. That's what video memory is for. Most often, its value is from 512 KB to 4 MB for the best PCs with the implementation of 16.7 million colors.


Video memory capacity calculated by the formula: V=I*X*Y, whereI– color depth of an individual point, X,Y – screen dimensions horizontally and vertically (the product of x and y is the screen resolution).

The display screen can operate in two main modes: text And graphic.

IN graphic mode the screen is divided into separate luminous points, the number of which depends on the type of display, for example 640 horizontally and 480 vertically. Glowing dots on the screen are usually called pixels, their color and brightness may vary. It is in the graphic mode that all complex graphic images created by the computer appear on the computer screen. special programs, which control the parameters of each pixel of the screen. Graphic modes are characterized by such indicators as:

- resolution(the number of dots with which the image is reproduced on the screen) - currently typical resolution levels are 800 * 600 dots or 1024 * 768 dots. However, for monitors with a large diagonal, a resolution of 1152 * 864 pixels can be used.

- color depth(number of bits used to encode the color of a dot), e.g. 8, 16, 24, 32 bits. 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 using the formula K=2 I, Where K– number of flowers, I– color depth or bit depth.

In addition to the knowledge listed above, the student should have an idea of ​​the palette:

- palette(number of colors used to reproduce an image), e.g. 4 colors, 16 colors, 256 colors, 256 shades gray, 216 colors in a mode called High color or 224, 232 colors in True color mode.

The student must also know the connections between units of measurement of information, be able to convert from small units to larger ones, Kbytes and Mbytes, use a regular calculator and Wise Calculator.

Level "3"

1. Determine the required amount of video memory for various graphic modes of the monitor screen, if the color depth per dot is known. (2.76)

Screen mode

Color depth (bits per dot)

Solution:

1. Total dots on the screen (resolution): 640 * 480 = 307200
2. Required amount of video memory V= 4 bits * 307200 = 1228800 bits = 153600 bytes = 150 KB.
3. The required amount of video memory for other graphics modes is calculated in the same way. When making calculations, the student uses a calculator to save time.

Answer:

Screen mode

Color depth (bits per dot)

150 KB

300 KB

600 KB

900 KB

1.2 MB

234 KB

469 KB

938 KB

1.4 MB

1.8 MB

384 KB

768 KB

1.5 MB

2.25 MB

640 KB

1.25 MB

2.5 MB

3.75 MB

2. Black and white (no grayscale) raster graphic image has a size of 10 ´10 points. How much memory will this image take?(2.6 8 )

Solution:

1. Number of points -100

2. Since there are only 2 colors: black and white. then the color depth is =2)

3. The amount of video memory is 100*1=100 bits

Problem 2.69 is solved in a similar way

3. To store a bitmap of size 128 x 128 pixels took up 4 KB of memory. What is the maximum possible number of colors in the image palette. (USE_2005, demo, level A). (See also Problem 2.73 )

Solution:

1. Determine the number of image points. 128*128=16384 points or pixels.

2. The amount of memory for a 4 KB image can be expressed in bits, since V=I*X*Y is calculated in bits. 4 KB=4*1024=4096 bytes = 4096*8 bits =32768 bits

3. Find the color depth I =V/(X*Y)=32768:16384=2

4. N=2I, where N is the number of colors in the palette. N=4

Answer: 4

4. How many bits of video memory does information about one pixel on a b/w screen (without halftones) take?(, P. 143, example 1)

Solution:

If the image is B/W without halftones, then only two colors are used - black and white, i.e. K = 2, 2i = 2, I = 1 bits per pixel.

Answer: 1 pixel

5. How much video memory is needed to store four pages of images if the bit depth is 24 and the display resolution is 800 x 600 pixels? (, No. 63)

Solution:

1. Find the amount of video memory for one page: 800*600*24= bits = 1440000 bytes = 1406.25 KB ≈1.37 MB

2. 1.37*4 =5.48 MB ≈5.5 MB for storing 4 pages.

Answer: 5.5 MB

Level "4"

6. Determine the amount of computer video memory that is necessary to implement the monitor’s graphic mode High Color with a resolution of 1024 x 768 pixels and a color palette of 65536 colors. (2.48)

If the student remembers that the High Color mode is 16 bits per dot, then the amount of memory can be found by determining the number of dots on the screen and multiplying by the color depth, i.e. 16. Otherwise, the student can reason like this:

Solution:

1. Using the formula K=2I, where K is the number of colors, I is the color depth, we determine the color depth. 2I =65536

The color depth is: I = log= 16 bits (calculated using programsWiseCalculator)

2.. The number of image pixels is: 1024´768 =

3. The required amount of video memory is: 16 bits ´ = 12 bits = 1572864 bytes = 1536 KB = 1.5 MB (»1.2 MB. The answer was given in the workshop by Ugrinovich). We teach students, when converting to other units, to divide by 1024, not 1000.

Answer: 1.5 MB

7. During the process of converting a raster graphic image, the number of colors decreased from 65536 to 16. How many times will the amount of memory it takes up decrease? (2.70, )

Solution:

To encode 65536 different colors for each point, 16 bits are needed. To encode 16 colors, only 4 bits are needed. Consequently, the amount of memory occupied decreased by 16:4=4 times.

Answer: 4 times

8. Is 256 KB of video memory enough to operate the monitor in 640 mode? ´ 480 and a palette of 16 colors? (2.77)

Solution:

1. Find out the amount of video memory that will be required to operate the monitor in 640x480 mode and a palette of 16 colors. V=I*X*Y=640*480*4 (24 =16, color depth is 4),

V= 1228800 bits = 153600 bytes = 150 KB.

2. 150 < 256, значит памяти достаточно.

Answer: enough

9. Specify the minimum amount of memory (in kilobytes) required to store any 256 x 256 pixel bitmap image if you know the image uses a palette of 216 colors. There is no need to store the palette itself.

1) 128

2) 512

3) 1024

4) 2048

(USE_2005, level A)

Solution:

Let's find the minimum amount of memory required to store one pixel. The image uses a palette of 216 colors, therefore, one pixel can be associated with any of 216 possible color numbers in the palette. Therefore, the minimum amount of memory for one pixel will be equal to log2 216 = 16 bits. The minimum amount of memory sufficient to store the entire image will be 16 * 256 * 256 = 24 * 28 * 28 = 220 bits = 220: 23 = 217 bytes = 217: 210 = 27 KB = 128 KB, which corresponds to point number 1.

Answer: 1

10. Graphic modes with color depths of 8, 16, 24, 32 bits are used. Calculate the amount of video memory required to implement these color depths at different screen resolutions.

Note: the task ultimately comes down to solving problem No. 1 (level “3”, but the student himself needs to remember the standard screen modes.

11. How many seconds will it take for a modem transmitting messages at a speed of 28800 bps to transmit color raster image 640 x 480 pixels in size, assuming that the color of each pixel is encoded in three bytes? (USE_2005, level B)

Solution:

1. Determine the image volume in bits:

3 bytes = 3*8 = 24 bits,

V=I*X*Y=640*480*24 bits =7372800 bits

2. Find the number of seconds to transmit an image: 7372800: 28800=256 seconds

Answer: 256.

12. How many seconds will it take for a modem transmitting messages at a speed of 14400 bps to transmit a color bitmap image measuring 800 x 600 pixels, assuming that there are 16 million colors in the palette? (USE_2005, level B)

Solution:

To encode 16 million colors, 3 bytes or 24 bits are required (True Color graphics mode). The total number of pixels in the image is 800 x 600 = 480000. Since there are 3 bytes per 1 pixel, then for 480,000 pixels there are 480,000 * 3 = 1,440,000 bytes or bits. : 14400 = 800 seconds.

Answer: 800 seconds.

13. A modern monitor allows you to see different colors on the screen. How many bits of memory does 1 pixel take? ( , p.143, example 2)

Solution:

One pixel is encoded by a combination of two characters “0” and “1”. We need to find out the pixel code length.

2x =, log2 =24 bits

Answer: 24.

14. What is the minimum amount of memory (in bytes) sufficient to store a black-and-white raster image measuring 32 x 32 pixels, if it is known that the image uses no more than 16 shades of gray. (USE_2005, level A)

Solution:

1. The color depth is 4, because 16 color gradations are used.

2. 32*32*4=4096 bits of memory for storing black and white images

3. 4096: 8 = 512 bytes.

Answer: 512 bytes

Level "5"

15. The monitor works with a 16 color palette in 640*400 pixels mode. Encoding an image requires 1250 KB. How many pages of video memory does it take up? (Task 2, Test I-6)

Solution:

1. Because page – a section of video memory that contains information about one screen image of one “picture” on the screen, i.e. several pages can be placed in video memory at the same time, then to find out the number of pages you need to divide the amount of video memory for the entire image by the amount of memory per 1 page. TO-number of pages, K=Vimage/V1 page

Vimage = 1250 KB according to condition

1. To do this, let's calculate the amount of video memory for one image page with a 16 color palette and a resolution of 640*400.

V1 page = 640*400*4, where 4 is the color depth (24 =16)

V1 page = 1024000 bits = 128000 bytes = 125 KB

3. K=1250: 125 =10 pages

Answer: 10 pages

16. A video memory page is 16,000 bytes. The display operates in 320*400 pixel mode. How many colors are in the palette? (Task 3, Test I-6)

Solution:

1. V=I*X*Y – volume of one page, V=16000 bytes = 128000 bits according to the condition. Let's find the color depth I.

I= 128000 / (320*400)=1.

2. Let us now determine how many colors are in the palette. K =2 I, Where K– number of flowers, I– color depth . K=2

Answer: 2 colors.

17. A color image of size 10 is scanned ´10 cm. Scanner resolution 600 dpi and color depth 32 bits. What information volume will the resulting graphic file have? (2.44, , problem 2.81 is solved similarly )

Solution:

1. A scanner resolution of 600 dpi (dots per inch) means that in a 1-inch segment the scanner is able to distinguish 600 dots. Let's convert the scanner resolution from dots per inch to dots per centimeter:

600 dpi: 2.54 » 236 dots/cm (1 inch = 2.54 cm)

2. Therefore, the image size in pixels will be 2360´2360 pixels. (multiplied by 10 cm.)

3. The total number of image pixels is:

4. The information volume of the file is:

32 bits ´ 5569600 = bits » 21 MB

Answer: 21 MB

18. The amount of video memory is 256 KB. The number of colors used is 16. Calculate display resolution options. Provided that the number of image pages can be 1, 2 or 4. (, No. 64, p. 146)

Solution:

1. If the number of pages is 1, then the formula V=I*X*Y can be expressed as

256 *1024*8 bits = X*Y*4 bits, (since 16 colors are used, the color depth is 4 bits.)

i.e. 512*1024 = X*Y; 524288 = X*Y.

The ratio between the height and width of the screen for standard modes does not differ from each other and is equal to 0.75. This means that to find X and Y, you need to solve the system of equations:

Let's express X=524288/Y, substitute it into the second equation, we get Y2 =524288*3/4=393216. Let's find Y≈630; X=524288/630≈830

630 x 830.

2. If the number of pages is 2, then one page with a volume of 256:2 = 128 KB, i.e.

128*1024*8 bits = X*Y*4 bits, i.e. 256*1024 = X*Y; 262144 = X*Y.

We solve the system of equations:

X=262144/Y; Y2 =262144*3/4=196608; Y=440, X=600

The resolution option could be 600 x 440.

4. If the number of pages is 4, then 256:4 =64; 64*1024*2=X*Y; 131072=X*Y; We solve the system and the screen point size is 0.28 mm. (2.49)

Solution:

https://pandia.ru/text/78/350/images/image005_115.gif" width="180" height="96 src=">

1. The task comes down to finding the number of dots across the width of the screen. Let's express diagonal size in centimeters. Considering that 1 inch = 2.54 cm, we have: 2.54 cm 15 = 38.1 cm.

2. Let's define ratio between screen height and width ana for the frequently used screen mode 1024x768 pixels: 768: 1024 = 0.75.

3. Let's define screen width. Let the screen width be L, and the height h,

h:L =0.75, then h= 0.75L.

According to the Pythagorean theorem we have:

L2 + (0.75L)2 = 38.12

1.5625 L2 = 1451.61

L ≈ 30.5 cm.

4. The number of dots across the width of the screen is:

305 mm: 0.28 mm = 1089.

Therefore, the maximum possible monitor screen resolution is 1024x768.

Answer: 1024x768.

26. Determine the relationship between the height and width of the monitor screen for various graphics modes. Does this ratio differ for different modes? a) 640x480; b)800x600; c) 1024x768; a) 1152x864; a) 1280x1024. Determine the maximum possible screen resolution for a monitor with a diagonal of 17" and a screen dot size of 0.25 mm. (2.74 )

Solution:

1. Let's determine the relationship between the height and width of the screen for the listed modes; they hardly differ from each other:

2. Let's express the diagonal size in centimeters:

2.54 cm 17 = 43.18 cm.

3. Let's determine the width of the screen. Let the screen width be L, then the height is 0.75L (for the first four cases) and 0.8L for the last case.

According to the Pythagorean theorem we have:

Therefore, the maximum possible resolution of the monitor screen is. 1280x1024

Answer: 1280x1024

3. Color and image coding.

Students use the knowledge acquired previously Number systems, converting numbers from one system to another.

Theoretical material of the topic is also used:

A color raster image is formed in accordance with the RGB color model, in which the three basic colors are Red, Green and Blue. The intensity of each color is specified in 8-bit binary code, which is often expressed in hexadecimal notation for convenience. In this case, the following record format is RRGGBB.

Level "3"

27. Write down the red color code in binary, hexadecimal and decimal notation. (2.51)

Solution:

Red color corresponds to the maximum value of the intensity of the red color and the minimum values ​​of the intensities of the green and blue basic colors , which corresponds to the following data:

Codes/Colors

Red

Green

Blue

binary

hexadecimal

decimal

28. How many colors will be used if 2 levels of brightness gradation are taken for each pixel color? 64 brightness levels for each color?

Solution:

1. In total, for each pixel a set of three colors is used (red, green, blue) with their own brightness levels (0-on, 1-off). So K=23 =8 colors.

Answer: 8; 262,144 colors.

Level "4"

29. Fill out the color table at 24-bit color depth in hexadecimal notation.

Solution:

With a color depth of 24 bits, 8 bits are allocated for each color, i.e. for each color there are 256 intensity levels possible (28 = 256). These levels are given binary codes(minimum intensity, maximum intensity). In binary representation, the following color formation is obtained:

Color name

Intensity

Red

Green

Blue

Black

Red

Green

Blue

White

Converting to hexadecimal number system we have:

Color name

Intensity

Red

Green

Blue

Black

Red

Green

Blue

White

30. On a “small monitor” with a 10 x 10 raster grid there is a black and white image of the letter “K”. Represent the contents of video memory as a bit matrix in which the rows and columns correspond to the rows and columns of the raster grid. ( , p.143, example 4)

9 10

Solution:

Encoding the image on such a screen requires 100 bits (1 bit per pixel) of video memory. Let "1" mean a filled pixel, and "0" mean an unfilled pixel. The matrix will look like this:

0001 0001 00

0001 001 000

0001 01 0000

00011 00000

0001 01 0000

0001 001 000

0001 0001 00

Experiments:

1. Search for pixels on the monitor.

Arm yourself with a magnifying glass and try to see the triads of red, green and blue (RGB – from English. "Red –Green –Blue" dots on the monitor screen. (, .)

As the primary source warns us, the results of experiments will not always be successful. The reason is this. What exist different technologies manufacturing cathode ray tubes. If the tube is made using technology "shadow mask" then you can see a real mosaic of dots. In other cases, when instead of a mask with holes, a system of phosphor threads of three primary colors is used (aperture grille), the picture will be completely different. The newspaper provides very visual photographs of three typical paintings that “curious students” can see.

It would be useful for the guys to be informed that it is advisable to distinguish between the concepts of “screen points” and pixels. The concept of "screen points"- physically really existing objects. Pixels- logical elements of the image. How can this be explained? Let's remember. That there are several typical image configurations on a monitor screen: 640 x 480, 600 x 800 pixels and others. But you can install any of them on the same monitor. This means that pixels are not monitor points. And each of them can be formed by several neighboring luminous points (within one). Upon command to color one or another pixel blue, the computer, taking into account the set display mode, will paint one or more adjacent points on the monitor. Pixel density is measured as the number of pixels per unit length. The most common units are called briefly as (dots per inch - the number of dots per inch, 1 inch = 2.54 cm). The dpi unit is generally accepted in the field computer graphics and publishing. Typically, the pixel density for a screen image is 72 dpi or 96 dpi.

2. Conduct an experiment in graphic editor what if for each pixel color there are 2 levels of brightness gradation? What colors will you receive? Present it in the form of a table.

Solution:

Red

Green

Blue

Color

Turquoise

Crimson

Vector graphics:

1. Vector image coding tasks.

2. Getting a vector image using vector commands

With the vector approach, the image is considered as a description of graphic primitives, lines, arcs, ellipses, rectangles, circles, shades, etc. The position and shape of these primitives in the graphic coordinate system are described.

Thus vector image encoded by vector commands, that is, described using an algorithm. A straight line segment is determined by the coordinates of its ends, circle – center coordinates and radius, polygon– coordinates of its corners, shaded area- border line and shading color. It is advisable for students to have a command system table vector graphics (, p.150):

Team

Action

Line to X1, Y1

Draw a line from the current position to position (X1, Y1).

Line X1, Y1, X2,Y2

Draw a line with start coordinates X1, Y1 and end coordinates X2, Y2. The current position is not set.

Circle X, Y, R

Draw a circle; X, Y are the coordinates of the center, and R is the length of the radius.

Ellipse X1, Y1, X2,Y2

Draw an ellipse bounded by a rectangle; (X1, Y1) are the coordinates of the upper left, and (X2, Y2) are the coordinates of the lower right corner of the rectangle.

Rectangle X1, Y1, X2,Y2

Draw a rectangle; (X1, Y1) - coordinates of the upper left corner, (X2, Y2) - coordinates of the lower right corner of the rectangle.

Drawing Color Color

Set the current drawing color.

Fill color Color

Set current fill color

Fill X, Y, BORDER COLOR

Shade arbitrary closed figure; X, Y – coordinates of any point inside a closed figure, BORDER COLOR – color of the boundary line.

1. Vector image coding tasks.

Level "3"

1. Describe the letter “K” with a sequence of vector commands.

Literature:

1., Computer Science for Lawyers and Economists, p. 35-36 (theoretical material)

2. , Computer Science and IT, pp. 112-116.

3. N. Ugrinovich, L. Bosova, N. Mikhailova, Workshop on Informatics and IT, pp. 69-73. (problems 2.67-2.81)

4. Popular lectures on computer design. – St. Petersburg, 2003, pp. 177-178.

5. In search of a pixel or types of cathode ray tubes. // Computer science. 2002, 347, pp. 16-17.

6. I. Semakin, E Henner, Computer Science. Problem book-workshop, vol. 1, Moscow, LBZ, 1999, pp. 142-155.

Electronic textbooks:

1. , Information in the school computer science course.

2. , A workbook on the topic “Information Theory”

Tests:

1. Test I-6 (Coding and Measuring Graphic Information)

Bluetooth