Remote sensing image segmentation algorithm