Image Thresholding and segmentation (Adaptive  Approach)