Answer Image Processing
Answer Image Processing
0 1 2 3
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
Transformation Function
d) Apply below transformation function and obtain new histogram.
3
New
2
Gray
1
levels
0
0 1 2 3
21 30 9 20
0 1 2 3
Original Histogram 0 3
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
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