Graphics & Image: Suhail Q. Mir

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 48

GRAPHICS & IMAGE

SUHAIL Q. MIR
suhailmir@uok.edu.in

MSc. IT
Directorate of Information Technology & Support Systems
University of Kashmir
Image Properties

Pixels
Resolution,
Bit Depth,
Color,
Aspect Ratio,
Dpi ,
Image Properties Pixel
Images consist of pixels—picture elements in
digital images
Image Properties Resolution
Image resolution refers to the number of pixels in a digital image (higher resolution
always yields better quality). E.g. high resolution for an image might be
1,600 × 1,200, whereas lower resolution might be 640 × 480.

Height (H)

Width (W)
Same pixels, different dpi in each
image

Dots per inch or dpi is a measure only recognized in


software applications which are designed for
preparing material for print
Image Properties
Image

Display Resolution & Image Resolution

Display
Display Standards
Interlaced vs
Progressive(not interlaced)
Progressive vs Interlaced
Progressive vs Interlaced
Image Properties
Image

The Image Should fully fit


the Display Screen

Display

We define aspect ratio


Image Properties

Aspect Ratio

The aspect ratio of an


image/screen is the ratio of its
width to its height. It is
commonly expressed as two
numbers separated by a colon,
as in 16:9. For an x:y aspect
ratio, the image is x units wide
and y units high. Widely used
aspect ratios include 1.85:1 and
2.39:1 in film photography, 4:3
and 16:9 in television, and 3:2 in
still camera photography.
Example

Image screen
Image AR 4:3
Image AR 16:9
Image Properties
Bit Depth and Color

Bit Depth is defined as


the amount of color per pixel

Per pixel: either 0 or 1

1-bit monochrome image (called “Lena” by multimedia scientists


Per Pixel= 2 bit color

i.e.
00 white
01 light grey
10 dark grey
11 black
8-Bit Gray-Level Images
Grayscale image of Lena

0000 0000
0101 0101
0011 0011
0110 0110
0000 1111
0101 1010
0011 1100
0110 1001

256
BIT PLANE

displays the concept of


bitplanes graphically. Each
bitplane can have a value of 0
or 1 at each pixel but, together,
all the bitplanes make up a
single byte that stores values
between 0 and 255 (in this 8-
bit situation).
Understanding Bit Plane

101 100 010


001 111 110
000 101 100
Bitmap of an image
Resolution ?
AR ?
How many pixels ?
Understanding Bit Plane

Each pixel contains 3 bits,


101
001
100
111
010
110
1 0 1
so we will be having 3 bit
planes and every bit plane
will contain data as follows 000 101 100
MSB
Middle LSB
Bitmap of an image

3 bit
planes
Understanding Bit Plane
MSB Middle LSB
101 100 010
001 111 110 1 0 1
000 101 100

All MSB All Middle All LSB

1 1 0 0 0 1 1 0 0
3 bit
0 1 1 0 1 1 1 1 0
planes
0 1 1 0 0 0 0 1 0
24-Bit Color Images (True Color)

In a color 24-bit image, each pixel is represented by three bytes,


usually representing RGB. Since each value is in the range 0–255,
this format supports 256×256×256, or a total of 16,777,216, possible
combined colors.
24 Bit Color
MSB Middle LSB
RGB RGB RGB
24 bits

RGB RGB RGB


R G B
8 bits 8 bits 8 bits

RGB RGB RGB

every channel
All MSB All Middle All LSB
has 8 bit
planes
24 Bit Color, calculate the size in KB of this 3X3 image

RGB RGB RGB


24 bits

RGB RGB RGB

RGB RGB RGB


A Little More About Images

RGB image, sometimes referred to as a true-color image is stored as [Row,


Column, Channels] [ Row, Column, Channels ], a 3D numpy array
Frame Buffer

Such an array must be stored in hardware; we call this hardware a frame


buffer. Special (relatively expensive) hardware called a “video” card (actually
a graphics card) is used for this purpose. The resolution of the video card
does not have to match the desired resolution of the image, but if not enough
video card memory is available, the data have to be shifted around in RAM
for display.
Frame Buffer
CRT Monitor Frame Buffer
Frame Buffer LED
An idea of a
Bit-plane of a 24 bit image

This data structure is called a

color histogram
Image Properties
Other Color Depths

8-bit Gray Scale


12-bit color
15-bit high color
16-bit high color
Deep color (32/36/48/64-bit)
Color Models

RGB CMYK
Simple color frame buffer
0 0 DAC
3 1
0 1 DAC

0 DAC

Frame Buffer CRT RASTER


Red Green Blue
Black 0 0 0
Red 1 0 0
Green 0 1 0
Blue 0 0 1
3 Bit plane frame buffer color combinations
Yellow 1 1 0
Cyan 0 1 1
White 1 1 42 1
A 24 Bit plane color frame buffer
8 registers
Color Guns
01001011 DAC
Blue 75

10101100 DAC
Green 172

00001010 DAC
Red 10
CRT Raster
Frame Buffer
43
Compression !!!

WHY ?

You might also like