BaseRowFilter and BaseColumnFilter in opencv 3.x
I have some old code which I would like to use/port:
template<typename T, typename ST> 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 by @wuling. So I do not know if @berak has any idea or if @wuling managed to find a workaround. Thanks.
same problem with levenberg-marquardt code. My answer is copy code in your own code
I see, thanks Laurent ;-)
Ok I copied the classes from here but now I am getting a strange error of:
any idea?
I am sorry that it is the same question:)
I don't know how to use (still working and steerable pyramid) but I can compile this source code and link.
@wuling did you manage to make it work, in your case?
@LBerger, Laurent I can compile your code without problem as well but if I try this code I get the error I mention above. Can you try my code and tell me if that is the case for you as well. Thanks in advance.
only 5 link errors :
so you also have the problem...
@theodore now it's ok for compile and link. I have to copy other function and I don't use namespace cv. Becarefull all functions are here but some are empty : you have to copy and replace mat with cv::mat...