Leaf segmentation invariant of the background