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

Manages a laser line extraction context. More...

#include <eVision/Easy3D/Easy3DLaserLine/ELaserLineExtractor.h>

Collaboration diagram for eVision::Easy3D::ELaserLineExtractor:

Public Member Functions

 ELaserLineExtractor (int frameWidth, int frameHeight, int numFramesPerMap, float zResolution)
 Creates an ELaserLineExtractor object.
 ELaserLineExtractor (int frameWidth, int frameHeight, int numFramesPerMap)
 Creates an ELaserLineExtractor object.
 ELaserLineExtractor (const eVision::Easy3D::ELaserLineExtractor &other)
 Creates an ELaserLineExtractor object.
virtual ~ELaserLineExtractor () throw ()
eVision::Easy3D::ELaserLineExtractor & operator= (const eVision::Easy3D::ELaserLineExtractor &other)
 Assignment operator.
int32_t GetFrameWidth () const
 Width of the frames from which the profiles are extracted.
int32_t GetFrameHeight () const
 Height of the frames from which the profiles are extracted.
int32_t GetNumFramesPerMap () const
 Number of frames from which the profiles are be extracted.
float GetZResolution () const
 Z resolution of the extracted profile.
int32_t GetNumExtractedProfile () const
 Number of extracted profiles.
bool ExtractProfileFromFrame (const eVision::EROIBW8 &frame)
 Extracts a profile from a frame and adds it to the current depth map.
std::vector< float > GetProfile () const
 Returns the last extracted profile.
void Save (const std::string &file)
 Save the ELaserLineExtractor configuration. The settings are saved but the profiles aren't.
void Save (eVision::ESerializer *serializer)
 Save the ELaserLineExtractor configuration. The settings are saved but the profiles aren't.
void Load (const std::string &file)
 Load the ELaserLineExtractor configuration. The settings are loaded and the profiles are discarded.
void Load (eVision::ESerializer *serializer)
 Load the ELaserLineExtractor configuration. The settings are loaded and the profiles are discarded.
void SetAnalysisThreshold (int threshold)
 Analysis threshold. Set this value to eliminate noise.
int GetAnalysisThreshold () const
 Analysis threshold. Set this value to eliminate noise.
void SetAnalysisMode (eVision::Easy3D::EMaximumAnalysisMode mode)
 Analysis mode.
eVision::Easy3D::EMaximumAnalysisMode GetAnalysisMode () const
 Analysis mode.
void SetEnableSmoothing (bool enable)
 Enables or disables grayscale profile smoothing before extraction.
bool GetEnableSmoothing () const
 Enables or disables grayscale profile smoothing before extraction.
void SetSmoothingParameters (int param0, int param1, int param2)
 Sets the parameters of the smoothing kernel.
int GetSmoothingParameter0 () const
 Smoothing parameter 0.
void SetSmoothingParameter0 (int val)
 Smoothing parameter 0.
int GetSmoothingParameter1 () const
 Smoothing parameter 1.
void SetSmoothingParameter1 (int val)
 Smoothing parameter 1.
int GetSmoothingParameter2 () const
 Smoothing parameter 2.
void SetSmoothingParameter2 (int val)
 Smoothing parameter 2.
const eVision::Easy3D::EDepthMap16 & GetDepthMap () const
 Returns the current depth map.
void DrawLastProfile (eVision::EDrawAdapter *drawAdapter, float zoomX, float zoomY, float panX, float panY) const
 Draws the last extracted profile.
void DrawLastProfile (eVision::EDrawAdapter *drawAdapter, float zoomX, float zoomY, float panX) const
 Draws the last extracted profile.
void DrawLastProfile (eVision::EDrawAdapter *drawAdapter, float zoomX, float zoomY) const
 Draws the last extracted profile.
void DrawLastProfile (eVision::EDrawAdapter *drawAdapter, float zoomX) const
 Draws the last extracted profile.
void DrawLastProfile (eVision::EDrawAdapter *drawAdapter) const
 Draws the last extracted profile.
 ELaserLineExtractor (CppWrapperInternal::InternalConstructor)

Static Public Member Functions

static void DrawProfile (eVision::EDrawAdapter *drawAdapter, int32_t frameWidth, int32_t frameHeight, const std::vector< float > &profile, float zoomX, float zoomY, float panX, float panY)
 Draws a profile.
static void DrawProfile (eVision::EDrawAdapter *drawAdapter, int32_t frameWidth, int32_t frameHeight, const std::vector< float > &profile, float zoomX, float zoomY, float panX)
 Draws a profile.
static void DrawProfile (eVision::EDrawAdapter *drawAdapter, int32_t frameWidth, int32_t frameHeight, const std::vector< float > &profile, float zoomX, float zoomY)
 Draws a profile.
static void DrawProfile (eVision::EDrawAdapter *drawAdapter, int32_t frameWidth, int32_t frameHeight, const std::vector< float > &profile, float zoomX)
 Draws a profile.
static void DrawProfile (eVision::EDrawAdapter *drawAdapter, int32_t frameWidth, int32_t frameHeight, const std::vector< float > &profile)
 Draws a profile.

Public Attributes

CppWrapperInternal::WrappedClass wrappedClass_

Detailed Description

Manages a laser line extraction context.

License(s): Easy3DLaserLine

Constructor & Destructor Documentation

◆ ELaserLineExtractor() [1/4]

eVision::Easy3D::ELaserLineExtractor::ELaserLineExtractor ( int frameWidth,
int frameHeight,
int numFramesPerMap,
float zResolution )

Creates an ELaserLineExtractor object.

Parameters
frameWidthWidth of the frames from which the profiles will be extracted.
frameHeightHeight of the frames from which the profiles will be extracted.
numFramesPerMapNumber of frames (and thus profiles) to be used per depth map. Each extracted profile create a line in the depth map.
zResolutionOptional parameter for the Z resolution of the extracted profile.

With a value of 0, the resolution will be automatically calculated to maximize the sub-pixel accuracy.

◆ ELaserLineExtractor() [2/4]

eVision::Easy3D::ELaserLineExtractor::ELaserLineExtractor ( int frameWidth,
int frameHeight,
int numFramesPerMap )

Creates an ELaserLineExtractor object.

Parameters
frameWidthWidth of the frames from which the profiles will be extracted.
frameHeightHeight of the frames from which the profiles will be extracted.
numFramesPerMapNumber of frames (and thus profiles) to be used per depth map. Each extracted profile create a line in the depth map.

◆ ELaserLineExtractor() [3/4]

eVision::Easy3D::ELaserLineExtractor::ELaserLineExtractor ( const eVision::Easy3D::ELaserLineExtractor & other)

Creates an ELaserLineExtractor object.

Parameters
otherThe object that should be copied

◆ ~ELaserLineExtractor()

eVision::Easy3D::ELaserLineExtractor::~ELaserLineExtractor ( )
throw ( )
virtual

◆ ELaserLineExtractor() [4/4]

eVision::Easy3D::ELaserLineExtractor::ELaserLineExtractor ( CppWrapperInternal::InternalConstructor )

Member Function Documentation

◆ DrawLastProfile() [1/5]

void eVision::Easy3D::ELaserLineExtractor::DrawLastProfile ( eVision::EDrawAdapter * drawAdapter) const

Draws the last extracted profile.

Parameters
drawAdapterDraw adapter.

◆ DrawLastProfile() [2/5]

void eVision::Easy3D::ELaserLineExtractor::DrawLastProfile ( eVision::EDrawAdapter * drawAdapter,
float zoomX ) const

Draws the last extracted profile.

Parameters
drawAdapterDraw adapter.
zoomXHorizontal zooming factor.

◆ DrawLastProfile() [3/5]

void eVision::Easy3D::ELaserLineExtractor::DrawLastProfile ( eVision::EDrawAdapter * drawAdapter,
float zoomX,
float zoomY ) const

Draws the last extracted profile.

Parameters
drawAdapterDraw adapter.
zoomXHorizontal zooming factor.
zoomYVertical zooming factor. If set to 0, the horizontal zooming factor will be used for isotropic zooming.

◆ DrawLastProfile() [4/5]

void eVision::Easy3D::ELaserLineExtractor::DrawLastProfile ( eVision::EDrawAdapter * drawAdapter,
float zoomX,
float zoomY,
float panX ) const

Draws the last extracted profile.

Parameters
drawAdapterDraw adapter.
zoomXHorizontal zooming factor.
zoomYVertical zooming factor. If set to 0, the horizontal zooming factor will be used for isotropic zooming.
panXHorizontal panning value expressed in pixels. By default, no panning occurs.

◆ DrawLastProfile() [5/5]

void eVision::Easy3D::ELaserLineExtractor::DrawLastProfile ( eVision::EDrawAdapter * drawAdapter,
float zoomX,
float zoomY,
float panX,
float panY ) const

Draws the last extracted profile.

Parameters
drawAdapterDraw adapter.
zoomXHorizontal zooming factor.
zoomYVertical zooming factor. If set to 0, the horizontal zooming factor will be used for isotropic zooming.
panXHorizontal panning value expressed in pixels. By default, no panning occurs.
panYVertical panning value expressed in pixels. By default, no panning occurs.

◆ DrawProfile() [1/5]

void eVision::Easy3D::ELaserLineExtractor::DrawProfile ( eVision::EDrawAdapter * drawAdapter,
int32_t frameWidth,
int32_t frameHeight,
const std::vector< float > & profile )
static

Draws a profile.

Parameters
drawAdapterDraw adapter.
frameWidthWidth of the frame used to extract the profile
frameHeightHeight of the frame used to extract the profile
profileExtracted profile

◆ DrawProfile() [2/5]

void eVision::Easy3D::ELaserLineExtractor::DrawProfile ( eVision::EDrawAdapter * drawAdapter,
int32_t frameWidth,
int32_t frameHeight,
const std::vector< float > & profile,
float zoomX )
static

Draws a profile.

Parameters
drawAdapterDraw adapter.
frameWidthWidth of the frame used to extract the profile
frameHeightHeight of the frame used to extract the profile
profileExtracted profile
zoomXHorizontal zooming factor.

◆ DrawProfile() [3/5]

void eVision::Easy3D::ELaserLineExtractor::DrawProfile ( eVision::EDrawAdapter * drawAdapter,
int32_t frameWidth,
int32_t frameHeight,
const std::vector< float > & profile,
float zoomX,
float zoomY )
static

Draws a profile.

Parameters
drawAdapterDraw adapter.
frameWidthWidth of the frame used to extract the profile
frameHeightHeight of the frame used to extract the profile
profileExtracted profile
zoomXHorizontal zooming factor.
zoomYVertical zooming factor. If set to 0, the horizontal zooming factor will be used for isotropic zooming.

◆ DrawProfile() [4/5]

void eVision::Easy3D::ELaserLineExtractor::DrawProfile ( eVision::EDrawAdapter * drawAdapter,
int32_t frameWidth,
int32_t frameHeight,
const std::vector< float > & profile,
float zoomX,
float zoomY,
float panX )
static

Draws a profile.

Parameters
drawAdapterDraw adapter.
frameWidthWidth of the frame used to extract the profile
frameHeightHeight of the frame used to extract the profile
profileExtracted profile
zoomXHorizontal zooming factor.
zoomYVertical zooming factor. If set to 0, the horizontal zooming factor will be used for isotropic zooming.
panXHorizontal panning value expressed in pixels. By default, no panning occurs.

◆ DrawProfile() [5/5]

void eVision::Easy3D::ELaserLineExtractor::DrawProfile ( eVision::EDrawAdapter * drawAdapter,
int32_t frameWidth,
int32_t frameHeight,
const std::vector< float > & profile,
float zoomX,
float zoomY,
float panX,
float panY )
static

Draws a profile.

Parameters
drawAdapterDraw adapter.
frameWidthWidth of the frame used to extract the profile
frameHeightHeight of the frame used to extract the profile
profileExtracted profile
zoomXHorizontal zooming factor.
zoomYVertical zooming factor. If set to 0, the horizontal zooming factor will be used for isotropic zooming.
panXHorizontal panning value expressed in pixels. By default, no panning occurs.
panYVertical panning value expressed in pixels. By default, no panning occurs.

◆ ExtractProfileFromFrame()

bool eVision::Easy3D::ELaserLineExtractor::ExtractProfileFromFrame ( const eVision::EROIBW8 & frame)

Extracts a profile from a frame and adds it to the current depth map.

Returns true if the depth map is complete and ready for further processing.

Parameters
frameFrame from which the profile will be extracted.

◆ GetAnalysisMode()

eVision::Easy3D::EMaximumAnalysisMode eVision::Easy3D::ELaserLineExtractor::GetAnalysisMode ( ) const

Analysis mode.

◆ GetAnalysisThreshold()

int eVision::Easy3D::ELaserLineExtractor::GetAnalysisThreshold ( ) const

Analysis threshold. Set this value to eliminate noise.

In the center of gravity (COG) analysis mode, this threshold is used to discriminate peaks and should be set accordingly.

◆ GetDepthMap()

const eVision::Easy3D::EDepthMap16 & eVision::Easy3D::ELaserLineExtractor::GetDepthMap ( ) const

Returns the current depth map.

Should be called only when the previous call to ExtractProfileFromFrame() returned true. Otherwise, the depth map returned will be incomplete.

◆ GetEnableSmoothing()

bool eVision::Easy3D::ELaserLineExtractor::GetEnableSmoothing ( ) const

Enables or disables grayscale profile smoothing before extraction.

◆ GetFrameHeight()

int32_t eVision::Easy3D::ELaserLineExtractor::GetFrameHeight ( ) const

Height of the frames from which the profiles are extracted.

◆ GetFrameWidth()

int32_t eVision::Easy3D::ELaserLineExtractor::GetFrameWidth ( ) const

Width of the frames from which the profiles are extracted.

◆ GetNumExtractedProfile()

int32_t eVision::Easy3D::ELaserLineExtractor::GetNumExtractedProfile ( ) const

Number of extracted profiles.

◆ GetNumFramesPerMap()

int32_t eVision::Easy3D::ELaserLineExtractor::GetNumFramesPerMap ( ) const

Number of frames from which the profiles are be extracted.

◆ GetProfile()

std::vector< float > eVision::Easy3D::ELaserLineExtractor::GetProfile ( ) const

Returns the last extracted profile.

If a point could not be extracted, its value will be set to FLOAT_MAX.

◆ GetSmoothingParameter0()

int eVision::Easy3D::ELaserLineExtractor::GetSmoothingParameter0 ( ) const

Smoothing parameter 0.

◆ GetSmoothingParameter1()

int eVision::Easy3D::ELaserLineExtractor::GetSmoothingParameter1 ( ) const

Smoothing parameter 1.

◆ GetSmoothingParameter2()

int eVision::Easy3D::ELaserLineExtractor::GetSmoothingParameter2 ( ) const

Smoothing parameter 2.

◆ GetZResolution()

float eVision::Easy3D::ELaserLineExtractor::GetZResolution ( ) const

Z resolution of the extracted profile.

With a value of 0, the resolution will be automatically calculated to maximize the sub-pixel accuracy.

◆ Load() [1/2]

void eVision::Easy3D::ELaserLineExtractor::Load ( const std::string & file)

Load the ELaserLineExtractor configuration. The settings are loaded and the profiles are discarded.

Parameters
fileFile path.

◆ Load() [2/2]

void eVision::Easy3D::ELaserLineExtractor::Load ( eVision::ESerializer * serializer)

Load the ELaserLineExtractor configuration. The settings are loaded and the profiles are discarded.

Parameters
serializerSerializer. Must be in read mode.

◆ operator=()

eVision::Easy3D::ELaserLineExtractor & eVision::Easy3D::ELaserLineExtractor::operator= ( const eVision::Easy3D::ELaserLineExtractor & other)

Assignment operator.

Parameters
otherThe object that should be copied

◆ Save() [1/2]

void eVision::Easy3D::ELaserLineExtractor::Save ( const std::string & file)

Save the ELaserLineExtractor configuration. The settings are saved but the profiles aren't.

Parameters
fileFile path.

◆ Save() [2/2]

void eVision::Easy3D::ELaserLineExtractor::Save ( eVision::ESerializer * serializer)

Save the ELaserLineExtractor configuration. The settings are saved but the profiles aren't.

Parameters
serializerSerializer. Must be in write mode.

◆ SetAnalysisMode()

void eVision::Easy3D::ELaserLineExtractor::SetAnalysisMode ( eVision::Easy3D::EMaximumAnalysisMode mode)

Analysis mode.

◆ SetAnalysisThreshold()

void eVision::Easy3D::ELaserLineExtractor::SetAnalysisThreshold ( int threshold)

Analysis threshold. Set this value to eliminate noise.

In the center of gravity (COG) analysis mode, this threshold is used to discriminate peaks and should be set accordingly.

◆ SetEnableSmoothing()

void eVision::Easy3D::ELaserLineExtractor::SetEnableSmoothing ( bool enable)

Enables or disables grayscale profile smoothing before extraction.

◆ SetSmoothingParameter0()

void eVision::Easy3D::ELaserLineExtractor::SetSmoothingParameter0 ( int val)

Smoothing parameter 0.

Parameters
valFirst kernel parameter.

◆ SetSmoothingParameter1()

void eVision::Easy3D::ELaserLineExtractor::SetSmoothingParameter1 ( int val)

Smoothing parameter 1.

Parameters
valSecond kernel parameter.

◆ SetSmoothingParameter2()

void eVision::Easy3D::ELaserLineExtractor::SetSmoothingParameter2 ( int val)

Smoothing parameter 2.

Parameters
valThird kernel parameter.

◆ SetSmoothingParameters()

void eVision::Easy3D::ELaserLineExtractor::SetSmoothingParameters ( int param0,
int param1,
int param2 )

Sets the parameters of the smoothing kernel.

Parameters
param0First kernel parameter.
param1Second kernel parameter.
param2Third kernel parameter.

If enabled, the smoothing will be performed using the following formula: f[i] = (f[i-1] * param0) + (f[i] * param1) + (f[i+1] * param2).

Member Data Documentation

◆ wrappedClass_

CppWrapperInternal::WrappedClass eVision::Easy3D::ELaserLineExtractor::wrappedClass_