Digital_image_processing introduction ppt for basic understanding
1.
25-01-2024
Sampling and Quantization
Dr.Ram Prakash Sharma
NIT Hamirpur
Reference: R. Gonzalez and R. Woods. Digital Image Processing, Prentice
Hall, 2008.
1
Electromagnetic Spectrum
2
What is a Digital Image?
• A digital image is a representation of a two-dimensional image as a
finite set of digital values, called picture elements or pixels
f(x,y) = reflectance(x,y) * illumination(x,y)
Reflectance in [0,1], illumination in [0,inf]
3
What is a Digital Image?
Remember digitization implies that a digital image is an approximation
of a real scene
1 pixel
4
1 2
3 4
2.
25-01-2024
What is animage?
• We can think of an image as a function, f:
• f( x, y ) gives the intensity at position ( x, y )
• Realistically, we expect the image only to be defined over a rectangle,
with a finite range:
• A color image is just three functions pasted together. We can
write this as a “vector-valued” function:
( , )
( , ) ( , )
( , )
r x y
f x y g x y
b x y
5
What is a digital image?
• We usually operate on digital (discrete) images:
• Sample the 2D space on a regular grid
• Quantize each sample (round to nearest integer)
• If our samples are D apart, we can write this as:
f[i ,j] = Quantize{ f(i D, j D) }
• The image can now be represented as a matrix of integer values
6
Sampling and Quantization
7
Image Sampling And Quantisation
8
5 6
7 8
3.
25-01-2024
Sampling and Quantization
9
RepresentingDigital Images
10
Spatial Resolution
The spatial resolution of an image is determined by how sampling was
carried out
Spatial resolution simply refers to the smallest discernable detail in an
image
• Vision specialists will
often talk about pixel
size
• Graphic designers will
talk about dots per
inch (DPI)
11
Spatial Resolution (cont…)
12
9 10
11 12
4.
25-01-2024
Spatial Resolution (cont…)
1024* 1024 512 * 512 256 * 256
128 * 128 64 * 64 32 * 32
13
Intensity Level Resolution
Intensity level resolution refers to the number of intensity levels used to
represent the image
• The more intensity levels used, the finer the level of detail discernable in an
image
• Intensity level resolution is usually given in terms of the number of bits used
to store each intensity level
Number of Bits
Number of Intensity
Levels
Examples
1 2 0, 1
2 4 00, 01, 10, 11
4 16 0000, 0101, 1111
8 256 00110011, 01010101
16 65,536 1010101010101010
14
Intensity Level Resolution (cont…)
128 grey levels (7 bpp) 64 grey levels (6 bpp) 32 grey levels (5 bpp)
16 grey levels (4 bpp) 8 grey levels (3 bpp) 4 grey levels (2 bpp) 2 grey levels (1 bpp)
256 grey levels (8 bits per pixel)
Images
taken
from
Gonzalez
&
Woods,
Digital
Image
Processing
(2002)
15
Relation between number of pixels and bits
16
13 14
15 16
25-01-2024
Image processing
• Animage processing operation typically defines a new
image g in terms of an existing image f.
• We can transform either the range of f.
• Or the domain of f:
21 22
23 24
21 22
23 24