Computer Vision Flashcards
How is pure white and pure black expressed as a image
Pure white = [255,255,255]
Pure black = [0,0,0]
How to select x and y values of an image. Also how to copy an image

How to create a color threshold

How to interpret the following code

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.

Where is X=0 and Y=0 in image processing
upper left. The x values go right, the y values go down

Explain region of interest
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 do you draw lines(perform linear fit) between different x,y coordinates
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 to do find the coordinates between the lines drawn with np.polyfit
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.

What is this line equivalent to?

Y = mx +b
How to color image pixels once you’ve identified a region threshold
- Region_select = copy of image
- Region threshold = all the pixels that met the filter criteria.

How to interpret this line

- 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.
Interpret this line

- 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.
Who developed edge detection algorithm
John Canny in 1986
Whats the goal of edge detection
find the boundaries of an object in an image
What does the brightness of the pixel represent in canny edge detection
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)

how to read an image in matplot

how to convert an image to grayscale

describe the Open CV canny edge function
- detect strong edge pixels (strong gradient) above the high_threshold, and reject pixels below the low_threshold.
- pixels with gradients between the low_threshold and high_threshold will be included as long as they are connected to strong edges.
- The output edges is a binary image with white pixels tracing out the detected edges and black everywhere else.
Thresholds are gradient thresholds

Why run gaussian smoothing before running the canny edge detection function
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.
Why use an odd size kernel when performing guassian smoothing
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
Explain Hough Space vs Image Space
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)

Describe parallel lines in Hough space

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
What does a point in image space relate to in Hough Space

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.






