Edge preserved smoothing techniques have gained importance for the purpose of image processing applications. A good edge preserving filter is given by nonlocal-means filter rather than any other linear model based approaches. This paper explores a different approach of nonlocal-means filter by using robust M-estimator function rather than the exponential function for its weight calculation. Here the filter output at each pixel is the weighted average of pixels with surrounding neighborhoods using the chosen robust M-estimator function. The main direction of this paper is to identify the best robust M-estimator function for nonlocal-means denoising algorithm. In order to speed up the computation, a new patch classification method is followed to eliminate the uncorrelated patches from the weighted averaging process. This patch classification approach compares favorably to existing techniques in respect of quality versus computational time. Validations using standard test images and brain atlas images have been analyzed and the results were compared with the other known methods. It is seen that there is reason to believe that the proposed refined technique has some notable points.