You are on page 1of 7

Technische Universität Berlin

Computer Vision &


Examination Remote Sensing

Automatic Image Analysis Prof. Dr. Olaf Hellwich


Dr. Ronny Hänsch
Summer term 2016

Name: .................................................. Student ID: ......................


________________________________________________________________________________

Berlin, July 27, 2016

DO NOT OPEN THIS EXAMINATION SHEET UNTIL YOU ARE TOLD TO DO SO!

Write your name and student ID in the corresponding places at the top of this page now.

Books, notes, dictionaries, own empty sheets of paper, pocket calculators are not allowed.
Use only a pen. Everything written with a pencil will not be taken into account.

A short and accurate style as well as a clear handwriting should be intended.


Pay attention to a clear and comprehensible preparation of sketches.

If you do not understand a question, please ask.


It will be to your advantage to read the entire examination before beginning to work.
The questions are not ordered by their complexity or difficulty.

Notation:

Black = Gray level of 0


White = Gray level of 255

1. Task: / 140points
2. Task: / 200points
3. Task: / 6 points
4. Task: / 16 points
5. Task: / 4 points
Total: / 60 points

Lot's of luck and do your best!


1 Fourier Descriptors (14 Points)

a) b)
Figure 1
Fourier Descriptors (FDs) offer invariances to many object variations in images.
In this example, they shall be used to automatically recognize special kinds of
food in images.

The template object in Figure 1a) shall be found in the image of Figure 1b). The
normalized FD of the template object is given at the first row of Table 1.

a) Provide an step-by-step description, how an unnormalized FD is extracted 4P


given a grayscale image.

b) Table 1 provides the unnormalized FD of one of the objects within the query 8P
image. A set of specific normalization steps is necessary to transform an
unnormalized FD into a FD that is invariant to common object variations.

Based on the given unnormalized FD of Object A, compute step by step all


necessary normalizations to derive the corresponding normalized FD that can
be compared to the given template FD. The comparison is based on the
Euclidean distance, but does not have to be computed. Enter the
corresponding intermediate results into the corresponding row of Table 1 and
state in the first column for which object variation an invariance is achieved.

Please note, that square roots and fractions do not have to be calculated,
i.e. a result such as √ 77/ √ 1111 is sufficient.

c) Given the normalized FD of the template, which objects will be detected in the 2P
query image. Explain your answer. A
Template Object
Normalized [ 0, |-0.99-0.13i|, |0.099-0.4i|, |-0.3-0.13i|, 0, 0, |-0.099-0.4i|, |-2.31+0.33i| ]
Object A
unnormalized [130+50i, -30-4i, 3-12i, -9-4i, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-3-12i, -70+10i]

translation [0,-30-4i, 3-12i, -9-4i, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-3-12i, -70+10i]

[0,1-1i, -1/10+3i, 3/10+1i, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1/10+3i, 7/3-5/2i]


scale
[0,|1-1i|, |-1/10+3i|, |3/10+1i|, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,|1/10+3i|, |7/3-5/2i|]
rotation

noise [0,|1-1i|, |-1/10+3i|, |3/10+1i|, 0,0,|1/10+3i|, |7/3-5/2i|]

Table 1
1a
get binary image (white foreground, black background)
use erosion to get rid of small objects and break connections between leafs
get contour lines from templates
take only the contour with the most points
stop execution if no contour with sufficient length is found for template
get contour lines from query image
skip those that have not enough elements and color them white
stop execution if no contour with sufficient length is found in query image
convert the countour in a adequate format and make the discrete fourier
transform
2 Hough Transform (20 Points)

a) b)
Figure 2

a) Figure 2a) shows three pixels on different lines in an image with their 10P
corresponding gradients that can be assumed to be of equal amplitude. Draw the
corresponding voting space for the Radon transform and for the Hough line
detector (i.e. without and with use of the gradient orientation, respectively). The
lines shall be parametrized by Equation 1
T
ρ= x ⋅ cos(θ)
()(
y sin(θ) ) (1)

Please note that a simple sketch is not sufficient. The drawing should be
based on actual calculations of the voting positions. The coordinate axes should
have proper names and scales. The votes should be at the correct positions.

b) Figure 2b) shows an triangular object. The centre of the longest edge is 4P
selected as reference point.

Generate the R-Table with a resolution of 45° for the three object pixels marked
in Figure 2b). Assume that gradient vectors point from dark to bright areas.

c) Adapt the R-Table from 2.b) to search for an object instance that was rotated by 6P
180° and scaled by a factor of 2.

3 Probability Density Estimation (6 Points)


a) What is the probability of x using 2P
Parzen Window with a quadratic
windows of size 20x20?

b) What is the probability of x using 2P


k-Nearest Neighbors with parameter
k = 7?

c) Do those two methods belong to 1P


parametric (A) or non-parametric (B)
approaches?

d) If you decided A in 3.c), state a non- 1P


parametric method.
Figure 3 If you decided B in 3.c), state a
parametric method.
4 Bayesian Decision Theory (16 Points)

a) Derive Bayes theorem starting from the joint probability P(A,B) of two events A 2P
and B. Provide proper technical names to all terms within the resulting equation.

A leading car company has an obstacle detector OD already included into their
cars. Now they developed an image-based person detection PD which is
supposed to be additionally included into their existing driver assistance system.

Given an image, both methods return either 0 or 1 depending on whether an


obstacle / person is present in front of the car or not. A study investigated the
effectiveness of both methods. It is based on the two cases that a person P is truly
present (P=1) or not (P=0). The results are summarized in Table 2.

P=1 P=0
OD = 1 OD = 0 OD = 1 OD = 0
PD = 1 800 0 PD = 1 25 300
PD = 0 190 10 PD = 0 25 650
Table 2

Please note, that it is not necessary to compute fractions within the following tasks,
e.g. a result such as 77 / 1111 is sufficient.

b) Compute P( OD, PD | P=1 ) and P( OD, PD | P=0 ). 4P

c) A car is known to drive in an extremely crowded environment where the 9P


chance of having a person in front of the car is 8 to 2 (i.e. in 8 of 10 cases).

Using this information, what are the probabilities of having a person in front of
the car given different detector results, i.e. P( P = 1 | OD, PD ) ?

d) Missing an existing person in front of the car comes with a much higher cost 1P
than vice versa and is thus assigned with a higher loss value. Provide an
equation for the expected loss of to break automatically (B=1) given the result of
both detectors?

5 Multiple Choice (4 Points)

State for each of the statements below, whether it is true (T) or false (F).
Please note, that there is a penalty of -0.5 points for a wrong answer.
However, the minimal number of points for this task is 0.

T F Statement
It needs 5 additions to compute the sum of a rectangular area in an
image by using the integral image. 1P

Simulated Annealing computes the gradient of an error function and 1P


uses this first derivative to find the global optimum.
The probability distribution of a variable in a Markov random field is
completely determined once all neighboring nodes are known and does 1P
not depend on nodes without direct connections.
Naive Bayes can be successfully applied, when dimensions of the
1P
feature space are not independent.

You might also like