Images: Pixels, Resolution, Compression, Bitmaps vs. Vectors

Download Report

Transcript Images: Pixels, Resolution, Compression, Bitmaps vs. Vectors

Images: Pixels and Resolution

Monica A. Stoica, [email protected]

Boston University Books used: “The Essential Guide to Computing” by E. Garrison Walters and “Information Technology Inside and Outside” by David Cyganski and John Orr

Pixels and Dots

All monitors use a matrix of points to create an image – each of these points is called a picture element

The number of dots in the matrix is not the actual number of elements needed to make an image, at least not a color one

Color dots are actually built up from three separate sub-dots that represent the primary colors of red, green and blue (RGB).

The three RGB dots together make a dot triad or a pixel

Dots and Pixels

A pixel is the smallest element of an image that can be managed by a computer’s graphics system

However, sometimes the term pixel is used to describe the physical dots in the display’s matrix.

In many cases these two coincide

For example if we have a computer that has a maximum physical matrix of dots that is 800x600 (called SVGA) and the software is also using that matrix and is addressing information to each one of the 480,000 dots, then pixel and dot, or dot triad are the same thing .

Dot triads

A discontinuity occurs when the computer is using fewer pixels then the maximum number of dots provided by the display

So now there are multiple dots (dots triads) in a pixel.

Reason for this happening are:

The hardware or software can’t handle the larger matrix

The user prefers the lower resolution

Color dots are created from three sub-dots each responsible for one of the primary colors Red, Green, Blue (printers use actually cyan, magenta, and yellow)

Making Black and White from RGB dot triads is easy:

If all the sub-dots in a triad are on – white

If all the sub-dots in a triad are off – black

Red only is red, red+green is yellow, green+blue is cyan, red+blue is magenta

If these were all the colors we could have, or there were no shades of green we could not depict nature which has dozens of green in grass alone

We can vary the intensity or brightness of each dot: thus, green at 1/3 power creates a light green; a combination of 1/3 power green and 1/3 power blue creates a light cyan, etc.

Computers have to dedicate now more memory to each pixel

In a Black and White display a pixels is either On or Off, so it requires only one bit per pixel in memory – a 1 for On and a 0 for Off

With color there are now three sub-dots each of which requires more memory

If you give each sub-pixel or sub-dot only one bit you get as many as 8 colors described above – mathematically this is 2 3

If you want 64 colors, you need 2 bits of memory per sub-pixel, 6 total or 2 6 .

Here are some standard levels of color:

Color 256 – Bits 8

Color 65,536 – Bits 16

Color 16.7 million – Bits 24

For a variety of reasons related to color theory, bits do not have to be allocated equally within the dot triad, so 8 and 16 bits will work even If the numbers aren’t divisible by 3

RGB and RAM

Using 16 million colors or 8 bits/sub-pixel gives true color. This means 24-bits per pixel and given a standard monitor with 768x1024 pixels, it means that 18,874,368 bits or 2.5 MB of RAM are required to be allocated just for the screen

Computers for a long time could not support that – prices had to fall before high resolution, true color display systems were possible for our images.

Smoothness of Motion

When first moving pictures were created photographers discovered that it was necessary to show at least 24 frames per sec

When television appeared 50 years later, it employed a 30 frames per second, though it was based on electrical requirements rather than a desire to improve the image.

Our retina retains some of the information with which it was stimulated for about 50 milliseconds, or one twentieth of a second – thus the average human visual system can only take 20 different images per second before they start to blur

Frame Rate and Refresh Rate

Closely related to, but different from frame rate is refresh rate

Although 24 frames per second is sufficient to show accurate motion in objects on a screen, displaying frames at this speed makes the screen itself look unstable to most viewers. This is called flicker.

Refresh rate is related to viewing distance and content. Thus a viewer sitting close to a display and needing high resolution will be more comfortable with a high refresh rate.

Monitors and TVs have a refresh rate of 60 or 80 Hz.

TV Animations

If television would display at simply 30 frames per second, would suffer from a flash or a flicker phenomenon

This phenomenon is addressed by presenting the images twice per frame in a sense. 60 times per second, every other line or raster is changed – each new image is painted onto the screen in a two – step process, first the odd rows, then the even ones – so that at every points on the screen things are locally changing at a a rate of 60 times per second

This way we do not discern the choppiness we would see if the images were refreshed all at ones 30 times per second.

Adding Up the Bits

Let’s assume a screen of 512x512, and we use 3 bits per sub-dot to a total of 9 bits per pixel – pretty modest. If we want the scene to change 60 times a second, so that we don’t see flickering or choppiness, we get:

512x512x9x60x3600seconds = 500 billion bits per second just for the video!

The Godfather (3 hour movie) would require about 191 GB of memory

This almost sounds like an offer we can refuse…if it were not for Compression

A Picture is worth 10,000 words

10,000 words at an average of 6 characters per word, and 8 bits per character for the ASCII representation, would require 480,000 bits = 60 KB.

An image of 256 x 256 pixels, with 8 bits used for the gray level of each pixel, is 524,288 bits = 64 KB.

So it seems that the writers of those old adages might have had more insight into information representation than one might first suspect :)