Tuesday, February 22, 2011

Assignment 1

This is my submission for Assignment 1. The full write up and complete results will be submitted to the professor directly. I'll post the full results once they've been graded and such.



Assignment Requirements

The requirements: PDF

Part 1: The original images

The following are the images, before any sort of manipulation.
 







Part 2: Edge Detection

For this, the professor gave us some simple matlab code. The basic algorithm is as follows:
  1. Smooth the image, using a Binomial estimation of a Gaussian filter. 
  2. Calculate the gradient of the image.  This will generate a magnitude and a direction of the gradient at each pixel. 
  3. Apply a nonmaxima suppression step to thin the
    edges to single pixel wide edges
  4. Run Hysteresis threshold.






Histogram

The last step was to generate a histogram for each image. Essentially this is a count of all of the colors in the image. To process, I performed the following steps:
  1.  On the red channel, I shift the bits to the right 4, and then to the left 8. (Roughly equivalent to dividing by 16 and then multiplying by 256)
  2. On the green channel, I shifted thebits to the right 4. (Roughly equivalent to dividing by 16).
  3. On the blue channel, I shifted the bits to the right 4, and then to the left 4. (Roughly equivalent to dividing by 16).
  4. Sum the result of all of the bit shifts above (red+blue+green).  All values of the pixels will be between 0-4095. 
  5. Plot the counts.