BEC007-Digital Image Processing
BEC007-Digital Image Processing
UNIT I
DIGITAL IMAGE FUNDAMENTAL
1 pixel
Cont..
Common image formats include:
1 sample per point (B&W or Grayscale)
3 samples per point (Red, Green, and Blue)
4 samples per point (Red, Green, Blue, and
“Alpha”, a.k.a. Opacity)
• Low-Level Processes:
– Input and output are images
– Tasks: Primitive operations, such as, image
processing to reduce noise, contrast enhancement
and image sharpening
Computerized Processes Types
• Mid-Level Processes:
– Inputs, generally, are images. Outputs are
attributes extracted from those images (edges,
contours, identity of individual objects)
– Tasks:
• Segmentation (partitioning an image into
regions or objects)
• Description of those objects to reduce them to a
form suitable for computer processing
• Classifications (recognition) of objects
Computerized Processes Types
• High-Level Processes:
– Image analysis and computer vision
Digital Image Definition
Image
Restoration
Segmentation
Image
Acquisition Object
Recognition
Problem Domain
Fundamental Steps in DIP: (Description)
Step 5: Wavelets
Are the foundation of representing images in various
degrees of resolution. It is used for image data
compression.
Fundamental Steps in DIP: (Description)
Step 6: Compression
Techniques for reducing the storage required to save
an image or the bandwidth required to transmit it.
Fundamental Steps in DIP: (Description)
Network
Typical general-
Image sensors purpose DIP
Problem Domain system
Components of an Image Processing System
1. Image Sensors
Two elements are required to acquire digital images.
The first is the physical device that is sensitive to the
energy radiated by the object we wish to image
(Sensor). The second, called a digitizer, is a device
for converting the output of the physical sensing
device into digital form.
Components of an Image Processing System
2. Specialized Image Processing Hardware
Usually consists of the digitizer, mentioned before,
plus hardware that performs other primitive
operations, such as an arithmetic logic unit (ALU),
which performs arithmetic and logical operations in
parallel on entire images.
This type of hardware sometimes is called a front-
end subsystem, and its most distinguishing
characteristic is speed. In other words, this unit
performs functions that require fast data throughputs
that the typical main computer cannot handle.
Components of an Image Processing System
3. Computer
The computer in an image processing system is a
general-purpose computer and can range from a PC
to a supercomputer. In dedicated applications,
sometimes specially designed computers are used to
achieve a required level of performance.
Components of an Image Processing System
6. Image Displays
The displays in use today are mainly color
(preferably flat screen) TV monitors. Monitors are
driven by the outputs of the image and graphics
display cards that are an integral part of a computer
system.
Components of an Image Processing System
7. Hardcopy devices
Used for recording images, include laser printers,
film cameras, heat-sensitive devices, inkjet units and
digital units, such as optical and CD-Rom disks.
Components of an Image Processing System
8. Networking
Is almost a default function in any computer system,
in use today. Because of the large amount of data
inherent in image processing applications the key
consideration in image transmission is bandwidth.
45
Cones vs. Rods
Hexagonal pixel
• Dynamic range of
human visual system
– 10-6 ~ 104
• Cannot accomplish this
range simultaneously
• The current sensitivity
level of the visual
system is called the
brightness adaptation
level
50
Brightness discrimination
• The perceived
brightness is not a
simple function of
intensity
– Mach band pattern
– Simultaneous
contrast
52
Image formation in the eye
• Flexible lens
• Controlled by the tension in the fibers of the
ciliary body
– To focus on distant objects?
– To focus on objects near eye?
– Near-sighted and far-sighted
Image formation in the eye
radiant electrical
energy impulses
A simple image formation model
• ISO number
– Sensitivity of the film or the sensor
– Can go as high as 1,600 and 3,200
• Shutter speed
– How fast the shutter is opened and closed
• f/stop
– The size of aperture
– 1.0 ~ 32
Sampling and Quantization
Uniform sampling
Sampled
(0,0) (0,1) (0,2) (0,3) (0,0) (0,0) (0,2) (0,2)
by 2
(1,0) (1,1) (1,2) (1,3) (0,0) (0,0) (0,2) (0,2)
(2,0) (2,1) (2,2) (2,3) (2,0) (2,0) (2,2) (2,2)
(3,0) (3,1) (3,2) (3,3) (2,0) (2,0) (2,2) (2,2)
• Non-uniform sampling
– communication
More on aliasing
59
original Sampled by 2 Sampled by 4
Sampled by 8 Sampled by 16
Uniform quantization
255 3
192
2
128
1
64
0 0
original 128 levels (7 bits) 16 levels (4 bits)
(A) (B)
Digital Image Representation
Images as Matrices
• Q: Suppose a pixel has 1 bit, how many gray levels can it represent?
Answer: 2 intensity levels only, black and white.
Bit (0,1) 0:black , 1: white
• Q: Suppose a pixel has 2 bit, how many gray levels can it represent?
Answer: 4 gray intensity levels
2Bit (00, 01, 10 ,11).
Now ..
if we want to represent 256 intensities of grayscale, how many bits do we need?
Answer: 8 bits which represents: 28=256
so, the gray intensities ( L ) that the pixel can hold, is calculated according to according to
number of pixels it has (k). L= 2k
Number of storage of bits:
N=M in this table, which means no. of horizontal pixels= no. of vertical pixels. And
thus:
# of pixels in the image= N*N
Spatial and gray-level resolution
Sub sampling
subSampling is performed by deleting rows and columns from the original image.
Spatial and gray-level resolution
Re sampling
(pixel replication)
A special case of nearest
neighbor zooming.
• Forward Transformation
forward transformation kernel
M 1 N 1
T (u, v) f ( x, y)r ( x, y, u, v)
x 0 y 0
u 0,1,..., M 1, v 0,1,..., N 1
r ( x, y, u, v) r1 ( x, u )r2 ( y, v)
r ( x, y, u, v) r1 ( x, u )r1 ( y, v)
Fourier Series Theorem
α1
α2
α3
Continuous Fourier Transform (FT)
where
Definitions
• Magnitude of FT (spectrum):
• Phase of FT:
• Magnitude-Phase representation:
magnitude
• Properties:
Example: impulse or “delta” function (cont’d)
• FT of delta function:
x
u
Example: spatial/frequency shifts
f ( x) F (u ), then
Special Cases:
j 2ux0 j 2ux0
(1) f ( x x 0 ) e F (u ) ( x x0 ) e
j 2u 0 x
(2) f ( x)e j 2u0 x
F (u u 0 ) e (u u 0 )
Example: sine and cosine functions
cos(2πu0x) F(u)
1/2
Example: sine and cosine functions (cont’d)
jF(u)
sin(2πu0x)
Extending FT in 2D
• Forward FT
• Inverse FT
Example: 2D rectangle function
• FT of 2D rectangle function
2D sinc()
top view
Discrete Fourier Transform (DFT)
Discrete Fourier Transform (DFT) (cont’d)
• Forward DFT
• Inverse DFT
1/(NΔx)
Example
Extending DFT to 2D
• Forward DFT
• Inverse DFT:
Extending DFT to 2D (cont’d)
• Forward DFT
• Inverse DFT
2D cos/sin functions
Interpretation:
Visualizing DFT
|F(u,v)| |D(u,v)|
Forward DFT:
kernel is ux vy ux vy
j 2 ( ) j 2 ( ) j 2 ( )
separable: N N N
e e e
DFT Properties: (1) Separability (cont’d)
• Let’s set:
• Then:
DFT Properties: (1) Separability (cont’d)
f(x,y) F(u,v)
|F(u)|
|F(u-N/2)|
DFT Properties: (4) Translation (cont’d)
)
N
sinc sinc
but …
DFT Properties: (8) Average value
Average:
So:
Magnitude and Phase of DFT
magnitude phase
only phase