Introduction Flashcards

1
Q

What is computer vision?

A

Computer vision is the study that has as goal to create software that can interpret images and give back information about what the image represents.

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

What is an image mathematically speaking?

A

An image is a function I(x,y) that gives back the intensity at position (x,y).

I: R² -> R, where R usually is a value in a discrete range e.g., [0, 255].

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

Name at least six uses of computer vision.

A

Optical Image Recognition (OCR) - Used to read characters from an image
Facial recognition - Used in cameras with smile shutters and to unlock your phone
Object recognition - Detect objects in images, can be used to detect theft in stores
3D modelling - Convert images into 3D models
Motion capture - Project images onto moving entities (Davy Jones in Pirates of the Caribbean)
Structure from motion - Turns a series of 2D images into 3D images
Smart cars - Computer vision is used in car collision detection systems
Sports - Detect who’s first at the finish line
Vision based interaction - Computer vision is used in the Wii controller and in Kinect
Security / Surveillance - Computer vision is used by security cameras to detect thieves
Medical imaging - Computer vision and augmented reality can help surgeons operate

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

Define a color image as a vector-valued function.

A

I(x,y) = [ r(x,y) g(x,y) b(x,y) ]

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

What is noise in an image mathematically speaking?

A

Noise is just like an image, a function, η(x,y). An image with noise can be defined as the sum of noise and the original image.

I’(x,y) = I(x,y) + η(x,y)

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

What is salt and pepper noise?

A

Salt and pepper noise as a function returns black and white pixels at random positions. The noise is sparsely distributed.

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

What is impulse noise?

A

Impulse noise as a function returns white pixels at random positions.

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

What is Gaussian noise?

A

Gaussian noise as a function returns intensities that are picked from a normal distribution.

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

What makes computer vision difficult?

A

Viewpoint - It’s difficult for computer vision algorithms to deal with objects seen from an unfamiliar angle.
Illumination - Light in different levels of brightness and from different angles can complicate the detection of features.
Scale - The distance between the camera and object can make the same object to be of different sizes.
Motion - Moving objects or cameras can complicate matters.
Intra class variation - The object you are looking for may appear in different colors or shapes (there are many car types for example).
Occlusion - There may be objects in front of the objects you are trying to identify.
Background clutter - The object you are looking for might disappear in the background if they look very similar (lack of contrast.
Local ambiguity - A feature may be present in multiple objects in an image.

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

What does sigma determine in the context of Guassian noise?

A

Sigma is the factor that gets multiplied with the Guassian kernel, a larger sigma value will result in more visible noise in the resulting image.

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

What does sigma determine in the context of a Guassian smoothening filter?

A

Sigma determines the standard deviation of the kernel, a larger sigma value will result in more blur in the resulting image.

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

Why are non-uniform Gaussian kernels preferred over uniform kernels when smoothening images?

A

When using a Gaussian kernel, the center pixel and most nearby pixels will contribute the most to the average. This will result in a smoother looking average or blur.

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

Give an example of a Gaussian kernel.

A

[ 1 2 1
2 4 2 * 1/16
1 2 1 ]

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

What is a linear operator?

A

An operator is linear if two properties hold:

Additivity: H( f1 + f2 ) = H( f1 ) + H( f2 )
Multiplicative scaling: H( a * f1 ) = a * H( f1 )

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

What’s the difference between cross-correlation (G = H ⊗ F) and convolution (G = H * F)?

A

Convolution is very similar to cross-correlation, but in convolution the kernel will get flipped by 180 degrees.

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

Would convolution and cross-correlation produce different results when using a box or Gaussian filter?

A

No, the results will be identical in this case. It does however matter when you’re dealing with derivatives.

17
Q

Name some mathematical properties of convolution.

A

Linear and shift invariant (filter behaves the same as long as the values are the same, location does not matter)
Commutative: f * g = g * f
Associative: (f * g) * h = f * (g * h)
Identity: f * e = f
Differentiation: d/dx (f * g) = df/dx * g

18
Q

If you have an image that has NxN pixels and a non-separable kernel with a size of WxW, what’s the time complexity of convolution?

Now suppose the kernel is separable, what would the time complexity be?

A

Non-separable: O(N^2 * W^2)
Separable: O(2 * W * N^2)

Why?

Consider that H is our kernel, which gets split up in a column vector C and row vector R:

H = C * R

Instead of one convolution we could now do two:

G = H * F = (C * R) * F = C * (R * F)

Each convolution has a complexity of W * N * N. Because we do two convolutions, R * F and C * (R * F), the complexity will be:

2 * W * N^2

19
Q

Imagine that you have to convolve an image using a kernel that aligns its top right cell with the top left cell of the image, how does this affect the output image compared to when the center cell of the kernel aligns with the top left cell of the image?

A

This is known as “full” convolution and will produce an image that is larger than the original.

“same” convolution (center cell first) results in an image of the same size as the original.

“valid” convolution (top left cell first) results in an image that is smaller than the original.

20
Q

When convolving, in order to deal with the boundaries, you might have to add an edge around the image. Name some methods to deal with the boundaries.

A

Clip filter - make the edges black. [ leaches in black in the resulting image :/ ]
Wrap around - top left pixel is bottom right pixel and so forth. [ even worse :( ]
Copy edge - replicates the adjacent pixels. [ pretty good :) ]
Reflect - mirror the pixels adjacent. [ best method :D ]

21
Q

What does the following image filter do?

[ 0 0 0
0 1 0
0 0 0 ]

A

It gives back the original image.

22
Q

What does the following image filter do?

[ 0 0 0
0 0 1
0 0 0 ]

A

It gives back the image, but it is shifted to the left by one pixel.

23
Q

What does the following image filter do?

[ 1 1 1
1 1 1 * 1/9
1 1 1 ]

A

It gives back a blurred version of the image.

24
Q

What does the following image filter do?

[ 0 0 0 [ 1 1 1
0 2 0 - 1/9 * 1 1 1
0 0 0 ] 1 1 1 ]

A

It gives back a sharpened version of the image.

image + (image - blurred_image)

25
Q

What non-linear filter could be used to remove salt and pepper noise?

A

A median filter could be used for this which iterates through the pixels, sorts the pixels around the current pixel and replaces the current pixel in the output image with the median.

26
Q

What are the four causes of edges in images?

A

Edges come from rapid changes in intensity in the image, the causes are the following four:

Surface normal discontinuity - changes in shape.
Depth discontinuity - for example, contrast between the object and background.
Illumination discontinuity - shadows.
Surface color discontinuity - changes in color.

27
Q

Formula for gradient direction.

A

Ø = arctan( df/dy / df/dx )

28
Q

Formula for gradient magnitude.

A

|| ∇f || = sqrt ( (df/dx)^2 + (df/dy)^2 )

29
Q

Define the Sobel operator.

A

[ -1 0 1 [ 1 2 1

  • 2 0 2 * 1/8 0 0 0 * 1/8
  • 1 0 1 ] -1 -2 -1 ]Sx Sy

+ Reduces noise the same time as it differentiates.
+ Center pixels contribute more.

30
Q

Define the Prewitt operator.

A

[ -1 0 1 [ 1 1 1

  • 1 0 1 0 0 0
  • 1 0 1 ] -1 -1 -1 ]Sx Sy
31
Q

Define Roberts operator.

A

[ 0 1 [ 1 0
-1 0 ] 0 -1 ]

Sx Sy

32
Q

Define a Laplacian operator.

A

[ 0 -1 0 [ -1 -1 -1
-1 4 -1 -1 8 -1
0 -1 0 ] -1 -1 -1 ]

Two examples of Laplacian operators.

  • Sensitive to noise.
    + Calculates the 2nd derivative in one pass.
33
Q

How does the canny edge operator work?

A
  1. Filter the image using the derivative of a Gaussian.
  2. Find the magnitude and orientation of the gradients.
  3. Non maximum suppression: Thin the multi-pixel wide ridges down to a single pixel width.
  4. Linking and thresholding: Define a low and high threshold, use the high threshold to start an edge and the low threshold to continue them.
34
Q

What is Hough transform used for and on what principle is it built?

A

Hough transform is used to find lines from a set of edge pixels. It is based on the principle of voting.

35
Q

What does a line in image space correspond to in Hough space?

A

A line in image space corresponds to a point in Hough space.

36
Q

What does a point in image space correspond to in Hough space?

A

A point in image space corresponds to a line in Hough space.

y = mx + b => b = -xm + y

37
Q

What is the equation used to represent points from image space in Hough space? Why do we represent lines in this form? What is the result in Hough space?

A

Hesse normal form:

d = x * cos(Ø) + y * sin(Ø)

d: the perpendicular distance from the line to the origin.
Ø: angle that the perpendicular makes with the x-axis.

This is a way of dealing with infinite slopes, 0 < Ø < π.

The result in Hough space is a sinusoid segment.

38
Q

Define the basic Hough transform algorithm.

A
  1. Intialize the accumulator array H[d, Ø] = 0.
  2. For each edge point E(x,y) in the image:
    For Ø = 0 to 180:
    d = x * cos(Ø) - y * sin(Ø)
    H[d, Ø] += 1
  3. Find the values (d, Ø) where H[d, Ø] is maximum.
  4. The detected line in the image is given by: d = x * cos(Ø) - y * sin(Ø)
39
Q

Define the principle steps of SIFT.

A
  1. Scale space peak selection (find potential features):

Blur the image a bunch of times by applying a Gaussian filter to the image with different but increasing sigma values (sigma determines the variance of the normal distribution in the kernel). The blurred images are stored in a stack and the Difference of Gaussian (DoG) between each two consecutive blurred images (subtract them from each other). DoG is a fast approximation of the NLoG operator (Normalized Laplacian of Guassian).

Extract the extrema by sliding a 3x3x3 window over the DoGs and store the largest value in the window.

  1. Key point localization (get rid of the weak extrema):

Remove the extrema that don’t meet a chosen threshold to obtain the actual feature points.

  1. Orientation assignment:

Calculate the X and Y gradient using Sobel or a similar method. Once the gradients are calculated, the angle of each pixel in the features can be calculated using: v = arctan( dI/dy / dI/dx ). Each feature can be assigned a principle orientation, by selecting the most frequent angle in the feature.

  1. Key point descriptor (create a signature of the feature):

Create signatures of the points by splitting the feature up in four quadrants, create a frequency array of the angles for each quadrant and concatenate the arrays. This big multidimensional is the descriptor that is used in matching.