void vm::scanner::cuda::computePointNormals(const Intr& intr, const Depth& depth, Cloud& points, Normals& normals) { points.create(depth.rows(), depth.cols()); normals.create(depth.rows(), depth.cols()); device::Reprojector reproj(intr.fx, intr.fy, intr.cx, intr.cy); device::Points& p = (device::Points&)points; device::Normals& n = (device::Normals&)normals; device::computePointNormals(reproj, depth, p, n); }
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); }
void pcl::gpu::PseudoConvexHull3D::reconstruct (const Cloud &points, Cloud &output) { DeviceArray2D<int> vertexes; reconstruct(points, vertexes); DeviceArray<int> cont(vertexes.cols() * vertexes.rows()); DeviceArray2D<int> buf(3, vertexes.cols(), cont.ptr(), vertexes.cols() * sizeof(int)); vertexes.copyTo(buf); size_t new_size = device::remove_duplicates(cont); DeviceArray<int> new_cont(cont.ptr(), new_size); output.create(new_size); const device::Cloud& c = (const device::Cloud&)points; device::Cloud& o = (device::Cloud&)output; device::pack_hull(c, new_cont, o); }