41 #include <pcl/gpu/containers/device_array.h>
42 #include <pcl/gpu/utils/safe_call.hpp>
43 #include <pcl/gpu/people/label_common.h>
44 #include <pcl/gpu/people/tree.h>
67 Intr (
float fx_,
float fy_,
float cx_,
float cy_) :
fx(fx_),
fy(fy_),
cx(cx_),
cy(cy_) {}
71 cx =
cx > 0 ?
cx : cols/2 - 0.5f;
72 cy =
cy > 0 ?
cy : rows/2 - 0.5f;
127 CUDATree (
int treeHeight_,
const std::vector<Node>& nodes,
const std::vector<Label>& leaves);
159 std::cout <<
"[pcl::device::ProbabilityProc:ProbabilityProc] : (D) : Constructor called" << std::endl;
Processor using multiple trees.
void process(const Depth &dmap, Labels &lmap, int FGThresh)
same as process, but runs the trick of declaring as background any neighbor that is more than FGThres...
void processProb(const Depth &dmap, Labels &lmap, LabelProbability &prob, int FGThresh)
output a probability map from the RDF.
void process(const Depth &dmap, Labels &lmap)
MultiTreeLiveProc(int def_rows=480, int def_cols=640)
Constructor with default values, allocates multilmap device memory.
std::vector< CUDATree > trees
Implementation Class to process probability histograms on GPU.
int CUDA_GaussianBlur(const Depth &depth, LabelProbability &probIn, DeviceArray< float > &kernel, LabelProbability &probTemp, LabelProbability &probOut)
This will blur the input labelprobability with the given kernel, this version avoids extended allocat...
int CUDA_GaussianBlur(const Depth &depth, LabelProbability &probIn, DeviceArray< float > &kernel, LabelProbability &probOut)
This will blur the input labelprobability with the given kernel.
void CUDA_WeightedSumProb(const Depth &depth, LabelProbability &probIn, float weight, LabelProbability &probOut)
This will sum a probability multiplied with it's weight.
ProbabilityProc()
Default constructor.
void CUDA_CombineProb(const Depth &depth, LabelProbability &probIn1, float weight1, LabelProbability &probIn2, float weight2, LabelProbability &probOut)
This will combine two probabilities according their weight.
void CUDA_SelectLabel(const Depth &depth, Labels &labels, LabelProbability &probabilities)
This will merge the votes from the different trees into one final vote, including probabilistic's.
void smoothLabelImage(const Labels &src, const Depth &depth, Labels &dst, int num_parts, int patch_size, int depthThres)
void computeCloud(const Depth &depth, const Intr &intr, Cloud &cloud)
void colorLMap(const Labels &labels, const DeviceArray< uchar4 > &cmap, Image &rgb)
void mixedColorMap(const Labels &labels, const DeviceArray< uchar4 > &map, const Image &rgba, Image &output)
void computeHueWithNans(const Image &image, const Depth &depth, HueImage &hue)
float computeHue(int rgba)
void prepareForeGroundDepth(const Depth &depth1, Mask &inverse_mask, Depth &depth2)
Struct that holds a single RDF tree in GPU.
pcl::gpu::people::trees::Label Label
DeviceArray< Label > leaves_device
DeviceArray< Node > nodes_device
CUDATree(int treeHeight_, const std::vector< Node > &nodes, const std::vector< Label > &leaves)
static void computeEdges(const Labels &labels, const Depth &depth, int num_parts, float sq_radius, DeviceArray2D< unsigned char > &edges)
static void labelComponents(const DeviceArray2D< unsigned char > &edges, DeviceArray2D< int > &comps)
static void initEdges(int rows, int cols, DeviceArray2D< unsigned char > &edges)
static void prepareRect5x5Kernel(Kernel &kernel)
static void invoke(const Mask &src, const Kernel &kernel, Mask &dst)
Camera intrinsics structure.
void setDefaultPPIfIncorrect(int cols, int rows)
Intr(float fx_, float fy_, float cx_, float cy_)