Professional Documents
Culture Documents
1
Digital Image Processing
Contents
Chapter 01 – Introduction ---------------------------------------------------------------------------------------02
Chapter 02 – Color Model ---------------------------------------------------------------------------------------04
Chapter 03 – Edge Detection ------------------------------------------------------------------------------------06
Chapter 04 – Image compression -------------------------------------------------------------------------------10
Chapter 05 – Morphology ---------------------------------------------------------------------------------------13
Overview with short questions ----------------------------------------------------------------------------------18
2
Digital Image Processing
Chapter 01 – Introduction
Q:04| Describe the key stage of digital image processing with diagram.
Ans: Key stage of digital image processing with diagram are as follows-
3
Digital Image Processing
4
Digital Image Processing
Chapter 02 – Color Model
Q:04| Write down the differences between CMYK and HIS color model.
Ans: We can make a decision about how we can differ CMYK color model from HIS color model
through considering the following statements about CMYK and HSI individually-
5
Digital Image Processing
CMYK color model: This model uses the colors cyan (C), magenta (M), yellow (Y) and black (K),
which is called the “key.” This model is used for color printing. CMYK is subtractive. This is because
the CMYK system uses colored inks to make colors on a white background and "subtracts" brightness
from that white background.
HIS color model: HIS color model, stands for Human Saturation Intensity is based on human
perception of colors. Humans describe a color object by its hue, saturation, and brightness. The HSI
model decouples the intensity component from the color-carrying information (hue & saturation).
So, from the above discussion we can understand that CMYK can be an efficient color model for
printing but unfortunately it is not good for human interpretation but on the other hand HIS do so.
6
Digital Image Processing
Chapter 03 – Edge Detection
7
Digital Image Processing
Q:06| How the Robert, Prewitt and Sobel operators works? Explain with necessary figures.
Ans: Roberts Operator: The Roberts Edge filter is use to detect edges based applying a horizontal
and vertical filter in sequence. Both filters are applied to the image and summed to form the final
result.
Prewitt Operator: Prewitt operator is used for detecting edges horizontally and vertically. We can
approximate the magnitude of the gradient at the center of a 3x3 region as
8
Digital Image Processing
Sobel Operator: The sobel operator is very similar to Prewitt operator. It is also a derivate mask and
calculates edges in both horizontal and vertical direction. Derivative filters are terribly sensitive to
noise. The Sobel filter (shown below) both blurs and differentiates an image providing good noise-
resistant edge detection.
9
Digital Image Processing
Chapter 04 – Image compression
𝑛
Compression ratio, CR = 𝑛1
2
10
Digital Image Processing
Q:04| Describe the general algorithm for data compression and image reconstruction.
Ans: The general algorithm for data compression and image reconstruction can be describe vividly
through the following flowchart-
An input image is fed into the encoder which creates a set of symbols from the input data. After
transmission over the channel, the encoded representation is fed to the decoder, where a reconstructed
output image f’(x,y) is generated . In general, f’(x,y) may or may not an exact replica of f(x,y). If it is,
the system is error free or information preserving, if not, some level of distortion is present in the
reconstructed image.
Q:05| What are the two approaches of image compression technique? Explain.
Ans: The two approaches of image compression technique are-
• Lossless
➢ Information preserving
➢ Low compression ratios
• Lossy
➢ Not information preserving
➢ High compression ratios
Lossless algorithms remove only redundancy present in the data. The reconstructed image is identical
to the original, i.e., all of the information present in the input image has been preserved by compression.
Higher compression is possible using lossy algorithms which create redundancy (by discarding some
information) and then remove it.
11
Digital Image Processing
A good example for (1) objective fidelity criteria is root-mean square (RMS) error between on input
and output image For any value of x, and y, the error e(x,y) can be defined as :
𝑒(x,y) = 𝑓 ′ (x,y) - 𝑓(x,y)
The total error between two images is-
𝑀−1 𝑛−1
𝑀−1 𝑛−1
1 1
𝑒𝑟𝑚𝑠 =[ ∑ ∑[𝑓 ′ (x, y) − 𝑓(x, y)]2 ]2
𝑀𝑁
𝑥=0 𝑦=0
12
Digital Image Processing
Chapter 05 – Morphological Operations
13
Digital Image Processing
g = f s
n m
2 2
g ( x, y ) = n m f ( x − k , y − l ) s (k , l )
k =− l =−
2 2
1 if s hits f
g ( x, y ) =
0 otherwise
Erosion: Erosion is Used to decrease the area of a component. It removes pixels around the boundaries
and enlarges interior holes.
An image is processed by applying a structuring element, center the structuring element S on pixel P.
If P is ON then set it to OFF if any part of S overlaps an OFF image pixel. This process can only turn
pixels from ON to OFF. The component can only shrink,
Given binary image f and structuring element s the errotted image g can be described as:
g=f s
14
Digital Image Processing
n m
2 2
g ( x, y ) = n m f ( x − k , y − l ) s(k , l )
k =− l =−
2 2
1 if s fits f
g ( x, y ) =
0 otherwise
15
Digital Image Processing
image, placing them in the background, while closing removes small holes in the foreground, changing
small islands of background into foreground.
0 0 1 1 1 1
0 0 1 1 1 1
1 1 1 1 0 1
1 1 1 1 0 0
Input image
1 1 1
1 1 1
1 1 1
Structuring element
Ans: i. Dealation: f ⊕ s
1 1 1 1 1 1
1 1 1 1 1 1
1 1 1 1 1 1
1 1 1 1 1 1
1 1 1 1 1 1
16
Digital Image Processing
ii. Erosion: f ⊖ s
0 0 0 1 0 1
0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0
1 1 1 0 0 0
0 0 1 1 1 1
0 0 0 0 0 0
1 1 1 1 0 0
1 1 1 1 0 0
1 1 1 1 1 1
1 1 1 1 1 1
1 1 1 1 1 1
1 1 1 1 1 1
17
Digital Image Processing
Overview with short questions
1. The process from image processing to computer vision can be broken up into _____
process.
Ans: three
2. In digital image, _____ are the dots that make up the picture.
Ans: pixels
3. The _____ of an image is the number of distinct pixels in each dimension.
Ans: resolution
4. Morphological operations are typically applied to remove _____.
Ans: imperfections
5. Noise removal is the example of _____ level process.
Ans: low
6. Filtering is used to remove _____ from images.
Ans: noise
7. True or False: Artificial Intelligence is not a field of Digital Image Processing.
Ans: False.
8. True or False: Robot vision is a field of Digital Image Processing.
Ans: True.
9. How the Resolution of an image is represented?
Ans: Width × height.
10. How many primary colors the human eye can combine to discern all possible colors?
Ans: Three.
11. The goal of image compression is to _____ the amount of data required to represent a
digital image.
Ans: reduce
12. Mention an application area of edge detection.
Ans: Face detection
13. Dilation is used to the _____ area of an image component.
Ans: increase
14. The brightness or darkness of an object is called _____.
Ans: intensity
15. Morphological processing refers to a range techniques that deal with the _____ objects
in an image.
Ans: shape
16. What is the last key stage of DIP?
Ans: Representation and description.
17. Mention 2 applications of digital image processing.
Ans: Medical imaging, Image transmission.
18. Capturing an image from a camera is a _____ process.
Ans: physical
19. In digital image, each element of matrix is called _____.
Ans: pixel
20. Elaborate CAD.
Ans: Computer Aided Diagnosis.
21. Object recognition, Segmentation are the examples of _____ level process.
Ans: Mid-level
22. Explain the term written in this format: "1024x768".
Ans: 1024 pixels at width and 768 pixels at height.
23. What is the first key stage of DIP?
18
Digital Image Processing
Ans: Image Acquisition.
24. In digital signal, mention those two values which are used to represent information.
Ans: 0, 1.
25. In capturing an image from camera, _____ is used as a source of energy.
Ans: Sunlight
19