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

EasyGauge base class. More...

#include <eVision/EasyGauge/EBaseGauge.h>

Inheritance diagram for eVision::EBaseGauge:
Collaboration diagram for eVision::EBaseGauge:

Public Member Functions

virtual ~EBaseGauge () throw ()
virtual eVision::EShapeType GetType () const =0
 Shape type.
std::string GetName () const
 Name of the EBaseGauge object.
void SetName (const std::string &name)
 Name of the EBaseGauge object.
virtual void SetNominal (const eVision::EShape &shape)=0
 Nominal shape of the gauge.
virtual std::unique_ptr< eVision::EShape > GetNominal () const =0
 Nominal shape of the gauge.
void SetEditionMode (eVision::EEditionMode mode)
 Graphical edition mode (default: EBaseGauge::GetAvailableEditionModes).
eVision::EEditionMode GetEditionMode () const
 Graphical edition mode (default: EBaseGauge::GetAvailableEditionModes).
virtual eVision::EEditionMode GetAvailableEditionModes () const
 Returns all possible edition modes of the gauge.
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.
virtual void SetTolerance (float tolerance)=0
 Half thickness of the model fitting gauge.
virtual float GetTolerance () const =0
 Half thickness of the model fitting gauge.
virtual void SetHVConstraint (bool bHVConstraint)=0
 Status of the restriction on the orientation of the point location gauge or model fitting sample paths.
virtual bool GetHVConstraint () const =0
 Status of the restriction on the orientation of the point location gauge or model fitting sample paths.
virtual void SetTransitionType (eVision::ETransitionType eTransitionType)=0
 Transition type.
virtual eVision::ETransitionType GetTransitionType () const =0
 Transition type.
virtual void SetTransitionChoice (eVision::ETransitionChoice eTransitionChoice)=0
 Transition choice.
virtual eVision::ETransitionChoice GetTransitionChoice () const =0
 Transition choice.
virtual void SetTransitionIndex (uint32_t un32TransitionIndex)=0
 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 =0
 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)=0
 Threshold level used to delimit significant peaks in the data profile.
virtual uint32_t GetThreshold () const =0
 Threshold level used to delimit significant peaks in the data profile.
virtual void SetMinAmplitude (uint32_t un32MinAmplitude)=0
 Offset added to the Threshold when a peak is to be detected.
virtual uint32_t GetMinAmplitude () const =0
 Offset added to the Threshold when a peak is to be detected.
virtual void SetMinArea (uint32_t un32MinArea)=0
 Minimum area value.
virtual uint32_t GetMinArea () const =0
 Minimum area value.
virtual uint32_t GetThickness () const =0
 Number of parallel segments used to extract the data profile.
virtual void SetThickness (uint32_t un32Thickness)=0
 Number of parallel segments used to extract the data profile.
virtual uint32_t GetSmoothing () const =0
 Number of pixels used for the low-pass filtering operation.
virtual void SetSmoothing (uint32_t un32Smoothing)=0
 Number of pixels used for the low-pass filtering operation.
virtual bool GetRectangularSamplingArea () const =0
 Flag indicating whether the sampling area remains a rectangle when rotated, instead of becoming a parallelogram.
virtual void SetRectangularSamplingArea (bool bRectangularSamplingArea)=0
 Flag indicating whether the sampling area remains a rectangle when rotated, instead of becoming a parallelogram.
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.
virtual uint32_t GetNumSamples () const =0
 Number of sampled points during the 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 std::unique_ptr< eVision::EShape > GetMeasured () const =0
 Copy of the measured shape.
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)

Static Public Member Functions

static std::unique_ptr< eVision::EBaseGauge > Make (const std::string &path)
 Creates a gauge of the correct type.

Public Attributes

CppWrapperInternal::WrappedClass wrappedClass_

Detailed Description

EasyGauge base class.

License(s): EasyGauge

Constructor & Destructor Documentation

◆ ~EBaseGauge()

eVision::EBaseGauge::~EBaseGauge ( )
throw ( )
virtual

◆ EBaseGauge()

eVision::EBaseGauge::EBaseGauge ( CppWrapperInternal::InternalConstructor )

Member Function Documentation

◆ AddSkipRange()

uint32_t eVision::EBaseGauge::AddSkipRange ( const eVision::EIntegerRange & range)

Adds an item to the set of skip ranges and returns the index of the newly added range.

Parameters
rangeThe skip range.

The samples indices between start and end (including the boundaries) will be discarded during the measurement process.

This method allows to define skip ranges in an EBaseGauge. This means that, at measure time, samples belonging to these ranges will not be taken into account.

A sample may belong to more than one skip range; to be discarded, a sample has to pertain to at least one range. Moreover, the skip ranges are allowed to overlap one another.

The range is allowed to be reversed (i.e. end is not required to be greater than start).

Also, start and end are not required to reference valid indices at the time of the call (i.e. the range may lie outside the current return value for EBaseGauge::GetNumSamples).

◆ Drag() [1/8]

void eVision::EBaseGauge::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.

Parameters
xCurrent cursor coordinates.
yCurrent cursor coordinates.
frameFrame of reference in which the gauge is located.
zoomXHorizontal zoom factor. By default, true scale is used.

◆ Drag() [2/8]

void eVision::EBaseGauge::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.

Parameters
xCurrent cursor coordinates.
yCurrent cursor coordinates.
frameFrame of reference in which the gauge is located.
zoomXHorizontal zoom factor. By default, true scale is used.
zoomYVertical zoom factor. By default, true scale is used.

◆ Drag() [3/8]

void eVision::EBaseGauge::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.

Parameters
xCurrent cursor coordinates.
yCurrent cursor coordinates.
frameFrame of reference in which the gauge is located.
zoomXHorizontal zoom factor. By default, true scale is used.
zoomYVertical zoom factor. By default, true scale is used.
panXHorizontal pan offset. By default, no pan is added.

◆ Drag() [4/8]

void eVision::EBaseGauge::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.

Parameters
xCurrent cursor coordinates.
yCurrent cursor coordinates.
frameFrame of reference in which the gauge is located.
zoomXHorizontal zoom factor. By default, true scale is used.
zoomYVertical zoom factor. By default, true scale is used.
panXHorizontal pan offset. By default, no pan is added.
panYVertical pan offset. By default, no pan is added.

◆ Drag() [5/8]

void eVision::EBaseGauge::Drag ( int32_t x,
int32_t y,
float zoomX )

Moves a handle to a new position and updates the position parameters of the shape.

Parameters
xCurrent cursor coordinates.
yCurrent cursor coordinates.
zoomXHorizontal zoom factor. By default, true scale is used.

◆ Drag() [6/8]

void eVision::EBaseGauge::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.

Parameters
xCurrent cursor coordinates.
yCurrent cursor coordinates.
zoomXHorizontal zoom factor. By default, true scale is used.
zoomYVertical zoom factor. By default, true scale is used.

◆ Drag() [7/8]

void eVision::EBaseGauge::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.

Parameters
xCurrent cursor coordinates.
yCurrent cursor coordinates.
zoomXHorizontal zoom factor. By default, true scale is used.
zoomYVertical zoom factor. By default, true scale is used.
panXHorizontal pan offset. By default, no pan is added.

◆ Drag() [8/8]

void eVision::EBaseGauge::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.

Parameters
xCurrent cursor coordinates.
yCurrent cursor coordinates.
zoomXHorizontal zoom factor. By default, true scale is used.
zoomYVertical zoom factor. By default, true scale is used.
panXHorizontal pan offset. By default, no pan is added.
panYVertical pan offset. By default, no pan is added.

◆ Draw() [1/10]

void eVision::EBaseGauge::Draw ( eVision::EDrawAdapter * graphicContext,
eVision::EDrawingMode drawingMode ) const

Draws a graphical representation of a shape, as defined by EDrawingMode.

Parameters
graphicContextHandle of the device context on which to draw.
drawingModeIndicates how the point location or model fitting gauge must be displayed, as defined by EDrawingMode.

◆ Draw() [2/10]

void eVision::EBaseGauge::Draw ( eVision::EDrawAdapter * graphicContext,
eVision::EDrawingMode drawingMode,
const eVision::EFrame & frame ) const

Draws a graphical representation of a shape, as defined by EDrawingMode.

Parameters
graphicContextHandle of the device context on which to draw.
drawingModeIndicates how the point location or model fitting gauge must be displayed, as defined by EDrawingMode.
frameFrame of reference in which the gauge is located.

◆ Draw() [3/10]

void eVision::EBaseGauge::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.

Parameters
graphicContextHandle of the device context on which to draw.
drawingModeIndicates how the point location or model fitting gauge must be displayed, as defined by EDrawingMode.
frameFrame of reference in which the gauge is located.
zoomXHorizontal zoom factor. By default, true scale is used.

◆ Draw() [4/10]

void eVision::EBaseGauge::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.

Parameters
graphicContextHandle of the device context on which to draw.
drawingModeIndicates how the point location or model fitting gauge must be displayed, as defined by EDrawingMode.
frameFrame of reference in which the gauge is located.
zoomXHorizontal zoom factor. By default, true scale is used.
zoomYVertical zoom factor. By default, true scale is used.

◆ Draw() [5/10]

void eVision::EBaseGauge::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.

Parameters
graphicContextHandle of the device context on which to draw.
drawingModeIndicates how the point location or model fitting gauge must be displayed, as defined by EDrawingMode.
frameFrame of reference in which the gauge is located.
zoomXHorizontal zoom factor. By default, true scale is used.
zoomYVertical zoom factor. By default, true scale is used.
panXHorizontal pan offset. By default, no pan is added.

◆ Draw() [6/10]

void eVision::EBaseGauge::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.

Parameters
graphicContextHandle of the device context on which to draw.
drawingModeIndicates how the point location or model fitting gauge must be displayed, as defined by EDrawingMode.
frameFrame of reference in which the gauge is located.
zoomXHorizontal zoom factor. By default, true scale is used.
zoomYVertical zoom factor. By default, true scale is used.
panXHorizontal pan offset. By default, no pan is added.
panYVertical pan offset. By default, no pan is added.

◆ Draw() [7/10]

void eVision::EBaseGauge::Draw ( eVision::EDrawAdapter * graphicContext,
eVision::EDrawingMode drawingMode,
float zoomX ) const

Draws a graphical representation of a shape, as defined by EDrawingMode.

Parameters
graphicContextHandle of the device context on which to draw.
drawingModeIndicates how the point location or model fitting gauge must be displayed, as defined by EDrawingMode.
zoomXHorizontal zoom factor. By default, true scale is used.

◆ Draw() [8/10]

void eVision::EBaseGauge::Draw ( eVision::EDrawAdapter * graphicContext,
eVision::EDrawingMode drawingMode,
float zoomX,
float zoomY ) const

Draws a graphical representation of a shape, as defined by EDrawingMode.

Parameters
graphicContextHandle of the device context on which to draw.
drawingModeIndicates how the point location or model fitting gauge must be displayed, as defined by EDrawingMode.
zoomXHorizontal zoom factor. By default, true scale is used.
zoomYVertical zoom factor. By default, true scale is used.

◆ Draw() [9/10]

void eVision::EBaseGauge::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.

Parameters
graphicContextHandle of the device context on which to draw.
drawingModeIndicates how the point location or model fitting gauge must be displayed, as defined by EDrawingMode.
zoomXHorizontal zoom factor. By default, true scale is used.
zoomYVertical zoom factor. By default, true scale is used.
panXHorizontal pan offset. By default, no pan is added.

◆ Draw() [10/10]

void eVision::EBaseGauge::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.

Parameters
graphicContextHandle of the device context on which to draw.
drawingModeIndicates how the point location or model fitting gauge must be displayed, as defined by EDrawingMode.
zoomXHorizontal zoom factor. By default, true scale is used.
zoomYVertical zoom factor. By default, true scale is used.
panXHorizontal pan offset. By default, no pan is added.
panYVertical pan offset. By default, no pan is added.

◆ GetAvailableEditionModes()

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

◆ GetAverageDistance()

float eVision::EBaseGauge::GetAverageDistance ( ) const

Average distance between the sampled points and the fitted model.

Irrelevant in case of a point location operation.

◆ GetEditionMode()

eVision::EEditionMode eVision::EBaseGauge::GetEditionMode ( ) const

Graphical edition mode (default: EBaseGauge::GetAvailableEditionModes).

This also sets the same graphical edition mode to the nominal shape.

◆ GetFilteringThreshold()

float eVision::EBaseGauge::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.

Irrelevant in case of a point location operation.

During a model fitting operation, the "filtering" process can be invoked to remove outliers, i.e. points that were located significantly far away from the fitted model (so that their position is dubious).

◆ GetHVConstraint()

virtual bool eVision::EBaseGauge::GetHVConstraint ( ) const
pure 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.

Implemented in eVision::ECircleGauge, eVision::ELineGauge, eVision::EPointGauge, eVision::EPolygonGauge, eVision::ERectangleGauge, and eVision::EWedgeGauge.

◆ GetLabeled()

bool eVision::EBaseGauge::GetLabeled ( ) const

Whether to draw a label describing the gauge (default: no).

◆ GetMeasured()

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

◆ GetMinAmplitude()

virtual uint32_t eVision::EBaseGauge::GetMinAmplitude ( ) const
pure 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.

Implemented in eVision::ECircleGauge, eVision::ELineGauge, eVision::EPointGauge, eVision::EPolygonGauge, eVision::ERectangleGauge, and eVision::EWedgeGauge.

◆ GetMinArea()

virtual uint32_t eVision::EBaseGauge::GetMinArea ( ) const
pure 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.

Implemented in eVision::ECircleGauge, eVision::ELineGauge, eVision::EPointGauge, eVision::EPolygonGauge, eVision::ERectangleGauge, and eVision::EWedgeGauge.

◆ GetMinNumFitSamples()

std::vector< int32_t > eVision::EBaseGauge::GetMinNumFitSamples ( ) const

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

In case of a ERectangleGauge, 4 values are used, one for each side of the rectangle. Value 0 is used for line and circle gauge. Values 0,1,2,3 are used for rectangle and wedge gauge in the following manner: Rectangle : Top = 0, Left = 1, Bottom = 2, Right = 3 Wedge : Outer Circle = 0, Origin Border = 1, Inner Circle = 2, End Border = 3

◆ GetName()

std::string eVision::EBaseGauge::GetName ( ) const

Name of the EBaseGauge object.

◆ GetNominal()

virtual std::unique_ptr< eVision::EShape > eVision::EBaseGauge::GetNominal ( ) const
pure 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.

Implemented in eVision::ECircleGauge, eVision::ELineGauge, eVision::EPointGauge, eVision::EPolygonGauge, eVision::ERectangleGauge, and eVision::EWedgeGauge.

◆ GetNumFilteringPasses()

uint32_t eVision::EBaseGauge::GetNumFilteringPasses ( ) const

Number of filtering passes for a model fitting operation.

Irrelevant in case of a point location operation.

During a filtering pass, the points that are too distant from the model are discarded. During a model fitting operation, the "filtering" process can be invoked to remove outliers, i.e. points that were located significantly far away from the fitted model (so that their position is dubious).

By default, (the number of filtering passes is 0), the outliers rejection process is disabled.

◆ GetNumSamples()

virtual uint32_t eVision::EBaseGauge::GetNumSamples ( ) const
pure 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).

Implemented in eVision::ECircleGauge, eVision::ELineGauge, eVision::EPointGauge, eVision::EPolygonGauge, eVision::ERectangleGauge, and eVision::EWedgeGauge.

◆ GetNumSkipRanges()

uint32_t eVision::EBaseGauge::GetNumSkipRanges ( ) const

Number of skip ranges in the gauge after a call to EBaseGauge::AddSkipRange.

◆ GetNumValidSamples()

uint32_t eVision::EBaseGauge::GetNumValidSamples ( ) const

Number of valid sample points remaining after a 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).

◆ GetProperty()

std::string eVision::EBaseGauge::GetProperty ( const std::string & aProperty) const

Gets the value of property aProperty. Throws an exception if no such property exists.

Parameters
aPropertyThe name of the property.

◆ GetRectangularSamplingArea()

virtual bool eVision::EBaseGauge::GetRectangularSamplingArea ( ) const
pure 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.

Implemented in eVision::ECircleGauge, eVision::ELineGauge, eVision::EPointGauge, eVision::EPolygonGauge, eVision::ERectangleGauge, and eVision::EWedgeGauge.

◆ GetSample()

eVision::ESamplePoint eVision::EBaseGauge::GetSample ( uint32_t index) const

Retrieves sampled points used during the model fitting operation.

Parameters
indexIndex of the point between 0 and EBaseGauge::GetNumSamples

◆ GetSamplePointIndex()

uint32_t eVision::EBaseGauge::GetSamplePointIndex ( ) const

Sampled.

◆ GetSamplingStep()

float eVision::EBaseGauge::GetSamplingStep ( ) const

Approximate distance between sampled points during a model fitting operation.

Irrelevant in case of a point gauge.

To fit a model, a series of point location operations are performed along the model. The point location gauges spacing is given by the sampling step.

By default, the sampling step is set to 5, which means 5 pixels when the field of view is not calibrated, and 5 physical units in case of a calibrated field of view.

Be aware that if the sampling step is too large, the number of sampled points along the model will not be sufficient to accurately locate it.

◆ GetSkipRange()

eVision::EIntegerRange eVision::EBaseGauge::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).

Parameters
indexIndex of the skip range.

Start is guaranteed to be smaller or equal to end.

◆ GetSmoothing()

virtual uint32_t eVision::EBaseGauge::GetSmoothing ( ) const
pure 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.

Implemented in eVision::ECircleGauge, eVision::ELineGauge, eVision::EPointGauge, eVision::EPolygonGauge, eVision::ERectangleGauge, and eVision::EWedgeGauge.

◆ GetThickness()

virtual uint32_t eVision::EBaseGauge::GetThickness ( ) const
pure 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.

Implemented in eVision::ECircleGauge, eVision::ELineGauge, eVision::EPointGauge, eVision::EPolygonGauge, eVision::ERectangleGauge, and eVision::EWedgeGauge.

◆ GetThreshold()

virtual uint32_t eVision::EBaseGauge::GetThreshold ( ) const
pure 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.

Implemented in eVision::ECircleGauge, eVision::ELineGauge, eVision::EPointGauge, eVision::EPolygonGauge, eVision::ERectangleGauge, and eVision::EWedgeGauge.

◆ GetTolerance()

virtual float eVision::EBaseGauge::GetTolerance ( ) const
pure 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.

Implemented in eVision::ECircleGauge, eVision::ELineGauge, eVision::EPointGauge, eVision::EPolygonGauge, eVision::ERectangleGauge, and eVision::EWedgeGauge.

◆ GetTransitionChoice()

virtual eVision::ETransitionChoice eVision::EBaseGauge::GetTransitionChoice ( ) const
pure 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).

Implemented in eVision::ECircleGauge, eVision::ELineGauge, eVision::EPointGauge, eVision::EPolygonGauge, eVision::ERectangleGauge, and eVision::EWedgeGauge.

◆ GetTransitionIndex()

virtual uint32_t eVision::EBaseGauge::GetTransitionIndex ( ) const
pure 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).

Implemented in eVision::ECircleGauge, eVision::ELineGauge, eVision::EPointGauge, eVision::EPolygonGauge, eVision::ERectangleGauge, and eVision::EWedgeGauge.

◆ GetTransitionType()

virtual eVision::ETransitionType eVision::EBaseGauge::GetTransitionType ( ) const
pure 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).

Implemented in eVision::ECircleGauge, eVision::ELineGauge, eVision::EPointGauge, eVision::EPolygonGauge, eVision::ERectangleGauge, and eVision::EWedgeGauge.

◆ GetType()

virtual eVision::EShapeType eVision::EBaseGauge::GetType ( ) const
pure virtual

◆ HasProperty()

bool eVision::EBaseGauge::HasProperty ( const std::string & aProperty) const

Returns whether a EBaseGauge has a property named aProperty.

Parameters
aPropertyThe name of the property.

◆ HasSamples()

bool eVision::EBaseGauge::HasSamples ( ) const

Whether the samples are available or not.

The samples are available after a call to EBaseGauge::Measure, even if the shape was not found.

◆ HasValidPolarityProperty()

bool eVision::EBaseGauge::HasValidPolarityProperty ( ) const

Returns whether the EBaseGauge has a valid polarity property.

I.e. if it has a property named "polarity" whose value is either "inverted" or "direct".

The "polarity" property is mostly used to define the orientation of the gradient in a shape of a EVectorModel.

◆ HitTest() [1/10]

eVision::EEditionMode eVision::EBaseGauge::HitTest ( int32_t x,
int32_t y )

Checks if there is a handle under the cursor and returns the corresponding edition mode.

Parameters
xCursor current X coordinate.
yCursor current Y coordinate.

◆ HitTest() [2/10]

eVision::EEditionMode eVision::EBaseGauge::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.

Parameters
xCursor current X coordinate.
yCursor current Y coordinate.
frameFrame of reference in which the gauge is located.

◆ HitTest() [3/10]

eVision::EEditionMode eVision::EBaseGauge::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.

Parameters
xCursor current X coordinate.
yCursor current Y coordinate.
frameFrame of reference in which the gauge is located.
zoomXHorizontal zoom factor. By default, true scale is used.

◆ HitTest() [4/10]

eVision::EEditionMode eVision::EBaseGauge::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.

Parameters
xCursor current X coordinate.
yCursor current Y coordinate.
frameFrame of reference in which the gauge is located.
zoomXHorizontal zoom factor. By default, true scale is used.
zoomYVertical zoom factor. By default, true scale is used.

◆ HitTest() [5/10]

eVision::EEditionMode eVision::EBaseGauge::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.

Parameters
xCursor current X coordinate.
yCursor current Y coordinate.
frameFrame of reference in which the gauge is located.
zoomXHorizontal zoom factor. By default, true scale is used.
zoomYVertical zoom factor. By default, true scale is used.
panXHorizontal pan offset. By default, no pan is added.

◆ HitTest() [6/10]

eVision::EEditionMode eVision::EBaseGauge::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.

Parameters
xCursor current X coordinate.
yCursor current Y coordinate.
frameFrame of reference in which the gauge is located.
zoomXHorizontal zoom factor. By default, true scale is used.
zoomYVertical zoom factor. By default, true scale is used.
panXHorizontal pan offset. By default, no pan is added.
panYVertical pan offset. By default, no pan is added.

◆ HitTest() [7/10]

eVision::EEditionMode eVision::EBaseGauge::HitTest ( int32_t x,
int32_t y,
float zoomX )

Checks if there is a handle under the cursor and returns the corresponding edition mode.

Parameters
xCursor current X coordinate.
yCursor current Y coordinate.
zoomXHorizontal zoom factor. By default, true scale is used.

◆ HitTest() [8/10]

eVision::EEditionMode eVision::EBaseGauge::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.

Parameters
xCursor current X coordinate.
yCursor current Y coordinate.
zoomXHorizontal zoom factor. By default, true scale is used.
zoomYVertical zoom factor. By default, true scale is used.

◆ HitTest() [9/10]

eVision::EEditionMode eVision::EBaseGauge::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.

Parameters
xCursor current X coordinate.
yCursor current Y coordinate.
zoomXHorizontal zoom factor. By default, true scale is used.
zoomYVertical zoom factor. By default, true scale is used.
panXHorizontal pan offset. By default, no pan is added.

◆ HitTest() [10/10]

eVision::EEditionMode eVision::EBaseGauge::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.

Parameters
xCursor current X coordinate.
yCursor current Y coordinate.
zoomXHorizontal zoom factor. By default, true scale is used.
zoomYVertical zoom factor. By default, true scale is used.
panXHorizontal pan offset. By default, no pan is added.
panYVertical pan offset. By default, no pan is added.

◆ IsFound()

bool eVision::EBaseGauge::IsFound ( ) const

Flag indicating whether a measured shape has been found.

After calling Measure() on a gauge object, use IsFound() to get the status of the measurement.

◆ Load() [1/2]

void eVision::EBaseGauge::Load ( const std::string & path)

Loads a gauge.The given ESerializer must have been created for reading.

Parameters
pathThe file path.

◆ Load() [2/2]

void eVision::EBaseGauge::Load ( eVision::ESerializer * serializer)

Loads a gauge.The given ESerializer must have been created for reading.

Parameters
serializerPointer to the ESerializer created for reading.

◆ Make()

std::unique_ptr< eVision::EBaseGauge > eVision::EBaseGauge::Make ( const std::string & path)
static

Creates a gauge of the correct type.

Parameters
pathFile path

◆ Measure() [1/4]

std::unique_ptr< eVision::EShape > eVision::EBaseGauge::Measure ( const eVision::EROIBW8 & sourceImage)

Performs the gauge measurement.

For a point gauge, it locates the points along the defined path. For other gauges, it performs the model fitting operation.

Parameters
sourceImageSource image.

◆ Measure() [2/4]

std::unique_ptr< eVision::EShape > eVision::EBaseGauge::Measure ( const eVision::EROIBW8 & sourceImage,
const eVision::EFrame & frame )

Performs the gauge measurement.

For a point gauge, it locates the points along the defined path. For other gauges, it performs the model fitting operation.

Parameters
sourceImageSource image.
frameFrame of reference

◆ Measure() [3/4]

std::unique_ptr< eVision::EShape > eVision::EBaseGauge::Measure ( const eVision::EROIBW8 & sourceImage,
const eVision::ERegion & region )

Performs the gauge measurement.

For a point gauge, it locates the points along the defined path. For other gauges, it performs the model fitting operation.

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

◆ Measure() [4/4]

std::unique_ptr< eVision::EShape > eVision::EBaseGauge::Measure ( const eVision::EROIBW8 & sourceImage,
const eVision::ERegion & region,
const eVision::EFrame & frame )

Performs the gauge measurement.

For a point gauge, it locates the points along the defined path. For other gauges, it performs the model fitting operation.

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

◆ MeasureSamplePath() [1/4]

eVision::ESamplePath eVision::EBaseGauge::MeasureSamplePath ( const eVision::EROIBW8 & sourceImage,
uint32_t pathIndex ) const
virtual

Measures the specified sample path.

The sample path contains all the detected transitions along that path and can be used to plot the profile and derivatives of that path.

Parameters
sourceImageSource image.
pathIndexIndex of the path to measure between 0 and EBaseGauge::GetNumSamples.

◆ MeasureSamplePath() [2/4]

eVision::ESamplePath eVision::EBaseGauge::MeasureSamplePath ( const eVision::EROIBW8 & sourceImage,
uint32_t pathIndex,
const eVision::EFrame & frame ) const
virtual

Measures the specified sample path.

The sample path contains all the detected transitions along that path and can be used to plot the profile and derivatives of that path.

Parameters
sourceImageSource image.
pathIndexIndex of the path to measure between 0 and EBaseGauge::GetNumSamples.
frameFrame of reference

◆ MeasureSamplePath() [3/4]

eVision::ESamplePath eVision::EBaseGauge::MeasureSamplePath ( const eVision::EROIBW8 & sourceImage,
uint32_t pathIndex,
const eVision::ERegion & region ) const
virtual

Measures the specified sample path.

The sample path contains all the detected transitions along that path and can be used to plot the profile and derivatives of that path.

Parameters
sourceImageSource image.
pathIndexIndex of the path to measure between 0 and EBaseGauge::GetNumSamples.
regionRegion to use with the source image.

◆ MeasureSamplePath() [4/4]

eVision::ESamplePath eVision::EBaseGauge::MeasureSamplePath ( const eVision::EROIBW8 & sourceImage,
uint32_t pathIndex,
const eVision::ERegion & region,
const eVision::EFrame & frame ) const
virtual

Measures the specified sample path.

The sample path contains all the detected transitions along that path and can be used to plot the profile and derivatives of that path.

Parameters
sourceImageSource image.
pathIndexIndex of the path to measure between 0 and EBaseGauge::GetNumSamples.
regionRegion to use with the source image.
frameFrame of reference

◆ MeasureWithoutFitting() [1/4]

void eVision::EBaseGauge::MeasureWithoutFitting ( const eVision::EROIBW8 & sourceImage)

Triggers the point location without line fitting operation.

Parameters
sourceImageSource image.

This method performs the actual measurement for each transition, but does not perform the gauge fitting. This means that individual samples will be available through the EBaseGauge::GetSample method, but the gauge position will not be changed.

Please note that the filtering will not be performed in this method, since it relies upon the fitting process. The filtering parameters will thus be unused.

For point gauge, this method is equivalent to EBaseGauge::Measure.

◆ MeasureWithoutFitting() [2/4]

void eVision::EBaseGauge::MeasureWithoutFitting ( const eVision::EROIBW8 & sourceImage,
const eVision::EFrame & frame )

Triggers the point location without line fitting operation.

Parameters
sourceImageSource image.
frameFrame of reference

This method performs the actual measurement for each transition, but does not perform the gauge fitting. This means that individual samples will be available through the EBaseGauge::GetSample method, but the gauge position will not be changed.

Please note that the filtering will not be performed in this method, since it relies upon the fitting process. The filtering parameters will thus be unused.

For point gauge, this method is equivalent to EBaseGauge::Measure.

◆ MeasureWithoutFitting() [3/4]

void eVision::EBaseGauge::MeasureWithoutFitting ( const eVision::EROIBW8 & sourceImage,
const eVision::ERegion & region )

Triggers the point location without line fitting operation.

Parameters
sourceImageSource image.
regionThe region on which to measure.

This method performs the actual measurement for each transition, but does not perform the gauge fitting. This means that individual samples will be available through the EBaseGauge::GetSample method, but the gauge position will not be changed.

Please note that the filtering will not be performed in this method, since it relies upon the fitting process. The filtering parameters will thus be unused.

For point gauge, this method is equivalent to EBaseGauge::Measure.

◆ MeasureWithoutFitting() [4/4]

void eVision::EBaseGauge::MeasureWithoutFitting ( const eVision::EROIBW8 & sourceImage,
const eVision::ERegion & region,
const eVision::EFrame & frame )

Triggers the point location without line fitting operation.

Parameters
sourceImageSource image.
regionThe region on which to measure.
frameFrame of reference

This method performs the actual measurement for each transition, but does not perform the gauge fitting. This means that individual samples will be available through the EBaseGauge::GetSample method, but the gauge position will not be changed.

Please note that the filtering will not be performed in this method, since it relies upon the fitting process. The filtering parameters will thus be unused.

For point gauge, this method is equivalent to EBaseGauge::Measure.

◆ RemoveAllSkipRanges()

void eVision::EBaseGauge::RemoveAllSkipRanges ( )

Removes all the skip ranges previously created by a call to EBaseGauge::AddSkipRange.

◆ RemoveProperty()

void eVision::EBaseGauge::RemoveProperty ( const std::string & aProperty)

Removes the property name aProperty from the EBaseGauge.

Parameters
aPropertyThe name of the property.

◆ RemoveSkipRange()

void eVision::EBaseGauge::RemoveSkipRange ( const uint32_t index)

After a call to EBaseGauge::AddSkipRange, removes the skip range with the given index.

Parameters
indexIndex of the skip range to remove, as returned by EBaseGauge::AddSkipRange.

◆ Save() [1/2]

void eVision::EBaseGauge::Save ( const std::string & path)

Saves a gauge.The given ESerializer must have been created for writing.

Parameters
pathThe file path.

◆ Save() [2/2]

void eVision::EBaseGauge::Save ( eVision::ESerializer * serializer)

Saves a gauge.The given ESerializer must have been created for writing.

Parameters
serializerPointer to the ESerializer created for writing.

◆ SetEditionMode()

void eVision::EBaseGauge::SetEditionMode ( eVision::EEditionMode mode)

Graphical edition mode (default: EBaseGauge::GetAvailableEditionModes).

Parameters
modeEEditionMode flags

This also sets the same graphical edition mode to the nominal shape.

◆ SetFilteringThreshold()

void eVision::EBaseGauge::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.

Irrelevant in case of a point location operation.

During a model fitting operation, the "filtering" process can be invoked to remove outliers, i.e. points that were located significantly far away from the fitted model (so that their position is dubious).

◆ SetHVConstraint()

virtual void eVision::EBaseGauge::SetHVConstraint ( bool bHVConstraint)
pure 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.

Implemented in eVision::ECircleGauge, eVision::ELineGauge, eVision::EPointGauge, eVision::EPolygonGauge, eVision::ERectangleGauge, and eVision::EWedgeGauge.

◆ SetLabeled()

void eVision::EBaseGauge::SetLabeled ( bool labeled)

Whether to draw a label describing the gauge (default: no).

◆ SetMinAmplitude()

virtual void eVision::EBaseGauge::SetMinAmplitude ( uint32_t un32MinAmplitude)
pure 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.

Implemented in eVision::ECircleGauge, eVision::ELineGauge, eVision::EPointGauge, eVision::EPolygonGauge, eVision::ERectangleGauge, and eVision::EWedgeGauge.

◆ SetMinArea()

virtual void eVision::EBaseGauge::SetMinArea ( uint32_t un32MinArea)
pure 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.

Implemented in eVision::ECircleGauge, eVision::ELineGauge, eVision::EPointGauge, eVision::EPolygonGauge, eVision::ERectangleGauge, and eVision::EWedgeGauge.

◆ SetMinNumFitSamples()

void eVision::EBaseGauge::SetMinNumFitSamples ( const std::vector< int32_t > & sides)

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

Parameters
sidesThe list of the minimum number of samples to fit the shape.

In case of a ERectangleGauge, 4 values are used, one for each side of the rectangle. Value 0 is used for line and circle gauge. Values 0,1,2,3 are used for rectangle and wedge gauge in the following manner: Rectangle : Top = 0, Left = 1, Bottom = 2, Right = 3 Wedge : Outer Circle = 0, Origin Border = 1, Inner Circle = 2, End Border = 3

◆ SetName()

void eVision::EBaseGauge::SetName ( const std::string & name)

Name of the EBaseGauge object.

◆ SetNominal()

virtual void eVision::EBaseGauge::SetNominal ( const eVision::EShape & shape)
pure 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.

Implemented in eVision::ECircleGauge, eVision::ELineGauge, eVision::EPointGauge, eVision::EPolygonGauge, eVision::ERectangleGauge, and eVision::EWedgeGauge.

◆ SetNumFilteringPasses()

void eVision::EBaseGauge::SetNumFilteringPasses ( uint32_t un32NumFilteringPasses)

Number of filtering passes for a model fitting operation.

Irrelevant in case of a point location operation.

During a filtering pass, the points that are too distant from the model are discarded. During a model fitting operation, the "filtering" process can be invoked to remove outliers, i.e. points that were located significantly far away from the fitted model (so that their position is dubious).

By default, (the number of filtering passes is 0), the outliers rejection process is disabled.

◆ SetProperty()

void eVision::EBaseGauge::SetProperty ( const std::string & aProperty,
const std::string & aValue )

Sets the value of property aProperty to aValue for this EBaseGauge.

Parameters
aPropertyThe name of the property.
aValueThe value of the property.

You may use a shape property to define the orientation of the gradient in a shape of a EVectorModel. This is done by setting a property named "polarity" to "inverted" or "direct".

Additionally, you may set any property to any value for your own needs.

◆ SetRectangularSamplingArea()

virtual void eVision::EBaseGauge::SetRectangularSamplingArea ( bool bRectangularSamplingArea)
pure 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.

Implemented in eVision::ECircleGauge, eVision::ELineGauge, eVision::EPointGauge, eVision::EPolygonGauge, eVision::ERectangleGauge, and eVision::EWedgeGauge.

◆ SetSamplePointIndex()

void eVision::EBaseGauge::SetSamplePointIndex ( uint32_t index)

Sampled.

◆ SetSamplingStep()

void eVision::EBaseGauge::SetSamplingStep ( float f32SamplingStep)

Approximate distance between sampled points during a model fitting operation.

Irrelevant in case of a point gauge.

To fit a model, a series of point location operations are performed along the model. The point location gauges spacing is given by the sampling step.

By default, the sampling step is set to 5, which means 5 pixels when the field of view is not calibrated, and 5 physical units in case of a calibrated field of view.

Be aware that if the sampling step is too large, the number of sampled points along the model will not be sufficient to accurately locate it.

◆ SetSmoothing()

virtual void eVision::EBaseGauge::SetSmoothing ( uint32_t un32Smoothing)
pure 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.

Implemented in eVision::ECircleGauge, eVision::ELineGauge, eVision::EPointGauge, eVision::EPolygonGauge, eVision::ERectangleGauge, and eVision::EWedgeGauge.

◆ SetThickness()

virtual void eVision::EBaseGauge::SetThickness ( uint32_t un32Thickness)
pure 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.

Implemented in eVision::ECircleGauge, eVision::ELineGauge, eVision::EPointGauge, eVision::EPolygonGauge, eVision::ERectangleGauge, and eVision::EWedgeGauge.

◆ SetThreshold()

virtual void eVision::EBaseGauge::SetThreshold ( uint32_t un32Threshold)
pure 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.

Implemented in eVision::ECircleGauge, eVision::ELineGauge, eVision::EPointGauge, eVision::EPolygonGauge, eVision::ERectangleGauge, and eVision::EWedgeGauge.

◆ SetTolerance()

virtual void eVision::EBaseGauge::SetTolerance ( float tolerance)
pure 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.

Implemented in eVision::ECircleGauge, eVision::ELineGauge, eVision::EPointGauge, eVision::EPolygonGauge, eVision::ERectangleGauge, and eVision::EWedgeGauge.

◆ SetTransitionChoice()

virtual void eVision::EBaseGauge::SetTransitionChoice ( eVision::ETransitionChoice eTransitionChoice)
pure 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).

Implemented in eVision::ECircleGauge, eVision::ELineGauge, eVision::EPointGauge, eVision::EPolygonGauge, eVision::ERectangleGauge, and eVision::EWedgeGauge.

◆ SetTransitionIndex()

virtual void eVision::EBaseGauge::SetTransitionIndex ( uint32_t un32TransitionIndex)
pure 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).

Implemented in eVision::ECircleGauge, eVision::ELineGauge, eVision::EPointGauge, eVision::EPolygonGauge, eVision::ERectangleGauge, and eVision::EWedgeGauge.

◆ SetTransitionType()

virtual void eVision::EBaseGauge::SetTransitionType ( eVision::ETransitionType eTransitionType)
pure 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).

Implemented in eVision::ECircleGauge, eVision::ELineGauge, eVision::EPointGauge, eVision::EPolygonGauge, eVision::ERectangleGauge, and eVision::EWedgeGauge.

Member Data Documentation

◆ wrappedClass_

CppWrapperInternal::WrappedClass eVision::EBaseGauge::wrappedClass_