Title: Automatic image segmentation and analysis with applications to diatom indentification