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

The ESpot store information about the detections produced by ESpotDetector. A spot is defined by a type (particle or scratch), a polarity (black or white) and a geometry. The geometry is an arbitrary rectangle, represented by a ERotatedBoundingBox. More...

#include <eVision/EasySpotDetector/ESpot.h>

Collaboration diagram for eVision::ESpot:

Public Member Functions

 ESpot ()
 Constructs an ESpot with default (invalid) values.
 ESpot (const eVision::ESpot &other)
 Copy constructor for ESpot.
virtual ~ESpot () throw ()
eVision::ESpot & operator= (const eVision::ESpot &other)
 Assignment operator.
bool operator== (const eVision::ESpot &other) const
 Check if two ESpot are identical.
bool operator!= (const eVision::ESpot &other) const
 Check if two ESpot are different.
eVision::ESpotType GetType () const
 Get the type of the spot, i.e. whether it is a ESpotType::ESpotType_Scratch or a ESpotType::ESpotType_Particle.
eVision::ESpotPolarity GetPolarity () const
 Get the polarity of the spot, i.e. whether it is ESpotPolarity::ESpotPolarity_White, ESpotPolarity::ESpotPolarity_Black or ESpotPolarity::ESpotPolarity_Any. A Spot's polarity is the same as the polarity setting of the detector when the spot was detected.
eVision::EPoint GetCenter () const
 Get the center point of the spot.
float GetWidth () const
 Get the width of the bounding box of spot.
float GetHeight () const
 Get the height of the bounding box of spot.
uint32_t GetArea () const
 Get the area of the spot (in number of pixels).
float GetStrength () const
 Get the strength of the spot (the average grey scale value over the local image background).
const eVision::ERotatedBoundingBox & GetBox () const
 Returns the rotated rectangle representing the spot.
const eVision::ERegion & GetRegion () const
 Returns the ERegion of the spot (the pixels composing the spot).
eVision::EROIBW8 GetROI () const
 Returns the EROIBW8 of the spot (axis aligned bounding box). The returned ROI is not attached to an image.
std::string GetDLLabel () const
 Returns the Deep Learning classification label.
float GetDLProbability () const
 Returns the Deep Learning classification probability.
void Draw (eVision::EDrawAdapter *drawAdapter, float extension, const eVision::ERGBColor &color, float zoomX, float zoomY, float panX, float panY) const
 Draw the ESpot.
void Draw (eVision::EDrawAdapter *drawAdapter, float extension, const eVision::ERGBColor &color, float zoomX, float zoomY, float panX) const
 Draw the ESpot.
void Draw (eVision::EDrawAdapter *drawAdapter, float extension, const eVision::ERGBColor &color, float zoomX, float zoomY) const
 Draw the ESpot.
void Draw (eVision::EDrawAdapter *drawAdapter, float extension, const eVision::ERGBColor &color, float zoomX) const
 Draw the ESpot.
void Draw (eVision::EDrawAdapter *drawAdapter, float extension, const eVision::ERGBColor &color) const
 Draw the ESpot.
void Draw (eVision::EDrawAdapter *drawAdapter, float extension) const
 Draw the ESpot.
void Draw (eVision::EDrawAdapter *drawAdapter) const
 Draw the ESpot.
void Draw (eVision::EDrawAdapter *drawAdapter, const eVision::EFrame &frame, float extension, const eVision::ERGBColor &color, float zoomX, float zoomY, float panX, float panY) const
 Draw the ESpot.
void Draw (eVision::EDrawAdapter *drawAdapter, const eVision::EFrame &frame, float extension, const eVision::ERGBColor &color, float zoomX, float zoomY, float panX) const
 Draw the ESpot.
void Draw (eVision::EDrawAdapter *drawAdapter, const eVision::EFrame &frame, float extension, const eVision::ERGBColor &color, float zoomX, float zoomY) const
 Draw the ESpot.
void Draw (eVision::EDrawAdapter *drawAdapter, const eVision::EFrame &frame, float extension, const eVision::ERGBColor &color, float zoomX) const
 Draw the ESpot.
void Draw (eVision::EDrawAdapter *drawAdapter, const eVision::EFrame &frame, float extension, const eVision::ERGBColor &color) const
 Draw the ESpot.
void Draw (eVision::EDrawAdapter *drawAdapter, const eVision::EFrame &frame, float extension) const
 Draw the ESpot.
void Draw (eVision::EDrawAdapter *drawAdapter, const eVision::EFrame &frame) const
 Draw the ESpot.
void Draw (HDC graphicsContext, float extension, const eVision::ERGBColor &color, float zoomX, float zoomY, float panX, float panY) const
 Draw the ESpot.
void Draw (HDC graphicsContext, float extension, const eVision::ERGBColor &color, float zoomX, float zoomY, float panX) const
 Draw the ESpot.
void Draw (HDC graphicsContext, float extension, const eVision::ERGBColor &color, float zoomX, float zoomY) const
 Draw the ESpot.
void Draw (HDC graphicsContext, float extension, const eVision::ERGBColor &color, float zoomX) const
 Draw the ESpot.
void Draw (HDC graphicsContext, float extension, const eVision::ERGBColor &color) const
 Draw the ESpot.
void Draw (HDC graphicsContext, float extension) const
 Draw the ESpot.
void Draw (HDC graphicsContext) const
 Draw the ESpot.
void Load (const std::string &path)
 Loads the ESpot. The given ESerializer must have been created for reading.
void Load (eVision::ESerializer *serializer)
 Loads the ESpot. The given ESerializer must have been created for reading.
void Save (const std::string &path)
 Saves the ESpot. The given ESerializer must have been created for writing.
void Save (eVision::ESerializer *serializer)
 Saves the ESpot. The given ESerializer must have been created for writing.
eVision::ESpot LocalToSensor (const eVision::EFrame &frame)
 Transforms a spot from local to sensor coordinates.
eVision::ESpot SensorToLocal (const eVision::EFrame &frame)
 Transforms a spot from sensor to local coordinates.
 ESpot (CppWrapperInternal::InternalConstructor)

Public Attributes

CppWrapperInternal::WrappedClass wrappedClass_

Detailed Description

The ESpot store information about the detections produced by ESpotDetector. A spot is defined by a type (particle or scratch), a polarity (black or white) and a geometry. The geometry is an arbitrary rectangle, represented by a ERotatedBoundingBox.

License(s): EasySpotDetector

Deprecated
Deprecated in version 26.6. Scheduled to be removed in version 27.6.

Constructor & Destructor Documentation

◆ ESpot() [1/3]

eVision::ESpot::ESpot ( )

Constructs an ESpot with default (invalid) values.

◆ ESpot() [2/3]

eVision::ESpot::ESpot ( const eVision::ESpot & other)

Copy constructor for ESpot.

Parameters
otherThe other ESpot that we will copy into this one.

◆ ~ESpot()

eVision::ESpot::~ESpot ( )
throw ( )
virtual

◆ ESpot() [3/3]

eVision::ESpot::ESpot ( CppWrapperInternal::InternalConstructor )

Member Function Documentation

◆ Draw() [1/21]

void eVision::ESpot::Draw ( eVision::EDrawAdapter * drawAdapter) const

Draw the ESpot.

Parameters
drawAdapterEDrawAdapter that will be used to draw.

◆ Draw() [2/21]

void eVision::ESpot::Draw ( eVision::EDrawAdapter * drawAdapter,
const eVision::EFrame & frame ) const

Draw the ESpot.

Parameters
drawAdapterEDrawAdapter that will be used to draw.
frameFrame associated with the spot. Usually, frame used to detect the spot.

◆ Draw() [3/21]

void eVision::ESpot::Draw ( eVision::EDrawAdapter * drawAdapter,
const eVision::EFrame & frame,
float extension ) const

Draw the ESpot.

Parameters
drawAdapterEDrawAdapter that will be used to draw.
frameFrame associated with the spot. Usually, frame used to detect the spot.
extensionExtension in pixels of the draw rectangle around the spot. Only used for ESpotType::ESpotType_Particle.

◆ Draw() [4/21]

void eVision::ESpot::Draw ( eVision::EDrawAdapter * drawAdapter,
const eVision::EFrame & frame,
float extension,
const eVision::ERGBColor & color ) const

Draw the ESpot.

Parameters
drawAdapterEDrawAdapter that will be used to draw.
frameFrame associated with the spot. Usually, frame used to detect the spot.
extensionExtension in pixels of the draw rectangle around the spot. Only used for ESpotType::ESpotType_Particle.
colorColor of the draw rectangle.

◆ Draw() [5/21]

void eVision::ESpot::Draw ( eVision::EDrawAdapter * drawAdapter,
const eVision::EFrame & frame,
float extension,
const eVision::ERGBColor & color,
float zoomX ) const

Draw the ESpot.

Parameters
drawAdapterEDrawAdapter that will be used to draw.
frameFrame associated with the spot. Usually, frame used to detect the spot.
extensionExtension in pixels of the draw rectangle around the spot. Only used for ESpotType::ESpotType_Particle.
colorColor of the draw rectangle.
zoomXHorizontal zooming factor. By default, true scale is used.

◆ Draw() [6/21]

void eVision::ESpot::Draw ( eVision::EDrawAdapter * drawAdapter,
const eVision::EFrame & frame,
float extension,
const eVision::ERGBColor & color,
float zoomX,
float zoomY ) const

Draw the ESpot.

Parameters
drawAdapterEDrawAdapter that will be used to draw.
frameFrame associated with the spot. Usually, frame used to detect the spot.
extensionExtension in pixels of the draw rectangle around the spot. Only used for ESpotType::ESpotType_Particle.
colorColor of the draw rectangle.
zoomXHorizontal zooming factor. By default, true scale is used.
zoomYVertical zooming factor. If set to 0 (default), the horizontal zooming factor is used instead, so as to provide isotropic zooming.

◆ Draw() [7/21]

void eVision::ESpot::Draw ( eVision::EDrawAdapter * drawAdapter,
const eVision::EFrame & frame,
float extension,
const eVision::ERGBColor & color,
float zoomX,
float zoomY,
float panX ) const

Draw the ESpot.

Parameters
drawAdapterEDrawAdapter that will be used to draw.
frameFrame associated with the spot. Usually, frame used to detect the spot.
extensionExtension in pixels of the draw rectangle around the spot. Only used for ESpotType::ESpotType_Particle.
colorColor of the draw rectangle.
zoomXHorizontal zooming factor. By default, true scale is used.
zoomYVertical zooming factor. If set to 0 (default), the horizontal zooming factor is used instead, so as to provide isotropic zooming.
panXHorizontal panning value expressed in pixels. By default, no panning occurs.

◆ Draw() [8/21]

void eVision::ESpot::Draw ( eVision::EDrawAdapter * drawAdapter,
const eVision::EFrame & frame,
float extension,
const eVision::ERGBColor & color,
float zoomX,
float zoomY,
float panX,
float panY ) const

Draw the ESpot.

Parameters
drawAdapterEDrawAdapter that will be used to draw.
frameFrame associated with the spot. Usually, frame used to detect the spot.
extensionExtension in pixels of the draw rectangle around the spot. Only used for ESpotType::ESpotType_Particle.
colorColor of the draw rectangle.
zoomXHorizontal zooming factor. By default, true scale is used.
zoomYVertical zooming factor. If set to 0 (default), the horizontal zooming factor is used instead, so as to provide isotropic zooming.
panXHorizontal panning value expressed in pixels. By default, no panning occurs.
panYVertical panning value expressed in pixels. By default, no panning occurs.

◆ Draw() [9/21]

void eVision::ESpot::Draw ( eVision::EDrawAdapter * drawAdapter,
float extension ) const

Draw the ESpot.

Parameters
drawAdapterEDrawAdapter that will be used to draw.
extensionExtension in pixels of the draw rectangle around the spot. Only used for ESpotType::ESpotType_Particle.

◆ Draw() [10/21]

void eVision::ESpot::Draw ( eVision::EDrawAdapter * drawAdapter,
float extension,
const eVision::ERGBColor & color ) const

Draw the ESpot.

Parameters
drawAdapterEDrawAdapter that will be used to draw.
extensionExtension in pixels of the draw rectangle around the spot. Only used for ESpotType::ESpotType_Particle.
colorColor of the draw rectangle.

◆ Draw() [11/21]

void eVision::ESpot::Draw ( eVision::EDrawAdapter * drawAdapter,
float extension,
const eVision::ERGBColor & color,
float zoomX ) const

Draw the ESpot.

Parameters
drawAdapterEDrawAdapter that will be used to draw.
extensionExtension in pixels of the draw rectangle around the spot. Only used for ESpotType::ESpotType_Particle.
colorColor of the draw rectangle.
zoomXHorizontal zooming factor. By default, true scale is used.

◆ Draw() [12/21]

void eVision::ESpot::Draw ( eVision::EDrawAdapter * drawAdapter,
float extension,
const eVision::ERGBColor & color,
float zoomX,
float zoomY ) const

Draw the ESpot.

Parameters
drawAdapterEDrawAdapter that will be used to draw.
extensionExtension in pixels of the draw rectangle around the spot. Only used for ESpotType::ESpotType_Particle.
colorColor of the draw rectangle.
zoomXHorizontal zooming factor. By default, true scale is used.
zoomYVertical zooming factor. If set to 0 (default), the horizontal zooming factor is used instead, so as to provide isotropic zooming.

◆ Draw() [13/21]

void eVision::ESpot::Draw ( eVision::EDrawAdapter * drawAdapter,
float extension,
const eVision::ERGBColor & color,
float zoomX,
float zoomY,
float panX ) const

Draw the ESpot.

Parameters
drawAdapterEDrawAdapter that will be used to draw.
extensionExtension in pixels of the draw rectangle around the spot. Only used for ESpotType::ESpotType_Particle.
colorColor of the draw rectangle.
zoomXHorizontal zooming factor. By default, true scale is used.
zoomYVertical zooming factor. If set to 0 (default), the horizontal zooming factor is used instead, so as to provide isotropic zooming.
panXHorizontal panning value expressed in pixels. By default, no panning occurs.

◆ Draw() [14/21]

void eVision::ESpot::Draw ( eVision::EDrawAdapter * drawAdapter,
float extension,
const eVision::ERGBColor & color,
float zoomX,
float zoomY,
float panX,
float panY ) const

Draw the ESpot.

Parameters
drawAdapterEDrawAdapter that will be used to draw.
extensionExtension in pixels of the draw rectangle around the spot. Only used for ESpotType::ESpotType_Particle.
colorColor of the draw rectangle.
zoomXHorizontal zooming factor. By default, true scale is used.
zoomYVertical zooming factor. If set to 0 (default), the horizontal zooming factor is used instead, so as to provide isotropic zooming.
panXHorizontal panning value expressed in pixels. By default, no panning occurs.
panYVertical panning value expressed in pixels. By default, no panning occurs.

◆ Draw() [15/21]

void eVision::ESpot::Draw ( HDC graphicsContext) const

Draw the ESpot.

Parameters
graphicsContextHandle of the graphics context on which to draw.
Deprecated

Use the overload taking an EDrawAdapter by using an instance of EWindowsDrawAdapter.

Deprecated in version 23.12. Scheduled to be removed in version 27.6.

◆ Draw() [16/21]

void eVision::ESpot::Draw ( HDC graphicsContext,
float extension ) const

Draw the ESpot.

Parameters
graphicsContextHandle of the graphics context on which to draw.
extensionExtension in pixels of the draw rectangle around the spot. Only used for ESpotType::ESpotType_Particle.
Deprecated

Use the overload taking an EDrawAdapter by using an instance of EWindowsDrawAdapter.

Deprecated in version 23.12. Scheduled to be removed in version 27.6.

◆ Draw() [17/21]

void eVision::ESpot::Draw ( HDC graphicsContext,
float extension,
const eVision::ERGBColor & color ) const

Draw the ESpot.

Parameters
graphicsContextHandle of the graphics context on which to draw.
extensionExtension in pixels of the draw rectangle around the spot. Only used for ESpotType::ESpotType_Particle.
colorColor of the draw rectangle.
Deprecated

Use the overload taking an EDrawAdapter by using an instance of EWindowsDrawAdapter.

Deprecated in version 23.12. Scheduled to be removed in version 27.6.

◆ Draw() [18/21]

void eVision::ESpot::Draw ( HDC graphicsContext,
float extension,
const eVision::ERGBColor & color,
float zoomX ) const

Draw the ESpot.

Parameters
graphicsContextHandle of the graphics context on which to draw.
extensionExtension in pixels of the draw rectangle around the spot. Only used for ESpotType::ESpotType_Particle.
colorColor of the draw rectangle.
zoomXHorizontal zooming factor. By default, true scale is used.
Deprecated

Use the overload taking an EDrawAdapter by using an instance of EWindowsDrawAdapter.

Deprecated in version 23.12. Scheduled to be removed in version 27.6.

◆ Draw() [19/21]

void eVision::ESpot::Draw ( HDC graphicsContext,
float extension,
const eVision::ERGBColor & color,
float zoomX,
float zoomY ) const

Draw the ESpot.

Parameters
graphicsContextHandle of the graphics context on which to draw.
extensionExtension in pixels of the draw rectangle around the spot. Only used for ESpotType::ESpotType_Particle.
colorColor of the draw rectangle.
zoomXHorizontal zooming factor. By default, true scale is used.
zoomYVertical zooming factor. If set to 0 (default), the horizontal zooming factor is used instead, so as to provide isotropic zooming.
Deprecated

Use the overload taking an EDrawAdapter by using an instance of EWindowsDrawAdapter.

Deprecated in version 23.12. Scheduled to be removed in version 27.6.

◆ Draw() [20/21]

void eVision::ESpot::Draw ( HDC graphicsContext,
float extension,
const eVision::ERGBColor & color,
float zoomX,
float zoomY,
float panX ) const

Draw the ESpot.

Parameters
graphicsContextHandle of the graphics context on which to draw.
extensionExtension in pixels of the draw rectangle around the spot. Only used for ESpotType::ESpotType_Particle.
colorColor of the draw rectangle.
zoomXHorizontal zooming factor. By default, true scale is used.
zoomYVertical zooming factor. If set to 0 (default), the horizontal zooming factor is used instead, so as to provide isotropic zooming.
panXHorizontal panning value expressed in pixels. By default, no panning occurs.
Deprecated

Use the overload taking an EDrawAdapter by using an instance of EWindowsDrawAdapter.

Deprecated in version 23.12. Scheduled to be removed in version 27.6.

◆ Draw() [21/21]

void eVision::ESpot::Draw ( HDC graphicsContext,
float extension,
const eVision::ERGBColor & color,
float zoomX,
float zoomY,
float panX,
float panY ) const

Draw the ESpot.

Parameters
graphicsContextHandle of the graphics context on which to draw.
extensionExtension in pixels of the draw rectangle around the spot. Only used for ESpotType::ESpotType_Particle.
colorColor of the draw rectangle.
zoomXHorizontal zooming factor. By default, true scale is used.
zoomYVertical zooming factor. If set to 0 (default), the horizontal zooming factor is used instead, so as to provide isotropic zooming.
panXHorizontal panning value expressed in pixels. By default, no panning occurs.
panYVertical panning value expressed in pixels. By default, no panning occurs.
Deprecated

Use the overload taking an EDrawAdapter by using an instance of EWindowsDrawAdapter.

Deprecated in version 23.12. Scheduled to be removed in version 27.6.

◆ GetArea()

uint32_t eVision::ESpot::GetArea ( ) const

Get the area of the spot (in number of pixels).

◆ GetBox()

const eVision::ERotatedBoundingBox & eVision::ESpot::GetBox ( ) const

Returns the rotated rectangle representing the spot.

◆ GetCenter()

eVision::EPoint eVision::ESpot::GetCenter ( ) const

Get the center point of the spot.

◆ GetDLLabel()

std::string eVision::ESpot::GetDLLabel ( ) const

Returns the Deep Learning classification label.

This information is available when the Deep Learning classification has been activated by ESpotDetector::SetDLClassifierPath. See also ESpot::GetDLProbability.

◆ GetDLProbability()

float eVision::ESpot::GetDLProbability ( ) const

Returns the Deep Learning classification probability.

This information is available when the Deep Learning classification has been activated by ESpotDetector::SetDLClassifierPath. See also ESpot::GetDLLabel.

◆ GetHeight()

float eVision::ESpot::GetHeight ( ) const

Get the height of the bounding box of spot.

◆ GetPolarity()

eVision::ESpotPolarity eVision::ESpot::GetPolarity ( ) const

Get the polarity of the spot, i.e. whether it is ESpotPolarity::ESpotPolarity_White, ESpotPolarity::ESpotPolarity_Black or ESpotPolarity::ESpotPolarity_Any. A Spot's polarity is the same as the polarity setting of the detector when the spot was detected.

◆ GetRegion()

const eVision::ERegion & eVision::ESpot::GetRegion ( ) const

Returns the ERegion of the spot (the pixels composing the spot).

◆ GetROI()

eVision::EROIBW8 eVision::ESpot::GetROI ( ) const

Returns the EROIBW8 of the spot (axis aligned bounding box). The returned ROI is not attached to an image.

◆ GetStrength()

float eVision::ESpot::GetStrength ( ) const

Get the strength of the spot (the average grey scale value over the local image background).

◆ GetType()

eVision::ESpotType eVision::ESpot::GetType ( ) const

Get the type of the spot, i.e. whether it is a ESpotType::ESpotType_Scratch or a ESpotType::ESpotType_Particle.

◆ GetWidth()

float eVision::ESpot::GetWidth ( ) const

Get the width of the bounding box of spot.

◆ Load() [1/2]

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

Loads the ESpot. The given ESerializer must have been created for reading.

Parameters
pathThe file path.

◆ Load() [2/2]

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

Loads the ESpot. The given ESerializer must have been created for reading.

Parameters
serializerThe serializer.

◆ LocalToSensor()

eVision::ESpot eVision::ESpot::LocalToSensor ( const eVision::EFrame & frame)

Transforms a spot from local to sensor coordinates.

Parameters
frameReference frame in which the region is defined.

◆ operator!=()

bool eVision::ESpot::operator!= ( const eVision::ESpot & other) const

Check if two ESpot are different.

Parameters
otherThe other object.

◆ operator=()

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

Assignment operator.

Parameters
otherThe other ESpot that we will copy into this one.

◆ operator==()

bool eVision::ESpot::operator== ( const eVision::ESpot & other) const

Check if two ESpot are identical.

Parameters
otherThe other object.

◆ Save() [1/2]

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

Saves the ESpot. The given ESerializer must have been created for writing.

Parameters
pathThe file path.

◆ Save() [2/2]

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

Saves the ESpot. The given ESerializer must have been created for writing.

Parameters
serializerThe ESerializer object that is written to.

◆ SensorToLocal()

eVision::ESpot eVision::ESpot::SensorToLocal ( const eVision::EFrame & frame)

Transforms a spot from sensor to local coordinates.

Parameters
frameReference frame in which the region is defined.

Member Data Documentation

◆ wrappedClass_

CppWrapperInternal::WrappedClass eVision::ESpot::wrappedClass_