Abstract
Median filtering is a commonly used technique in smoothing and denoising applications. Based on the vector programming model of modern commodity graphics processing units (GPUs), which directly support for minmax operations, compare and select as fundamental instructions, we implemented the branchless vectorized median (BVM) filter proposed in reference [1] using NVIDIA's compute unified device architecture (CUDA). The BVM filter keeps track of a sorted array from which values are deleted and to which new values are inserted. Although it is of O(M2) computational complexity while other sort algorithms are of O(M ln M) computational complexity, at least for typical data, it may outperform other implementations. The mainly reason is that this algorithm is branchless, and it makes use of data-level parallelism thereby its runtime is data- independent and highly predictable. We describe some important criteria such as the memory layout for a fast accessing scheme and discuss the bottlenecks in the branchless vectorized median computation. We provide performance benchmarks in comparsion to other implementations, a median filter on GPUs based on comparing a pivot value to all values, and the same branchless vectorized median implementation on CPUs. The comparison uses constant data, linear data, and random data. The runtime of BVM is independent of the data and shows a factor up to 4.6 faster than the pivot median filter. Although the performance of CUDA-based BVM filter is roughly 25% slower compared to a CPU-based (8 cores) routine, it is still a cheaper solution for many applications. We also present some factors such as the array size, the number of arrays and the filter size that influence the total BVM performance. An application of median filter for ring artifacts reduction will be demonstrated. The processing time is up to 3.7 times faster than the optimized CPU-based (four cores) routine.
Talk to us
Join us for a 30 min session where you can share your feedback and ask us any queries you have
Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.