A FAST WEIGHTED MEDIAN ALGORITHM BASED ON QUICKSELECT

Abstract:

Weighted median filters are increasingly being used in signal processing applications and thus fast implementations are of importance. This paper introduces a fast algorithm to compute the weighted median of N samples which has linear time and space complexity as opposed to O(N logN) which is the time complexity of traditional sorting algorithms. The proposed algorithm is based on Quickselect which is closely related to the well known Quicksort. We compare the runtime and the complexity to Floyd and Rivest’s algorithm SELECT which to date has been the fastest median finding algorithm and show that our algorithm is up to 30% faster.


Download the C++ code. It is licensed under the MIT license.


Contact: rauh@udel.edu