Example #1
0
void
pcl::gpu::KinfuTracker::getLastFrameNormals (DeviceArray2D<NormalType>& normals) const
{
  normals.create (rows_, cols_);
  DeviceArray2D<float8>& n = (DeviceArray2D<float8>&)normals;
  device::convert (nmaps_g_prev_[0], n);
}
Example #2
0
void
pcl::gpu::KinfuTracker::getLastFrameCloud (DeviceArray2D<PointType>& cloud) const
{
  cloud.create (rows_, cols_);
  DeviceArray2D<float4>& c = (DeviceArray2D<float4>&)cloud;
  device::convert (vmaps_g_prev_[0], c);
}
Example #3
0
 template<> PCL_EXPORTS void
 convertMapToOranizedCloud<pcl::Normal> (const RayCaster::MapArr& map, DeviceArray2D<pcl::Normal>& cloud)
 {
   cloud.create (map.rows()/3, map.cols());
   DeviceArray2D<float8>& n = (DeviceArray2D<float8>&)cloud;
   device::convert(map, n);
 }
Example #4
0
void pcl::gpu::people::colorizeLabels(const DeviceArray<pcl::RGB>& color_map, const DeviceArray2D<unsigned char>& labels, DeviceArray2D<pcl::RGB>& color_labels)
{
  color_labels.create(labels.rows(), labels.cols());

  const DeviceArray<uchar4>& map = (const DeviceArray<uchar4>&)color_map;
  device::Image& img = (device::Image&)color_labels;  
  device::colorLMap(labels, map, img);
}
Example #5
0
void
pcl::gpu::PseudoConvexHull3D::reconstruct (const Cloud &cloud, DeviceArray2D<int>& vertexes)
{
    const device::Cloud& c = (const device::Cloud&)cloud;

    device::FacetStream& fs = impl_->fs;
    device::PointStream ps(c);

    ps.computeInitalSimplex();

    device::InitalSimplex simplex = ps.simplex;

    fs.setInitialFacets(ps.simplex);
    ps.initalClassify();

    for(;;)
    {
        //new external points number
        ps.cloud_size = ps.searchFacetHeads(fs.facet_count, fs.head_points);
        if (ps.cloud_size == 0)
            break;

        fs.compactFacets();
        ps.classify(fs);

        if (!fs.canSplit())
            throw PCLException("Can't split facets, please enlarge default buffer", __FILE__, "", __LINE__);

        fs.splitFacets();
    }

    int ecount;
    int fcount = fs.facet_count;
    fs.empty_count.download(&ecount);

    vertexes.create(3, fcount + ecount);
    DeviceArray2D<int> subf(3, fcount, vertexes.ptr(),        vertexes.step());
    DeviceArray2D<int> sube(3, ecount, vertexes.ptr()+fcount, vertexes.step());

    DeviceArray2D<int>(3, fcount, fs.verts_inds.ptr(), fs.verts_inds.step()).copyTo(subf);
    DeviceArray2D<int>(3, ecount, fs.empty_facets.ptr(), fs.empty_facets.step()).copyTo(sube);
}
void MulticamFusion::getLastFrameCloud (DeviceArray2D<PointXYZ>& cloud) const{
	cloud.create (rows, cols);
	DeviceArray2D<float4>& c = (DeviceArray2D<float4>&)cloud;
	device::convert (vmaps_g_prev_, c);
}