Source: https://hugues-talbot.github.io/files/04_Segmentation.pdf