void vm::scanner::cuda::renderImage(const Cloud& points, const Normals& normals, const Intr& intr, const Vec3f& light_pose, Image& image) { image.create(points.rows(), points.cols()); const device::Points& p = (const device::Points&)points; const device::Normals& n = (const device::Normals&)normals; device::Reprojector reproj(intr.fx, intr.fy, intr.cx, intr.fy); device::Vec3f light = device_cast<device::Vec3f>(light_pose); device::Image& i = (device::Image&)image; device::renderImage(p, n, reproj, light, i); waitAllDefaultStream(); }
void vm::scanner::cuda::resizePointsNormals(const Cloud& points, const Normals& normals, Cloud& points_out, Normals& normals_out) { points_out.create (points.rows()/2, points.cols()/2); normals_out.create (normals.rows()/2, normals.cols()/2); device::Points& pi = (device::Points&)points; device::Normals& ni= (device::Normals&)normals; device::Points& po = (device::Points&)points_out; device::Normals& no = (device::Normals&)normals_out; device::resizePointsNormals(pi, ni, po, no); }