code updates to python image processing