scipy.ndimage
2.6. Image manipulation and processing using Numpy and Scipy — Scipy lecture notes
https://scipy-lectures.org/advanced/image_processing/