Source: http://biomisa.org/wp-content/uploads/2018/10/DIP-python.pdf