16-311 Introduction to Robotics |
|||
Main Schedule Homework Labs Links |
Lab 2: Vision |
|||||||
Challenge StatementCreate a MATLAB pipeline to take in images of known objects and determine the distance to these objects. Lab Goals
BackgroundPrinciples
One of the first techniques we discussed was thresholdiing. This enables us to take colored or grayscale image and reduce it down to a black-and-white thresholded version where each pixel is either a 0 or a 1. In order to create this result, we choose a pixel value (or perhaps a value for each of the colored channels in a pixel) and set all the pixels with a lower value than this threshold value to 0 (black if we assume lower numbers are closer to black) and all pixels with a higher value than this threshold value to 1. In order to pick this threhold value, we can use a histogram to visualize the distribution of pixel values. Here we see a simple example of a 9-pixel image and the accompanying histogram.
Based on this histogram, we may decide to threshold at 2, so any pixels greater than or eaqual to 2 are set to the high value. And any pixels less than 2 are set to 0.
Alternatively, we may see the lighter pixels as still valuable portions of the colored space and decide to threshold at 1, instead of 2.
Lab RequirementsThe specifications for Lab 2 are presented in the following document. This will be the most up-to-date resource for lab requirements. Lab 2 Writeup
Lab 2 Materials (0.5 GB Zip folder) |
|||||||
|