TuttleOFX  1
tuttle::imageUtils Namespace Reference

Data Structures

struct  tensor_t
 Structure handling anisotropic gradient parameters. More...
class  ImageTensors
 Class used to render tensors. More...

Functions

template<typename S_VIEW , typename D_VIEW >
void deriche (const S_VIEW &src, D_VIEW &dst, const float sigma, const int order=0, const char axe= 'x', const bool cond=true)
 The Canny-Deriche filter is a recursive algorithm allowing to compute blurred derivatives of order 0,1 or 2 of an image.
template<typename S_VIEW , typename D_VIEW >
void dericheFilter (const S_VIEW &src, D_VIEW &dst, const float sigma, int order=0, float threshold=0.0f)
 Use deriche filter amon x and y direction to apply blur.
template<typename S_VIEW , typename D_VIEW >
D_VIEW & simple_structure_tensor (const S_VIEW &src, D_VIEW &final_dst, float threshold)
 Apply precise forward/backward finite differences to get a gradient image.
template<typename S_VIEW , typename D_VIEW >
void harris (const S_VIEW &src, D_VIEW &dst, float threshold)
template<typename ViewIt >
void symmetric_eigen (ViewIt &tensorXY, std::vector< double > &val, std::vector< double > &vec)
 Compute the eigenvalues and eigenvectors of a symmetric matrix.
const float & pix2d (const float *W, const int x, const int y, const int c, const int w, const int h, const int nc)
 Return right pixel from unsafe coordinates.
template<typename DstView >
const float pix2d (DstView &myView, const int x, const int y, const int c, const int w, const int h)
 Return right pixel from unsafe coordinates.
float linear_pix2d (const float *W, const float fx, const float fy, const int c, const int w, const int h, const int nc)
 Return interpolated pixel.
template<typename DstView >
float linear_pix2d (DstView &myView, const float fx, const float fy, const int c, const int w, const int h)
 Return interpolated pixel.
template<class S_VIEW , class D_VIEW >
D_VIEW & pseudo_residual (S_VIEW &src, D_VIEW &dst)
 Compute somme pseudo-residuals The pseudo residual r_i of the image Y_i are so thar E[r_i^2] = E[Y_i^2]. This is the 2D pseudo-implementation.
template<class S_VIEW , typename t >
double variance_mean (S_VIEW &src, t &mean)
 Return the variance and the mean of the image Least Mean of Square.
template<class S_VIEW >
double noise_variance (S_VIEW &src)
 Robustly estimatate the variance of a the noise using the pseudo-residuals.

Function Documentation

template<typename S_VIEW , typename D_VIEW >
void tuttle::imageUtils::deriche ( const S_VIEW &  src,
D_VIEW &  dst,
const float  sigma,
const int  order = 0,
const char  axe = 'x',
const bool  cond = true 
)

The Canny-Deriche filter is a recursive algorithm allowing to compute blurred derivatives of order 0,1 or 2 of an image.

Parameters:
[in,out]srcSource view
[out]dstDestination view
[in]sigmaStandard variation of the gaussian distribution
[in]orderDerivative order (0 = kind of blur, 1 = kind of blurred edge detection, 2 = kind of very blurred edge detection)
[in]axeDirection of the blur
[in]condMiscallenous
Returns:
Return the result of the Deriche filter
See also:
blur

Definition at line 37 of file blurFilters.hpp.

References tuttle::plugin::merge::copy_pixels().

Referenced by dericheFilter().

Here is the call graph for this function:

template<typename S_VIEW , typename D_VIEW >
void tuttle::imageUtils::dericheFilter ( const S_VIEW &  src,
D_VIEW &  dst,
const float  sigma,
int  order = 0,
float  threshold = 0.0f 
)

Use deriche filter amon x and y direction to apply blur.

Parameters:
[in,out]srcSource view
[out]dstDestination view
[in]sigmaStandard variation of the gaussian distribution

Definition at line 226 of file blurFilters.hpp.

References deriche(), and boost::gil::view().

Referenced by tuttle::imageUtils::ImageTensors< View >::anisotropic_gradient().

Here is the call graph for this function:

template<typename S_VIEW , typename D_VIEW >
void tuttle::imageUtils::harris ( const S_VIEW &  src,
D_VIEW &  dst,
float  threshold 
)
float tuttle::imageUtils::linear_pix2d ( const float *  W,
const float  fx,
const float  fy,
const int  c,
const int  w,
const int  h,
const int  nc 
) [inline]

Return interpolated pixel.

Parameters:
[in]Winput image (linear buffer, cache optimisation)
[in]fxfloat abscisse
[in]fyfloat ordinate
[in]cchannel index
[in]wimage width
[in]himage height
[in]ncchannels number
Returns:
right pixel

Definition at line 67 of file interpolation.hpp.

References pix2d().

Here is the call graph for this function:

template<typename DstView >
float tuttle::imageUtils::linear_pix2d ( DstView &  myView,
const float  fx,
const float  fy,
const int  c,
const int  w,
const int  h 
)

Return interpolated pixel.

Parameters:
[in]myViewinput view
[in]fxfloat abscisse
[in]fyfloat ordinate
[in]cchannel index
[in]wimage width
[in]himage height
[in]ncchannels number
Returns:
right pixel

Definition at line 97 of file interpolation.hpp.

References pix2d().

Here is the call graph for this function:

template<class S_VIEW >
double tuttle::imageUtils::noise_variance ( S_VIEW &  src)

Robustly estimatate the variance of a the noise using the pseudo-residuals.

See also:
variance_estimation()

Definition at line 116 of file noiseAnalysis.hpp.

References pseudo_residual(), variance_mean(), and boost::gil::view().

Referenced by tuttle::plugin::nlmDenoiser::NLMDenoiserProcess< View >::computeWeights().

Here is the call graph for this function:

const float& tuttle::imageUtils::pix2d ( const float *  W,
const int  x,
const int  y,
const int  c,
const int  w,
const int  h,
const int  nc 
) [inline]

Return right pixel from unsafe coordinates.

Parameters:
[in]Winput image (linear buffer, cache optimisation)
[in]xabscisse
[in]yordinate
[in]cchannel index
[in]wimage width
[in]himage height
[in]ncchannels number
Returns:
right pixel

Definition at line 28 of file interpolation.hpp.

Referenced by linear_pix2d().

template<typename DstView >
const float tuttle::imageUtils::pix2d ( DstView &  myView,
const int  x,
const int  y,
const int  c,
const int  w,
const int  h 
)

Return right pixel from unsafe coordinates.

Parameters:
[in]myViewinput view
[in]xabscisse
[in]yordinate
[in]cchannel index
[in]wimage width
[in]himage height
[in]ncchannels number
Returns:
right pixel

Definition at line 48 of file interpolation.hpp.

template<class S_VIEW , class D_VIEW >
D_VIEW& tuttle::imageUtils::pseudo_residual ( S_VIEW &  src,
D_VIEW &  dst 
)

Compute somme pseudo-residuals The pseudo residual r_i of the image Y_i are so thar E[r_i^2] = E[Y_i^2]. This is the 2D pseudo-implementation.

Definition at line 22 of file noiseAnalysis.hpp.

Referenced by noise_variance().

template<typename S_VIEW , typename D_VIEW >
D_VIEW& tuttle::imageUtils::simple_structure_tensor ( const S_VIEW &  src,
D_VIEW &  final_dst,
float  threshold 
)

Apply precise forward/backward finite differences to get a gradient image.

Parameters:
[in]srcSource view
[out]final_dstDestination view
Returns:
outline image (destination)
Warning:
Destination MUST BE different from source.

Definition at line 32 of file edgeDetect.hpp.

Referenced by tuttle::imageUtils::ImageTensors< View >::anisotropic_gradient().

template<typename ViewIt >
void tuttle::imageUtils::symmetric_eigen ( ViewIt &  tensorXY,
std::vector< double > &  val,
std::vector< double > &  vec 
)

Compute the eigenvalues and eigenvectors of a symmetric matrix.

Parameters:
[in]tensorXYtensor (view iterator) at a certain position
[out]valeigenvalue
[out]valeigenvector
Warning:
vec MUST BE a linear float vector of dimension 4.

Definition at line 247 of file edgeDetect.hpp.

Referenced by tuttle::imageUtils::ImageTensors< View >::anisotropic_gradient().

template<class S_VIEW , typename t >
double tuttle::imageUtils::variance_mean ( S_VIEW &  src,
t &  mean 
)

Return the variance and the mean of the image Least Mean of Square.

Definition at line 78 of file noiseAnalysis.hpp.

Referenced by noise_variance().