Segmentation and feature analysis of medical images for cell abnormalities and cancer detection