Automatic multilevel image segmentation based on fuzzy reasoning