Now you’ve seen that corners are good unique features that can help identify certain points on an object. And this is a great example of how object structure and image gradients can be useful in feature recognition. But if we’re interested not only in feature points like corners, but in whole object detection, we have to look at distinct sets of features often called “feature vectors.” And in fact, if you look at the direction of multiple gradients around the center point in an image, you can get a feature vector that makes for a robust representation of the shape of an object. Let’s look at a few simple examples to better understand this idea. Take this trapezoid and its corresponding gradient which is just an edge detected image. If we break this image up into a grid of cells and look at the direction of the gradient in each cell with respect to the center of the trapezoid, we can then flatten this data and create a 1D array. This is a feature vector, and in this case it’s a vector of gradient directions. We can do the same thing for other shapes like this circle taking the gradient and calculating the direction of the gradient in each grid cell, and we get a different feature vector for each shape. These two feature vectors exactly represent these two shapes, but ideally to accurately identify any circle or trapezoid at different sizes or from different perspectives, these vectors should allow for enough flexibility to detect some variation in these shapes while remaining distinct enough to be able to distinguish different shapes. Next, we’ll talk about some common feature detection methods that allow for this flexibility, and use patterns in image gradients to recognize different objects.