SMIL  1.0.4
Line Based Operators

Morphological operators using line segments as structuring elements. More...

Detailed Description

Morphological operators using line segments as structuring elements.

Implementation of morphological operations by line, square and circle structuring elements using repeately operations with linear structuring elements and arbitrary angles.

These algorithms are described in [18] P. Soille, Morphological Image Analysis, 2003, Section 3.9, p. 89 and [16]

3D Line Structuring Element using Bresenham's Line Drawing Algorithm.

Warning
Circle morphological operations based on line segments use an iteractive algorithm. The circle diameter may not be exactly as expected. Most of the time it's always inside a 10 % interval.
+ Collaboration diagram for Line Based Operators:

Functions

template<class T >
RES_T lineDilate (const Image< T > &imIn, Image< T > &imOut, int hLen, double theta=0, double zeta=0)
 lineDilate() More...
 
template<class T >
RES_T lineErode (const Image< T > &imIn, Image< T > &imOut, int hLen, double theta=0, double zeta=0)
 lineErode() More...
 
template<class T >
RES_T lineOpen (const Image< T > &imIn, Image< T > &imOut, int hLen, double theta=0, double zeta=0)
 lineOpen() More...
 
template<class T >
RES_T lineClose (const Image< T > &imIn, Image< T > &imOut, int hLen, double theta=0, double zeta=0)
 lineClose() More...
 
template<class T >
RES_T squareDilate (const Image< T > &imIn, Image< T > &imOut, int side)
 squareDilate() : the SE is a square defined by its side More...
 
template<class T >
RES_T squareErode (const Image< T > &imIn, Image< T > &imOut, int side)
 squareErode() : the SE is a square defined by its side More...
 
template<class T >
RES_T squareOpen (const Image< T > &imIn, Image< T > &imOut, int side)
 squareOpen() : the SE is a square defined by its side More...
 
template<class T >
RES_T squareClose (const Image< T > &imIn, Image< T > &imOut, int side)
 squareClose() : the SE is a square defined by its side More...
 
template<class T >
RES_T circleDilate (const Image< T > &imIn, Image< T > &imOut, int radius)
 circleDilate() : the SE is a disk of radius radius pixels More...
 
template<class T >
RES_T circleErode (const Image< T > &imIn, Image< T > &imOut, int radius)
 circleErode() : the SE is a disk of radius radius pixels More...
 
template<class T >
RES_T circleOpen (const Image< T > &imIn, Image< T > &imOut, int radius)
 circleOpen() : the SE is a disk of radius radius pixels More...
 
template<class T >
RES_T circleClose (const Image< T > &imIn, Image< T > &imOut, int radius)
 circleClose() : the SE is a disk of radius radius pixels More...
 
template<class T >
RES_T rectangleDilate (const Image< T > &imIn, Image< T > &imOut, int side1, int side2, double theta=0)
 rectangleDilate() : generic dilation of imIn by a rectangle of sides side1 and side2, rotated by an angle theta. More...
 
template<class T >
RES_T rectangleErode (const Image< T > &imIn, Image< T > &imOut, int side1, int side2, double theta=0)
 rectangleErode() : generic erosion of imIn by a rectangle of sides side1 and side2, rotated by an angle theta. More...
 
template<class T >
RES_T rectangleOpen (const Image< T > &imIn, Image< T > &imOut, int side1, int side2, double theta=0)
 rectangleOpen() : generic opening of imIn by a rectangle of sides side1 and side2, rotated by an angle theta. More...
 
template<class T >
RES_T rectangleClose (const Image< T > &imIn, Image< T > &imOut, int side1, int side2, double theta=0)
 rectangleClose() : generic closing of imIn by a rectangle of sides side1 and side2, rotated by an angle theta. More...
 

Function Documentation

◆ lineDilate()

RES_T smil::lineDilate ( const Image< T > &  imIn,
Image< T > &  imOut,
int  hLen,
double  theta = 0,
double  zeta = 0 
)

lineDilate()

The 3D Structuring Element is a segment of length $ (2 \: . \: hLen + 1) $ and an orientation given by angles $ \theta $ and $ \zeta $ (in radians).

Parameters
[in]imIn: input image
[in]hLen: Half Length of the Structuring Element
[in]theta: angle (in radians) of the line in the h x v plane
[in]zeta: elevation angle (in radians)
[out]imOut: output image

◆ lineErode()

RES_T smil::lineErode ( const Image< T > &  imIn,
Image< T > &  imOut,
int  hLen,
double  theta = 0,
double  zeta = 0 
)

lineErode()

The 3D Structuring Element is a segment of length $ (2 \: . \: hLen + 1) $ and an orientation given by angles $ \theta $ and $ \zeta $ (in radians).

Parameters
[in]imIn: input image
[in]hLen: Half Length of the Structuring Element
[in]theta: angle (in radians) of the line in the h x v plane
[in]zeta: elevation angle (in radians)
[out]imOut: output image

◆ lineOpen()

RES_T smil::lineOpen ( const Image< T > &  imIn,
Image< T > &  imOut,
int  hLen,
double  theta = 0,
double  zeta = 0 
)

lineOpen()

The 3D Structuring Element is a segment of length $ (2 \: . \: hLen + 1) $ and an orientation given by angles $ \theta $ and $ \zeta $ (in radians).

Parameters
[in]imIn: input image
[in]hLen: Half Length of the Structuring Element
[in]theta: angle (in radians) of the line in the h x v plane
[in]zeta: elevation angle (in radians)
[out]imOut: output image

◆ lineClose()

RES_T smil::lineClose ( const Image< T > &  imIn,
Image< T > &  imOut,
int  hLen,
double  theta = 0,
double  zeta = 0 
)

lineClose()

The 3D Structuring Element is a segment of length $ (2 \: . \: hLen + 1) $ and an orientation given by angles $ \theta $ and $ \zeta $ (in radians).

Parameters
[in]imIn: input image
[in]hLen: Half Length of the Structuring Element
[in]theta: angle (in radians) of the line in the h x v plane
[in]zeta: elevation angle (in radians)
[out]imOut: output image

◆ squareDilate()

RES_T smil::squareDilate ( const Image< T > &  imIn,
Image< T > &  imOut,
int  side 
)

squareDilate() : the SE is a square defined by its side

Parameters
[in]imIn: input image
[out]imOut: output image
[in]side: side of the Square Structuring Element
Note
  • in 3D images, the same square S.E. is applied to each slice.

◆ squareErode()

RES_T smil::squareErode ( const Image< T > &  imIn,
Image< T > &  imOut,
int  side 
)

squareErode() : the SE is a square defined by its side

Parameters
[in]imIn: input image
[out]imOut: output image
[in]side: side of the Square Structuring Element
Note
  • in 3D images, the same square S.E. is applied to each slice.

◆ squareOpen()

RES_T smil::squareOpen ( const Image< T > &  imIn,
Image< T > &  imOut,
int  side 
)

squareOpen() : the SE is a square defined by its side

Parameters
[in]imIn: input image
[out]imOut: output image
[in]side: side of the Square Structuring Element
Note
  • in 3D images, the same square S.E. is applied to each slice.

◆ squareClose()

RES_T smil::squareClose ( const Image< T > &  imIn,
Image< T > &  imOut,
int  side 
)

squareClose() : the SE is a square defined by its side

Parameters
[in]imIn: input image
[out]imOut: output image
[in]side: side of the Square Structuring Element
Note
  • in 3D images, the same square S.E. is applied to each slice.

◆ circleDilate()

RES_T smil::circleDilate ( const Image< T > &  imIn,
Image< T > &  imOut,
int  radius 
)

circleDilate() : the SE is a disk of radius radius pixels

Parameters
[in]imIn: input image
[out]imOut: output image
[in]radius: the radius of the disk
Note
  • in 3D images, the same disk S.E. is applied to each slice.

◆ circleErode()

RES_T smil::circleErode ( const Image< T > &  imIn,
Image< T > &  imOut,
int  radius 
)

circleErode() : the SE is a disk of radius radius pixels

Parameters
[in]imIn: input image
[out]imOut: output image
[in]radius: the radius of the disk
Note
  • in 3D images, the same disk S.E. is applied to each slice.

◆ circleOpen()

RES_T smil::circleOpen ( const Image< T > &  imIn,
Image< T > &  imOut,
int  radius 
)

circleOpen() : the SE is a disk of radius radius pixels

Parameters
[in]imIn: input image
[out]imOut: output image
[in]radius: the radius of the disk
Note
  • in 3D images, the same disk S.E. is applied to each slice.

◆ circleClose()

RES_T smil::circleClose ( const Image< T > &  imIn,
Image< T > &  imOut,
int  radius 
)

circleClose() : the SE is a disk of radius radius pixels

Parameters
[in]imIn: input image
[out]imOut: output image
[in]radius: the radius of the disk
Note
  • in 3D images, the same disk S.E. is applied to each slice.

◆ rectangleDilate()

RES_T smil::rectangleDilate ( const Image< T > &  imIn,
Image< T > &  imOut,
int  side1,
int  side2,
double  theta = 0 
)

rectangleDilate() : generic dilation of imIn by a rectangle of sides side1 and side2, rotated by an angle theta.

Parameters
[in]imIn: input image
[out]imOut: output image
[in]side1: rectangle side
[in]side2: rectangle side
[in]theta: angle between side1 and horizontal axis

◆ rectangleErode()

RES_T smil::rectangleErode ( const Image< T > &  imIn,
Image< T > &  imOut,
int  side1,
int  side2,
double  theta = 0 
)

rectangleErode() : generic erosion of imIn by a rectangle of sides side1 and side2, rotated by an angle theta.

Parameters
[in]imIn: input image
[out]imOut: output image
[in]side1: rectangle side
[in]side2: rectangle side
[in]theta: angle between side1 and horizontal axis

◆ rectangleOpen()

RES_T smil::rectangleOpen ( const Image< T > &  imIn,
Image< T > &  imOut,
int  side1,
int  side2,
double  theta = 0 
)

rectangleOpen() : generic opening of imIn by a rectangle of sides side1 and side2, rotated by an angle theta.

Parameters
[in]imIn: input image
[out]imOut: output image
[in]side1: rectangle side
[in]side2: rectangle side
[in]theta: angle between side1 and horizontal axis

◆ rectangleClose()

RES_T smil::rectangleClose ( const Image< T > &  imIn,
Image< T > &  imOut,
int  side1,
int  side2,
double  theta = 0 
)

rectangleClose() : generic closing of imIn by a rectangle of sides side1 and side2, rotated by an angle theta.

Parameters
[in]imIn: input image
[out]imOut: output image
[in]side1: rectangle side
[in]side2: rectangle side
[in]theta: angle between side1 and horizontal axis