0% found this document useful (0 votes)
4 views

Answer Image Processing

Uploaded by

Bushra Qadr
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

Answer Image Processing

Uploaded by

Bushra Qadr
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Faculty of Science Stage: 4

Department of Computer Science Date: 17 / 4 /2023


Subject: Image Processing Time: 90 Minutes

MidTerm Examination, First Semester (2022-2023)


Q 1: There is the gray level matrix of an image. a) Illustrate its histogram. b) Do equalization steps c) Draw
equalized histogram and transformation function. [8 marks]

21 pixels 30 pixels 9 pixels 20 pixels 80 pixels

26.25% 37.5% 11.25% 25%

0 1 2 3

S0=3*26.25%=0.7875 S0>>1, S1=3*(26.25+37.5)%=1.9125 S1>>2, S2=3*(26.25+37.5+11.25)%=2.25 S2>>2,

S3=3*100%=3 S3>>3 (S1 #21pixels, S2 #30+#9=#39pixels, S3 #20pixels)

0 1 2 3 3 2 1 1 0 0

1 1 3 3 3 3 3 3 1 1

0 0 0 1 0 0 3 3 2 2

3 3 3 0 0 1 1 2 0 2

1 0 1 0 2 1 0 3 0 1
0 1 2 3
0 1 2 3 1 1 1 1 1 1 1 1 1 1
Equalized Histogram
Histogram of picture 1 1 2 3 3 3 3 1 0 0

1 1 0 0 0 1 2 3 0 3

New 3

Gray 2

levels 1

0 1 2 3

Old gray levels

Transformation Function
d) Apply below transformation function and obtain new histogram.

3
New
2
Gray
1
levels
0

0 1 2 3

Old gray levels

21 30 9 20

0 1 2 3

Original Histogram 0 3

Applying Trans. Func.

S0=r1+r3=30+20=50
S1=S2=0
S3=r0+r2=21+9=30

Q2: Illustrate the electromagnetic spectrum and describe what is light? How different colors occur? Use more
illustrations for your description? [4 marks]
• Light is just a particular part of the electromagnetic spectrum that can be sensed by the human eye.
• The electromagnetic spectrum is split up according to the wavelengths of different forms of energy
In visible zone, colors start with lower frequency (Red) to highest frequency (Violet).Other colors are took place
between red and violet depending on their frequencis.
Q3: How the analogue image converts to digital image? Using a sample describe the stages? [3 marks]
• Two major steps in converting analogue image to digital one.
• Sampling:
• digital sensors can only measure a limited number of samples at a discrete set of energy levels
• Quantization
• Is the process of converting a continuous analogue signal into a digital representation of this
signal

Sampling:
Digitization of the coordinate values

Quantization:
Digitization of the Amplitude values
Q4: a) After illustrating Bayern filters, describe how does RGB convert to gray image? b) What are infrared
sensors? Describe how are they work? [4 marks]
As mentioned before, the standard Bayer CFA comes with a BGGR pattern. The Figure 1 represents the pixels in
the Bayer format.
But an RGB-IR camera comes with an additional set of pixels that are dedicated to allow only light in the IR
spectrum to pass through them. Presence of these pixels facilitates multi-band imaging. Many sensor
manufacturers have developed this new CFA that comes with a combination or R,G,B, and IR pixels as shown in
the Figure 2. A Bayer array consists of alternating rows of red-green and green-blue filters. Notice how the
Bayer array contains twice as many green as red or blue sensors. Each primary color does not receive an equal
fraction of the total area because the human eye is more sensitive to green light than both red and blue light.
An infrared sensor is a device that detects infrared radiation in its environment and outputs an electric
signal. An infrared sensor can detect movement as well as to measure the heat of an object. The Infrared Sensor
can detect infrared radiation, which is invisible to our eyes.
Q5: The following image shows a 4 bits sub-image of size 8*8 black and white: [6 marks]

Find and sketch seperatly the connectivity between the pixels based on:

a) 4-adjacency

0 1 1 0 0 1 0 0
0 1 1 0 0 1 0 0
0 0 0 1 0 0 1 00
1 0 1 1 0 0 1 11
0 1 0 0 1 0 0 1
0
1 0 0 1 1 0 1 1
1
0 0 1 1 0 1 1 0
0
0 1 1 0 0 1 0 0

b) M-adjacency

c) M-path from top left corner to down right corner

0 1 1 0 0 1 0 0
0 1 1 0 0 1 0 0
0 0 0 1 0 0 1 00
1 0 1 1 0 0 1 11
0 1 0 0 1 0 0 1
0
1 0 0 1 1 0 1 1
1
0 0 1 1 0 1 1 0
0
0 1 1 0 0 1 0 0
Head of Department Examiner

M. Dana Rasool Dr. Sadegh A. Aminifar

You might also like