eVision C++ API 26.10.0-beta.2.dev
Loading...
Searching...
No Matches
eVision::ERectangleGauge Class Reference

Rectangle gauge. More...

#include <eVision/EasyGauge/ERectangleGauge.h>

Inheritance diagram for eVision::ERectangleGauge:
Collaboration diagram for eVision::ERectangleGauge:

Public Member Functions

 ERectangleGauge ()
 Constructs a ERectangleGauge.
 ERectangleGauge (const eVision::ERectangle &rect)
 Constructs a ERectangleGauge.
 ERectangleGauge (const eVision::ERectangleGauge &other)
 Copy constructor.
virtual ~ERectangleGauge () throw ()
eVision::ERectangleGauge & operator= (const eVision::ERectangleGauge &other)
 Copies all the data from another ERectangleGauge object into the current ERectangleGauge object.
void SetRectangle (const eVision::ERectangle &rectangle)
 Nominal rectangle.
const eVision::ERectangle & GetRectangle () const
 Nominal rectangle.
void CopyTo (eVision::ERectangleGauge &dest) const
 Copies all the data of the current ERectangleGauge object into another ERectangleGauge object.
virtual eVision::EShapeType GetType () const
 Shape type.
virtual void SetNominal (const eVision::EShape &shape)
 Nominal shape of the gauge.
virtual std::unique_ptr< eVision::EShape > GetNominal () const
 Nominal shape of the gauge.
float GetInnerFilteringThreshold () const
 Sampled point inner filtering threshold.
void SetInnerFilteringThreshold (float f32InnerFilteringThreshold)
 Sampled point inner filtering threshold.
void DisableInnerFiltering ()
 Disables inner sampled point filtering.
bool IsInnerFilteringEnabled () const
 Whether inner sampled point filtering is enabled.
virtual eVision::EEditionMode GetAvailableEditionModes () const
 Returns all possible edition modes of the gauge.
uint32_t GetActiveEdges () const
 Active edges as defined in ERectangleGaugeEdge.
void SetActiveEdges (uint32_t un32ActiveEdges)
 Active edges as defined in ERectangleGaugeEdge.
virtual void SetTolerance (float f32Tolerance)
 Half thickness of the model fitting gauge.
virtual float GetTolerance () const
 Half thickness of the model fitting gauge.
virtual void SetHVConstraint (bool bHVConstraint)
 Status of the restriction on the orientation of the point location gauge or model fitting sample paths.
virtual bool GetHVConstraint () const
 Status of the restriction on the orientation of the point location gauge or model fitting sample paths.
virtual void SetTransitionType (eVision::ETransitionType eTransitionType)
 Transition type.
virtual eVision::ETransitionType GetTransitionType () const
 Transition type.
virtual void SetTransitionChoice (eVision::ETransitionChoice eTransitionChoice)
 Transition choice.
virtual eVision::ETransitionChoice GetTransitionChoice () const
 Transition choice.
virtual void SetTransitionIndex (uint32_t un32TransitionIndex)
 Index (from 0 on) of the transition to be retained when the transition choice parameter is set to ETransitionChoice::ETransitionChoice_NthFromBegin or ETransitionChoice::ETransitionChoice_NthFromEnd.
virtual uint32_t GetTransitionIndex () const
 Index (from 0 on) of the transition to be retained when the transition choice parameter is set to ETransitionChoice::ETransitionChoice_NthFromBegin or ETransitionChoice::ETransitionChoice_NthFromEnd.
virtual void SetThreshold (uint32_t un32Threshold)
 Threshold level used to delimit significant peaks in the data profile.
virtual uint32_t GetThreshold () const
 Threshold level used to delimit significant peaks in the data profile.
virtual void SetMinAmplitude (uint32_t un32MinAmplitude)
 Offset added to the Threshold when a peak is to be detected.
virtual uint32_t GetMinAmplitude () const
 Offset added to the Threshold when a peak is to be detected.
virtual void SetMinArea (uint32_t un32MinArea)
 Minimum area value.
virtual uint32_t GetMinArea () const
 Minimum area value.
virtual uint32_t GetThickness () const
 Number of parallel segments used to extract the data profile.
virtual void SetThickness (uint32_t un32Thickness)
 Number of parallel segments used to extract the data profile.
virtual uint32_t GetSmoothing () const
 Number of pixels used for the low-pass filtering operation.
virtual void SetSmoothing (uint32_t un32Smoothing)
 Number of pixels used for the low-pass filtering operation.
virtual bool GetRectangularSamplingArea () const
 Flag indicating whether the sampling area remains a rectangle when rotated, instead of becoming a parallelogram.
virtual void SetRectangularSamplingArea (bool bRectangularSamplingArea)
 Flag indicating whether the sampling area remains a rectangle when rotated, instead of becoming a parallelogram.
virtual uint32_t GetNumSamples () const
 Number of sampled points during the model fitting operation.
uint32_t GetNumSamplesLeftEdge () const
 Number of sampled points found on leftmost edge during the measure operation.
uint32_t GetNumSamplesRightEdge () const
 Number of sampled points found on rightmost edge during the measure operation.
uint32_t GetNumSamplesLowerEdge () const
 Number of sampled points found on lower edge during the measure operation.
uint32_t GetNumSamplesUpperEdge () const
 Number of sampled points found on upper edge during the measure operation.
bool GetKnownAngle () const
 Flag indicating whether the rotation angle of the rectangle to be fitted is known or not.
void SetKnownAngle (bool bKnownAngle)
 Flag indicating whether the rotation angle of the rectangle to be fitted is known or not.
eVision::ESamplePoint GetSampleLeftEdge (uint32_t index) const
 Allows to retrieve information on the samples found along the leftmost edge.
eVision::ESamplePoint GetSampleLowerEdge (uint32_t index) const
 Allows to retrieve information on the samples found along the lower edge.
eVision::ESamplePoint GetSampleRightEdge (uint32_t index) const
 Allows to retrieve information on the samples found along the rightmost edge.
eVision::ESamplePoint GetSampleUpperEdge (uint32_t index) const
 Allows to retrieve information on the samples found along the upper edge.
eVision::ERectangle Measure (const eVision::EROIBW8 &sourceImage, const eVision::EFrame &frame)
 Performs the gauge measurement.
eVision::ERectangle Measure (const eVision::EROIBW8 &sourceImage)
 Performs the gauge measurement.
eVision::ERectangle Measure (const eVision::EROIBW8 &sourceImage, const eVision::ERegion &region, const eVision::EFrame &frame)
 Performs the gauge measurement.
eVision::ERectangle Measure (const eVision::EROIBW8 &sourceImage, const eVision::ERegion &region)
 Performs the gauge measurement.
eVision::ERectangle GetMeasuredRectangle () const
 Information pertaining to the fitted rectangle.
virtual std::unique_ptr< eVision::EShape > GetMeasured () const
 Copy of the measured shape.
void SetMinNumFitSamples (uint32_t topSide, uint32_t leftSide, uint32_t bottomSide, uint32_t rightSide)
 Sets the minimum number of samples required for fitting the shape.
void SetMinNumFitSamples (eVision::ERectangleGaugeEdge edge, uint32_t newValue)
 Sets the minimum number of samples required for fitting the shape.
std::vector< uint32_t > GetMinNumFitSamples () const
 Sets the minimum number of samples required for fitting the shape.
uint32_t GetMinNumFitSamples (eVision::ERectangleGaugeEdge edge) const
 Sets the minimum number of samples required for fitting the shape.
 ERectangleGauge (CppWrapperInternal::InternalConstructor)
Public Member Functions inherited from eVision::EBaseGauge
virtual ~EBaseGauge () throw ()
std::string GetName () const
 Name of the EBaseGauge object.
void SetName (const std::string &name)
 Name of the EBaseGauge object.
void SetEditionMode (eVision::EEditionMode mode)
 Graphical edition mode (default: EBaseGauge::GetAvailableEditionModes).
eVision::EEditionMode GetEditionMode () const
 Graphical edition mode (default: EBaseGauge::GetAvailableEditionModes).
bool GetLabeled () const
 Whether to draw a label describing the gauge (default: no).
void SetLabeled (bool labeled)
 Whether to draw a label describing the gauge (default: no).
void Draw (eVision::EDrawAdapter *graphicContext, eVision::EDrawingMode drawingMode, float zoomX, float zoomY, float panX, float panY) const
 Draws a graphical representation of a shape, as defined by EDrawingMode.
void Draw (eVision::EDrawAdapter *graphicContext, eVision::EDrawingMode drawingMode, float zoomX, float zoomY, float panX) const
 Draws a graphical representation of a shape, as defined by EDrawingMode.
void Draw (eVision::EDrawAdapter *graphicContext, eVision::EDrawingMode drawingMode, float zoomX, float zoomY) const
 Draws a graphical representation of a shape, as defined by EDrawingMode.
void Draw (eVision::EDrawAdapter *graphicContext, eVision::EDrawingMode drawingMode, float zoomX) const
 Draws a graphical representation of a shape, as defined by EDrawingMode.
void Draw (eVision::EDrawAdapter *graphicContext, eVision::EDrawingMode drawingMode) const
 Draws a graphical representation of a shape, as defined by EDrawingMode.
void Draw (eVision::EDrawAdapter *graphicContext, eVision::EDrawingMode drawingMode, const eVision::EFrame &frame, float zoomX, float zoomY, float panX, float panY) const
 Draws a graphical representation of a shape, as defined by EDrawingMode.
void Draw (eVision::EDrawAdapter *graphicContext, eVision::EDrawingMode drawingMode, const eVision::EFrame &frame, float zoomX, float zoomY, float panX) const
 Draws a graphical representation of a shape, as defined by EDrawingMode.
void Draw (eVision::EDrawAdapter *graphicContext, eVision::EDrawingMode drawingMode, const eVision::EFrame &frame, float zoomX, float zoomY) const
 Draws a graphical representation of a shape, as defined by EDrawingMode.
void Draw (eVision::EDrawAdapter *graphicContext, eVision::EDrawingMode drawingMode, const eVision::EFrame &frame, float zoomX) const
 Draws a graphical representation of a shape, as defined by EDrawingMode.
void Draw (eVision::EDrawAdapter *graphicContext, eVision::EDrawingMode drawingMode, const eVision::EFrame &frame) const
 Draws a graphical representation of a shape, as defined by EDrawingMode.
eVision::EEditionMode HitTest (int32_t x, int32_t y, float zoomX, float zoomY, float panX, float panY)
 Checks if there is a handle under the cursor and returns the corresponding edition mode.
eVision::EEditionMode HitTest (int32_t x, int32_t y, float zoomX, float zoomY, float panX)
 Checks if there is a handle under the cursor and returns the corresponding edition mode.
eVision::EEditionMode HitTest (int32_t x, int32_t y, float zoomX, float zoomY)
 Checks if there is a handle under the cursor and returns the corresponding edition mode.
eVision::EEditionMode HitTest (int32_t x, int32_t y, float zoomX)
 Checks if there is a handle under the cursor and returns the corresponding edition mode.
eVision::EEditionMode HitTest (int32_t x, int32_t y)
 Checks if there is a handle under the cursor and returns the corresponding edition mode.
eVision::EEditionMode HitTest (int32_t x, int32_t y, const eVision::EFrame &frame, float zoomX, float zoomY, float panX, float panY)
 Checks if there is a handle under the cursor and returns the corresponding edition mode.
eVision::EEditionMode HitTest (int32_t x, int32_t y, const eVision::EFrame &frame, float zoomX, float zoomY, float panX)
 Checks if there is a handle under the cursor and returns the corresponding edition mode.
eVision::EEditionMode HitTest (int32_t x, int32_t y, const eVision::EFrame &frame, float zoomX, float zoomY)
 Checks if there is a handle under the cursor and returns the corresponding edition mode.
eVision::EEditionMode HitTest (int32_t x, int32_t y, const eVision::EFrame &frame, float zoomX)
 Checks if there is a handle under the cursor and returns the corresponding edition mode.
eVision::EEditionMode HitTest (int32_t x, int32_t y, const eVision::EFrame &frame)
 Checks if there is a handle under the cursor and returns the corresponding edition mode.
void Drag (int32_t x, int32_t y, float zoomX, float zoomY, float panX, float panY)
 Moves a handle to a new position and updates the position parameters of the shape.
void Drag (int32_t x, int32_t y, float zoomX, float zoomY, float panX)
 Moves a handle to a new position and updates the position parameters of the shape.
void Drag (int32_t x, int32_t y, float zoomX, float zoomY)
 Moves a handle to a new position and updates the position parameters of the shape.
void Drag (int32_t x, int32_t y, float zoomX)
 Moves a handle to a new position and updates the position parameters of the shape.
void Drag (int32_t x, int32_t y, const eVision::EFrame &frame, float zoomX, float zoomY, float panX, float panY)
 Moves a handle to a new position and updates the position parameters of the shape.
void Drag (int32_t x, int32_t y, const eVision::EFrame &frame, float zoomX, float zoomY, float panX)
 Moves a handle to a new position and updates the position parameters of the shape.
void Drag (int32_t x, int32_t y, const eVision::EFrame &frame, float zoomX, float zoomY)
 Moves a handle to a new position and updates the position parameters of the shape.
void Drag (int32_t x, int32_t y, const eVision::EFrame &frame, float zoomX)
 Moves a handle to a new position and updates the position parameters of the shape.
void Save (const std::string &path)
 Saves a gauge.The given ESerializer must have been created for writing.
void Save (eVision::ESerializer *serializer)
 Saves a gauge.The given ESerializer must have been created for writing.
void Load (const std::string &path)
 Loads a gauge.The given ESerializer must have been created for reading.
void Load (eVision::ESerializer *serializer)
 Loads a gauge.The given ESerializer must have been created for reading.
bool HasProperty (const std::string &aProperty) const
 Returns whether a EBaseGauge has a property named aProperty.
std::string GetProperty (const std::string &aProperty) const
 Gets the value of property aProperty. Throws an exception if no such property exists.
void SetProperty (const std::string &aProperty, const std::string &aValue)
 Sets the value of property aProperty to aValue for this EBaseGauge.
void RemoveProperty (const std::string &aProperty)
 Removes the property name aProperty from the EBaseGauge.
bool HasValidPolarityProperty () const
 Returns whether the EBaseGauge has a valid polarity property.
float GetSamplingStep () const
 Approximate distance between sampled points during a model fitting operation.
void SetSamplingStep (float f32SamplingStep)
 Approximate distance between sampled points during a model fitting operation.
float GetFilteringThreshold () const
 Relative filtering threshold, that is the fraction of the average distance between the sampled points and the fitted model above which a point is filtered out.
void SetFilteringThreshold (float f32FilteringThreshold)
 Relative filtering threshold, that is the fraction of the average distance between the sampled points and the fitted model above which a point is filtered out.
uint32_t GetNumFilteringPasses () const
 Number of filtering passes for a model fitting operation.
void SetNumFilteringPasses (uint32_t un32NumFilteringPasses)
 Number of filtering passes for a model fitting operation.
uint32_t GetNumValidSamples () const
 Number of valid sample points remaining after a model fitting operation.
eVision::ESamplePoint GetSample (uint32_t index) const
 Retrieves sampled points used during the model fitting operation.
bool HasSamples () const
 Whether the samples are available or not.
void SetSamplePointIndex (uint32_t index)
 Sampled.
uint32_t GetSamplePointIndex () const
 Sampled.
float GetAverageDistance () const
 Average distance between the sampled points and the fitted model.
void SetMinNumFitSamples (const std::vector< int32_t > &sides)
 Sets/Gets the minimum number of samples required for fitting the shape.
std::vector< int32_t > GetMinNumFitSamples () const
 Sets/Gets the minimum number of samples required for fitting the shape.
uint32_t AddSkipRange (const eVision::EIntegerRange &range)
 Adds an item to the set of skip ranges and returns the index of the newly added range.
uint32_t GetNumSkipRanges () const
 Number of skip ranges in the gauge after a call to EBaseGauge::AddSkipRange.
eVision::EIntegerRange GetSkipRange (uint32_t index) const
 Allows to retrieve the start and end values of the skip range corresponding to the given index, if it is valid (i.e. if it has previously been created by a call to the EBaseGauge::AddSkipRange method).
void RemoveSkipRange (const uint32_t index)
 After a call to EBaseGauge::AddSkipRange, removes the skip range with the given index.
void RemoveAllSkipRanges ()
 Removes all the skip ranges previously created by a call to EBaseGauge::AddSkipRange.
std::unique_ptr< eVision::EShape > Measure (const eVision::EROIBW8 &sourceImage, const eVision::EFrame &frame)
 Performs the gauge measurement.
std::unique_ptr< eVision::EShape > Measure (const eVision::EROIBW8 &sourceImage)
 Performs the gauge measurement.
std::unique_ptr< eVision::EShape > Measure (const eVision::EROIBW8 &sourceImage, const eVision::ERegion &region, const eVision::EFrame &frame)
 Performs the gauge measurement.
std::unique_ptr< eVision::EShape > Measure (const eVision::EROIBW8 &sourceImage, const eVision::ERegion &region)
 Performs the gauge measurement.
void MeasureWithoutFitting (const eVision::EROIBW8 &sourceImage, const eVision::EFrame &frame)
 Triggers the point location without line fitting operation.
void MeasureWithoutFitting (const eVision::EROIBW8 &sourceImage)
 Triggers the point location without line fitting operation.
void MeasureWithoutFitting (const eVision::EROIBW8 &sourceImage, const eVision::ERegion &region, const eVision::EFrame &frame)
 Triggers the point location without line fitting operation.
void MeasureWithoutFitting (const eVision::EROIBW8 &sourceImage, const eVision::ERegion &region)
 Triggers the point location without line fitting operation.
bool IsFound () const
 Flag indicating whether a measured shape has been found.
virtual eVision::ESamplePath MeasureSamplePath (const eVision::EROIBW8 &sourceImage, uint32_t pathIndex, const eVision::EFrame &frame) const
 Measures the specified sample path.
virtual eVision::ESamplePath MeasureSamplePath (const eVision::EROIBW8 &sourceImage, uint32_t pathIndex) const
 Measures the specified sample path.
virtual eVision::ESamplePath MeasureSamplePath (const eVision::EROIBW8 &sourceImage, uint32_t pathIndex, const eVision::ERegion &region, const eVision::EFrame &frame) const
 Measures the specified sample path.
virtual eVision::ESamplePath MeasureSamplePath (const eVision::EROIBW8 &sourceImage, uint32_t pathIndex, const eVision::ERegion &region) const
 Measures the specified sample path.
 EBaseGauge (CppWrapperInternal::InternalConstructor)

Additional Inherited Members

Static Public Member Functions inherited from eVision::EBaseGauge
static std::unique_ptr< eVision::EBaseGauge > Make (const std::string &path)
 Creates a gauge of the correct type.
Public Attributes inherited from eVision::EBaseGauge
CppWrapperInternal::WrappedClass wrappedClass_

Detailed Description

Rectangle gauge.

License(s): EasyGauge

Constructor & Destructor Documentation

◆ ERectangleGauge() [1/4]

eVision::ERectangleGauge::ERectangleGauge ( )

Constructs a ERectangleGauge.

◆ ERectangleGauge() [2/4]

eVision::ERectangleGauge::ERectangleGauge ( const eVision::ERectangle & rect)

Constructs a ERectangleGauge.

Parameters
rectNominal rectangle

◆ ERectangleGauge() [3/4]

eVision::ERectangleGauge::ERectangleGauge ( const eVision::ERectangleGauge & other)

Copy constructor.

Parameters
otherOther ERectangleGauge object.

◆ ~ERectangleGauge()

eVision::ERectangleGauge::~ERectangleGauge ( )
throw ( )
virtual

◆ ERectangleGauge() [4/4]

eVision::ERectangleGauge::ERectangleGauge ( CppWrapperInternal::InternalConstructor )

Member Function Documentation

◆ CopyTo()

void eVision::ERectangleGauge::CopyTo ( eVision::ERectangleGauge & dest) const

Copies all the data of the current ERectangleGauge object into another ERectangleGauge object.

Parameters
destAn ERectangleGauge object in which the current ERectangleGauge object data have to be copied.

◆ DisableInnerFiltering()

void eVision::ERectangleGauge::DisableInnerFiltering ( )

Disables inner sampled point filtering.

The inner sampled point filtering is activated as soon as the corresponding ERectangleGauge::GetInnerFilteringThreshold is set.

◆ GetActiveEdges()

uint32_t eVision::ERectangleGauge::GetActiveEdges ( ) const

Active edges as defined in ERectangleGaugeEdge.

◆ GetAvailableEditionModes()

eVision::EEditionMode eVision::ERectangleGauge::GetAvailableEditionModes ( ) const
virtual

Returns all possible edition modes of the gauge.

Reimplemented from eVision::EBaseGauge.

◆ GetHVConstraint()

bool eVision::ERectangleGauge::GetHVConstraint ( ) const
virtual

Status of the restriction on the orientation of the point location gauge or model fitting sample paths.

Sample paths are the point location gauges placed along the model to be fitted.

Implements eVision::EBaseGauge.

◆ GetInnerFilteringThreshold()

float eVision::ERectangleGauge::GetInnerFilteringThreshold ( ) const

Sampled point inner filtering threshold.

If inner filtering is enabled, the sampled points that have been found inside the measured rectangle are filtered in regard of their distance to it. If this distance is greater than the threshold, the sampled point is set as invalid, and removed from the measure. This distance is in physical units.

The inner sampled point filtering is activated as soon as the corresponding threshold is set. To disable inner filtering, use the DisableInnerFiltering method.

◆ GetKnownAngle()

bool eVision::ERectangleGauge::GetKnownAngle ( ) const

Flag indicating whether the rotation angle of the rectangle to be fitted is known or not.

A rectangle model to be fitted may have a well-known orientation. It is possible to impose the value of this rotation angle, thus removing one degree of freedom.

The sign of the rotation angle depends on whether the field of view is calibrated or not.

  • When the field of view is calibrated, the coordinate system is said to be direct, the abscissa extends rightwards and the ordinate extends upwards. In this case, an anticlockwise rotation leads to a positive angle value.
  • When the field of view is not calibrated, the coordinate system is said to be inverse, the abscissa extends rightwards and the ordinate extends downwards. In this case, a clockwise rotation leads to a positive angle value.

◆ GetMeasured()

std::unique_ptr< eVision::EShape > eVision::ERectangleGauge::GetMeasured ( ) const
virtual

Copy of the measured shape.

Implements eVision::EBaseGauge.

◆ GetMeasuredRectangle()

eVision::ERectangle eVision::ERectangleGauge::GetMeasuredRectangle ( ) const

Information pertaining to the fitted rectangle.

◆ GetMinAmplitude()

uint32_t eVision::ERectangleGauge::GetMinAmplitude ( ) const
virtual

Offset added to the Threshold when a peak is to be detected.

When analyzing a derivative profile, a peak is made up of consecutive pixel values above Threshold. To detect weak [strong] transitions, lower [raise] the Threshold value.

To avoid interference of noise, an additional parameter is provided. The MinAmplitude parameter is an offset added to Threshold when a peak is to be detected.

When the pixel values of the derivative profile do not reach Threshold + MinAmplitude, the peak is not taken into account. Anyway, when a peak is taken into account, all the pixels with values above Threshold are considered (for more accuracy). Setting the MinAmplitude value to 0 merely cancels its effect.

Implements eVision::EBaseGauge.

◆ GetMinArea()

uint32_t eVision::ERectangleGauge::GetMinArea ( ) const
virtual

Minimum area value.

A transition is detected if its derivative peak reaches Threshold + MinAmplitude value, and then declared valid if the area between the peak curve and the horizontal at level Threshold reaches the MinArea value.

Implements eVision::EBaseGauge.

◆ GetMinNumFitSamples() [1/2]

std::vector< uint32_t > eVision::ERectangleGauge::GetMinNumFitSamples ( ) const

Sets the minimum number of samples required for fitting the shape.

◆ GetMinNumFitSamples() [2/2]

uint32_t eVision::ERectangleGauge::GetMinNumFitSamples ( eVision::ERectangleGaugeEdge edge) const

Sets the minimum number of samples required for fitting the shape.

Parameters
edgeRelated edge.

◆ GetNominal()

std::unique_ptr< eVision::EShape > eVision::ERectangleGauge::GetNominal ( ) const
virtual

Nominal shape of the gauge.

Note that the gauge stores a copy of the shape and returns a copy of the shape. The gauge applies its EBaseGauge::SetEditionMode to the shape.

Implements eVision::EBaseGauge.

◆ GetNumSamples()

uint32_t eVision::ERectangleGauge::GetNumSamples ( ) const
virtual

Number of sampled points during the model fitting operation.

Irrelevant in case of a point location operation.

After a model fitting operation, a number of points have been fitted along the model. Among them, some are not reliable because of their Area value. Among the remaining ones, some are filtered out (NumFilteringPasses, FilteringThreshold).

Implements eVision::EBaseGauge.

◆ GetNumSamplesLeftEdge()

uint32_t eVision::ERectangleGauge::GetNumSamplesLeftEdge ( ) const

Number of sampled points found on leftmost edge during the measure operation.

◆ GetNumSamplesLowerEdge()

uint32_t eVision::ERectangleGauge::GetNumSamplesLowerEdge ( ) const

Number of sampled points found on lower edge during the measure operation.

◆ GetNumSamplesRightEdge()

uint32_t eVision::ERectangleGauge::GetNumSamplesRightEdge ( ) const

Number of sampled points found on rightmost edge during the measure operation.

◆ GetNumSamplesUpperEdge()

uint32_t eVision::ERectangleGauge::GetNumSamplesUpperEdge ( ) const

Number of sampled points found on upper edge during the measure operation.

◆ GetRectangle()

const eVision::ERectangle & eVision::ERectangleGauge::GetRectangle ( ) const

Nominal rectangle.

◆ GetRectangularSamplingArea()

bool eVision::ERectangleGauge::GetRectangularSamplingArea ( ) const
virtual

Flag indicating whether the sampling area remains a rectangle when rotated, instead of becoming a parallelogram.

By default, this flag is set to true: the sampling area always remains a rectangle. Setting this property is only useful when the thickness transition parameter is greater than 1. In fact, when thickness transition parameter is equal to 1, rectangle and parallelogram reduce to the same segment.

Implements eVision::EBaseGauge.

◆ GetSampleLeftEdge()

eVision::ESamplePoint eVision::ERectangleGauge::GetSampleLeftEdge ( uint32_t index) const

Allows to retrieve information on the samples found along the leftmost edge.

Parameters
indexThe sample index

◆ GetSampleLowerEdge()

eVision::ESamplePoint eVision::ERectangleGauge::GetSampleLowerEdge ( uint32_t index) const

Allows to retrieve information on the samples found along the lower edge.

Parameters
indexThe sample index

◆ GetSampleRightEdge()

eVision::ESamplePoint eVision::ERectangleGauge::GetSampleRightEdge ( uint32_t index) const

Allows to retrieve information on the samples found along the rightmost edge.

Parameters
indexThe sample index

◆ GetSampleUpperEdge()

eVision::ESamplePoint eVision::ERectangleGauge::GetSampleUpperEdge ( uint32_t index) const

Allows to retrieve information on the samples found along the upper edge.

Parameters
indexThe sample index

◆ GetSmoothing()

uint32_t eVision::ERectangleGauge::GetSmoothing ( ) const
virtual

Number of pixels used for the low-pass filtering operation.

To reduce the effect of noise, the profile data can be low-pass filtered along the point location gauge direction.

Implements eVision::EBaseGauge.

◆ GetThickness()

uint32_t eVision::ERectangleGauge::GetThickness ( ) const
virtual

Number of parallel segments used to extract the data profile.

To reduce the effect of noise and/or strengthen a transition, several parallel profiles can be accumulated.

Implements eVision::EBaseGauge.

◆ GetThreshold()

uint32_t eVision::ERectangleGauge::GetThreshold ( ) const
virtual

Threshold level used to delimit significant peaks in the data profile.

When analyzing a derivative profile, a peak is made up of consecutive pixel values above Threshold. To detect weak [strong] transitions, lower [raise] the Threshold value.

To avoid interference of noise, an additional parameter is provided. The MinAmplitude parameter is an offset added to Threshold when a peak is to be detected.

When the pixel values of the derivative profile do not reach Threshold + MinAmplitude, the peak is not taken into account. Anyway, when a peak is taken into account, all the pixels with values above Threshold are considered (for more accuracy). Setting the MinAmplitude value to 0 merely cancels its effect.

Implements eVision::EBaseGauge.

◆ GetTolerance()

float eVision::ERectangleGauge::GetTolerance ( ) const
virtual

Half thickness of the model fitting gauge.

By default, the tolerance is 20 (2x10), which means 20 pixels when the field of view is not calibrated, and 20 physical units in case of a calibrated field of view.

The tolerance isn't taken into consideration for the point gauge.

Implements eVision::EBaseGauge.

◆ GetTransitionChoice()

eVision::ETransitionChoice eVision::ERectangleGauge::GetTransitionChoice ( ) const
virtual

Transition choice.

Several peaks may be detected along a point location gauge. This parameter helps to select the desired transition.

In case of ETransitionChoice::ETransitionChoice_NthFromBegin or ETransitionChoice::ETransitionChoice_NthFromEnd transition choice, set EBaseGauge::SetTransitionIndex to specify the desired transition.

By default, the selected transition corresponds to the one with the largest amplitude (ETransitionChoice::ETransitionChoice_LargestAmplitude).

Implements eVision::EBaseGauge.

◆ GetTransitionIndex()

uint32_t eVision::ERectangleGauge::GetTransitionIndex ( ) const
virtual

Index (from 0 on) of the transition to be retained when the transition choice parameter is set to ETransitionChoice::ETransitionChoice_NthFromBegin or ETransitionChoice::ETransitionChoice_NthFromEnd.

Several peaks may be detected along a point location gauge. This parameter helps to select the desired transition.

By default, the first transition is retained (the index value is 0).

Implements eVision::EBaseGauge.

◆ GetTransitionType()

eVision::ETransitionType eVision::ERectangleGauge::GetTransitionType ( ) const
virtual

Transition type.

The type of transition tells whether it crosses increasing or decreasing gray-level values. This helps discriminate between nearby edges of an object.

By default, the searched transition type is indifferently a black to white or a white to black transition (ETransitionType::ETransitionType_BwOrWb).

Implements eVision::EBaseGauge.

◆ GetType()

eVision::EShapeType eVision::ERectangleGauge::GetType ( ) const
virtual

Shape type.

Implements eVision::EBaseGauge.

◆ IsInnerFilteringEnabled()

bool eVision::ERectangleGauge::IsInnerFilteringEnabled ( ) const

Whether inner sampled point filtering is enabled.

The inner sampled point filtering is activated as soon as the corresponding threshold is set, getting the ERectangleGauge::GetInnerFilteringThreshold property. To disable inner filtering, use the ERectangleGauge::DisableInnerFiltering method.

◆ Measure() [1/4]

eVision::ERectangle eVision::ERectangleGauge::Measure ( const eVision::EROIBW8 & sourceImage)

Performs the gauge measurement.

Parameters
sourceImageSource image.

◆ Measure() [2/4]

eVision::ERectangle eVision::ERectangleGauge::Measure ( const eVision::EROIBW8 & sourceImage,
const eVision::EFrame & frame )

Performs the gauge measurement.

Parameters
sourceImageSource image.
frameFrame of reference

◆ Measure() [3/4]

eVision::ERectangle eVision::ERectangleGauge::Measure ( const eVision::EROIBW8 & sourceImage,
const eVision::ERegion & region )

Performs the gauge measurement.

Parameters
sourceImageSource image.
regionRegion to use with the source image.

◆ Measure() [4/4]

eVision::ERectangle eVision::ERectangleGauge::Measure ( const eVision::EROIBW8 & sourceImage,
const eVision::ERegion & region,
const eVision::EFrame & frame )

Performs the gauge measurement.

Parameters
sourceImageSource image.
regionRegion to use with the source image.
frameFrame of reference

◆ operator=()

eVision::ERectangleGauge & eVision::ERectangleGauge::operator= ( const eVision::ERectangleGauge & other)

Copies all the data from another ERectangleGauge object into the current ERectangleGauge object.

Parameters
otherERectangleGauge object to be copied

◆ SetActiveEdges()

void eVision::ERectangleGauge::SetActiveEdges ( uint32_t un32ActiveEdges)

Active edges as defined in ERectangleGaugeEdge.

◆ SetHVConstraint()

void eVision::ERectangleGauge::SetHVConstraint ( bool bHVConstraint)
virtual

Status of the restriction on the orientation of the point location gauge or model fitting sample paths.

Sample paths are the point location gauges placed along the model to be fitted.

Implements eVision::EBaseGauge.

◆ SetInnerFilteringThreshold()

void eVision::ERectangleGauge::SetInnerFilteringThreshold ( float f32InnerFilteringThreshold)

Sampled point inner filtering threshold.

If inner filtering is enabled, the sampled points that have been found inside the measured rectangle are filtered in regard of their distance to it. If this distance is greater than the threshold, the sampled point is set as invalid, and removed from the measure. This distance is in physical units.

The inner sampled point filtering is activated as soon as the corresponding threshold is set. To disable inner filtering, use the DisableInnerFiltering method.

◆ SetKnownAngle()

void eVision::ERectangleGauge::SetKnownAngle ( bool bKnownAngle)

Flag indicating whether the rotation angle of the rectangle to be fitted is known or not.

A rectangle model to be fitted may have a well-known orientation. It is possible to impose the value of this rotation angle, thus removing one degree of freedom.

The sign of the rotation angle depends on whether the field of view is calibrated or not.

  • When the field of view is calibrated, the coordinate system is said to be direct, the abscissa extends rightwards and the ordinate extends upwards. In this case, an anticlockwise rotation leads to a positive angle value.
  • When the field of view is not calibrated, the coordinate system is said to be inverse, the abscissa extends rightwards and the ordinate extends downwards. In this case, a clockwise rotation leads to a positive angle value.

◆ SetMinAmplitude()

void eVision::ERectangleGauge::SetMinAmplitude ( uint32_t un32MinAmplitude)
virtual

Offset added to the Threshold when a peak is to be detected.

When analyzing a derivative profile, a peak is made up of consecutive pixel values above Threshold. To detect weak [strong] transitions, lower [raise] the Threshold value.

To avoid interference of noise, an additional parameter is provided. The MinAmplitude parameter is an offset added to Threshold when a peak is to be detected.

When the pixel values of the derivative profile do not reach Threshold + MinAmplitude, the peak is not taken into account. Anyway, when a peak is taken into account, all the pixels with values above Threshold are considered (for more accuracy). Setting the MinAmplitude value to 0 merely cancels its effect.

Implements eVision::EBaseGauge.

◆ SetMinArea()

void eVision::ERectangleGauge::SetMinArea ( uint32_t un32MinArea)
virtual

Minimum area value.

A transition is detected if its derivative peak reaches Threshold + MinAmplitude value, and then declared valid if the area between the peak curve and the horizontal at level Threshold reaches the MinArea value.

Implements eVision::EBaseGauge.

◆ SetMinNumFitSamples() [1/2]

void eVision::ERectangleGauge::SetMinNumFitSamples ( eVision::ERectangleGaugeEdge edge,
uint32_t newValue )

Sets the minimum number of samples required for fitting the shape.

Parameters
edgeRelated edge to change the minimum number of samples.
newValueNew value for minimum number of samples for the specified edge.

◆ SetMinNumFitSamples() [2/2]

void eVision::ERectangleGauge::SetMinNumFitSamples ( uint32_t topSide,
uint32_t leftSide,
uint32_t bottomSide,
uint32_t rightSide )

Sets the minimum number of samples required for fitting the shape.

Parameters
topSideMinimum number of samples to fit the top side.
leftSideMinimum number of samples to fit the left side.
bottomSideMinimum number of samples to fit the bottom side.
rightSideMinimum number of samples to fit the right side.

◆ SetNominal()

void eVision::ERectangleGauge::SetNominal ( const eVision::EShape & shape)
virtual

Nominal shape of the gauge.

Parameters
shapeNew nominal shape

Note that the gauge stores a copy of the shape and returns a copy of the shape. The gauge applies its EBaseGauge::SetEditionMode to the shape.

Implements eVision::EBaseGauge.

◆ SetRectangle()

void eVision::ERectangleGauge::SetRectangle ( const eVision::ERectangle & rectangle)

Nominal rectangle.

◆ SetRectangularSamplingArea()

void eVision::ERectangleGauge::SetRectangularSamplingArea ( bool bRectangularSamplingArea)
virtual

Flag indicating whether the sampling area remains a rectangle when rotated, instead of becoming a parallelogram.

By default, this flag is set to true: the sampling area always remains a rectangle. Setting this property is only useful when the thickness transition parameter is greater than 1. In fact, when thickness transition parameter is equal to 1, rectangle and parallelogram reduce to the same segment.

Implements eVision::EBaseGauge.

◆ SetSmoothing()

void eVision::ERectangleGauge::SetSmoothing ( uint32_t un32Smoothing)
virtual

Number of pixels used for the low-pass filtering operation.

To reduce the effect of noise, the profile data can be low-pass filtered along the point location gauge direction.

Implements eVision::EBaseGauge.

◆ SetThickness()

void eVision::ERectangleGauge::SetThickness ( uint32_t un32Thickness)
virtual

Number of parallel segments used to extract the data profile.

To reduce the effect of noise and/or strengthen a transition, several parallel profiles can be accumulated.

Implements eVision::EBaseGauge.

◆ SetThreshold()

void eVision::ERectangleGauge::SetThreshold ( uint32_t un32Threshold)
virtual

Threshold level used to delimit significant peaks in the data profile.

When analyzing a derivative profile, a peak is made up of consecutive pixel values above Threshold. To detect weak [strong] transitions, lower [raise] the Threshold value.

To avoid interference of noise, an additional parameter is provided. The MinAmplitude parameter is an offset added to Threshold when a peak is to be detected.

When the pixel values of the derivative profile do not reach Threshold + MinAmplitude, the peak is not taken into account. Anyway, when a peak is taken into account, all the pixels with values above Threshold are considered (for more accuracy). Setting the MinAmplitude value to 0 merely cancels its effect.

Implements eVision::EBaseGauge.

◆ SetTolerance()

void eVision::ERectangleGauge::SetTolerance ( float f32Tolerance)
virtual

Half thickness of the model fitting gauge.

By default, the tolerance is 20 (2x10), which means 20 pixels when the field of view is not calibrated, and 20 physical units in case of a calibrated field of view.

The tolerance isn't taken into consideration for the point gauge.

Implements eVision::EBaseGauge.

◆ SetTransitionChoice()

void eVision::ERectangleGauge::SetTransitionChoice ( eVision::ETransitionChoice eTransitionChoice)
virtual

Transition choice.

Several peaks may be detected along a point location gauge. This parameter helps to select the desired transition.

In case of ETransitionChoice::ETransitionChoice_NthFromBegin or ETransitionChoice::ETransitionChoice_NthFromEnd transition choice, set EBaseGauge::SetTransitionIndex to specify the desired transition.

By default, the selected transition corresponds to the one with the largest amplitude (ETransitionChoice::ETransitionChoice_LargestAmplitude).

Implements eVision::EBaseGauge.

◆ SetTransitionIndex()

void eVision::ERectangleGauge::SetTransitionIndex ( uint32_t un32TransitionIndex)
virtual

Index (from 0 on) of the transition to be retained when the transition choice parameter is set to ETransitionChoice::ETransitionChoice_NthFromBegin or ETransitionChoice::ETransitionChoice_NthFromEnd.

Several peaks may be detected along a point location gauge. This parameter helps to select the desired transition.

By default, the first transition is retained (the index value is 0).

Implements eVision::EBaseGauge.

◆ SetTransitionType()

void eVision::ERectangleGauge::SetTransitionType ( eVision::ETransitionType eTransitionType)
virtual

Transition type.

The type of transition tells whether it crosses increasing or decreasing gray-level values. This helps discriminate between nearby edges of an object.

By default, the searched transition type is indifferently a black to white or a white to black transition (ETransitionType::ETransitionType_BwOrWb).

Implements eVision::EBaseGauge.