Point Cloud Library (PCL)
1.9.1
gpu
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
#ifndef PCL_GPU_PROBABILITY_PROCESSOR_H_
38
#define PCL_GPU_PROBABILITY_PROCESSOR_H_
39
40
#include <iostream>
41
#include <sstream>
42
#include <fstream>
43
44
#include <
pcl/point_types.h
>
45
#include <pcl/console/print.h>
46
#include <pcl/gpu/containers/device_array.h>
47
#include <pcl/gpu/people/label_common.h>
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
typedef
boost::shared_ptr<ProbabilityProcessor>
Ptr
;
64
typedef
DeviceArray2D<unsigned short>
Depth
;
65
typedef
DeviceArray2D<unsigned char>
Labels
;
66
67
ProbabilityProcessor
();
68
69
/** \brief This will merge the votes from the different trees into one final vote, including probabilistic's **/
70
void
71
SelectLabel (
const
Depth
& depth,
Labels
& labels,
pcl::device::LabelProbability
& probabilities);
72
73
/** \brief This will combine two probabilities according their weight **/
74
void
75
CombineProb (
const
Depth
& depth,
76
pcl::device::LabelProbability
& probIn1,
77
float
weight1,
78
pcl::device::LabelProbability
& probIn2,
79
float
weight2,
80
pcl::device::LabelProbability
& probOut);
81
82
/** \brief This will sum a probability multiplied with it's weight **/
83
void
84
WeightedSumProb (
const
Depth
& depth,
pcl::device::LabelProbability
& probIn,
float
weight,
pcl::device::LabelProbability
& probOut);
85
86
/** \brief This will create a Gaussian Kernel **/
87
float
*
88
CreateGaussianKernel (
float
sigma,
89
int
kernelSize);
90
91
/** \brief This will do a GaussianBlur over the LabelProbability **/
92
int
93
GaussianBlur(
const
Depth
& depth,
94
pcl::device::LabelProbability
& probIn,
95
DeviceArray<float>
&
kernel
,
96
pcl::device::LabelProbability
& probOut);
97
98
/** \brief This will do a GaussianBlur over the LabelProbability **/
99
int
100
GaussianBlur(
const
Depth
& depth,
101
pcl::device::LabelProbability
& probIn,
102
DeviceArray<float>
&
kernel
,
103
pcl::device::LabelProbability
& probTemp,
104
pcl::device::LabelProbability
& probOut);
105
106
private
:
107
boost::shared_ptr<pcl::device::ProbabilityProc> impl_;
108
109
};
110
}
111
}
112
}
113
114
#endif // PCL_GPU_PROBABILITY_PROCESSOR_H_
pcl
This file defines compatibility wrappers for low level I/O functions.
Definition:
convolution.h:45
point_types.h
pcl::gpu::DeviceArray2D< unsigned short >
pcl::gpu::people::ProbabilityProcessor::Labels
DeviceArray2D< unsigned char > Labels
Definition:
probability_processor.h:65
pcl::gpu::people::ProbabilityProcessor
Definition:
probability_processor.h:60
pcl::gpu::DeviceArray< float >
pcl::gpu::people::ProbabilityProcessor::Ptr
boost::shared_ptr< ProbabilityProcessor > Ptr
Definition:
probability_processor.h:63
pcl::gpu::people::ProbabilityProcessor::Depth
DeviceArray2D< unsigned short > Depth
Definition:
probability_processor.h:64
pcl::kernel
Definition:
kernel.h:45