non-local-means: improve performance of patch projection