I am working on 2D median filter with IPP. But the 2D median filter function I wrote is too slow.
First of all, the outcome 2D image is correct verified with Matlab. But I compare the processing time between Matlab 2D median filter (medfilt2) and ippiFilterMedian_32f_C1R (which is the function I used). For a image with size 273 by 101, Matlab only needs about 0.32 second. But my code will need 38 seconds.
Can someone help me solve this problem?
Here is my code. In the main function, first, I assign random numbers to a 2D image. Then I apply the 2D median filter. The date type of my 2D input and output image is Ipp32f. The filter mask size is 31 by 31.