44#include <visp3/core/vpImage.h>
45#include <visp3/core/vpMath.h>
46#include <visp3/core/vpMatrix.h>
133 } vpLikelihoodThresholdType;
136 vpLikelihoodThresholdType m_likelihood_threshold_type;
138#ifdef VISP_BUILD_DEPRECATED_FUNCTIONS
186#if (VISP_CXX_STANDARD >= VISP_CXX_STANDARD_11)
323 void setMaskNumber(
const unsigned int &a);
339 void setMaskSize(
const unsigned int &a);
353 void setMu1(
const double &mu_1) { this->mu1 = mu_1; }
360 void setMu2(
const double &mu_2) { this->mu2 = mu_2; }
447#ifdef VISP_HAVE_NLOHMANN_JSON
454 friend void to_json(nlohmann::json &j,
const vpMe &me);
499 friend void from_json(
const nlohmann::json &j,
vpMe &me);
502#ifdef VISP_HAVE_NLOHMANN_JSON
503#include <nlohmann/json.hpp>
525 if (j.contains(
"thresholdType")) {
530 if (j.contains(
"mu")) {
531 std::vector<double> mus = j.at(
"mu").get<std::vector<double>>();
532 assert((mus.size() == 2));
544 if (j.contains(
"angleStep") && j.contains(
"nMask")) {
545 std::cerr <<
"both angle step and number of masks are defined, number of masks will take precedence" << std::endl;
548 else if (j.contains(
"angleStep")) {
551 else if (j.contains(
"nMask")) {
Implementation of a matrix and operations on matrices.
void setMu1(const double &mu_1)
void setSampleStep(const double &s)
void setMaskSign(const int &a)
int ntotal_sample
Distance between sampled points in pixels.
double sample_step
Seek range - on both sides of the reference pixel.
void setRange(const unsigned int &r)
void setStrip(const int &a)
friend void to_json(nlohmann::json &j, const vpMe &me)
Convert a vpMe object to a JSON representation.
friend void from_json(const nlohmann::json &j, vpMe &me)
Retrieve a vpMe object from a JSON representation.
vpLikelihoodThresholdType getLikelihoodThresholdType() const
double getMinSampleStep() const
void setLikelihoodThresholdType(const vpLikelihoodThresholdType likelihood_threshold_type)
void setMinSampleStep(const double &min)
double min_samplestep
Contrast continuity parameter (right boundary).
void setMaskSize(const unsigned int &a)
void setAngleStep(const unsigned int &a)
int getNbTotalSample() const
void checkSamplestep(double &sample_step)
unsigned int getAngleStep() const
vpMatrix * getMask() const
unsigned int getMaskNumber() const
int getPointsToTrack() const
void setNbTotalSample(const int &nb)
double mu1
Old likelihood ratio threshold (to be avoided) or easy-to-use normalized threshold: minimal contrast.
vpMe()
Array of matrices defining the different masks (one for every angle step).
double getThreshold() const
void setPointsToTrack(const int &n)
unsigned int getMaskSize() const
void setMu2(const double &mu_2)
double mu2
Contrast continuity parameter (left boundary).
double getSampleStep() const
unsigned int getRange() const
vpMe & operator=(const vpMe &me)
vpLikelihoodThresholdType
@ NORMALIZED_THRESHOLD
Easy-to-use normalized likelihood threshold corresponding to the minimal luminance contrast to consid...
@ OLD_THRESHOLD
Old likelihood ratio threshold (to be avoided).
void setMaskNumber(const unsigned int &a)
void setThreshold(const double &t)