Adaptive Selection of Search Region for NLM Based Image Segmentation