DynamicThresholdParams

Description

This structure contains parameters for dynamic thresholding of an image.

Structure fields and default values (if defined) are described below:

  • int Radius = 5 - Radius of dynamic threshold internal blur
  • real MinRelativeValue = 5 - Minimal relative value of a pixel that is considered foreground
  • real MaxRelativeValue - Maximal relative value of a pixel that is considered foreground
  • real Hysteresis - Defines how much the threshold criteria are lowered for pixels neighboring with other foreground pixels
struct DynamicThresholdParams
{
	int		Radius;
	real	MinRelativeValue;
	real	MaxRelativeValue;
	real	Hysteresis;

	explicit DynamicThresholdParams
	(
		 int Radius_ = 5,
		 real MinRelativeValue_ = 5 
	) :
		 Radius(Radius_),
		 MinRelativeValue(MinRelativeValue_) 
	{}

	int Radius( void ) const			{ return Radius;			};
	real MinRelativeValue( void ) const	{ return MinRelativeValue;	};
	real MaxRelativeValue( void ) const	{ return MaxRelativeValue;	};
	real Hysteresis( void ) const		{ return Hysteresis;		};

	bool operator == ( const avl::DynamicThresholdParams& rhs ) const
	{
		return Radius == rhs.Radius && 
			MinRelativeValue == rhs.MinRelativeValue && MaxRelativeValue == rhs.MaxRelativeValue && 
			Hysteresis == rhs.Hysteresis;
	}

	bool operator != ( const avl::DynamicThresholdParams& rhs ) const
	{
		return !(operator==(rhs));
	}

};