Geometrical Transformations Flashcards

1
Q

How do you scale an image?

A

Take each point[X,Y]
and multiply it by

[sx,0]
[0,sy]

to give you the point
[sx(X), sy(Y)].

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How do you translate an image?

A

For each point [X,Y]

and translation [Tx,Ty]

[X,Y]+[Tx,Ty] =

[X+Tx,Y+Ty]

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

How would we perform both a scaling and transformation at the same time?

A

Use an augmented matrix,

append a 1 to the point vector:

[X,Y,1]

and to the scaling matrix add a column with the translation vector:

[Sx, 0 , Tx]
[0, Sy, Ty]

Multiply the two to get:

[Sx(X) + Tx]
[Sy(Y) + Ty]

However, we now are unable to multiply multiple transformation matrices, to fix this we add an extra row to our transformation matrix.

[Sx, 0 , Tx]
[0, Sy, Ty]
[0, 0, 1]

This gives us a homogeneous co-ordinate at the end, when we multiply the matrix with the point vector:

[Sx(X) + Tx]
(Sy(Y)+Ty]
[1]

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How would you reflect/flip an image?

A

Typically translate the image centre to the origin, and then scale along the relevant axis by -1. This can be encoded in a single transformation.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

This is how we transform an image

[X,Y,1]
*
[a, b, c]
[d, e, f]
[g, h, i]

=

[X’,Y’,1]

What are the different components of the transformation matrix (a-i) responsible for?

A

a,e = scaling
b,d = shearing
a,b,d,e = rotation
c,f = translation

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What are some distortions caused by the camera lens?

A

Barrel distortion
Pin Cushion distortion

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is the distortion matrix in OpenCV?

A

A single row matrix, used to store the distortion parameters for radial and tangential distortion.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What does Barrel Distortion do?

A

Barrel distortion makes the lines bend outwards?

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What does Pin Cushion distortion do?

A

Makes the lines bend inwards, like pulling the corners of the image.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What types of interpolation are there?

A

1D Interpolation:
- nearest neighbour
- Linear
- Cubic

2D Interpolation:
- nearest neighbour
- Bi-linear
- Bi-cubic

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

When rotating an image, some pixels in the source image may not be mapped to an integer index in the output image, how might we remedy this?

A

We can go through pixels in the output image and see which point would be mapped to it in the input image.

We can then perform some interpolation by looking at the neighbouring pixels to that point.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly