7 #ifndef NUKLEI_POSE_ESTIMATOR_H
8 #define NUKLEI_POSE_ESTIMATOR_H
16 #define NUKLEI_POSE_ESTIMATOR_POLYMORPHIC
20 const bool WEIGHTED_SUM_EVIDENCE_EVAL =
false;
21 const double WHITE_NOISE_POWER = 1e-4;
41 const double oriH = .2,
42 const int nChains = -1,
44 boost::shared_ptr<CustomIntegrandFactor> cif = boost::shared_ptr<CustomIntegrandFactor>(),
45 const bool partialview =
false,
46 const bool progress =
true);
48 void load(
const std::string& objectFilename,
49 const std::string& sceneFilename,
50 const std::string& meshfile =
"",
51 const std::string& viewpointfile =
"",
52 const bool light =
true,
53 const bool computeNormals =
true);
57 const std::string& meshfile =
"",
58 const Vector3& viewpoint = Vector3::ZERO,
59 const bool light =
true,
60 const bool computeNormals =
true);
62 void usePartialViewEstimation(
const Vector3& viewpoint)
64 viewpoint_ = viewpoint;
68 void setMeshToVisibilityTol(
const double meshTol) { meshTol_ = meshTol; }
70 void setParallelization(
const parallelizer::Type t) { parallel_ = t; }
71 parallelizer::Type getParallelization()
const {
return parallel_; }
73 void setCustomIntegrandFactor(boost::shared_ptr<CustomIntegrandFactor> cif);
74 boost::shared_ptr<CustomIntegrandFactor> getCustomIntegrandFactor()
const;
79 kernel::se3 modelToSceneTransformation(
const boost::optional<kernel::se3>& gtTransfo = boost::none)
const;
81 double findMatchingScore(
const kernel::se3& pose)
const;
83 void writeAlignedModel(
const std::string& filename,
88 Vector3 viewpointInFrame(
const kernel::se3& frame)
const;
91 static double Ti(
const unsigned i,
const unsigned F);
108 mcmc(
const int n)
const;
109 bool recomputeIndices(std::vector<int>& indices,
117 KernelCollection::EvaluationStrategy evaluationStrategy_;
122 boost::shared_ptr<CustomIntegrandFactor> cif_;
124 boost::shared_ptr<ProgressIndicator> pi_;
126 parallelizer::Type parallel_;