Graphic representation of types of information. Graphic information and text information

Class: 11

Presentation for the lesson



























Back Forward

Attention! Slide previews are for informational purposes only and may not represent all the features of the presentation. If you are interested in this work, please download the full version.

Goals:

educational:

  • generalize knowledge in the section “Representation of graphical information in a computer” using to solve tasks A15 from the Unified State Exam in computer science,
  • introduce color formation models.

developing: develop thinking, attention, memory, imagination.

educational: to develop the skill of independent work, interest in the subject.

Lesson objectives:

  • restore students’ knowledge of what computer graphics is and what types of computer graphics students considered in a basic computer science course;
  • remember what a pixel or raster is, what basic colors are used to obtain the color of a point on the monitor screen;
  • repeat the rules for presenting data on a computer;
  • find out on what parameters the quality of the image on the monitor screen depends (screen resolution, pixel color depth);
  • display the formula for finding the amount of video memory on a graphical image;
  • analyze ways to solve problems from the Unified State Exam on this topic (A15);
  • develop the skill of independent work.

Lesson type: lesson of generalizing knowledge and learning new material using information technology.

Lesson form: combined.

Teaching methods: explanatory and demonstration, practical.

Comprehensive methodological support:

  • interactive whiteboard;
  • presentation “Representation of graphic information in a computer”;
  • textbook N.D. Ugrinovich for grades 10-11 (clause 7.1, p. 304), for grade 10. (clause 1.2, p. 36);
  • flash videos from the Unified Collection of Digital Educational Resources: “Model – RGB”, “Model – CMYK”;
  • handouts for working with the color model;
  • cards for independent work.

Lesson plan:

  1. Organizational moment (1 min).
  2. Setting the lesson goal (2 min).
  3. Checking homework (1 min.)
  4. Repetition of covered material (10 min)
  5. New topic (7 min.)
  6. Practical work on a PC (4 min.)
  7. Analysis of problems from the Unified State Exam on this topic (8 min)
  8. Independent work of students (5 min).
  9. Summing up (1 min).
  10. D/z (1 min).

Lesson progress

1. Organizational moment (1 min.)

2. Setting the lesson goal (2 min.)

In previous lessons we talked about encoding numerical and textual information in computer memory. Today we will discuss ways to computer encode graphic information (Appendix 1).

Since the 80s, the technology of processing graphic information on a computer has been intensively developing. Essentially , graphics processing is as well as numeric and text information, processing of numerical data.

From the basic computer science course, we are familiar with the general principles of computer graphics and graphic technologies. Today we will look at these questions in more detail. And we’ll look at several problems that will require your knowledge of encoding graphic information in computer memory. Such problems are found in the Unified State Exam (A15).

Write down the topic of the lesson (students write down the topic of the lesson in a notebook).

3. Checking homework. (1 min.)

Close your eyes and let your heart become your eye

Hello, my friend! (translate)

4. Repetition of the covered material (10 min.)

And first of all, let's remember what we know from the basic computer science course about computer graphics.

Questions for the class:

(The children answer questions posed by the teacher)

Tell us what is called computer graphics?

(Technology for creating and processing graphic images using computer technology.)

What types of computer graphics are you familiar with and what are their features?

(Raster and vector graphics).

  • Raster graphics- technology for creating a graphic object in the form of many points (pixels), a collection of data about the color of each pixel on the screen.
  • Vector graphics– technology for creating images in the form of graphic primitives (straight lines, ovals, rectangles)

How is data represented on a computer?

Data in computer memory is stored in binary form, i.e. in the form of chains of 1 and 0 (binary number system).

Data representation in a computer is discrete.

Can we say that the image on the monitor screen is discrete?

In the process of encoding an image in a computer, it is spatially discretized, i.e., the image is divided into separate small fragments, and each element is assigned a color value, that is, a code.

What are the names of the smallest elements into which the image on the monitor screen is divided?

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

What parameters determine the quality of the image on the monitor?

The quality of image encoding depends on two parameters:

1. The higher the quality of image encoding smaller point size and accordingly more points make up the image. The number of dots on the screen is called monitor resolution. Depending on the size of the monitor, different resolutions are used: 1024x768, 1280x1024, ...

2. Color images are composed of the binary color code of each pixel stored in video memory. Here they talk about color depth is the amount of memory in the number of bits used to store and represent color when encoding one pixel of raster graphics. The greater the number of colors, that is, the greater the number of possible states of an image point, is used, the better the image is encoded. The combination of colors used in the set forms color palette.)

What basic colors are used to create the color of a point on the screen?

5. New topic (10 min.)

Any color of a dot on a computer screen is obtained by mixing three basic colors: red, green, blue.

This model is called RGB.

Let's code the basic colors:

  • 1 - presence of a base color in the RGB system
  • 0 - no base color in the RGB system

For example, 100 - only red color is present

RGB color model (for each student) (Appendix 2).

How many colors can be encoded this way?

Don't rush to answer.

Slide 9

Watching videos

The RGB model is used in TVs, monitors, projectors, scanners, digital cameras... (Appendix 3).

To form an image on paper, another model is used - CMYK (Appendix 4) , (Appendix 4.1).

Slide 10-11

6. Practical work on a PC (5 min.)

View how the RGB model works

Slide 12-14

Derive a formula (using the main formula of computer science) for determining the number of colors in the palette

N - number of colors;

i - number of bits per 1 pixel (color depth)

Number of bits per 1 pixel Formula Number of colors in the palette
1 bit 2 1 2
2 bits 2 2 4
3 bits 2 3 8
4 bits 2 4 16
8 bit 2 8 256
16 bit 2 16 65 536
24 bits 2 24 16 777 216

How to determine the amount of video memory per graphic image? What data do you need to have?

(Total number of pixels and color depth, i.e. number of bits per 1 pixel)

Derive the formula for finding the amount of video memory on a graphical image, if we accept:

M is the amount of memory for the entire image;

K - total number of pixels;

i- quantity bit by 1 pixel.

7. Analysis of problems from the Unified State Exam on this topic (8 min)

Let's try to solve several problems (Appendix 5).

(Problems are solved using guiding questions to students; students are invited to express their opinions on how to solve each problem.)

Slide 16-17

Task No. 1.

Monitor screen resolution is 1024 x 768 pixels, color depth is 16 bits. What is the required amount of video memory for this graphics mode?

3) 4 KB

4) 1.5 MB

Solution:

1) Find the total number of pixels

1024*768 = 786432 (pixels)

2) Color depth is 16 bits, therefore, per 1 pixel – 2 bytes

3) Find the amount of video memory

786432*2 = 1572864 (bytes)

4) Convert to larger units of measurement

1572864 bytes = 1.5 MB

Answer: 4

Task No. 2.

To store a raster image measuring 128 x 128 pixels, 4 kilobytes of memory were allocated. What is the maximum possible number of colors in the image palette?

1) 8 2)2 3) 16 4) 4

Slide 19-22

Task No. 3.

To encode the background color of an Internet page, the attribute bgcolor=“# XXXXXX” is used, where hexadecimal values ​​of the intensity of color components in the 24-bit RGB model are specified in quotes. What color will the page specified by the tag have?

?

1) Red

3) Green

4) Purple

(Before the solution, a digression into theoretical material is made)

When describing Internet pages in HTML, it is allowed to describe a color as a hexadecimal number consisting of exactly 6 digits. For each color of the RGB model, 2 digits are allocated. To find out the contribution of each base color, the sequence “XXXXXX” divided into 3 groups.

XX XX XX = RR GG BB

FF 16 =255 10, which means maximum color brightness.

Good to remember:

#FFFFFF – white #00FF00 – green

#000000 – black #0000FF – blue

#FF0000 – red #CCCCCC – gray

1) We divide the recording into three groups and write it in the form of components of the RGB model:

00 FF 00 = RR GG BB

2) FF (maximum color brightness) is green, which means the background of the page will be green.

8. Independent work of students (5 min).

1. How much memory should be allocated for storing a 64 x 64 pixel raster image if the image palette has 16 colors?

1) 2048 bits 2) 2 KB 3) 64 bytes 4) 4096 bytes

2. To encode the background color of an Internet page, use the bgcolor="#ХХХХХХ" attribute, where hexadecimal values ​​of the intensity of color components in the 24-bit RGB model are specified in quotes. What color will the page specified by the tag have? ?

1) Red 2) black 3) green 4) purple

9. Summing up (1 min).

Vector graphics

The main logical element of vector graphics is the geometric object. The objects accepted are simple geometric shapes (so-called primitives - rectangle, circle, ellipse, line), composite shapes or shapes built from primitives, color fills, including gradients.

Rice. 1.

The advantage of vector graphics is that the shape, color and spatial position of its constituent objects can be described using mathematical formulas.

An important object in vector graphics is the spline. A spline is a curve by which one or another geometric figure is described. Modern TryeType and PostScript fonts are built on splines.

Vector graphics have many advantages. It is economical in terms of the disk space required to store images: this is due to the fact that it is not the image itself that is saved, but only some basic data, using which the program recreates the image each time. In addition, describing color characteristics hardly increases the file size.

Vector graphics objects are easily transformed and modified, which has virtually no effect on image quality. Scaling, rotation, curvature can be reduced to a couple of elementary transformations on vectors.

In those areas of graphics where maintaining clear and precise outlines is important, for example, in font compositions, in creating logos, etc., vector programs are indispensable.

Rice. 2.

Vector graphics can also include fragments of raster graphics: the fragment becomes the same object as all the others (albeit with significant limitations in processing).

An important advantage of vector graphics programs is the developed means of integrating images and text and a unified approach to them. Therefore, vector graphics programs are indispensable in the field of design, technical drawing, for drawing, graphic and design work.

However, on the other hand, vector graphics may seem overly rigid, “plywood”. It is really limited in purely pictorial means: it is almost impossible to create photorealistic images in vector graphics programs.

And, in addition, the vector principle of image description does not allow automating the input of graphic information, as a scanner does for bitmap graphics.

Recently, 3D modeling programs, also of a vector nature, have become increasingly widespread.

Featuring sophisticated rendering techniques (ray tracing, emissivity), these programs allow you to create photorealistic raster images with arbitrary resolution from vector objects with a moderate amount of effort and time.

In any case, if you work with graphics, you will inevitably deal with both of its forms - vector and raster. Understanding their strengths and weaknesses will allow you to do your job as efficiently as possible.

Vector graphics describe images using straight and curved lines called vectors, as well as parameters describing colors and layout. For example, an image of a tree leaf is described by points through which a line passes, thereby creating the outline of the leaf. The leaf color is determined by the color of the outline and the area within that outline.

When editing vector graphic elements, you change the parameters of straight and curved lines that describe the shape of these elements. You can move elements, change their size, shape and color, but this will not affect the quality of their visual presentation. Vector graphics are independent of resolution, i.e. can be displayed in a variety of output devices with different resolutions without loss of quality.

Vector representation consists of describing image elements with mathematical curves indicating their colors and occupancy (remember, a circle and a circle are different shapes). A red ellipse on a white background will be described by just two mathematical formulas - a rectangle and an ellipse of corresponding colors, sizes and locations. Obviously, such a description will take up much less space than in the first case. Another advantage is high-quality scaling in any direction. Increasing or decreasing objects is done by increasing or decreasing the corresponding coefficients in mathematical formulas. Unfortunately, the vector format becomes disadvantageous when transferring images with a lot of shades or fine details (for example, photographs). After all, every smallest highlight in this case will be represented not by a collection of one-color dots, but by a complex mathematical formula or a collection of graphic primitives, each of which is a formula. This makes the file heavier. In addition, converting an image from raster to vector format (for example, using Adobe Streme Line or Corel OCR-TRACE) results in the latter inheriting the inability to correctly scale up. As linear dimensions increase, the number of details or shades per unit area does not increase. This limitation is imposed by the resolution of input devices (scanners, digital cameras, etc.).

Raster graphics

Raster graphics describe images using colored dots, called pixels, arranged on a grid. For example, an image of a tree leaf is described by the specific location and color of each grid point, creating an image much like a mosaic.

When editing raster graphics, you are editing pixels, not lines. Raster graphics are resolution-dependent because information describing the image is attached to a grid of a specific size. When editing raster graphics, the quality of its presentation may change. In particular, resizing raster graphics can cause the edges of the image to become frayed as the pixels are redistributed on the grid. Outputting raster graphics to devices with a lower resolution than the resolution of the image itself will reduce its quality.

The basis of the raster representation of graphics is a pixel (dot) indicating its color. When describing, for example, a red ellipse on a white background, you have to indicate the color of each point, both the ellipse and the background. The image is represented as a large number of dots - the more there are, the visually better the image and the larger the file size. Those. one or even a picture can be presented with better or worse quality in accordance with the number of dots per unit of length - resolution (usually dots per inch - dpi or pixels per inch - ppi).

In addition, quality is also characterized by the number of colors and shades that each point in the image can take on. The more shades an image is characterized by, the more digits are required to describe them. Red can be color number 001, or it can be color number 00000001. Thus, the higher the quality of the image, the larger the file size.

Raster representation is typically used for photographic-type images with a lot of detail or shading. Unfortunately, scaling such images in any direction usually degrades the quality. When the number of dots is reduced, small details are lost and the inscriptions are deformed (although this may not be so noticeable if the visual size of the image itself is reduced - i.e., the resolution is maintained). Adding pixels leads to a deterioration in the sharpness and brightness of the image, because new points have to be given shades that are average between two or more adjacent colors. Common formats are .tif, .gif, .jpg, .png, .bmp, .pcx, etc.

Thus, the choice of raster or vector format depends on the goals and objectives of working with the image. If photographic color accuracy is needed, then a raster is preferable. It is more convenient to present logos, diagrams, and design elements in vector format. It is clear that in both raster and vector representation, graphics (as well as text) are displayed on a monitor screen or printing device in the form of a collection of points. On the Internet, graphics are presented in one of the raster formats that browsers can understand without installing additional modules - GIF, JPG, PNG.

Without additional plugins (add-ons), the most common browsers only understand raster formats - .gif, .jpg and .png (the latter is not yet widespread). At first glance, the use of vector editors becomes irrelevant. However, most of these editors provide export to .gif or .jpg at the resolution you choose. And it is easier for beginning artists to draw in vector media - if the hand trembles and the line goes in the wrong direction, the resulting element is easily edited. When drawing in raster mode, you risk irreparably damaging the background.

Due to the features of image representation described above, for each type you have to use a separate graphic editor - raster or vector. Of course, they have common features - the ability to open and save files in different formats, use tools with the same names (pencil, pen, etc.) or functions (select, move, zoom, etc.), choose the desired color or shade... However, the principles for implementing the drawing and editing processes are different and are determined by the nature of the corresponding format. So, if in raster editors they talk about selecting an object, they mean a collection of points in the form of an area of ​​complex shape. The extraction process is very often labor-intensive and painstaking work. When you move such a selection, a “hole” appears. In a vector editor, an object represents a set of graphic primitives, and to select it, you just need to select each of them with the mouse. And if these primitives were grouped by the appropriate command, then it is enough to “click” once on any of the points of the grouped object. Moving a selected object exposes underlying elements.

However, there is a trend towards convergence. Most modern vector editors are able to use raster images as backgrounds, or even convert parts of the image into vector format using built-in tools (tracing). Moreover, there are usually tools for editing the loaded background image, at least at the level of various built-in or installed filters. Version 8 of Illustrator is capable of loading Photoshop .psd files and using each of the resulting layers. In addition, to use the same filters, the generated vector image can be directly converted into a raster format and further used as an uneditable raster element. Moreover, all this is in addition to the usually available converters from vector to raster format with obtaining the corresponding .

Some raster editors are able to load one of the vector formats (usually .wmf) as a background or immediately convert them to a raster with the possibility of direct editing.

Under graphic information refers to a drawing, a drawing, a photograph, a picture in a book, an image on a TV screen, etc. we will consider it as example image on the TV screen. This image consists of a number of horizontal lines - rows. And each line, in turn, consists of the smallest elementary image units - points, which are called pixels (picsel–PICture’SElement– picture element). The entire array of elementary image units is called raster (Latin Rastrum – rake). Degree of clarity image depends on the number of lines on the entire screen and the number of dots in the line that represent resolution screen or just permission .

Monochrome image - an image consisting of any two contrasting colors - black and white, green and white, brown and white, etc. each pixel of the image can have either one or the other color. By assigning the binary code “0” to the first color, and the code “1” to the second (or vice versa), you can encode the state of one pixel of a monochrome image in one bit.

However, the resulting image will have too much contrast. A real, for example, black and white image consists of not only white and black colors. It includes many different intermediate shades - gray, light gray, dark gray, etc. If, in addition to white and black, only two additional gradations are used, then in order to encode the color state of one pixel, two bits will be required.

A common practice that produces realistic monochrome images is to encode the state of a single pixel using a single byte, which allows for 256 different shades of gray from completely white to completely black.

Color image can be formed in various ways. One of them is method RGB (from the words Red, Green, Blue - red, green, blue), which relies on the fact that the human eye perceives all colors as the sum of three primary colors - red, green and blue. To obtain a colored pixel, not one, but three colored rays are sent to the same place on the screen. For simplicity, we will assume that one bit is enough to encode each color. “0” in a bit means that this primary color is absent in the total color, and “1” means that it is present. Therefore, 3 bits are required to encode one color pixel. With this coding scheme, each pixel can have one of 8 possible colors. If each color is encoded using one byte, then it will be possible to transmit 256 shades of each of the primary colors. In total, in this case, the transmission of 256 X 256 X 256 = 16777216 different colors is provided, which is quite close to the real sensitivity of the human eye. This method of presenting color graphics is usually called the mode True Color (truecolor – true color) or full color mode .

There are other full-color color image encoding modes. They require a lot of memory. In order to save memory, various modes and graphic formats are being developed that reproduce color a little worse, but require much less memory. In particular, the mode High Color (highcolor-rich color), in which 16 bits are used to convey the color of one pixel and, therefore, 65535 color shades can be transmitted.

When recording an image into computer memory, in addition to the color of individual dots, it is necessary to record a lot of additional information - the size of the picture, the brightness of the dots, etc. A specific method of encoding all the information required when recording an image forms a graphic format. Graphic information encoding formats based on the transmission of the color of each individual pixel that makes up the image are classified as raster or BitMap formats (bitmap). The most well-known raster formats are BMP ,GIF And JPEG formats.

Raster graphics have significant disadvantage – an image encoded in one of the raster formats scales very poorly. Therefore, methods have been developed vector graphics . In vector graphics, the base object is line . In this case, the image is formed from individual segments of straight or curved lines, described mathematically, in a vector way, as well as geometric shapes - rectangles, circles, etc., which can be obtained from them.