Lens distortion correction division model 1p
 All Classes Files Functions Variables
filters.h File Reference

filters class AMI_DLL_H definition More...

#include <math.h>
#include <vector>
#include "../ami_image/image.h"
#include "../ami_utilities/utilities.h"
#include "../ami_primitives/subpixel_image_contours.h"

Go to the source code of this file.

Functions

template<class T , class U >
void gauss_conv (ami::image< T > &img, ami::image< U > &img_conv, double sigma_x, double sigma_y, double precision)
 
template<class T , class U >
void grad (const ami::image< T > &img, ami::image< U > &grad_x, ami::image< U > &grad_y, const bool NeigborhoodType)
 
float ami_median_float (int k, int n, float *x)
 FUNCTION TO COMPUTE THE MEDIAN OF A VECTOR IN FLOAT PRECISION. More...
 
template<class T >
void canny (ami::image< T > input, ami::image< T > &output, float *seno, float *coseno, int *x, int *y, float per_low, float per_high)
 
template<class T >
ami::subpixel_image_contours canny (ami::image< T > input, ami::image< T > &edges, float canny_low_threshold, float canny_high_threshold)
 

Detailed Description

filters class AMI_DLL_H definition

Author
Luis Alvarez

Function Documentation

float ami_median_float ( int  k,
int  n,
float *  x 
)

FUNCTION TO COMPUTE THE MEDIAN OF A VECTOR IN FLOAT PRECISION.

Parameters
[in]k: the estimated median separates the k lower values of the data sample.
[in]n: vector size
[in]x: pointer to the vector
Returns
median of x separating the k lower values.
Author
Luis Alvarez
template<class T >
void canny ( ami::image< T >  input,
ami::image< T > &  output,
float *  seno,
float *  coseno,
int *  x,
int *  y,
float  per_low,
float  per_high 
)
Parameters
inputINPUT IMAGE (GRAY SCALE)
outputOUTPUT IMAGE WITH THE EDGES
senoSINUS OF THE ORIENTATION
cosenoCOSINUS OF THE ORIENTATION
xCOORDINATE X OF THE POSITION
yCOORDINATE Y OF THE POSITION
per_lowPERCENTAGE FOR THE LOW THRESHOLD (BETWEEN 0 AND 1)
per_highPERCENTAGE FOR THE HIGH THRESHOLD (BETWEEN 0 AND 1)
template<class T >
ami::subpixel_image_contours canny ( ami::image< T >  input,
ami::image< T > &  edges,
float  canny_low_threshold,
float  canny_high_threshold 
)
Parameters
inputINPUT IMAGE (GRAY SCALE)
edgesOUTPUT IMAGE WITH THE EDGES
canny_low_thresholdPERCENTAGE FOR THE LOW THRESHOLD (BETWEEN 0 AND 1)
canny_high_thresholdPERCENTAGE FOR THE HIGH THRESHOLD (BETWEEN 0 AND 1)
template<class T , class U >
void gauss_conv ( ami::image< T > &  img,
ami::image< U > &  img_conv,
double  sigma_x,
double  sigma_y,
double  precision 
)
Parameters
imgINPUT IMAGE (IT CAN BE = OUTPUT IMAGE
img_convOUTPUT IMAGE
sigma_xSTANDARD DEVIATION IN THE x VARIABLE
sigma_ySTANDARD DEVIATION IN THE y VARIABLE
precisionPRECISION TO COMPUTE THE GAUSSIAN CONVOLUTION BIGGER IS THE PRECISION, MORE ITERATIONS TO COMPUTE THE CONVOLUTION
template<class T , class U >
void grad ( const ami::image< T > &  img,
ami::image< U > &  grad_x,
ami::image< U > &  grad_y,
const bool  NeigborhoodType 
)
Parameters
imgINPUT IMAGE
grad_xOUTPUT x-GRADIENT IMAGE
grad_yOUTPUT y-GRADIENT IMAGE
NeigborhoodType=0 means 5 size neighborhood, =9 means 9 size neighborhood