CVB++ 15.0
Cvb::Foundation::Morphology Namespace Reference

Namespace for morphological filter operations available from the Common Vision Blox Foundation package. More...

Enumerations

enum class  MorphologyMask { Rectangular = CExports::MM_Rect , Cross = CExports::MM_Cross , Elliptic = CExports::MM_Ellipse }
 Available morphology masks. More...
 
enum class  DistanceNorm { LInfinity = CExports::DN_LInf , L1 = CExports::DN_L1 , L2 = CExports::DN_L2 }
 Norm for calculating distances. More...
 

Functions

std::unique_ptr< ImageErode (const Image &image, MorphologyMask maskType, Size2D< int > maskSize, Point2D< int > maskOffset)
 Perform an erosion operation with a selectable filter mask. More...
 
std::unique_ptr< ImageErode (const Image &image, MorphologyMask maskType, Size2D< int > maskSize)
 Perform an erosion operation with a selectable filter mask. More...
 
std::unique_ptr< ImageErode (const Image &image, const Image &mask, Point2D< int > maskOffset)
 Perform an erosion operation with a custom filter mask. More...
 
std::unique_ptr< ImageErode (const Image &image, const Image &mask)
 Perform an erosion operation with a custom filter mask. More...
 
std::unique_ptr< ImageDilate (const Image &image, MorphologyMask maskType, Size2D< int > maskSize, Point2D< int > maskOffset)
 Perform a dilation operation with a selectable filter mask. More...
 
std::unique_ptr< ImageDilate (const Image &image, MorphologyMask maskType, Size2D< int > maskSize)
 Perform a dilation operation with a selectable filter mask. More...
 
std::unique_ptr< ImageDilate (const Image &image, const Image &mask, Point2D< int > maskOffset)
 Perform a dilation operation with a custom filter mask. More...
 
std::unique_ptr< ImageDilate (const Image &image, const Image &mask)
 Perform a dilation operation with a custom filter mask. More...
 
std::unique_ptr< ImageOpen (const Image &image, MorphologyMask maskType, Size2D< int > maskSize, Point2D< int > maskOffset)
 Perform an open operation with a selectable filter mask. More...
 
std::unique_ptr< ImageOpen (const Image &image, MorphologyMask maskType, Size2D< int > maskSize)
 Perform an open operation with a selectable filter mask. More...
 
std::unique_ptr< ImageOpen (const Image &image, const Image &mask, Point2D< int > maskOffset)
 Perform an open operation with a custom filter mask. More...
 
std::unique_ptr< ImageOpen (const Image &image, const Image &mask)
 Perform an open operation with a custom filter mask. More...
 
std::unique_ptr< ImageClose (const Image &image, MorphologyMask maskType, Size2D< int > maskSize, Point2D< int > maskOffset)
 Perform a close operation with a selectable filter mask. More...
 
std::unique_ptr< ImageClose (const Image &image, MorphologyMask maskType, Size2D< int > maskSize)
 Perform a close operation with a selectable filter mask. More...
 
std::unique_ptr< ImageClose (const Image &image, const Image &mask, Point2D< int > maskOffset)
 Perform a close operation with a custom filter mask. More...
 
std::unique_ptr< ImageClose (const Image &image, const Image &mask)
 Perform a close operation with a custom filter mask. More...
 
std::unique_ptr< ImageDistanceTransform (const ImagePlane &plane, Filter::FixedFilterSize maskSize, DistanceNorm norm)
 This function calculates (and writes into the output image) the distance to the closest pixel in the source image with the value zero for all nonzero pixels in the input image. More...
 

Detailed Description

Namespace for morphological filter operations available from the Common Vision Blox Foundation package.

Remarks
CMake users: Link to imported target CVB::CvbFoundationMorphology

Enumeration Type Documentation

◆ DistanceNorm

enum class DistanceNorm
strong

Norm for calculating distances.

Enumerator
LInfinity 

Infinity norm (a.k.a maximum norm).

L1 

L1 norm (a.k.a. absolute norm).

L2 

L2 norm (a.k.a. euclidean norm).

◆ MorphologyMask

enum class MorphologyMask
strong

Available morphology masks.

Enumerator
Rectangular 

Rectangular morphology mask.

Cross 

Cross-shaped morphology mask.

Elliptic 

Elliptic morphology mask.

Function Documentation

◆ Close() [1/4]

std::unique_ptr< Image > Close ( const Image image,
const Image mask 
)
inline

Perform a close operation with a custom filter mask.

Parameters
[in]imageImage on which the operation is to be executed.
[in]maskCustom filter mask to use.
Returns
The filtered image.
Exceptions
Anyexception derived from std::exception including CvbException.

The custom filter mask effective is a CVB image of up to 256x256 pixels, where irrelevant pixels have been set to black, and pixels, that are part of the filter mask have been set to white (255).

◆ Close() [2/4]

std::unique_ptr< Image > Close ( const Image image,
const Image mask,
Point2D< int >  maskOffset 
)
inline

Perform a close operation with a custom filter mask.

Parameters
[in]imageImage on which the operation is to be executed.
[in]maskCustom filter mask to use.
[in]maskOffsetOffset of the mask reference point relative to the top left pixel of the mask; must lie within the defined mask.
Returns
The filtered image.
Exceptions
Anyexception derived from std::exception including CvbException.

The custom filter mask effective is a CVB image of up to 256x256 pixels where irrelevant pixels have been set to black and pixels that are part of the filter mask have been set to white (255).

◆ Close() [3/4]

std::unique_ptr< Image > Close ( const Image image,
MorphologyMask  maskType,
Size2D< int >  maskSize 
)
inline

Perform a close operation with a selectable filter mask.

Parameters
[in]imageImage on which the operation is to be executed.
[in]maskTypeType of morphological mask to be used.
[in]maskSizeSize of the morphological mask.
Returns
The filtered image.
Exceptions
Anyexception derived from std::exception including CvbException.

◆ Close() [4/4]

std::unique_ptr< Image > Close ( const Image image,
MorphologyMask  maskType,
Size2D< int >  maskSize,
Point2D< int >  maskOffset 
)
inline

Perform a close operation with a selectable filter mask.

Parameters
[in]imageImage on which the operation is to be executed.
[in]maskTypeType of morphological mask to be used.
[in]maskSizeSize of the morphological mask.
[in]maskOffsetOffset of the mask reference point relative to the top left pixel of the mask; must lie within the defined maskSize.
Returns
The filtered image.
Exceptions
Anyexception derived from std::exception including CvbException.

◆ Dilate() [1/4]

std::unique_ptr< Image > Dilate ( const Image image,
const Image mask 
)
inline

Perform a dilation operation with a custom filter mask.

Parameters
[in]imageImage on which the operation is to be executed.
[in]maskCustom filter mask to use.
Returns
The filtered image.
Exceptions
Anyexception derived from std::exception including CvbException.

The custom filter mask effective is a CVB image of up to 256x256 pixels where irrelevant pixels have been set to black and pixels that are part of the filter mask have been set to white (255).

◆ Dilate() [2/4]

std::unique_ptr< Image > Dilate ( const Image image,
const Image mask,
Point2D< int >  maskOffset 
)
inline

Perform a dilation operation with a custom filter mask.

Parameters
[in]imageImage on which the operation is to be executed.
[in]maskCustom filter mask to use.
[in]maskOffsetOffset of the mask reference point relative to the top left pixel of the mask; must lie within the defined mask.
Returns
The filtered image.
Exceptions
Anyexception derived from std::exception including CvbException.

The custom filter mask effective is a CVB image of up to 256x256 pixels where irrelevant pixels have been set to black and pixels that are part of the filter mask have been set to white (255).

◆ Dilate() [3/4]

std::unique_ptr< Image > Dilate ( const Image image,
MorphologyMask  maskType,
Size2D< int >  maskSize 
)
inline

Perform a dilation operation with a selectable filter mask.

Parameters
[in]imageImage on which the operation is to be executed.
[in]maskTypeType of morphological mask to be used.
[in]maskSizeSize of the morphological mask.
Returns
The filtered image.
Exceptions
Anyexception derived from std::exception including CvbException.

◆ Dilate() [4/4]

std::unique_ptr< Image > Dilate ( const Image image,
MorphologyMask  maskType,
Size2D< int >  maskSize,
Point2D< int >  maskOffset 
)
inline

Perform a dilation operation with a selectable filter mask.

Parameters
[in]imageImage on which the operation is to be executed.
[in]maskTypeType of morphological mask to be used.
[in]maskSizeSize of the morphological mask.
[in]maskOffsetOffset of the mask reference point relative to the top left pixel of the mask; must lie within the defined maskSize.
Returns
The filtered image.
Exceptions
Anyexception derived from std::exception including CvbException.

◆ DistanceTransform()

std::unique_ptr< Image > DistanceTransform ( const ImagePlane plane,
Filter::FixedFilterSize  maskSize,
DistanceNorm  norm 
)
inline

This function calculates (and writes into the output image) the distance to the closest pixel in the source image with the value zero for all nonzero pixels in the input image.

Parameters
[in]planeImage plane on which to calculate.
[in]maskSizeMask size to use for the approximator (only Filter::FixedFilterSize::Kernel3x3 and Filter::FixedFilterSize::Kernel5x5 are acceptable).
[in]normDistance calculation norm to be used.
Returns
The transformed image.
Exceptions
Anyexception derived from std::exception including CvbException.

Distance is calculated approximatively using a set of principal distances, that is governed by the maskSize parameter and the distance norm.

◆ Erode() [1/4]

std::unique_ptr< Image > Erode ( const Image image,
const Image mask 
)
inline

Perform an erosion operation with a custom filter mask.

Parameters
[in]imageImage on which the operation is to be executed.
[in]maskCustom filter mask to use.
Returns
The filtered image.
Exceptions
Anyexception derived from std::exception including CvbException.

The custom filter mask effective is a CVB image of up to 256x256 pixels where irrelevant pixels have been set to black and pixels that are part of the filter mask have been set to white (255).

◆ Erode() [2/4]

std::unique_ptr< Image > Erode ( const Image image,
const Image mask,
Point2D< int >  maskOffset 
)
inline

Perform an erosion operation with a custom filter mask.

Parameters
[in]imageImage on which the operation is to be executed.
[in]maskCustom filter mask to use.
[in]maskOffsetOffset of the mask reference point relative to the top left pixel of the mask; must lie within the defined mask.
Returns
The filtered image.
Exceptions
Anyexception derived from std::exception including CvbException.

The custom filter mask effective is a CVB image of up to 256x256 pixels, where irrelevant pixels have been set to black and pixels that are part of the filter mask have been set to white (255).

◆ Erode() [3/4]

std::unique_ptr< Image > Erode ( const Image image,
MorphologyMask  maskType,
Size2D< int >  maskSize 
)
inline

Perform an erosion operation with a selectable filter mask.

Parameters
[in]imageImage on which the operation is to be executed.
[in]maskTypeType of morphological mask to be used.
[in]maskSizeSize of the morphological mask.
Returns
The filtered image.
Exceptions
Anyexception derived from std::exception including CvbException.

◆ Erode() [4/4]

std::unique_ptr< Image > Erode ( const Image image,
MorphologyMask  maskType,
Size2D< int >  maskSize,
Point2D< int >  maskOffset 
)
inline

Perform an erosion operation with a selectable filter mask.

Parameters
[in]imageImage to perform the operation on.
[in]maskTypeType of morphological mask to be used.
[in]maskSizeSize of the morphological mask.
[in]maskOffsetOffset of the mask reference point relative to the top left pixel of the mask; must lie within the defined maskSize.
Returns
The filtered image.
Exceptions
Anyexception derived from std::exception including CvbException.

◆ Open() [1/4]

std::unique_ptr< Image > Open ( const Image image,
const Image mask 
)
inline

Perform an open operation with a custom filter mask.

Parameters
[in]imageImage on which the operation is to be executed.
[in]maskCustom filter mask to use.
Returns
The filtered image.
Exceptions
Anyexception derived from std::exception including CvbException.

The custom filter mask effective is a CVB image of up to 256x256 pixels where irrelevant pixels have been set to black and pixels that are part of the filter mask have been set to white (255).

◆ Open() [2/4]

std::unique_ptr< Image > Open ( const Image image,
const Image mask,
Point2D< int >  maskOffset 
)
inline

Perform an open operation with a custom filter mask.

Parameters
[in]imageImage on which the operation is to be executed.
[in]maskCustom filter mask to use.
[in]maskOffsetOffset of the mask reference point relative to the top left pixel of the mask; must lie within the defined mask.
Returns
The filtered image.
Exceptions
Anyexception derived from std::exception including CvbException.

The custom filter mask effective is a CVB image of up to 256x256 pixels where irrelevant pixels have been set to black and pixels that are part of the filter mask have been set to white (255).

◆ Open() [3/4]

std::unique_ptr< Image > Open ( const Image image,
MorphologyMask  maskType,
Size2D< int >  maskSize 
)
inline

Perform an open operation with a selectable filter mask.

Parameters
[in]imageImage on which the operation is to be executed.
[in]maskTypeType of morphological mask to be used.
[in]maskSizeSize of the morphological mask.
Returns
The filtered image.
Exceptions
Anyexception derived from std::exception including CvbException.

◆ Open() [4/4]

std::unique_ptr< Image > Open ( const Image image,
MorphologyMask  maskType,
Size2D< int >  maskSize,
Point2D< int >  maskOffset 
)
inline

Perform an open operation with a selectable filter mask.

Parameters
[in]imageImage on which the operation is to be executed.
[in]maskTypeType of morphological mask to be used.
[in]maskSizeSize of the morphological mask.
[in]maskOffsetOffset of the mask reference point relative to the top left pixel of the mask; must lie within the defined maskSize.
Returns
The filtered image.
Exceptions
Anyexception derived from std::exception including CvbException.