penguinV
penguinV copied to clipboard
Multithreading version of median filter
Median filter is extremely slow in initial implementation. A usage of existing function pool could greatly help to speed up it. Please have a look into function_pool.cpp
for function pool reference as well filtering.cpp
for median filter implementation.
In initial filter we need to expand a zone from where we could pick up pixels for calculations: if we have a ROI as input data we just need to slightly expand it to get accurate results on border pixels.
Timings of median filter for Raspberry Pi 3B:
[13/220] filtering_MedianFilter3x3::_2048... 897.1+/-43.1 ms [14/220] filtering_MedianFilter3x3::_1024... 225.3+/-18.46 ms [15/220] filtering_MedianFilter3x3::_512... 55.84+/-3.208 ms [16/220] filtering_MedianFilter3x3::_256... 14+/-0.7081 ms
I am interested on working on this issue
Cool. As I mentioned above we should modify original filter in a way that it copies image pixels on original image border only but for given ROI which is smaller than image size we should use all available pixels based on given filter size.
I'll make some changes in filters by probably moving them into different file location to have the support the structure for function pool.
Hi, @rummanwaqar . Do you have any progress on this issue? Do you need a help?
@ihhub Sorry I got very busy at work and will not be able to continue work on this issue
It's okay. Thanks for informing.