Quantcast
Channel: OpenCV Q&A Forum - Latest question feed
Viewing all articles
Browse latest Browse all 19555

BaseRowFilter and BaseColumnFilter in opencv 3.x

$
0
0
I have some old code which I would like to use/port: template struct RowSum : public BaseRowFilter { RowSum( int _ksize, int _anchor ) { ksize = _ksize; anchor = _anchor; } void operator()(const uchar* src, uchar* dst, int width, int cn) { const T* S = (const T*)src; ST* D = (ST*)dst; int i = 0, k, ksz_cn = ksize*cn; width = (width - 1)*cn; for( k = 0; k < cn; k++, S++, D++ ) { ST s = 0; for( i = 0; i < ksz_cn; i += cn ) s += S[i]; D[0] = s; for( i = 0; i < width; i += cn ) { s += S[i + ksz_cn] - S[i]; D[i+cn] = s; } } } }; but apparently the `BaseRowFilter` and `BaseColumnFilter` classes are not public available anymore. Is there any way to bypass this restriction and make the above struct to work again as before? I found a kind of similar question [here](http://answers.opencv.org/question/43913/ptrfilterengine-ptrbaserowfilter-ptrbasecolumnfilter-in-opencv30-alpha/) by @wuling. So I do not know if @berak has any idea or if @wuling managed to find a workaround. Thanks.

Viewing all articles
Browse latest Browse all 19555

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>