47 #ifndef _MIRA_SCHMITTTRIGGERHYSTERESIS_H_ 48 #define _MIRA_SCHMITTTRIGGERHYSTERESIS_H_ 88 mLowerThreshold(lower<=upper?lower:upper),
89 mUpperThreshold(upper>=lower?upper:lower)
94 mLowerThreshold(lower<=upper?lower:upper),
95 mUpperThreshold(upper>=lower?upper:lower)
98 template <
typename Reflector>
101 r.property(
"Lower", mLowerThreshold,
"Lower threshold");
102 r.property(
"Upper", mUpperThreshold,
"Upper threshold");
103 r.member(
"State", mState,
"The state",
UNKNOWN);
112 State oldState = mState;
113 if (value < mLowerThreshold)
115 if (value > mUpperThreshold)
117 if (mState != oldState)
Definition: SchmittTriggerHysteresis.h:74
Class realizing a Schmitt trigger.
Definition: SchmittTriggerHysteresis.h:65
SchmittTriggerHysteresis(State state, const T &lower, const T &upper)
Definition: SchmittTriggerHysteresis.h:92
specialize cv::DataType for our ImgPixel and inherit from cv::DataType<Vec>
Definition: IOService.h:67
void reflect(Reflector &r)
Definition: SchmittTriggerHysteresis.h:99
SchmittTriggerHysteresis(State state)
Definition: SchmittTriggerHysteresis.h:82
SchmittTriggerHysteresis()
Definition: SchmittTriggerHysteresis.h:78
Definition: SchmittTriggerHysteresis.h:73
SchmittTriggerHysteresis(const T &lower, const T &upper)
Definition: SchmittTriggerHysteresis.h:86
State getState() const
Returns the state of the trigger.
Definition: SchmittTriggerHysteresis.h:125
Definition: SchmittTriggerHysteresis.h:75
State
State of the trigger.
Definition: SchmittTriggerHysteresis.h:71
bool update(const T &value)
Feed the next value into the trigger.
Definition: SchmittTriggerHysteresis.h:110