Computer Vision Flashcards

1
Q

How is pure white and pure black expressed as a image

A

Pure white = [255,255,255]

Pure black = [0,0,0]

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

How to select x and y values of an image. Also how to copy an image

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

How to create a color threshold

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

How to interpret the following code

A

Since all thresholds are at 0, nothing is changed to black. However, changing the thresholds to 200 would change many pixels to black, leaving the white pixels alone.

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

Where is X=0 and Y=0 in image processing

A

upper left. The x values go right, the y values go down

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

Explain region of interest

A

Assuming camera is fixed and front facing, a certain region of interest should identify the lane lines while blacking everything else out. Can you any type of polygon to identify region, but triangle is most basic

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

how do you draw lines(perform linear fit) between different x,y coordinates

A

np.polyfit takes as input a tuple of x values, then a tuple of y values, and the degree polynomial. The x and y values correspond to the origin and destination coordiantes you are connecting

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

how to do find the coordinates between the lines drawn with np.polyfit

A

run np.meshgrid the size of the image. This just creates a grid of x,y coordinates(pixels). Then use a predicate filter(with AND operator) to grab the pixels that meet a certain criteria. In this example, the filter looks for y values greater than far left and right lines AND less than the bottom line. Rememeber y values increase as you move down and image from the upper left.

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

What is this line equivalent to?

A

Y = mx +b

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

How to color image pixels once you’ve identified a region threshold

A
  • Region_select = copy of image
  • Region threshold = all the pixels that met the filter criteria.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

How to interpret this line

A
  1. Color all pixels black if its meets our color threshold OR falls outside the region of interest. Basically, some pixels that didn’t meet our color threshold will turn black becuase they are outside the region of interest.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Interpret this line

A
  1. Color threshold refers to the black areas. So not color threshold is al lthe white areas. Combing all the white areas with the region threshold gives you the lines.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Who developed edge detection algorithm

A

John Canny in 1986

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

Whats the goal of edge detection

A

find the boundaries of an object in an image

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

What does the brightness of the pixel represent in canny edge detection

A

the strength of the gradient at that point. The gradient is how different are the values adjacent pixels. Bright = big difference(big gradient). Black = low difference(low gradient)

17
Q

how to read an image in matplot

A
18
Q

how to convert an image to grayscale

A
19
Q

describe the Open CV canny edge function

A
  1. detect strong edge pixels (strong gradient) above the high_threshold, and reject pixels below the low_threshold.
  2. pixels with gradients between the low_threshold and high_threshold will be included as long as they are connected to strong edges.
  3. The output edges is a binary image with white pixels tracing out the detected edges and black everywhere else.

Thresholds are gradient thresholds

20
Q

Why run gaussian smoothing before running the canny edge detection function

A

First, canny edge already has the gaussian smoothing embedding in the function but its not a parameter. The gaussian smoothing suppresses noise and spurious gradients. It replaces each pixel with a weighted average of adjacent pixels. The weights are choosen from a Gaussian distribution, hence the name Gaussian smoothing.

21
Q

Why use an odd size kernel when performing guassian smoothing

A

odd sized filter replaces each pixel with a weighted sum of pixels around it(there is always a middle pixel). This preserves the location of objects in the image. If you use an even sized filter then there will be a lateral shift

22
Q

Explain Hough Space vs Image Space

A

In image space, a line is plotted as x vs. y. In 1962, Paul Hough devised a method for representing lines in parameter space(the values we need to find to build a line), which we will call “Hough space” in his honor.

In Hough space, I can represent my “x vs. y” line as a point in “m vs. b” instead. So, the characterization of a line in image space will be a single point at the position (m, b)

23
Q

Describe parallel lines in Hough space

A

Parallel lines have the same slope, which is to say, the same “m” parameter in our line model. So, in parameter space, two parallel lines would be represented by two points at the same m value, but different b values.

Answer = C

24
Q

What does a point in image space relate to in Hough Space

A

A single point in image space has many possible lines that pass through it, but not just any lines, only those with particular combinations of the m and b parameters. When plotting this particular m and b parameters in hough space, they form a line.

25
Q

Two points in image space correspond what in Hough Space

A

Two points in image space correspond to two lines in Hough Space. Not only that, but these lines must intersect… why

26
Q

now we have two intersecting lines in Hough Space. How would you represent their intersection at the point (m0, b0) in image space?

A

The intersection point at (m0, b0) represents the line y = m0x + b0 in image space and it must be the line that passes through both points!

27
Q

How to find lines in image space?

A
  1. Find edges using canny detection
  2. Every point in edge detect image is consdered a line in Hough Space.
  3. Look for intersecting lines in Hough Space. Divide Hough space into grid and define intersecting lines as all lines passing a given grid cell.
28
Q

Afte polarizing the coordinates, what does each point(or line of points) in image space coordiante to?

A

a since curve(s) in Hough Space. Interesection of sine curves indicates a line

29
Q

Whats the function to run Hough Transform on an image and describe the parameters

A
30
Q

what is the problem with vertical lines in m,b representation and how do you account for that?

A

They have an infinite slope(1/0 = error), meaning you can’t plot that line in M,B representation. Thus, you need to redefine the line in polar coordinates( P pronounced “Row”, spelled “Rho” and Theta)

31
Q

Using Polar Coordinates, what does each point in image space correpsond to in Hough Space

A

A Sine Curve

32
Q

what does image.shape() return

A

a tuple of row, columns, channels.

When creating vertices, you combine this logic with x,y values of an array. image.shape[0] is the y value, image.shape[1] is the x value