02-Digital Image (Raster and Vector Image)
02-Digital Image (Raster and Vector Image)
02-Digital Image (Raster and Vector Image)
1
Contents
1. What is a digital Image?
2. Type of digital images
3. Bitmap image
4. Bitmap and Resolution
5. Bitmap and Image size
6. Resolution for Publishing Photos
7. Type of bitmap images
8. Image representations
9. Color Depth
10. Data volumes
2
What is a Digital Image?
3
What is a Digital Image? (cont…)
4
Type of digital images
z Raster/Bitmap Image
• pixels in a grid
• resolution dependent
• resizing reduces quality
• easily converted
• restricted to rectangle
• minimal support for transparency
Original Object A Bitmap Image
z Vector Image
{ Vector images describe the image in the term of coordinates and
mathematical transformations.
5
Bitmap/Raster Image
z Common bitmap-based formats are JPEG/JPG, GIF, TIFF, PNG,
PICT (Macintosh), PSD (Adobe Photoshop) ,and BMP.
z Popular bitmap image editing programs are
{ Microsoft Paint 1 pixel
z The terminology varies according to the intended output device. PPI (pixels
per inch) refers to screen resolution, DPI (dots per inch) refers to print
resolution, and SPI (samples per inch) refers to scanning resolution.
z Resolution pixels
PPI =
inches
Exercise: Calculate resolution (PPI) of your monitor!
(in the case of IPS room’s monitors and its default setting,
7
size 12x9 inches (monitor type is 15 inches), 1024x768 pixels)
Bitmap Image and Resolution (cont…)
z Bitmap images are referred to as high resolution (hi-res) or low
resolution (low-res).
z When printing bitmaps, your printer needs much more image data
than a monitor. In order to render a bitmap image accurately, the
typical desktop printer needs 150-300 ppi.
8
Bitmap Image and Image Size
z When you reduce the size of a bitmap image through your software's
resize command, you must throw away pixels.
z When you increase the size of a bitmap image through your software's
resize command, the software has to create new pixels.
z When creating pixels, the software must estimate the color values of
the new pixels based on the surrounding pixels. This process is called
interpolation.
increase
reduce the size
the size
100x75 pixels
Original image 9
z The photo is 1538 x 2048 and I need a print size of 5x8 inches… The math
you need is:
{ pixels/inch=PPI
{ 1538/5=307 PPI
{ 2048/8=256 PPI
z That means that 256 is the maximum PPI you can get from this image to
print the longest side at 8 inches without letting your software add new
pixels.
z Please, Calculate minimum pixel sizes that I need to print 5x8 inches a high
resolution photo!
z The math you need is: inchxPPI=pixels
z 5x300 = 1500
z 8x300 = 2400 ∴The minimum pixels that I need is 1500x2400
11
Black &White Grayscale color (RGB) Color (RGBA)
Black and White Image (Zoom In)
12
Grayscale Image(Zoom In)
13
Color Image(Zoom In)
14
Bitmap Image & Color Depth
A Pixel Æ Smallest unit of the digital image elements
A Color Depth is number of a color intensity
levels that can be displayed on the screen
A
pixel's data
B&W Image :White or Black
(0 or 1)
Grayscale :Black~White
(0~[ N ])
Color Image;
(Red :0~[ N])
(Green:0~[ N])
(Blue :0~[ N])
a pixel's intensity level data
15
(Color Depth)
Color Depth
(Grayscale Image)
a pixel in a grayscale image has a color information
indicate a level of grayscale color from white to black
Grayscale :White--Black
(0 ~ [ N ])
0 1 2 3 4 5 6 ….N
1 pixel
17
Color Depth (RGB Color Image)
Color Information
緑
is represented by
the levels of Red,
Green and Blue.
赤
18
Bitmap Image Representation (cont…)
r,g,b=0,1,…,255
19
Smallest Unit of memory
Recordable data
OFF=0
Or
ON= 1
a bit
8 bits = a byte
Recordable data in the 8bits= a byte of memory
00000000 00001000 11111000
00000001 00001001 11111001
00000010 00001010 11111010
00000011 00001011 ……… 11111011 = 256 difference data
00000100 00001100 11111100
00000101 00001101 11111101
00000110 00001110 11111110 20
00000111 00001111 11111111
Image Representation (Cont…)
A pixel’s color information
on a memory buffer (8bits)
f(i,j)=0,1 B&W Image 0, 1
Grayscale 00000000
f(i,j)=0,1, … , 255 00000001
00000010
11111110
11111111
f(i,j)=(r,g,b) Color Image
00000000 00000000 00000000
00000001 00000001 00000001
r,g,b=0,1,…,255 00000010 00000010 00000010
21
Number of bits and Color Depth
z Color depth is defined by the total number of bits per pixel that can be
displayed on the computer screen.
Color Depth = 2 ^ Number of bits
z Data is stored in bits. Each bit represents two colors because it has a
value of 0 or 1.
z The more bits per pixel, the more color that can be displayed.
z For example:
z Each pixel in a 4-bit image can display one of the possible 16 colors,
z Each pixel in a 8-bit image can display one of the possible 256 colors,
z Each pixel in a 16-bit image can display one of the possible 65,535
colors,
z Each Pixel in a 24-bit image can display one of 16,777,216 color
(over 16-million colors).
22
Data volumes
A Data volume is mainly effected by number of pixels, type of image,
color dept and others file information.
z Examples:
z Black & White Image
z size: 512x512 pixels/image
z Results in 512x512=262,144bit/Image≒262kbit/image
z = 32,768 byte≒32.8kByte
z Grayscale Image
z size: 512x512 pixels/image
z Color Depth: 256 colors= 8bits/pixel
z Results in 512x512x8=2,097,152bit/Image≒2.1Mbit/image
z =262,144Byte≒262.1kByte
23
Exercise:
Please, calculate data volumes of the following Bitmap Images!
2) Grayscale Image
size: 400x300 pixels/image
Color Depth: 16bits/pixel =65536 colors