You are on page 1of 29

Volkan Şirin

Günhan Gülsoy
CENG 466 Midterm Question Proposal

Question:

Regarding images,
a) what is sampling and quantization?
b) what are the two types of resolution? Explain them.
c) define binary image. define adjacency, path, connectivity, region and background in binary images.
What is the basic technique for obtaining binary image from a gray‐level image? Why do we convert
gray‐level images to binary images?

Answer:
a) An image may be continuous with respect to the x‐ and y‐ coordinates and also in amplitude.
Digitizing the coordinate values is called sampling. Digitizing the amplitude values is called quantization.

b) Spatial, and radiometric. Spatial resolution is the ability to separate two adjacent pixels. Radiometric
resolution is the ability to separate two adjacent color intensities.

c) Binary images have only two intensity values, black and white, represented by 0 and 1. Two
neighboring pixels with same intensity value are called adjacent pixels. A set of adjacent pixels between
two pixels forms a path. If there’s a path between two pixels they are called connected. The set of
connected pixels constitute regions, all the pixels in a region should have the same intensity value in
binary images. Complement of all regions is the background. We obtain binary images from gray‐level
images by thresholding. We convert gray‐level images to binary images since processing such as
connected component extraction is easy with binary images.

Question:

Following three images are obtained from the same original image after a spatial domain
process.

a)What kind of filter might be applied to these images?


b)Compare the sizes of the masks applied to the image.

c)It is seen that the vertical bars on the left lower part of the images (a) and (b) are blurred, but a
clear separation exists between them. However, the bars have merged in image (c). Explain why.

Answer:

a) Averaging filter.

b) The larger averaging filter is used, the more blurry output is obtained.
Thus, b > c > a

c) We see the vertical bars as a single block in figure (c) because the width of the mask is
adjusted such that the width of the mask is sum of the widths of a vertical bar and a space
between two bars. So that, the average value is always same while
filtering the region where vertical bars exist.

As it can be seen in the figure the numbers of black pixels and white
pixels do not change so that we get the same avarage value for
different mask locations.

Ozan Özgün Bilgin


Ahmet Çağan Yıldırım

Question 4.3 at the End of Chapter 4, in Gonzales & Woods 2nd Ed: (Cenk Uyan)

Let F(u,v) denote the DFT of an image f(x,y). ..Suppose that a filter function in the frequency
domain given as H(u,v) = A, a positive constant. The net effect of filtering will be to multiply the
image by the same constant. Using the convolution theorem, explain mathematically why the
pixels in the spatial domain are multiplied by the same constant.

Answer:

Convolution in the frequency domain and multiplication in the time domain is the same thing,
and represented by the following equivalence:

f(x,y)h(x,y) Ù F(u,v) *H(u,v) Eq. 1


This fact forms the basis of the equivalence of the filtering in time domain, and the filtering in
the frequency domain.

Apply the filter in the frequency domain and substitute H(u,v) = A to represent the
application of the filter in the Eq.1:

f(x,y)A Ù F(u,v) *A Eq. 2

The net effect would be to multiply the function in time domain by the same constant .

Question(Cenk Uyan): How do you save all volumes of Donald Knuth's `Art of Computer
Programming` in a steel bar, including the pictures?

Answer: Digitize the volumes, and take the checksum of the whole. You can represent the
checksum as a real number using IEEE Floating Point representation standard (IEEE-754). This
real value is composed of a mantis and a exponential component. Normalize the mantis part to be
between 1 and 10, and measure that much distance from one end of the steel bar, and put a mark
at the exact length. You can always restore the checksum later , by measuring the location of the
mark on the bar from the same end, multiplying it by the exponential that you memorized ( a two
digit number) , therefore restore the complete set of volumes.

Question
Prepared by:
Çiðdem Avcý
Kerem Þahin

Unit: UNIT-2

question:

Answer the following questions,taking into consideration the concepts of


neighbourhood,boundary,region,edge,path and connectivity.

a) What property of image changes when the image represented in 4-


neighbourhood, is converted to be represented

by 24-neighbourhood?

answer: it is smoothed and less detailed.

b) for an 128*128 image , given the coordinates (as (x,y)) (69,15), (69,13)
,(69,12),(68,11),(67,12),(67,8),

write the conditions for these pixels to constitute a path in this image.

neighbourhood-12, similar colour according to a threshold.

c)what is the key difference between an edge and a boundary ?


answer:the boundary of a finite region forms a closed path and is thus a
global concept.edges are formed from pixels with derivative values that
exceed a preset threshold.thus,the idea of an edge is a local concept that is
based on a measure of gray-level discontinuity at a point.

d)according to the following intensity values of a 5*5 image,show the paths


by drawing dashed lines for 4-adjacency,8-adjacency and m-adjaceny.let
V={1,2,3}.

5 8 3 4 2

4 8 7 1 3

3 6 1 8 3

8 2 3 6 1

2 4 6 9 3

answer:

for 4-adjaceny:

5 8 3 4 2
|
4 8 7 1-3
|
3 6 1 8 3
| |
8 2-3 6 1
|
2 4 6 9 3

for 8-adjaceny:

5 8 3 4 2
\ /|
4 8 7 1-3
/ \|
3 6 1 8 3
\ | |
8 2-3 6 1
/ |
2 4 6 9 3

for m-adjaceny:

5 8 3 4 2
\ |
4 8 7 1-3
/ |
3 6 1 8 3
\ | |
8 2-3 6 1
/ |
2 4 6 9 3
a

Question Volkan Aran-Ozan Erol:


1- ) Given RGB matrices, find the letter by converting RGB into other color model.(Letter is
hidden inside the matrices.)

R=

0 2 1 1
1 0 1 1
2 1 1 1
3 1 2 2
0 2 1 2

G=

1 0 2 2
2 2 1 1
0 2 2 0
1 2 0 1
2 0 1 0

B=

3 2 1 1
1 1 1 1
2 1 1 2
0 0 1 0
2 1 1 1

SOLUTION:

I=1/3*(R+G+B)

I=

1.3333 1.3333 1.3333 1.3333


1.3333 1.0000 1.0000 1.0000
1.3333 1.3333 1.3333 1.0000
1.3333 1.0000 1.0000 1.0000
1.3333 1.0000 1.0000 1.0000

2- ) List four color models and give examples of application areas of these color models.

SOLUTION:

a-) RGB (Red-Green-Blue) color model (Application area: displaying images in electronic
systems such as TVs, computers and etc.)
b-) HIS (Hue-Intensity-Saturation) color model (Computer graphic applications)
c-) CMY (Cyan-Magenta-Yellow) color model (Printing applications with ink)
d-) CMYK (Cyan-Magenta-Yellow-Key [black]) color model (Printing applications with ink. It
differs from CMY with additive Black color.)
Reyhan Taşpınar Sample Midterm Question ( Chapter 4)
Buğra Oktay CENG 466

Question: Please answer the following True/False questions but be careful about your answers
since each wrong answer costs an extra point (-1 pt). (15 pts - 3 pts each)
a) The frequency domain is nothing more than the space defined by values of the Fourier
transform and its frequency variables.
b) It is usually possible to make direct associations between specific components of an image
and its transform.
c) The Gaussian filter has a parameter called the filter order, for high values of which the
Gaussian Filter approaches the form of the ideal filter.
d) The ideal low-pass filtering is a method of smoothing tends to create images with ”ringing” at
sharp boundaries.

e) If the noise is periodic, spatial filtering is more appropriate than spectral filtering.

Answer:
a) True
b) False, with the exception of trivial cases, it is usually impossible.
c) False, it is the Butterworth filter having the parameter “filter order”.
d) True
e) False, spectral filtering is the appropriate one for the condition given.
Group members: Tuncay U. Ölçer 28/11/08
Ahmet Yılmaz

CENG 466
FUNDAMENTALS OF IMAGE PROCESSING
MIDTERM QUESTION PROPOSAL
(Chapter 3)
Images (a) and (b) and their gray values are shown at the above at the matrices a’ and b’
respectively.
(a) (b)

3 5 2 6

2 7 0 2

5 1 4 1

6 2 0 4

(a’)

5 5 6 6

3 4 4 7
0 0 1 1

2 2 2 2

(b’)

a-)Find the cumulative histograms of the both images.


b-)Find the equalizaed images of the both images.
c-)Compare the histograms and outputs of the images.
d-)Laplican and averaging masks are applied to the image (b).What happens if the order of the
masks are changed. Will the result be the same or not? Why or why not?Explain briefly.
CENG 466
MIDTERM 1 SAMPLE QUESTION
Ömer PEKTAŞ (From Chapter 3)
Sara OMRANIAN

QUESTION:

Given the following image with gray levels of each pixel,

3 8 2 2 9 4
5 11 4 11 11 3
3 10 9 10 3 4
2 11 9 9 3 2
4 9 3 8 9 4
4 8 3 2 11 2

a) Binarize the image by first dividing the image into four quadrants and applying thresholding
to each quadrant. Determine the threshold value as the median of each quadrant and apply
thresholding such that

B(x,y) = | 1 f(x,y)>T
| 0 f(x,y)<=T
is the binarized image.

b) Discuss the effect of binarization in terms of storage space required.

c) Obtain the histogram of the given image and try to make it as flat as possible.

d) Stretch the gray level values of the given image to the full range [0,L-1]. Then, apply
averaging with the following filter: (If needed apply zero padding around borders.)

1/2 *
1 1
Note that left pixel is the seed pixel.

e) Using your results in part c and part d, find a transformation such that zk=T(rk) that specifies
the histogram for the resultant image obtained in part d.
SOLUTION:

a) I. Quadrant : 2 3 3 4 5 8 9 10 11
II. Quadrant : 2 3 3 4 4 9 10 11 11
III. Quadrant : 2 3 3 4 4 8 9 9 11
IV. Quadrant : 2 2 2 3 4 8 9 9 11

The highlighted values are median(M) for each quadrant. Then, the binarized image
becomes:
B(x,y)=1 for f(x,y)>M
B(x,y)=0 for f(x,y)<=M

0 1 0 0 1 0
0 1 0 1 1 0
0 1 1 1 0 0
0 1 1 1 0 0
0 1 0 1 1 0
0 1 0 0 1 0
====>

b) For the original image although full range is not spanned there are totally 16 gray levels (for
the range [0,15]), therefore 4 bits is required to represent the gray level of each pixel. Hence
totally

P1=6x6x4=144 bits are required.

For the binarized image, however, there are 2 gray levels requiring only 1 bit to represent
each pixel value. Then,

P2=6x6x1=36 bits are required.

It can be concluded that the image becomes compacted by binarization.


c)
d)
e)
Engin Esin – 1497312 28.11.2008
İbrahim Ersan Gök ‐ 1497338

CENG 466 MIDTERM QUESTION, 6th Ch.


1. Answer the following by using the RGB and HSI color models;
a) Which information and color model we need; to color a photograph taken in black
& white mode without any difference from the image taken in color mode? Explain.

A black & white image can be thought as in gray-level. In other words, it is an intensity
image. Therefore, we have I component of HSI and it is suitable to use HSI color model.
To color this image we need to know hue and saturation component information of this
gray-scaled image.

b) R, G and B components of a 3 bit color image are below. By using these matrices
find H, S and I components (in 3 bit format) of the original 3 bit image without
using formulas. (θRed=0⁰, θGreen=120⁰, θBlue=240⁰ for hue values. Assume that for
black and white, θBlack=0⁰, θWhite=0⁰ )
The original image can be shown in (R; G; B) type as;
0; 0; 0 7; 7; 0
0; 7; 7 7; 0; 7

This means;

• To find H component:
We assumed the angle as 0 for black. For others, we can say the value is at the middle of the
main colors, θYellow=60⁰, θCyan=180⁰, θMagenta=300⁰. We must assign this [0⁰, 360⁰] range to [0,7]
range for 3 bit format.
0⁰ 60⁰ 4
0
360⁰ 360⁰ 3 0 1
8
180⁰ 300⁰ 20 4 7
4
360⁰ 360⁰ 3

• To find S component:
The values we have are either 0 or 7; in other words, just the highest and the lowest for 3 bit
format. So the colors are pure and the saturation values would be 0 or 1. For black, all the values
are 0, so S=0; for others, they have values, 7, so S=1.
0 7
7 7
• To find I component:
Intensity is the average of the R, G and B values in gray‐scale. For black the average is naturally
0. For secondary colors the average is 5, because they have two “7” and one “0” element.
0 5
5 5

c) According to average yearly temperature data taken from satellites, temperature


range of world is [-40⁰C, +40⁰C]. If the impact of average temperature on climate
characteristics and thereby on plant distribution is considered, write an algorithm
which contains approximate R, G, B values to obtain closest vision to the real
appearance of cloudless world. (Assume that below -30⁰C and above +30⁰C there is
no plant and the highest plant distribution is at 0⁰C . The whole water is at 0⁰C and
there is no land at 0⁰C)

• [-40⁰C, -30⁰C] :
We can say this range is at poles. And because of no plant distribution whole range is
white as iceberg; [255; 255; 255]
• [-30⁰C, 0⁰C] :
At -30⁰C we have very low plant concentration near high snow concentration, which
means very light green. And at 0⁰C we have the highest plant distribution, which means
very dark green. Therefore, from -30⁰C to 0⁰C the green color tone is increasing
smoothly. We can show this as:
[255; 255; 255] => [0; 127; 0] (white to dark green)
• [0⁰C, 20⁰C] :
At 0⁰C we have the highest plant distribution, which means very dark green. And at 20⁰C
we have lower plant distribution, which means lighter green. Therefore, from 0⁰C to
20⁰C the green color tone is decreasing smoothly. We can show this as:
[0; 127; 0] => [127; 255; 127] (dark to light green)
• [20⁰C, 30⁰C] :
At 20⁰C we have middle-level plant distribution, which means lighter green. And
towards to 30⁰C, plant distribution goes to zero. However, this time, we have dark yellow
color for ground instead of white;
[127; 255; 127] => [127; 127; 0] (light green to dark yellow)
• [30⁰C, 40⁰C] :
At 30⁰C we have a ground with no plant (color is dark yellow). At 40⁰C the ground
would be a desert and the color would be lighter yellow.
[127; 127; 0] => [255; 255; 0] (dark yellow to yellow)

Midterm Question
Ozan Şener & Yusuf Soyman

Consider the image acquisition device which produce color images in RGB color space. Because
of the error in production of color sensors; device produce erroneous images. It is also known
that error in image is homogeneous over entire image and independent of spatial coordinates. It
is also known that error is multiplicative such that.
[Robserved Gobserved Bobserved]' = A* [Rreal Greal Breal]'
It is also known that A is orthogonal matrice.

a)If the same scene acquired by two different cameras one is erroneous and other is not.
Acquired matrices are shown below. Find the error matrix A.
Without Error: With Error:
R= R=

0 0 0 0 0 0 0 0
0 1 0 0 0 -0.8 -0.6 0
0 1 1 0 0 -0.8 0 0
0 0 0 0 0 0 0 0

G= G=

0 0 0 0 0 0 0 0
0 1 0 0 0 0.44 0.48 0
0 1 0 0 0 0.44 0.8 0
0 0 0 0 0 0 0 0

B= B=

0 0 0 0 0 0 0 0
0 0 1 0 0 1.08 -0.64 0
0 0 0 0 0 1.08 0.6 0
0 0 0 0 0 0 0

b) Suppose that you have produced this camera. After noticing this error, you have decided to
distribute patch for your product. Your patch need a transformation matrix to correct the image.
Moreover, your software using YUV space although you know your error matrix(A) in RGB
space. so find correction matrix which correct the YUV values such that.
[Yreal Ureal Vreal]' = C* [Yobserved Uobserved Vobserved]'
c)Now tranform the given RGB image(with error) in part a to YUV space, apply your correction
matrix and transform it back to the RGB space and verify that it is equal to the RGB image
without error.

Note:You may use RGB to YUV and YUV to RGB conversion matrices given below.

For answer:
A=

0 -0.8000 -0.6000
0.8000 -0.3600 0.4800
0.6000 0.4800 -0.6400

RGB to YUV Conversion (simplified)


Y = 16 + (0.25 * R) + (0.5 * G) + (0.1 * B)
U = 128 - (0.1 * R) - (0.3 * G) + (0.4 * B)
V = 128 + (0.4 * R) - (0.4 * G) - (0.1 * B)

YUV to RGB Conversion (simplified)

R = 1.2(Y - 16) + 1.6(V - 128)


G = 1.2(Y - 16) - 0.8(V - 128) - 0.4(U - 128)
B = 1.2(Y - 16) + 2.0(U - 128)

QUESTION (Beliz Uğurhan & Gizem Baştürk):

The Haar transform of an image is given by the following matrix.

T=
4 0 0 0
0 -4 0 0
0 0 0 0
0 0 0 0

a. Obtain and draw the original 4x4 image.


b. Construct the quad-tree representation of the original image.

Solution:

a)

H4 =
1 1 1 1
1 1 -1 -1
√2 -√2 0 0
0 0 √2 -√2

Since T = HFHT , F= HTTH

After doing this operation we get F as:

0 0 4 4
0 0 4 4
4 4 0 0
4 4 0 0

After normalizing the matrix;


F=
0 0 1 1
0 0 1 1
1 1 0 0
1 1 0 0

And the object is:

b) Quad-tree representation of the image is:

You might also like