Source: https://bjpcjp.github.io/pdfs/math/vision_szeliski_2010.pdf