C++ - how to apply separate filter

unless this is some school assignment, you should not write loops.
instead, use sepFilter2D()