Point Cloud Library (PCL)
1.15.1
Toggle main menu visibility
Loading...
Searching...
No Matches
people
include
pcl
gpu
people
probability_processor.h
1
/*
2
* Software License Agreement (BSD License)
3
*
4
* Copyright (c) 2011, Willow Garage, Inc.
5
* All rights reserved.
6
*
7
* Redistribution and use in source and binary forms, with or without
8
* modification, are permitted provided that the following conditions
9
* are met:
10
*
11
* * Redistributions of source code must retain the above copyright
12
* notice, this list of conditions and the following disclaimer.
13
* * Redistributions in binary form must reproduce the above
14
* copyright notice, this list of conditions and the following
15
* disclaimer in the documentation and/or other materials provided
16
* with the distribution.
17
* * Neither the name of Willow Garage, Inc. nor the names of its
18
* contributors may be used to endorse or promote products derived
19
* from this software without specific prior written permission.
20
*
21
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
24
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
25
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
26
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
27
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
28
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
29
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
31
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
32
* POSSIBILITY OF SUCH DAMAGE.
33
*
34
* @author: Koen Buys
35
*/
36
37
#pragma once
38
39
#include <
pcl/point_types.h
>
40
#include <pcl/console/print.h>
41
#include <pcl/gpu/containers/device_array.h>
42
#include <pcl/gpu/people/label_common.h>
43
44
#include <fstream>
45
#include <iostream>
46
#include <memory>
47
#include <sstream>
48
49
namespace
pcl
50
{
51
namespace
device
52
{
53
class
ProbabilityProc
;
54
}
55
56
namespace
gpu
57
{
58
namespace
people
59
{
60
class
PCL_EXPORTS
ProbabilityProcessor
61
{
62
public
:
63
using
Ptr
= shared_ptr<ProbabilityProcessor>;
64
using
ConstPtr
= shared_ptr<const ProbabilityProcessor>;
65
using
Depth
=
DeviceArray2D<unsigned short>
;
66
using
Labels
=
DeviceArray2D<unsigned char>
;
67
68
ProbabilityProcessor
();
69
70
/** \brief This will merge the votes from the different trees into one final vote, including probabilistic's **/
71
void
72
SelectLabel
(
const
Depth
& depth,
Labels
& labels,
pcl::device::LabelProbability
& probabilities);
73
74
/** \brief This will combine two probabilities according their weight **/
75
void
76
CombineProb
(
const
Depth
& depth,
77
pcl::device::LabelProbability
& probIn1,
78
float
weight1,
79
pcl::device::LabelProbability
& probIn2,
80
float
weight2,
81
pcl::device::LabelProbability
& probOut);
82
83
/** \brief This will sum a probability multiplied with it's weight **/
84
void
85
WeightedSumProb
(
const
Depth
& depth,
pcl::device::LabelProbability
& probIn,
float
weight,
pcl::device::LabelProbability
& probOut);
86
87
/** \brief This will create a Gaussian Kernel **/
88
float
*
89
CreateGaussianKernel
(
float
sigma,
90
int
kernelSize);
91
92
/** \brief This will do a GaussianBlur over the LabelProbability **/
93
int
94
GaussianBlur
(
const
Depth
& depth,
95
pcl::device::LabelProbability
& probIn,
96
DeviceArray<float>
&
kernel
,
97
pcl::device::LabelProbability
& probOut);
98
99
/** \brief This will do a GaussianBlur over the LabelProbability **/
100
int
101
GaussianBlur
(
const
Depth
& depth,
102
pcl::device::LabelProbability
& probIn,
103
DeviceArray<float>
&
kernel
,
104
pcl::device::LabelProbability
& probTemp,
105
pcl::device::LabelProbability
& probOut);
106
107
private
:
108
std::shared_ptr<pcl::device::ProbabilityProc> impl_;
109
110
};
111
}
112
}
113
}
pcl::device::ProbabilityProc
Implementation Class to process probability histograms on GPU.
Definition
internal.h:154
pcl::gpu::DeviceArray2D
DeviceArray2D class
Definition
device_array.h:188
pcl::gpu::DeviceArray
DeviceArray class
Definition
device_array.h:54
pcl::gpu::people::ProbabilityProcessor::ConstPtr
shared_ptr< const ProbabilityProcessor > ConstPtr
Definition
probability_processor.h:64
pcl::gpu::people::ProbabilityProcessor::GaussianBlur
int GaussianBlur(const Depth &depth, pcl::device::LabelProbability &probIn, DeviceArray< float > &kernel, pcl::device::LabelProbability &probTemp, pcl::device::LabelProbability &probOut)
This will do a GaussianBlur over the LabelProbability.
pcl::gpu::people::ProbabilityProcessor::Depth
DeviceArray2D< unsigned short > Depth
Definition
probability_processor.h:65
pcl::gpu::people::ProbabilityProcessor::Labels
DeviceArray2D< unsigned char > Labels
Definition
probability_processor.h:66
pcl::gpu::people::ProbabilityProcessor::SelectLabel
void SelectLabel(const Depth &depth, Labels &labels, pcl::device::LabelProbability &probabilities)
This will merge the votes from the different trees into one final vote, including probabilistic's.
pcl::gpu::people::ProbabilityProcessor::GaussianBlur
int GaussianBlur(const Depth &depth, pcl::device::LabelProbability &probIn, DeviceArray< float > &kernel, pcl::device::LabelProbability &probOut)
This will do a GaussianBlur over the LabelProbability.
pcl::gpu::people::ProbabilityProcessor::CreateGaussianKernel
float * CreateGaussianKernel(float sigma, int kernelSize)
This will create a Gaussian Kernel.
pcl::gpu::people::ProbabilityProcessor::CombineProb
void CombineProb(const Depth &depth, pcl::device::LabelProbability &probIn1, float weight1, pcl::device::LabelProbability &probIn2, float weight2, pcl::device::LabelProbability &probOut)
This will combine two probabilities according their weight.
pcl::gpu::people::ProbabilityProcessor::WeightedSumProb
void WeightedSumProb(const Depth &depth, pcl::device::LabelProbability &probIn, float weight, pcl::device::LabelProbability &probOut)
This will sum a probability multiplied with it's weight.
pcl::gpu::people::ProbabilityProcessor::ProbabilityProcessor
ProbabilityProcessor()
pcl::gpu::people::ProbabilityProcessor::Ptr
shared_ptr< ProbabilityProcessor > Ptr
Definition
probability_processor.h:63
pcl::kernel
Definition
kernel.h:46
point_types.h
Defines all the PCL implemented PointT point type structures.
pcl::device
Definition
device_array.h:315
pcl::device::LabelProbability
DeviceArray2D< prob_histogram > LabelProbability
Definition
label_common.h:264
pcl::gpu::people
Definition
bodyparts_detector.h:63
pcl::gpu
Definition
device_array.h:45
pcl
Definition
convolution.h:46