void vm::scanner::cuda::computeNormalsAndMaskDepth(const Intr& intr, Depth& depth, Normals& normals)
{
  normals.create(depth.rows(), depth.cols());

  device::Reprojector reproj(intr.fx, intr.fy, intr.cx, intr.cy);

  device::Normals& n = (device::Normals&)normals;
  device::computeNormalsAndMaskDepth(reproj, depth, n);
}
Exemple #2
0
void kf::cuda::computeNormalsAndMaskDepth(const Intr& intr, Depth& depth, Normals& normals)
{
    normals.create(depth.rows(), depth.cols());

    impl::Reprojector reproj(intr.fx, intr.fy, intr.cx, intr.cy);

    impl::Normals& n = (impl::Normals&)normals;
    impl::computeNormalsAndMaskDepth(reproj, depth, n);
}
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);
}
Exemple #4
0
void kf::cuda::computePointNormals(const Intr& intr, const Depth& depth, Points& points, Normals& normals)
{
    points.create(depth.rows(), depth.cols());
    normals.create(depth.rows(), depth.cols());

    impl::Reprojector reproj(intr.fx, intr.fy, intr.cx, intr.cy);

    impl::Points& p = (impl::Points&)points;
    impl::Normals& n = (impl::Normals&)normals;
    impl::computePointNormals(reproj, depth, p, n);
}
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::renderImage(const Depth& depth, const Normals& normals, const Intr& intr, const Vec3f& light_pose, Image& image)
{
  image.create(depth.rows(), depth.cols());

  const device::Depth& d = (const device::Depth&)depth;
  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(d, n, reproj, light, i);
  waitAllDefaultStream();
}
Exemple #7
0
void kf::cuda::renderImage(const Points& points, const Normals& normals, const Intr& intr, const cv::Vec3f& light_pose, Image& image)
{
    image.create(points.rows(), points.cols());

    const impl::Points& p = (const impl::Points&)points;
    const impl::Normals& n = (const impl::Normals&)normals;
    impl::Reprojector reproj(intr.fx, intr.fy, intr.cx, intr.fy);
    impl::Vec3f light = device_cast<impl::Vec3f>(light_pose);

    impl::Image& i = (impl::Image&)image;
    impl::renderImage(p, n, reproj, light, i);
    waitAllDefaultStream();
}