Common algorithms for image processing