40 #ifndef PCL_DENSE_CRF_H_ 41 #define PCL_DENSE_CRF_H_ 43 #include <pcl/point_cloud.h> 46 #include <pcl/ml/pairwise_potential.h> 68 setDataVector (
const std::vector<Eigen::Vector3i, Eigen::aligned_allocator<Eigen::Vector3i> > data);
73 setColorVector (
const std::vector<Eigen::Vector3i, Eigen::aligned_allocator<Eigen::Vector3i> > color);
76 setUnaryEnergy (
const std::vector<float> unary);
80 addPairwiseEnergy (
const std::vector<float> &feature,
const int feature_dimension,
const float w);
87 addPairwiseGaussian (
float sx,
float sy,
float sz,
float w);
93 addPairwiseBilateral (
float sx,
float sy,
float sz,
94 float sr,
float sg,
float sb,
99 addPairwiseNormals (std::vector<Eigen::Vector3i, Eigen::aligned_allocator<Eigen::Vector3i> > &coord,
100 std::vector<Eigen::Vector3f, Eigen::aligned_allocator<Eigen::Vector3f> > &normals,
101 float sx,
float sy,
float sz,
102 float snx,
float sny,
float snz,
107 inference (
int n_iterations, std::vector<float> &result,
float relax = 1.0f);
110 mapInference (
int n_iterations, std::vector<int> &result,
float relax = 1.0f);
113 expAndNormalize (std::vector<float> &out,
const std::vector<float> &in,
114 float scale,
float relax = 1.0f);
117 expAndNormalizeORI (
float* out,
const float* in,
float scale=1.0f,
float relax=1.0f );
118 void map (
int n_iterations, std::vector<int> result,
float relax=1.0f );
119 std::vector<float> runInference(
int n_iterations,
float relax );
120 void startInference();
121 void stepInference(
float relax );
125 runInference (
float relax);
129 getBarycentric (
int idx, std::vector<float> &bary);
132 getFeatures (
int idx, std::vector<float> &features);
142 std::vector<Eigen::Vector3i, Eigen::aligned_allocator<Eigen::Vector3i> >
data_;
145 std::vector<Eigen::Vector3i, Eigen::aligned_allocator<Eigen::Vector3i> >
color_;
162 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
std::vector< float > current_
std::vector< PairwisePotential * > pairwise_potential_
pairwise potentials
int N_
Number of variables and labels.
std::vector< float > tmp_
std::vector< Eigen::Vector3i, Eigen::aligned_allocator< Eigen::Vector3i > > color_
Color vector.
Defines all the PCL implemented PointT point type structures.
std::vector< float > unary_
TODO: double might use to much memory.
std::vector< Eigen::Vector3i, Eigen::aligned_allocator< Eigen::Vector3i > > data_
Data vector.
std::vector< float > next_