Problem Building Examples
Closed this issue · 2 comments
pducks32 commented
Hi, great library but I haven't been able to build the examples I keep getting this error on my macOS Sierra, clang, MacBook pro.
error: use of undeclared identifier
'box_nbh2d'
auto nbh = box_nbh2d<vuchar3, 3, 3>(img);
Any help would be great. Thanks!
matt-42 commented
Sorry for this. I fixed the examples in my last commit d07727b
I made the access to the neighborhood less verbose :
pixel_wise(relative_access(img), out) | [] (auto n, auto& b) {
vint3 sum = vint3::Zero();
sum += n(0, -1).template cast<int>();
sum += n(0, 0).template cast<int>();
sum += n(0, 1).template cast<int>();
b = (sum / 3).cast<unsigned char>();
};
It is thanks to a full rewrite of pixel_wise, which is up to 2x faster on clang.
pducks32 commented
Thanks