SMIL  1.0.4

Detailed Description

+ Collaboration diagram for Arithmetics:

Functions

template<class T >
RES_T inv (const Image< T > &imIn, Image< T > &imOut)
 inv() - Invert an image. More...
 
template<class T >
RES_T add (const Image< T > &imIn1, const Image< T > &imIn2, Image< T > &imOut)
 add() - Addition (with saturation check) More...
 
template<class T >
RES_T add (const Image< T > &imIn1, const T &value, Image< T > &imOut)
 add() - Addition (with saturation check) More...
 
template<class T >
RES_T addNoSat (const Image< T > &imIn1, const Image< T > &imIn2, Image< T > &imOut)
 addNoSat() - Addition (without saturation check) More...
 
template<class T >
RES_T addNoSat (const Image< T > &imIn1, const T &value, Image< T > &imOut)
 addNoSat() - Addition (without saturation check) More...
 
template<class T >
RES_T sub (const Image< T > &imIn1, const Image< T > &imIn2, Image< T > &imOut)
 sub() - Subtraction between two images More...
 
template<class T >
RES_T sub (const Image< T > &imIn, const T &value, Image< T > &imOut)
 sub() - Subtraction between an image and a constant value More...
 
template<class T >
RES_T sub (const T &value, const Image< T > &imIn, Image< T > &imOut)
 sub() - Subtraction between a value and an image More...
 
template<class T >
RES_T subNoSat (const Image< T > &imIn1, const Image< T > &imIn2, Image< T > &imOut)
 subNoSat() - Subtraction (without type minimum check) between two images More...
 
template<class T >
RES_T subNoSat (const Image< T > &imIn, const T &value, Image< T > &imOut)
 subNoSat() - Subtraction (without type minimum check) between an image and a constant value More...
 
template<class T >
RES_T subNoSat (const T &value, const Image< T > &imIn, Image< T > &imOut)
 subNoSat() - Subtraction (without type minimum check) between a value and an image More...
 
template<class T >
RES_T sup (const Image< T > &imIn1, const Image< T > &imIn2, Image< T > &imOut)
 sup() - Sup of two images More...
 
template<class T >
ResImage< T > sup (const Image< T > &imIn1, const Image< T > &imIn2)
 sup() - Sup of two images More...
 
template<class T >
RES_T sup (const Image< T > &imIn, const T &value, Image< T > &imOut)
 sup() - Sup of an image and a value More...
 
template<class T >
RES_T inf (const Image< T > &imIn1, const Image< T > &imIn2, Image< T > &imOut)
 inf() - Inf of two images More...
 
template<class T >
ResImage< T > inf (const Image< T > &imIn1, const Image< T > &imIn2)
 inf() - Inf of two images More...
 
template<class T >
RES_T inf (const Image< T > &imIn, const T &value, Image< T > &imOut)
 inf() - Inf of an image and a value More...
 
template<class T >
RES_T equ (const Image< T > &imIn1, const Image< T > &imIn2, Image< T > &imOut)
 equ() - Equality operator (pixel by pixel) More...
 
template<class T >
RES_T equ (const Image< T > &imIn, const T &value, Image< T > &imOut)
 equ() - Equality operator (pixel by pixel) More...
 
template<class T >
bool equ (const Image< T > &imIn1, const Image< T > &imIn2)
 equ() - Test equality between two images More...
 
template<class T >
RES_T diff (const Image< T > &imIn1, const Image< T > &imIn2, Image< T > &imOut)
 diff() - Difference between two images. More...
 
template<class T >
RES_T diff (const Image< T > &imIn, const T &value, Image< T > &imOut)
 diff() - Difference between an image and a value More...
 
template<class T >
RES_T absDiff (const Image< T > &imIn1, const Image< T > &imIn2, Image< T > &imOut)
 absDiff() - Absolute difference ("vertical distance") between two images. More...
 
template<class T >
RES_T grt (const Image< T > &imIn1, const Image< T > &imIn2, Image< T > &imOut)
 grt() - Greater operator More...
 
template<class T >
RES_T grt (const Image< T > &imIn, const T &value, Image< T > &imOut)
 grt() - Greater operator More...
 
template<class T >
RES_T grtOrEqu (const Image< T > &imIn1, const Image< T > &imIn2, Image< T > &imOut)
 grtOrEqu() - Greater or equal operator More...
 
template<class T >
RES_T grtOrEqu (const Image< T > &imIn, const T &value, Image< T > &imOut)
 grtOrEqu() - Greater or equal operator More...
 
template<class T >
RES_T low (const Image< T > &imIn1, const Image< T > &imIn2, Image< T > &imOut)
 low() - Lower operator More...
 
template<class T >
RES_T low (const Image< T > &imIn, const T &value, Image< T > &imOut)
 low() - Lower operator More...
 
template<class T >
RES_T lowOrEqu (const Image< T > &imIn1, const Image< T > &imIn2, Image< T > &imOut)
 lowOrEqu() - Lower or equal operator More...
 
template<class T >
RES_T lowOrEqu (const Image< T > &imIn, const T &value, Image< T > &imOut)
 lowOrEqu() - Lower or equal operator More...
 
template<class T >
RES_T div (const Image< T > &imIn1, const Image< T > &imIn2, Image< T > &imOut)
 div() - Division between two images More...
 
template<class T >
RES_T div (const Image< T > &imIn, double &dValue, Image< T > &imOut)
 div() - Division : an image and a value More...
 
template<class T >
RES_T mul (const Image< T > &imIn1, const Image< T > &imIn2, Image< T > &imOut)
 mul() - Multiply two images More...
 
template<class T >
RES_T mul (const Image< T > &imIn, const double &dValue, Image< T > &imOut)
 mul() - Multiply an image and a value More...
 
template<class T >
RES_T mulNoSat (const Image< T > &imIn1, const Image< T > &imIn2, Image< T > &imOut)
 mulNoSat() - Multiply (without type max check) The result is a image where : More...
 
template<class T >
RES_T mulNoSat (const Image< T > &imIn, const T &value, Image< T > &imOut)
 mulNoSat() - Multiply an image and a value (without type max check) More...
 
template<class T1 , class T2 >
RES_T log (const Image< T1 > &imIn, Image< T2 > &imOut, int base=0)
 log() - Logarithm of an image More...
 
template<class T1 , class T2 >
RES_T exp (const Image< T1 > &imIn, Image< T2 > &imOut, int base=0)
 exp() - exponential of an image More...
 
template<class T1 , class T2 >
RES_T pow (const Image< T1 > &imIn, Image< T2 > &imOut, double exponent=2)
 pow() - power of an image More...
 
template<class T1 , class T2 >
RES_T sqrt (const Image< T1 > &imIn, Image< T2 > &imOut)
 sqrt() - square root of an image More...
 

Function Documentation

◆ inv()

RES_T smil::inv ( const Image< T > &  imIn,
Image< T > &  imOut 
)

inv() - Invert an image.

Parameters
[in]imIn: Input image.
[out]imOut: Output image.
See also
Image::operator~

◆ add() [1/2]

RES_T smil::add ( const Image< T > &  imIn1,
const Image< T > &  imIn2,
Image< T > &  imOut 
)

add() - Addition (with saturation check)

Addition between two images.

Parameters
[in]imIn1: input image
[in]imIn2: input image
[out]imOut: output image
See also
Image::operator+

◆ add() [2/2]

RES_T smil::add ( const Image< T > &  imIn1,
const T &  value,
Image< T > &  imOut 
)

add() - Addition (with saturation check)

Addition a single value to each pixel of an image.

Parameters
[in]imIn1: input image
[in]value: value to be added to each pixel in imIn
[out]imOut: output image
See also
Image::operator+

◆ addNoSat() [1/2]

RES_T smil::addNoSat ( const Image< T > &  imIn1,
const Image< T > &  imIn2,
Image< T > &  imOut 
)

addNoSat() - Addition (without saturation check)

Addition between two images.

Parameters
[in]imIn1: input image
[in]imIn2: input image
[out]imOut: output image

◆ addNoSat() [2/2]

RES_T smil::addNoSat ( const Image< T > &  imIn1,
const T &  value,
Image< T > &  imOut 
)

addNoSat() - Addition (without saturation check)

Addition a single value to each pixel of an image.

Parameters
[in]imIn1: input image
[in]value: value to be added to each pixel in imIn
[out]imOutoutput image

◆ sub() [1/3]

RES_T smil::sub ( const Image< T > &  imIn1,
const Image< T > &  imIn2,
Image< T > &  imOut 
)

sub() - Subtraction between two images

Parameters
[in]imIn1: input image
[in]imIn2: input image
[out]imOut: output image containing imIn1 - imIn2

◆ sub() [2/3]

RES_T smil::sub ( const Image< T > &  imIn,
const T &  value,
Image< T > &  imOut 
)

sub() - Subtraction between an image and a constant value

Parameters
[in]imIn: input image
[in]value: value to be subtracted from each pixel in the image
[out]imOut: output image containing imIn - val

◆ sub() [3/3]

RES_T smil::sub ( const T &  value,
const Image< T > &  imIn,
Image< T > &  imOut 
)

sub() - Subtraction between a value and an image

Parameters
[in]value: value to which each pixel of the image will be subtracted.
[in]imIn: input image
[out]imOut: output image containing val - imIn

◆ subNoSat() [1/3]

RES_T smil::subNoSat ( const Image< T > &  imIn1,
const Image< T > &  imIn2,
Image< T > &  imOut 
)

subNoSat() - Subtraction (without type minimum check) between two images

Parameters
[in]imIn1: input image
[in]imIn2: input image
[out]imOut: output image containing imIn1 - imIn2

◆ subNoSat() [2/3]

RES_T smil::subNoSat ( const Image< T > &  imIn,
const T &  value,
Image< T > &  imOut 
)

subNoSat() - Subtraction (without type minimum check) between an image and a constant value

Parameters
[in]imIn: input image
[in]value: value to be subtracted from each pixel in the image
[out]imOut: output image containing imIn - val

◆ subNoSat() [3/3]

RES_T smil::subNoSat ( const T &  value,
const Image< T > &  imIn,
Image< T > &  imOut 
)

subNoSat() - Subtraction (without type minimum check) between a value and an image

Parameters
[in]value: value to which each pixel of the image will be subtracted.
[in]imIn: input image
[out]imOut: output image containing val - imIn

◆ sup() [1/3]

RES_T smil::sup ( const Image< T > &  imIn1,
const Image< T > &  imIn2,
Image< T > &  imOut 
)

sup() - Sup of two images

Parameters
[in]imIn1: input image
[in]imIn2: input image
[out]imOut: output image

◆ sup() [2/3]

ResImage<T> smil::sup ( const Image< T > &  imIn1,
const Image< T > &  imIn2 
)

sup() - Sup of two images

Parameters
[in]imIn1: input image
[in]imIn2: input image
Returns
an image, which is the sup of imIn1 and imIn2

◆ sup() [3/3]

RES_T smil::sup ( const Image< T > &  imIn,
const T &  value,
Image< T > &  imOut 
)

sup() - Sup of an image and a value

Parameters
[in]imIn: input image
[in]value: input value
[out]imOut: output image

◆ inf() [1/3]

RES_T smil::inf ( const Image< T > &  imIn1,
const Image< T > &  imIn2,
Image< T > &  imOut 
)

inf() - Inf of two images

Parameters
[in]imIn1: input image
[in]imIn2: input image
[out]imOut: output image

◆ inf() [2/3]

ResImage<T> smil::inf ( const Image< T > &  imIn1,
const Image< T > &  imIn2 
)

inf() - Inf of two images

Parameters
[in]imIn1: input image
[in]imIn2: input image
Returns
an image, which is the inf of imIn1 and imIn2

◆ inf() [3/3]

RES_T smil::inf ( const Image< T > &  imIn,
const T &  value,
Image< T > &  imOut 
)

inf() - Inf of an image and a value

Parameters
[in]imIn: input image
[in]value: input value
[out]imOut: output image

◆ equ() [1/3]

RES_T smil::equ ( const Image< T > &  imIn1,
const Image< T > &  imIn2,
Image< T > &  imOut 
)

equ() - Equality operator (pixel by pixel)

Comparison, pixel by pixel, between two images.

The result is a binary image where :

  • imOut(x) = (imIn1(x) == imIn2(x) ? max(T) : 0)

The result is an image indicating which pixels are equal in both images.

Parameters
[in]imIn1: input image
[in]imIn2: input image
[out]imOut: output image
Note
The functions equ() are the inverse of functions diff()

◆ equ() [2/3]

RES_T smil::equ ( const Image< T > &  imIn,
const T &  value,
Image< T > &  imOut 
)

equ() - Equality operator (pixel by pixel)

Comparison, pixel by pixel, between an image and a value.

The result is a binary image where :

  • imOut(x) = (imIn(x) == value ? max(T) : 0)

The result is an image indicating which pixels are equal to the value.

Parameters
[in]imIn: input image
[in]value: input value
[out]imOut: output image
Note
The functions equ() are the inverse of functions diff()

◆ equ() [3/3]

bool smil::equ ( const Image< T > &  imIn1,
const Image< T > &  imIn2 
)

equ() - Test equality between two images

Parameters
[in]imIn1: input image
[in]imIn2: input image
Returns
True if imIn1 == imIn2, False otherwise
Warning
Don't confuse this function with the two others with the same name but checking equality for each pixel. The difference are in the parameters.

◆ diff() [1/2]

RES_T smil::diff ( const Image< T > &  imIn1,
const Image< T > &  imIn2,
Image< T > &  imOut 
)

diff() - Difference between two images.

Comparison, pixel by pixel, between two images.

The result is a binary image where :

  • imOut(x) = (imIn1(x) != imIn2(x) ? max(T) : 0)

In other words, the result is an image indicating which pixels are different in both images.

Parameters
[in]imIn1: input image
[in]imIn2: input image
[out]imOut: output image
Note
The functions diff() are the inverse of functions equ()

◆ diff() [2/2]

RES_T smil::diff ( const Image< T > &  imIn,
const T &  value,
Image< T > &  imOut 
)

diff() - Difference between an image and a value

Comparison, pixel by pixel, between an image and a value.

The result is a binary image where :

  • imOut(x) = (imIn(x) != value ? max(T) : 0)

In other words, the result is an image indicating which pixels are different to the value.

Parameters
[in]imIn: input image
[in]value: input value
[out]imOut: output image
Note
The functions diff() are the inverse of functions equ()

◆ absDiff()

RES_T smil::absDiff ( const Image< T > &  imIn1,
const Image< T > &  imIn2,
Image< T > &  imOut 
)

absDiff() - Absolute difference ("vertical distance") between two images.

Absolute difference between two images : abs(imIn1 - imIn2)

Parameters
[in]imIn1: input image
[in]imIn2: input image
[out]imOut: output image

◆ grt() [1/2]

RES_T smil::grt ( const Image< T > &  imIn1,
const Image< T > &  imIn2,
Image< T > &  imOut 
)

grt() - Greater operator

Comparison, pixel by pixel, between two images

The result is a binary image where :

  • imOut(x) = (imIn1(x) > imIn2(x) ? max(T) : 0)
Parameters
[in]imIn1: input image
[in]imIn2: input image
[out]imOut: output image

◆ grt() [2/2]

RES_T smil::grt ( const Image< T > &  imIn,
const T &  value,
Image< T > &  imOut 
)

grt() - Greater operator

Comparison, pixel by pixel, between an image and a value.

The result is a binary image where :

  • imOut(x) = (imIn(x) > value ? max(T) : 0)
Parameters
[in]imIn: input image
[in]value: input value
[out]imOut: output image

◆ grtOrEqu() [1/2]

RES_T smil::grtOrEqu ( const Image< T > &  imIn1,
const Image< T > &  imIn2,
Image< T > &  imOut 
)

grtOrEqu() - Greater or equal operator

Comparison, pixel by pixel, between two images

The result is a binary image where :

  • imOut(x) = (imIn1(x) >= imIn2(x) ? max(T) : 0)
Parameters
[in]imIn1: input image
[in]imIn2: input image
[out]imOut: output image

◆ grtOrEqu() [2/2]

RES_T smil::grtOrEqu ( const Image< T > &  imIn,
const T &  value,
Image< T > &  imOut 
)

grtOrEqu() - Greater or equal operator

Comparison, pixel by pixel, between an image and a value.

The result is a binary image where :

  • imOut(x) >= (imIn(x) > value ? max(T) : 0)
Parameters
[in]imIn: input image
[in]value: input value
[out]imOut: output image

◆ low() [1/2]

RES_T smil::low ( const Image< T > &  imIn1,
const Image< T > &  imIn2,
Image< T > &  imOut 
)

low() - Lower operator

Comparison, pixel by pixel, between two images

The result is a binary image where :

  • imOut(x) = (imIn1(x) < imIn2(x) ? max(T) : 0)
Parameters
[in]imIn1: input image
[in]imIn2: input image
[out]imOut: output image

◆ low() [2/2]

RES_T smil::low ( const Image< T > &  imIn,
const T &  value,
Image< T > &  imOut 
)

low() - Lower operator

Comparison, pixel by pixel, between an image and a value.

The result is a binary image where :

  • imOut(x) = (imIn(x) < value ? max(T) : 0)
Parameters
[in]imIn: input image
[in]value: input value
[out]imOut: output image

◆ lowOrEqu() [1/2]

RES_T smil::lowOrEqu ( const Image< T > &  imIn1,
const Image< T > &  imIn2,
Image< T > &  imOut 
)

lowOrEqu() - Lower or equal operator

Comparison, pixel by pixel, between two images

The result is a binary image where :

  • imOut(x) = (imIn1(x) <= imIn2(x) ? max(T) : 0)
Parameters
[in]imIn1: input image
[in]imIn2: input image
[out]imOut: output image

◆ lowOrEqu() [2/2]

RES_T smil::lowOrEqu ( const Image< T > &  imIn,
const T &  value,
Image< T > &  imOut 
)

lowOrEqu() - Lower or equal operator

Comparison, pixel by pixel, between an image and a value

The result is a binary image where :

  • imOut(x) = (imIn(x) <= value ? max(T) : 0)
Parameters
[in]imIn: input image
[in]value: input value
[out]imOut: output imageBase/include/private/DImageArith.hpp:

◆ div() [1/2]

RES_T smil::div ( const Image< T > &  imIn1,
const Image< T > &  imIn2,
Image< T > &  imOut 
)

div() - Division between two images

The result is a image where :

  • imOut(x) = (imIn2(x) != 0 ? imIn1(x) / imIn2(x) : max(T))
Parameters
[in]imIn1: input image
[in]imIn2: input image
[out]imOut: output image

◆ div() [2/2]

RES_T smil::div ( const Image< T > &  imIn,
double &  dValue,
Image< T > &  imOut 
)

div() - Division : an image and a value

The result is a image where :

  • imOut(x) = (value != 0 ? imIn(x) / value : max(T))
Parameters
[in]imIn: input image
[in]dValue: input value
[out]imOut: output image

◆ mul() [1/2]

RES_T smil::mul ( const Image< T > &  imIn1,
const Image< T > &  imIn2,
Image< T > &  imOut 
)

mul() - Multiply two images

The result is a image where :

  • imOut(x) = (imIn1(x) * imIn2(x) <= max(T) ? imIn1(x) * imIn2(x) : max(T))
Parameters
[in]imIn1: input image
[in]imIn2: input image
[out]imOut: output image

◆ mul() [2/2]

RES_T smil::mul ( const Image< T > &  imIn,
const double &  dValue,
Image< T > &  imOut 
)

mul() - Multiply an image and a value

The result is a image where :

  • imOut(x) = (imIn(x) * dValue <= max(T) ? imIn(x) * dValue : max(T))
Parameters
[in]imIn: input image
[in]dValue: input value
[out]imOut: output image

◆ mulNoSat() [1/2]

RES_T smil::mulNoSat ( const Image< T > &  imIn1,
const Image< T > &  imIn2,
Image< T > &  imOut 
)

mulNoSat() - Multiply (without type max check) The result is a image where :

  • imOut(x) = (imIn1(x) * imIn2(x) % (max(T) + 1))
Parameters
[in]imIn1: input image
[in]imIn2: input image
[out]imOut: output image
Note
In reality mulNoSat() and mul() gives the same result

◆ mulNoSat() [2/2]

RES_T smil::mulNoSat ( const Image< T > &  imIn,
const T &  value,
Image< T > &  imOut 
)

mulNoSat() - Multiply an image and a value (without type max check)

The result is a image where the value of each pixel will be given by :

  • imOut(x) = (imIn(x) * value % (max(T) + 1))
Parameters
[in]imIn: input image
[in]value: input value
[out]imOut: output image
Note
In reality mulNoSat() and mul() gives the same result

◆ log()

RES_T smil::log ( const Image< T1 > &  imIn,
Image< T2 > &  imOut,
int  base = 0 
)

log() - Logarithm of an image

The result is a image where the value of each pixel will be given by :

  • imOut(x) = (imIn(x) > 0 ? log(imIn(x)) : max(T))
Parameters
[in]imIn: input image
[out]imOut: output image
[in]base: base of the function logarithm
Note
Possible bases: 0 or none (natural logarithm, or base e), 2, 10

◆ exp()

RES_T smil::exp ( const Image< T1 > &  imIn,
Image< T2 > &  imOut,
int  base = 0 
)

exp() - exponential of an image

The result is a image where the value of each pixel will be given by :

  • imOut(x) = exp(imIn(x))
Parameters
[in]imIn: input image
[out]imOut: output image
[in]base: base of the function logarithm
Note
  • Possible bases: 0 or none (natural logarithm, or base e), 2, 10
  • Output value is limited to the maximum value of imOut data type
See also

◆ pow()

RES_T smil::pow ( const Image< T1 > &  imIn,
Image< T2 > &  imOut,
double  exponent = 2 
)

pow() - power of an image

The result is a image where the value of each pixel will be given by :

  • imOut(x) = pow(imIn(x), exponent)
Parameters
[in]imIn: input image
[out]imOut: output image
[in]exponent: exponent to raise the value of each pixel
Note
  • Output value is limited to the maximum value of imOut data type

◆ sqrt()

RES_T smil::sqrt ( const Image< T1 > &  imIn,
Image< T2 > &  imOut 
)

sqrt() - square root of an image

The result is a image where the value of each pixel will be given by :

  • imOut(x) = sqrt(imIn(x)
Parameters
[in]imIn: input image
[out]imOut: output image