Homework Files

Inside the homework3 folder in your JupyterHub you’ll find a number of files:

  • blur_image.py: a partial Python program that you will complete.
  • utils.py: a collection of functions to help build the program. While you are welcome to explore the functions in here, doing so is not necessary to complete this assignment.
  • images: a directory which contains some black and white images for you to process.
  • test_grids: a directory which contains some very small black and white images stored as text files in CSV (comma-separated values) format.
  • test_blur_image.py: a Python program to test and partially validate that your blur_image.py program produces expected results.

While passing all of the tests in test_blur_image.py (i.e., if you see the “All tests passed!” message after running) is a strong indication of having completed the required components for this assignment, it is not a guarantee that you will receive full credit. See more details in the full assignment specification.

Homework 3 file directory in JupyterHub

You will work on this assignment by modifying blur_image.py and submitting the modified version. This is the only file that we expect you to modify and submit.

Running the Program

Similar to Homework 2, for this assignment you will run your program in the terminal in JupyterHub. Open blur_image.py and open a terminal in the homework3 directory. You can run the program by typing in the following command:

python blur_image.py images/Husky.png

Once you have finished the assignment, you will also see two newly created files in the current directory:

  • Husky_blurry.png: a blurred version of the original Husky.png
  • Husky_blurry_grid.txt: a text file containing the integer contents of the blurred grid. The integers are in CSV (comma separated value). This file will be useful for debugging your program.

If you haven’t yet completed the assignment, you will NOT see these files.

The .png file can be opened directly on JupyterHub and should appear slightly blurred.

The only thing you need to make sure at this point is that the blur_image.py file runs correctly and you get this output:

Initial Homework 3 output with the terminal output: "Welcome to the CSE 160 Image Blurring program! Reading image images/Husky.png Program done.


Now you’re ready to get started with your image blurring implementation! Take a look at the assignment specifications for next steps.