1. Write a function to threshold your images separating the background from the foreground:
Implement the "peakiness" detection algorithm described in class. The output of your function should be a binary image with 0 for all background pixels, and 1 for all foreground pixels.
Apply this function to can.jpg and turn in the output image.
Note: Take a look at the list function in Matlab to compute the histogram. In case you have an RGB color image, the rgb2gray function can be used to convert it to gray scale.