Ask Your Question
0

cv::sepFilter2D in one dimension?

asked 2018-08-21 03:51:48 -0600

enxdtw gravatar image

Hi,

Can sepFilter2D also just do a filter in X or Y but not in both. It would be useful if it could (think the law texture kernels).

Cheers

Dave

edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted
0

answered 2018-08-22 06:32:55 -0600

kbarni gravatar image

AFAIK there is no 1D convolution filter (horizontal or vertical) in OpenCV.

However it is easy to implement using three for loops (two to go through the pixels, one for the sum of the products).

edit flag offensive delete link more

Comments

Sure, I did it myself, but with OpenCV there would be some optimisation, boundary handling, maybe GPU implementation, plus it's a pretty obvious missing feature.

enxdtw gravatar imageenxdtw ( 2018-08-22 10:32:04 -0600 )edit

there was a FilterEngine, with row and col filters, but it was removed from the public api (to enable more gpu optimizations, i guess)

berak gravatar imageberak ( 2018-08-25 01:35:25 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2018-08-21 03:51:48 -0600

Seen: 879 times

Last updated: Aug 22 '18