42 #include <pcl/ml/pairwise_potential.h>
62 Eigen::aligned_allocator<Eigen::Vector3i>> data);
67 Eigen::aligned_allocator<Eigen::Vector3i>> color);
74 const int feature_dimension,
84 float sx,
float sy,
float sz,
float sr,
float sg,
float sb,
float w);
88 std::vector<Eigen::Vector3i, Eigen::aligned_allocator<Eigen::Vector3i>>& coord,
89 std::vector<Eigen::Vector3f, Eigen::aligned_allocator<Eigen::Vector3f>>& normals,
99 inference(
int n_iterations, std::vector<float>& result,
float relax = 1.0f);
102 mapInference(
int n_iterations, std::vector<int>& result,
float relax = 1.0f);
106 const std::vector<float>& in,
108 float relax = 1.0f)
const;
116 map(
int n_iterations, std::vector<int> result,
float relax = 1.0f);
141 std::vector<Eigen::Vector3i, Eigen::aligned_allocator<Eigen::Vector3i>>
data_;
144 std::vector<Eigen::Vector3i, Eigen::aligned_allocator<Eigen::Vector3i>>
color_;
158 bool xyz_{
false}, rgb_{
false}, normal_{
false};
void getFeatures(int idx, std::vector< float > &features)
std::vector< float > tmp_
void runInference(float relax)
void setColorVector(const std::vector< Eigen::Vector3i, Eigen::aligned_allocator< Eigen::Vector3i >> color)
The associated color of the data.
DenseCrf(int N, int m)
Constructor for DenseCrf class.
~DenseCrf()
Deconstructor for DenseCrf class.
std::vector< Eigen::Vector3i, Eigen::aligned_allocator< Eigen::Vector3i > > data_
Data vector.
void setDataVector(const std::vector< Eigen::Vector3i, Eigen::aligned_allocator< Eigen::Vector3i >> data)
Set the input data vector.
void expAndNormalize(std::vector< float > &out, const std::vector< float > &in, float scale, float relax=1.0f) const
void expAndNormalizeORI(float *out, const float *in, float scale=1.0f, float relax=1.0f)
void addPairwiseGaussian(float sx, float sy, float sz, float w)
Add a pairwise gaussian kernel.
void setUnaryEnergy(const std::vector< float > unary)
std::vector< float > current_
std::vector< PairwisePotential * > pairwise_potential_
Pairwise potentials.
std::vector< Eigen::Vector3i, Eigen::aligned_allocator< Eigen::Vector3i > > color_
Color vector.
void addPairwiseBilateral(float sx, float sy, float sz, float sr, float sg, float sb, float w)
Add a bilateral gaussian kernel.
void mapInference(int n_iterations, std::vector< int > &result, float relax=1.0f)
void map(int n_iterations, std::vector< int > result, float relax=1.0f)
std::vector< float > unary_
CRF unary potentials.
void stepInference(float relax)
std::vector< float > runInference(int n_iterations, float relax)
void inference(int n_iterations, std::vector< float > &result, float relax=1.0f)
void addPairwiseNormals(std::vector< Eigen::Vector3i, Eigen::aligned_allocator< Eigen::Vector3i >> &coord, std::vector< Eigen::Vector3f, Eigen::aligned_allocator< Eigen::Vector3f >> &normals, float sx, float sy, float sz, float snx, float sny, float snz, float w)
std::vector< float > next_
void addPairwiseEnergy(const std::vector< float > &feature, const int feature_dimension, const float w)
void getBarycentric(int idx, std::vector< float > &bary)
#define PCL_MAKE_ALIGNED_OPERATOR_NEW
Macro to signal a class requires a custom allocator.
Defines functions, macros and traits for allocating and using memory.
Defines all the PCL and non-PCL macros used.