< Back

Lab 10: Images


Greyscale

In a file called grey.py, write a function called compute_greyscale(picture). This function should alter the pixels stored inside of the picture object, so that all three pixel values are averaged and set to that average. Your function should then display the greyscale picture.

Example

Before After

Hint


Photo Negative

In a file called negative.py, write a function called compute_negative(picture). This function should alter the pixels stored inside of the picture object, so that all three pixel values are their negated version. Your function should then display the negative picture.

Example

Before After

Hint