Segmentation Of 2D And 3D Textures From Estimates Of The Local Orientation