I want to implement non-local denoising of an image. The algorithm is to break the image into windows, then extract patches within windows and then compare the dissimlarity between patches to compute the weight matrix.
Can anyone please help me to implement the same using pytorch or tensorflow for single image?