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

Manages a complete context for the Canny edge detector. More...

#include <eVision/EasyImage/ECannyEdgeDetector.h>

Collaboration diagram for eVision::ECannyEdgeDetector:

Public Member Functions

 ECannyEdgeDetector ()
 Constructs a ECannyEdgeDetector object initialized to its default values.
virtual ~ECannyEdgeDetector () throw ()
void SetSmoothingScale (float scale)
 The scale of the features of interest.
float GetSmoothingScale () const
 The scale of the features of interest.
void ResetSmoothingScale ()
 Prevents the smoothing of the source image by a Gaussian filter.
void SetThresholdingMode (eVision::ECannyThresholdingMode mode)
 Sets the mode of the hysteresis thresholding.
eVision::ECannyThresholdingMode GetThresholdingMode () const
 Returns the mode of the hysteresis thresholding.
void SetLowThreshold (float lowThreshold)
 Sets the low hysteresis threshold for a pixel to be considered as an edge.
float GetLowThreshold () const
 Returns the low hysteresis threshold for a pixel to be considered as an edge.
void SetHighThreshold (float highThreshold)
 Sets the high hysteresis threshold for a pixel to be considered as an edge.
float GetHighThreshold () const
 Returns the high hysteresis threshold for a pixel to be considered as an edge.
void Apply (const eVision::EROIBW8 &source, eVision::EROIBW8 &result)
 Apply the Canny edge detector on an image/ROI.
void Apply (const eVision::EROIBW8 &source, const eVision::ERegion &region, eVision::EROIBW8 &result)
 Apply the Canny edge detector on an image/ROI.
void Apply (const eVision::EROIBW8 &source, const eVision::ERegion &region, const eVision::EFrame &frame, eVision::EROIBW8 &result)
 Apply the Canny edge detector on an image/ROI.
 ECannyEdgeDetector (CppWrapperInternal::InternalConstructor)

Public Attributes

CppWrapperInternal::WrappedClass wrappedClass_

Detailed Description

Manages a complete context for the Canny edge detector.

The Canny edge detector operates on a grayscale BW8 image and delivers a black-and-white BW8 image where pixels have only 2 possible values: 0 and 255. Pixels corresponding to edges in the source image are set to value 255 in the output image; The other pixels are set to value 0.

License(s): EasyImage

Constructor & Destructor Documentation

◆ ECannyEdgeDetector() [1/2]

eVision::ECannyEdgeDetector::ECannyEdgeDetector ( )

Constructs a ECannyEdgeDetector object initialized to its default values.

◆ ~ECannyEdgeDetector()

eVision::ECannyEdgeDetector::~ECannyEdgeDetector ( )
throw ( )
virtual

◆ ECannyEdgeDetector() [2/2]

eVision::ECannyEdgeDetector::ECannyEdgeDetector ( CppWrapperInternal::InternalConstructor )

Member Function Documentation

◆ Apply() [1/3]

void eVision::ECannyEdgeDetector::Apply ( const eVision::EROIBW8 & source,
const eVision::ERegion & region,
const eVision::EFrame & frame,
eVision::EROIBW8 & result )

Apply the Canny edge detector on an image/ROI.

Parameters
sourceThe source image/ROI.
regionThe region on which to apply the method.
frameThe reference frame of the region.
resultThe output image/ROI.

The output ROI must have the same size than the input ROI.

◆ Apply() [2/3]

void eVision::ECannyEdgeDetector::Apply ( const eVision::EROIBW8 & source,
const eVision::ERegion & region,
eVision::EROIBW8 & result )

Apply the Canny edge detector on an image/ROI.

Parameters
sourceThe source image/ROI.
regionThe region on which to apply the method.
resultThe output image/ROI.

The output ROI must have the same size than the input ROI.

◆ Apply() [3/3]

void eVision::ECannyEdgeDetector::Apply ( const eVision::EROIBW8 & source,
eVision::EROIBW8 & result )

Apply the Canny edge detector on an image/ROI.

Parameters
sourceThe source image/ROI.
resultThe output image/ROI.

The output ROI must have the same size than the input ROI.

◆ GetHighThreshold()

float eVision::ECannyEdgeDetector::GetHighThreshold ( ) const

Returns the high hysteresis threshold for a pixel to be considered as an edge.

◆ GetLowThreshold()

float eVision::ECannyEdgeDetector::GetLowThreshold ( ) const

Returns the low hysteresis threshold for a pixel to be considered as an edge.

◆ GetSmoothingScale()

float eVision::ECannyEdgeDetector::GetSmoothingScale ( ) const

The scale of the features of interest.

This scale corresponds to the standard deviation of the Gaussian filter that is used to smooth the source image before the computation of the gradient, hereby selecting the scale of the features of interest.

If this scale is set to zero, no smoothing is achieved: The gradient is computed directly on the raw source image, speeding up the detector, but making the process much less reliable.

◆ GetThresholdingMode()

eVision::ECannyThresholdingMode eVision::ECannyEdgeDetector::GetThresholdingMode ( ) const

Returns the mode of the hysteresis thresholding.

◆ ResetSmoothingScale()

void eVision::ECannyEdgeDetector::ResetSmoothingScale ( )

Prevents the smoothing of the source image by a Gaussian filter.

Calling this method is equivalent to set ECannyEdgeDetector::SetSmoothingScale to zero. It disables the use of the Gaussian filter.

◆ SetHighThreshold()

void eVision::ECannyEdgeDetector::SetHighThreshold ( float highThreshold)

Sets the high hysteresis threshold for a pixel to be considered as an edge.

Parameters
highThresholdThe high threshold.

◆ SetLowThreshold()

void eVision::ECannyEdgeDetector::SetLowThreshold ( float lowThreshold)

Sets the low hysteresis threshold for a pixel to be considered as an edge.

Parameters
lowThresholdThe low threshold.

◆ SetSmoothingScale()

void eVision::ECannyEdgeDetector::SetSmoothingScale ( float scale)

The scale of the features of interest.

Parameters
scaleThe width of the Gaussian kernel, or zero if the Gaussian smoothing is disabled.

This scale corresponds to the standard deviation of the Gaussian filter that is used to smooth the source image before the computation of the gradient, hereby selecting the scale of the features of interest.

If this scale is set to zero, no smoothing is achieved: The gradient is computed directly on the raw source image, speeding up the detector, but making the process much less reliable.

◆ SetThresholdingMode()

void eVision::ECannyEdgeDetector::SetThresholdingMode ( eVision::ECannyThresholdingMode mode)

Sets the mode of the hysteresis thresholding.

Parameters
modeThe thresholding mode.

If the threshold mode is set to ECannyThresholdingMode::ECannyThresholdingMode_Absolute, the threshold values are interpreted as absolute thresholds. In this case, the thresholds must be strictly positive real values.

If the threshold mode is set to ECannyThresholdingMode::ECannyThresholdingMode_Relative, the thresholds are expressed as a fraction ranging from 0 to 1 of the maximum value of the gradient of the source image.

In either case, the low threshold must be less than the high threshold.

Member Data Documentation

◆ wrappedClass_

CppWrapperInternal::WrappedClass eVision::ECannyEdgeDetector::wrappedClass_