Source: https://www.lirmm.fr/~strauss/MasterImage/Bases/TP-Image.pdf