Range Image Segmentation by Curve Grouping