A programming of VC++ for image segmentation