In a recent work with Idan Ram and Israel Cohen we have proposed handling of elementary image processing tasks with novel algorithms that are based on patch ordering. The core idea is to extract all the overlapped patches from the image, and permute them to form the shortest path. Once ordered, one can apply simple 1D filtering methods to the resulting ordered values, and obtain highly effective results.
The work reported in this IEEE-TIP paper describes the very core idea behind this novel approach and demonstrates it for denoising and inpaining. We provide this freely available package, which contains all the Matlab code to reproduce the results in paper, along with a demonstration of the core idea of ordering and the regularity it leads to, which explains why this method works. A second Matlab package is also available, reproducing the results presented in our ICASSP-2013 paper, which treated the 1D ordered signal by the Non-Local-Means filter.