In this talk, I will survey some recent developments of mathematical morphology on graphs. A specific focus will be made on some trees that can be built from an image or a dataset, how such trees can be seen as spaces of shapes, and how they can be linked to some classical optimization approaches common in computer vision. I will try as much as possible to hide the mathematical part and to concentrate on clarifying the underlying ideas.