EdgeScanParams

Description

This structure contains parameters of edge scanning process. Instance of this structure should be customized and passed as a parameter to edge scanning related functions.

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

  • ProfileInterpolationMethod ProfileInterpolation = Quadratic4 - Selects the method of sub-pixel precise edge detection
  • float SmoothingStdDev = 0.6f - Parameter for gaussian smoothing of the brightness profile
  • float MinMagnitude = 5.0f - Minimum acceptable edge strength
  • EdgeTransition EdgeTransition - Specifies the type of edges to be detected
struct EdgeScanParams
{
	ProfileInterpolationMethod	ProfileInterpolation;
	float						SmoothingStdDev;
	float						MinMagnitude;
	EdgeTransition				EdgeTransition;

	explicit EdgeScanParams
	(
		 ProfileInterpolationMethod ProfileInterpolation_ = Quadratic4,
		 float SmoothingStdDev_ = 0.6f,
		 float MinMagnitude_ = 5.0f 
	) :
		 ProfileInterpolation(ProfileInterpolation_),
		 SmoothingStdDev(SmoothingStdDev_),
		 MinMagnitude(MinMagnitude_) 
	{}

	ProfileInterpolationMethod ProfileInterpolation( void ) const	{ return ProfileInterpolation;	};
	float SmoothingStdDev( void ) const								{ return SmoothingStdDev;		};
	float MinMagnitude( void ) const								{ return MinMagnitude;			};
	EdgeTransition EdgeTransition( void ) const						{ return EdgeTransition;		};

	bool operator == ( const avl::EdgeScanParams& rhs ) const
	{
		return ProfileInterpolation == rhs.ProfileInterpolation && 
			SmoothingStdDev == rhs.SmoothingStdDev && 
			MinMagnitude == rhs.MinMagnitude && 
			EdgeTransition == rhs.EdgeTransition;
	}

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

};