Here is the original picture of me at the Met. (See the little sticker on my jacket?) I cropped the photo for faster processing, so unfortunately you can no longer see the beautiful Roman statue that was sitting next to me.
Here is the grayscale image that was produced after I processed the original picture.
My algorithm involved going through each pixel's rgb values and taking the maximum value from the three values. I then set the other two non-maximum values to this maximum value. This produces a shade of gray while still preserving the relative contrast between pixels (as the rgb color with the highest value is what is most visible to the eye).
Here is the blurred image that was produced after I processed the grayscale image.
My algorithm involved going through every pixel (except for edge and corner pixels) and changing each pixel's rgb values to the average rgb value of its surrounding pixels. Since the input was a grayscale image and the desired output was also grayscale, I only had to take the first value in the rgb list. Note: To prevent an overflow error when averaging rgb values (which have a maximum of 255), the values must be converted to integer type.