Ask Your Question

Revision history [back]

Linear complexity median filter (such as OpenCV's 8-bit single and multichannel versions) is based on a moving histogram implementation. Naturally for floating point, there is none or it would be close to infinite sized histogram. Simplest workaround would be discretization - say - to 8-bit :) if that suits you.

You can follow one of these guidelines or just implement O(N^3) version yourself. The last N comes from the linear search using std::nth_element in a neighborhood of N^2.

Linear complexity median filter (such as OpenCV's 8-bit single and multichannel versions) is based on a moving histogram implementation. Naturally for floating point, there is none or it would be close to infinite sized histogram. Simplest workaround would be discretization - say - to 8-bit :) if that suits you.you. Or then increasing the number of bins in a custom way.

You can follow one of these guidelines or just implement O(N^3) version yourself. The last N comes from the linear search using std::nth_element in a neighborhood of N^2.