Clustering method and sine cosine algorithm for image segmentation