I am seeking a fast technique that computes local histograms for all the patches of an image. Here the patch is defined as an N by N window surrounding the pixel.
The paper 'Mikhail Sizintsev, Konstantinos G. Derpanis and Andrew Hogue. Histogram-based search: A comparative study' presents a multiscale histogram-based search algorithm 'the distributive histogram' that can be evaluated exhaustively in a fast and memory efficient manner.