code for image processing lecture