35 #ifndef VP_COLOR_HISTOGRAM_MASK_H
36 #define VP_COLOR_HISTOGRAM_MASK_H
38 #include <visp3/core/vpConfig.h>
39 #include <visp3/core/vpException.h>
40 #include <visp3/rbt/vpColorHistogram.h>
41 #include <visp3/rbt/vpObjectMask.h>
42 #include <visp3/core/vpImage.h>
44 #ifdef VISP_HAVE_NLOHMANN_JSON
45 #include VISP_NLOHMANN_JSON(json_fwd.hpp)
72 m_histBackground.setBinNumber(N);
73 m_histBackgroundFrame.setBinNumber(N);
74 m_histObject.setBinNumber(N);
75 m_histObjectFrame.setBinNumber(N);
84 m_depthErrorTolerance = errorMax;
90 if (updateRate < 0.f || updateRate > 1.f) {
93 m_objectUpdateRate = updateRate;
99 if (updateRate < 0.f || updateRate > 1.f) {
102 m_backgroundUpdateRate = updateRate;
108 m_computeOnBBOnly = bbOnly;
114 #if defined(VISP_HAVE_NLOHMANN_JSON)
119 vpColorHistogram m_histObject, m_histBackground, m_histObjectFrame, m_histBackgroundFrame;
120 float m_depthErrorTolerance;
121 float m_objectUpdateRate, m_backgroundUpdateRate;
126 bool m_computeOnBBOnly;
A color histogram based segmentation algorithm.
float getDepthErrorTolerance() const
float getObjectUpdateRate() const
virtual ~vpColorHistogramMask()=default
bool isComputedOnlyOnBoundingBox() const
void setComputeOnlyOnBoundingBox(bool bbOnly)
float getBackgroundUpdateRate() const
void setBinNumber(unsigned int N)
void setDepthErrorTolerance(float errorMax)
void setObjectUpdateRate(float updateRate)
void setBackgroundUpdateRate(float updateRate)
error that can be emitted by ViSP classes.
@ badValue
Used to indicate that a value is not in the allowed range.
virtual void loadJsonConfiguration(const nlohmann::json &j)=0
virtual void updateMask(const vpRBFeatureTrackerInput &frame, const vpRBFeatureTrackerInput &previousFrame, vpImage< float > &mask)=0