Ask Your Question

Revision history [back]

getLinearRowFilter for floating rows

I have row kernel

cv::Mat kernel = (cv::Mat_<float> << -0.5, 0.0, 0.5)

And want filtering matrix with float values using not filter2D.

Founded interface BaseRowsFilter and function implemented this, getLinearRowFilter. I can use filter on uchar rows:

virtual void operator()(const uchar* src, uchar* dst,
                        int width, int cn) = 0;

But I want use this on floating values. Please prompt me, it is possible use single row kernel on floating values without FilterEngine? I think that if FilterEngine including BaseRowFilter and BaseColumnFilter, they calls with uchar row/column but for different types. Documentation of BaseRowFilers said:

While the filtering operation interface uses the uchar type, a particular implementation is not limited to 8-bit data.

Now I use FilterEngine with two kernels - my for rows and identity for columns. Thanks a lot!