efficiency of Filter2D and sepFilter2D

asked 2015-08-19 20:31:24 -0600

Anna Lucia gravatar image

Theoretically, the sepFilter is faster than Filter. But, the results in my tests show that the Filter2D is about 4 times faster than the sepFilter2D. I tested the two functions in CPU,with the same kernel radius size.

edit retag flag offensive close merge delete

Comments

I think this is an interesting issue. Could you provide some basic code to reproduce the benchmark results?

tuannhtn gravatar imagetuannhtn ( 2015-08-20 02:07:08 -0600 )edit

I think that it depends on an internal optimization that might exist with one of the functions. However, for that you will need to dig into the source code and clarify it, but most likely my guess is that this is the case.

theodore gravatar imagetheodore ( 2015-08-20 08:45:08 -0600 )edit

how large is your kernel ? (i.e. filter2d uses dct for k>11)

berak gravatar imageberak ( 2015-08-21 00:20:49 -0600 )edit

The radius of the kernel is 3 for both cases. And I've tested both CPU and GPU.

Anna Lucia gravatar imageAnna Lucia ( 2015-08-24 22:36:13 -0600 )edit