CS 585 HW 1: Image input and output

The first assignment in CS 585 involved performing different operations on images with python. The two transformations I made to my selfie image were grayscale and blur.

Grayscale

I decided to convert my image from color to grayscale by looping through every pixel in the image and set each color channel's values as (Blue + Green + Red)/3. By taking the average of the color channels, this does a great job changing the image from color to grayscale

Blur

I decided to blur my image by looping through every pixel and take an average of all the surrounding pixels for each color channel, then set the original pixel to this averaged value. Through this action of averaging each pixel with all of its surrounding pixels, we see that it creates a nice blur effect after the algorithm runs a few times.

Results

Original Photo

Grayscale

Blur

Grayscale and Blur