![]() |
Visual Servoing Platform
version 3.6.0 under development (2023-09-29)
|
#include <visp3/core/vpImageFilter.h>
Static Public Member Functions | |
static void | canny (const vpImage< unsigned char > &I, vpImage< unsigned char > &Ic, unsigned int gaussianFilterSize, float thresholdCanny, unsigned int apertureSobel) |
static void | canny (const vpImage< unsigned char > &I, vpImage< unsigned char > &Ic, unsigned int gaussianFilterSize, float lowerThresholdCanny, float higherThresholdCanny, unsigned int apertureSobel) |
template<class T > | |
static double | derivativeFilterX (const vpImage< T > &I, unsigned int r, unsigned int c) |
template<class T > | |
static double | derivativeFilterY (const vpImage< T > &I, unsigned int r, unsigned int c) |
template<class T , typename FilterType > | |
static FilterType | derivativeFilterX (const vpImage< T > &I, unsigned int r, unsigned int c, const FilterType *filter, unsigned int size) |
template<class T , typename FilterType > | |
static FilterType | derivativeFilterY (const vpImage< T > &I, unsigned int r, unsigned int c, const FilterType *filter, unsigned int size) |
template<typename FilterType > | |
static void | filter (const vpImage< unsigned char > &I, vpImage< FilterType > &If, const vpArray2D< FilterType > &M, bool convolve=false) |
template<typename FilterType > | |
static void | filter (const vpImage< FilterType > &I, vpImage< FilterType > &Iu, vpImage< FilterType > &Iv, const vpArray2D< FilterType > &M, bool convolve=false) |
static void | sepFilter (const vpImage< unsigned char > &I, vpImage< double > &If, const vpColVector &kernelH, const vpColVector &kernelV) |
template<typename FilterType > | |
static void | filter (const vpImage< unsigned char > &I, vpImage< FilterType > &GI, const FilterType *filter, unsigned int size) |
template<typename FilterType > | |
static void | filter (const vpImage< FilterType > &I, vpImage< FilterType > &GI, const FilterType *filter, unsigned int size) |
static unsigned char | filterGaussXPyramidal (const vpImage< unsigned char > &I, unsigned int i, unsigned int j) |
static unsigned char | filterGaussYPyramidal (const vpImage< unsigned char > &I, unsigned int i, unsigned int j) |
template<typename FilterType > | |
static void | filterX (const vpImage< unsigned char > &I, vpImage< FilterType > &dIx, const FilterType *filter, unsigned int size) |
template<typename FilterType > | |
static void | filterX (const vpImage< FilterType > &I, vpImage< FilterType > &dIx, const FilterType *filter, unsigned int size) |
static void | filterX (const vpImage< vpRGBa > &I, vpImage< vpRGBa > &dIx, const double *filter, unsigned int size) |
static void | filterXR (const vpImage< vpRGBa > &I, vpImage< vpRGBa > &dIx, const double *filter, unsigned int size) |
static void | filterXG (const vpImage< vpRGBa > &I, vpImage< vpRGBa > &dIx, const double *filter, unsigned int size) |
static void | filterXB (const vpImage< vpRGBa > &I, vpImage< vpRGBa > &dIx, const double *filter, unsigned int size) |
template<typename FilterType > | |
static FilterType | filterX (const vpImage< unsigned char > &I, unsigned int r, unsigned int c, const FilterType *filter, unsigned int size) |
static double | filterXR (const vpImage< vpRGBa > &I, unsigned int r, unsigned int c, const double *filter, unsigned int size) |
static double | filterXG (const vpImage< vpRGBa > &I, unsigned int r, unsigned int c, const double *filter, unsigned int size) |
static double | filterXB (const vpImage< vpRGBa > &I, unsigned int r, unsigned int c, const double *filter, unsigned int size) |
template<typename FilterType > | |
static FilterType | filterXLeftBorder (const vpImage< unsigned char > &I, unsigned int r, unsigned int c, const FilterType *filter, unsigned int size) |
static double | filterXLeftBorderR (const vpImage< vpRGBa > &I, unsigned int r, unsigned int c, const double *filter, unsigned int size) |
static double | filterXLeftBorderG (const vpImage< vpRGBa > &I, unsigned int r, unsigned int c, const double *filter, unsigned int size) |
static double | filterXLeftBorderB (const vpImage< vpRGBa > &I, unsigned int r, unsigned int c, const double *filter, unsigned int size) |
template<typename FilterType > | |
static FilterType | filterXRightBorder (const vpImage< unsigned char > &I, unsigned int r, unsigned int c, const FilterType *filter, unsigned int size) |
static double | filterXRightBorderR (const vpImage< vpRGBa > &I, unsigned int r, unsigned int c, const double *filter, unsigned int size) |
static double | filterXRightBorderG (const vpImage< vpRGBa > &I, unsigned int r, unsigned int c, const double *filter, unsigned int size) |
static double | filterXRightBorderB (const vpImage< vpRGBa > &I, unsigned int r, unsigned int c, const double *filter, unsigned int size) |
template<typename FilterType > | |
static FilterType | filterX (const vpImage< FilterType > &I, unsigned int r, unsigned int c, const FilterType *filter, unsigned int size) |
template<typename FilterType > | |
static FilterType | filterXLeftBorder (const vpImage< FilterType > &I, unsigned int r, unsigned int c, const FilterType *filter, unsigned int size) |
template<typename FilterType > | |
static FilterType | filterXRightBorder (const vpImage< FilterType > &I, unsigned int r, unsigned int c, const FilterType *filter, unsigned int size) |
template<typename FilterType > | |
static void | filterY (const vpImage< unsigned char > &I, vpImage< FilterType > &dIy, const FilterType *filter, unsigned int size) |
static void | filterY (const vpImage< vpRGBa > &I, vpImage< vpRGBa > &dIx, const double *filter, unsigned int size) |
static void | filterYR (const vpImage< vpRGBa > &I, vpImage< vpRGBa > &dIx, const double *filter, unsigned int size) |
static void | filterYG (const vpImage< vpRGBa > &I, vpImage< vpRGBa > &dIx, const double *filter, unsigned int size) |
static void | filterYB (const vpImage< vpRGBa > &I, vpImage< vpRGBa > &dIx, const double *filter, unsigned int size) |
template<typename FilterType > | |
static void | filterY (const vpImage< FilterType > &I, vpImage< FilterType > &dIy, const FilterType *filter, unsigned int size) |
template<typename FilterType > | |
static FilterType | filterY (const vpImage< unsigned char > &I, unsigned int r, unsigned int c, const FilterType *filter, unsigned int size) |
static double | filterYR (const vpImage< vpRGBa > &I, unsigned int r, unsigned int c, const double *filter, unsigned int size) |
static double | filterYG (const vpImage< vpRGBa > &I, unsigned int r, unsigned int c, const double *filter, unsigned int size) |
static double | filterYB (const vpImage< vpRGBa > &I, unsigned int r, unsigned int c, const double *filter, unsigned int size) |
template<typename FilterType > | |
static FilterType | filterYTopBorder (const vpImage< unsigned char > &I, unsigned int r, unsigned int c, const FilterType *filter, unsigned int size) |
static double | filterYTopBorderR (const vpImage< vpRGBa > &I, unsigned int r, unsigned int c, const double *filter, unsigned int size) |
static double | filterYTopBorderG (const vpImage< vpRGBa > &I, unsigned int r, unsigned int c, const double *filter, unsigned int size) |
static double | filterYTopBorderB (const vpImage< vpRGBa > &I, unsigned int r, unsigned int c, const double *filter, unsigned int size) |
template<typename FilterType > | |
static FilterType | filterYBottomBorder (const vpImage< unsigned char > &I, unsigned int r, unsigned int c, const FilterType *filter, unsigned int size) |
static double | filterYBottomBorderR (const vpImage< vpRGBa > &I, unsigned int r, unsigned int c, const double *filter, unsigned int size) |
static double | filterYBottomBorderG (const vpImage< vpRGBa > &I, unsigned int r, unsigned int c, const double *filter, unsigned int size) |
static double | filterYBottomBorderB (const vpImage< vpRGBa > &I, unsigned int r, unsigned int c, const double *filter, unsigned int size) |
template<typename FilterType > | |
static FilterType | filterYTopBorder (const vpImage< double > &I, unsigned int r, unsigned int c, const FilterType *filter, unsigned int size) |
template<typename FilterType > | |
static FilterType | filterYBottomBorder (const vpImage< double > &I, unsigned int r, unsigned int c, const FilterType *filter, unsigned int size) |
template<typename FilterType > | |
static FilterType | filterY (const vpImage< double > &I, unsigned int r, unsigned int c, const FilterType *filter, unsigned int size) |
template<typename FilterType > | |
static void | gaussianBlur (const vpImage< unsigned char > &I, vpImage< FilterType > &GI, unsigned int size=7, FilterType sigma=0., bool normalize=true) |
static void | gaussianBlur (const vpImage< vpRGBa > &I, vpImage< vpRGBa > &GI, unsigned int size=7, double sigma=0., bool normalize=true) |
template<typename FilterType > | |
static void | gaussianBlur (const vpImage< FilterType > &I, vpImage< FilterType > &GI, unsigned int size=7, FilterType sigma=0., bool normalize=true) |
template<class T > | |
static double | gaussianFilter (const vpImage< T > &fr, unsigned int r, unsigned int c) |
static void | getGaussPyramidal (const vpImage< unsigned char > &I, vpImage< unsigned char > &GI) |
static void | getGaussXPyramidal (const vpImage< unsigned char > &I, vpImage< unsigned char > &GI) |
static void | getGaussYPyramidal (const vpImage< unsigned char > &I, vpImage< unsigned char > &GI) |
template<typename FilterType > | |
static void | getGaussianKernel (FilterType *filter, unsigned int size, FilterType sigma=0., bool normalize=true) |
template<typename FilterType > | |
static void | getGaussianDerivativeKernel (FilterType *filter, unsigned int size, FilterType sigma=0., bool normalize=true) |
template<typename FilterType > | |
static void | getGradX (const vpImage< unsigned char > &I, vpImage< FilterType > &dIx) |
template<typename ImageType , typename FilterType > | |
static void | getGradX (const vpImage< ImageType > &I, vpImage< FilterType > &dIx, const FilterType *filter, unsigned int size) |
template<typename ImageType , typename FilterType > | |
static void | getGradXGauss2D (const vpImage< ImageType > &I, vpImage< FilterType > &dIx, const FilterType *gaussianKernel, const FilterType *gaussianDerivativeKernel, unsigned int size) |
template<typename FilterType > | |
static void | getGradY (const vpImage< unsigned char > &I, vpImage< FilterType > &dIy) |
template<typename ImageType , typename FilterType > | |
static void | getGradY (const vpImage< ImageType > &I, vpImage< FilterType > &dIy, const FilterType *filter, unsigned int size) |
template<typename ImageType , typename FilterType > | |
static void | getGradYGauss2D (const vpImage< ImageType > &I, vpImage< FilterType > &dIy, const FilterType *gaussianKernel, const FilterType *gaussianDerivativeKernel, unsigned int size) |
template<typename FilterType > | |
static FilterType | getSobelKernelX (FilterType *filter, unsigned int size) |
template<typename FilterType > | |
static FilterType | getSobelKernelY (FilterType *filter, unsigned int size) |
static float | computeCannyThreshold (const cv::Mat &cv_I, const cv::Mat *p_cv_blur, float &lowerThresh) |
static float | computeCannyThreshold (const vpImage< unsigned char > &I, float &lowerThresh) |
static float | median (const cv::Mat &cv_I) |
static float | median (const vpImage< unsigned char > &Isrc) |
static std::vector< float > | median (const vpImage< vpRGBa > &Isrc) |
Various image filter, convolution, etc...
Definition at line 67 of file vpImageFilter.h.
|
static |
Apply the Canny edge operator on the image Isrc and return the resulting image Ires.
The following example shows how to use the method:
Isrc | : Image to apply the Canny edge detector to. |
Ires | : Filtered image (255 means an edge, 0 otherwise). |
gaussianFilterSize | : The size of the mask of the Gaussian filter to apply (an odd number). |
lowerThreshold | : The lower threshold for the Canny operator. Values lower than this value are rejected. If negative, it will be set to one third of the thresholdCanny . |
upperThreshold | : The upper threshold for the Canny operator. Only value greater than this value are marked as an edge. If negative, it will be automatically computed, along with the lower threshold. Otherwise, the lower threshold will be set to one third of the thresholdCanny . |
apertureSobel | : Size of the mask for the Sobel operator (odd number). |
Definition at line 347 of file vpImageFilter.cpp.
References vpException::badValue, computeCannyThreshold(), vpImageConvert::convert(), and vpCannyEdgeDetection::detect().
|
static |
Apply the Canny edge operator on the image Isrc and return the resulting image Ires.
The following example shows how to use the method:
Isrc | : Image to apply the Canny edge detector to. |
Ires | : Filtered image (255 means an edge, 0 otherwise). |
gaussianFilterSize | : The size of the mask of the Gaussian filter to apply (an odd number). |
thresholdCanny | : The upper threshold for the Canny operator. Only value greater than this value are marked as an edge. If negative, it will be automatically computed, along with the lower threshold. Otherwise, the lower threshold will be set to one third of the thresholdCanny . |
apertureSobel | : Size of the mask for the Sobel operator (odd number). |
Definition at line 298 of file vpImageFilter.cpp.
Referenced by vpMeNurbs::seekExtremitiesCanny().
|
static |
Compute the upper Canny edge filter threshold.
[in] | cv_I | : The image, in cv format. |
[in] | p_cv_blur | : If different from nullptr, must contain a blurred version of cv_I. |
[out] | lowerThresh | : The lower threshold for the Canny edge filter. |
Definition at line 219 of file vpImageFilter.cpp.
References median().
Referenced by canny(), and computeCannyThreshold().
|
static |
Compute the upper Canny edge filter threshold.
[in] | I | : The gray-scale image, in ViSP format. |
[in] | lowerThresh | : Canny lower threshold. |
Definition at line 251 of file vpImageFilter.cpp.
References computeCannyThreshold(), and vpImageConvert::convert().
|
inlinestatic |
Apply a 1x3 derivative filter to an image pixel.
I | : Image to filter |
r | : coordinates (row) of the pixel |
c | : coordinates (column) of the pixel |
Definition at line 83 of file vpImageFilter.h.
Referenced by vpFeatureLuminance::buildFrom(), and getGradX().
|
inlinestatic |
Apply a 1 x size Derivative Filter in X to an image pixel.
FilterType | : Either float, to accelerate the computation time, or double, to have greater precision. |
I | : Image to filter |
r | : Coordinates(row) of the pixel |
c | : Coordinates(column) of the pixel |
filter | : Coefficients of the filter to be initialized using vpImageFilter::getGaussianDerivativeKernel(). |
size | : Size of the filter. |
Definition at line 116 of file vpImageFilter.h.
|
inlinestatic |
Apply a 3x1 derivative filter to an image pixel.
I | : Image to filter |
r | : coordinates (row) of the pixel |
c | : coordinates (column) of the pixel |
Definition at line 96 of file vpImageFilter.h.
Referenced by vpFeatureLuminance::buildFrom(), and getGradY().
|
inlinestatic |
Apply a size x 1 Derivative Filter in Y to an image pixel.
FilterType | : Either float, to accelerate the computation time, or double, to have greater precision. |
I | : Image to filter. |
r | : Coordinates (row) of the pixel. |
c | : Coordinates (column) of the pixel. |
filter | : Coefficients of the filter to be initialized using vpImageFilter::getGaussianDerivativeKernel(). |
size | : Size of the filter. |
Definition at line 143 of file vpImageFilter.h.
|
inlinestatic |
Apply a separable filter.
FilterType | : Either float, to accelerate the computation time, or double, to have greater precision. |
I | The original image. |
GI | The filtered image. |
filter | The separable filter. |
size | The size of the filter. |
Definition at line 312 of file vpImageFilter.h.
References vpImage< Type >::destroy().
|
inlinestatic |
Apply a filter to an image:
FilterType | : Either float, to accelerate the computation time, or double, to have greater precision. |
I | : Image to filter |
Iu | : Filtered image along the horizontal axis (u = columns). |
Iv | : Filtered image along the vertical axis (v = rows). |
M | : Filter kernel. |
convolve | : If true, perform a convolution otherwise a correlation. |
Definition at line 237 of file vpImageFilter.h.
References vpImage< Type >::getHeight(), vpArray2D< Type >::getRows(), vpImage< Type >::getWidth(), and vpImage< Type >::resize().
|
inlinestatic |
Apply a separable filter.
FilterType | : Either float, to accelerate the computation time, or double, to have greater precision. |
I | : The original image. |
GI | : The filtered image. |
filter | : The separable filter. |
size | : The size of the filter. |
Definition at line 295 of file vpImageFilter.h.
References vpImage< Type >::destroy().
|
inlinestatic |
Apply a filter to an image.
FilterType | : Either float, to accelerate the computation time, or double, to have greater precision. |
I | : Image to filter |
If | : Filtered image. |
M | : Filter kernel. |
convolve | : If true, perform a convolution otherwise a correlation. |
Definition at line 185 of file vpImageFilter.h.
References vpArray2D< Type >::getCols(), vpImage< Type >::getHeight(), vpArray2D< Type >::getRows(), vpImage< Type >::getWidth(), and vpImage< Type >::resize().
Referenced by filterX(), filterY(), vpTemplateTracker::getGaussianBluredImage(), vpTemplateTrackerMI::getMI(), vpTemplateTrackerMI::getMI256(), vpTemplateTrackerZNCCForwardAdditional::initHessienDesired(), vpTemplateTrackerZNCCInverseCompositional::initHessienDesired(), vpTemplateTrackerMIESM::initHessienDesired(), vpTemplateTrackerMIForwardAdditional::initHessienDesired(), vpTemplateTrackerMIForwardCompositional::initHessienDesired(), vpTemplateTrackerMIInverseCompositional::initHessienDesired(), vpTemplateTracker::initTracking(), vpTemplateTrackerSSDESM::trackNoPyr(), vpTemplateTrackerSSDForwardAdditional::trackNoPyr(), vpTemplateTrackerSSDForwardCompositional::trackNoPyr(), vpTemplateTrackerSSDInverseCompositional::trackNoPyr(), vpTemplateTrackerZNCCForwardAdditional::trackNoPyr(), vpTemplateTrackerZNCCInverseCompositional::trackNoPyr(), vpTemplateTrackerMIESM::trackNoPyr(), vpTemplateTrackerMIForwardAdditional::trackNoPyr(), vpTemplateTrackerMIForwardCompositional::trackNoPyr(), and vpTemplateTrackerMIInverseCompositional::trackNoPyr().
|
inlinestatic |
Definition at line 320 of file vpImageFilter.h.
Referenced by getGaussXPyramidal().
|
inlinestatic |
Definition at line 324 of file vpImageFilter.h.
Referenced by getGaussYPyramidal().
|
inlinestatic |
Definition at line 548 of file vpImageFilter.h.
|
inlinestatic |
Definition at line 347 of file vpImageFilter.h.
References vpImage< Type >::getHeight(), vpImage< Type >::getWidth(), and vpImage< Type >::resize().
|
inlinestatic |
Definition at line 369 of file vpImageFilter.h.
|
inlinestatic |
Definition at line 330 of file vpImageFilter.h.
References vpImage< Type >::getHeight(), vpImage< Type >::getWidth(), and vpImage< Type >::resize().
Referenced by gaussianBlur().
|
static |
Definition at line 409 of file vpImageFilter.cpp.
References filter(), filterXB(), filterXG(), filterXLeftBorderB(), filterXLeftBorderG(), filterXLeftBorderR(), filterXR(), filterXRightBorderB(), filterXRightBorderG(), filterXRightBorderR(), vpImage< Type >::getHeight(), vpImage< Type >::getWidth(), and vpImage< Type >::resize().
|
inlinestatic |
Definition at line 405 of file vpImageFilter.h.
|
static |
Referenced by filterX().
|
inlinestatic |
Definition at line 393 of file vpImageFilter.h.
|
static |
Referenced by filterX().
|
inlinestatic |
Definition at line 562 of file vpImageFilter.h.
|
inlinestatic |
Definition at line 418 of file vpImageFilter.h.
|
inlinestatic |
Definition at line 466 of file vpImageFilter.h.
Referenced by filterX().
|
inlinestatic |
Definition at line 450 of file vpImageFilter.h.
Referenced by filterX().
|
inlinestatic |
Definition at line 434 of file vpImageFilter.h.
Referenced by filterX().
|
inlinestatic |
Definition at line 381 of file vpImageFilter.h.
|
static |
Referenced by filterX().
|
inlinestatic |
Definition at line 579 of file vpImageFilter.h.
References vpImage< Type >::getWidth().
|
inlinestatic |
Definition at line 483 of file vpImageFilter.h.
References vpImage< Type >::getWidth().
|
inlinestatic |
Definition at line 531 of file vpImageFilter.h.
References vpImage< Type >::getWidth().
Referenced by filterX().
|
inlinestatic |
Definition at line 515 of file vpImageFilter.h.
References vpImage< Type >::getWidth().
Referenced by filterX().
|
inlinestatic |
Definition at line 499 of file vpImageFilter.h.
References vpImage< Type >::getWidth().
Referenced by filterX().
|
inlinestatic |
Definition at line 852 of file vpImageFilter.h.
|
inlinestatic |
Definition at line 622 of file vpImageFilter.h.
References vpImage< Type >::getHeight(), vpImage< Type >::getWidth(), and vpImage< Type >::resize().
|
inlinestatic |
Definition at line 643 of file vpImageFilter.h.
|
inlinestatic |
Definition at line 596 of file vpImageFilter.h.
References vpImage< Type >::getHeight(), vpImage< Type >::getWidth(), and vpImage< Type >::resize().
Referenced by gaussianBlur().
|
static |
Definition at line 451 of file vpImageFilter.cpp.
References filter(), filterYB(), filterYBottomBorderB(), filterYBottomBorderG(), filterYBottomBorderR(), filterYG(), filterYR(), filterYTopBorderB(), filterYTopBorderG(), filterYTopBorderR(), vpImage< Type >::getHeight(), vpImage< Type >::getWidth(), and vpImage< Type >::resize().
|
inlinestatic |
Definition at line 678 of file vpImageFilter.h.
|
static |
Referenced by filterY().
|
inlinestatic |
Definition at line 835 of file vpImageFilter.h.
References vpImage< Type >::getHeight().
|
inlinestatic |
Definition at line 753 of file vpImageFilter.h.
References vpImage< Type >::getHeight().
|
inlinestatic |
Definition at line 801 of file vpImageFilter.h.
References vpImage< Type >::getHeight().
Referenced by filterY().
|
inlinestatic |
Definition at line 785 of file vpImageFilter.h.
References vpImage< Type >::getHeight().
Referenced by filterY().
|
inlinestatic |
Definition at line 769 of file vpImageFilter.h.
References vpImage< Type >::getHeight().
Referenced by filterY().
|
inlinestatic |
Definition at line 666 of file vpImageFilter.h.
|
static |
Referenced by filterY().
|
inlinestatic |
Definition at line 655 of file vpImageFilter.h.
|
static |
Referenced by filterY().
|
inlinestatic |
Definition at line 818 of file vpImageFilter.h.
|
inlinestatic |
Definition at line 691 of file vpImageFilter.h.
|
inlinestatic |
Definition at line 737 of file vpImageFilter.h.
Referenced by filterY().
|
inlinestatic |
Definition at line 722 of file vpImageFilter.h.
Referenced by filterY().
|
inlinestatic |
Definition at line 707 of file vpImageFilter.h.
Referenced by filterY().
|
inlinestatic |
Apply a Gaussian blur to a double image.
FilterType | : Either float, to accelerate the computation time, or double, to have greater precision. |
I | : Input double image. |
GI | : Filtered image. |
size | : Filter size. This value should be odd. |
sigma | : Gaussian standard deviation. If it is equal to zero or negative, it is computed from filter size as sigma = (size-1)/6. |
normalize | : Flag indicating whether to normalize the filter coefficients or not. |
Definition at line 904 of file vpImageFilter.h.
References vpImage< Type >::destroy().
|
inlinestatic |
Apply a Gaussian blur to an image.
FilterType | : Either float, to accelerate the computation time, or double, to have greater precision. |
I | : Input image. |
GI | : Filtered image. |
size | : Filter size. This value should be odd. |
sigma | : Gaussian standard deviation. If it is equal to zero or negative, it is computed from filter size as sigma = (size-1)/6. |
normalize | : Flag indicating whether to normalize the filter coefficients or not. |
Definition at line 878 of file vpImageFilter.h.
References vpImage< Type >::destroy().
Referenced by vp::unsharpMask().
|
static |
Apply a Gaussian blur to RGB color image.
I | : Input image. |
GI | : Filtered image. |
size | : Filter size. This value should be odd. |
sigma | : Gaussian standard deviation. If it is equal to zero or negative, it is computed from filter size as sigma = (size-1)/6. |
normalize | : Flag indicating whether to normalize the filter coefficients or not. |
Definition at line 524 of file vpImageFilter.cpp.
References vpImage< Type >::destroy(), filterX(), filterY(), and getGaussianKernel().
|
inlinestatic |
Apply a 5x5 Gaussian filter to an image pixel.
fr | : Image to filter |
r | : coordinates (row) of the pixel |
c | : coordinates (column) of the pixel |
Definition at line 922 of file vpImageFilter.h.
|
inlinestatic |
Return the coefficients of a Gaussian derivative filter that may be used to compute spatial image derivatives after applying a Gaussian blur.
FilterType | : Either float, to accelerate the computation time, or double, to have greater precision. |
filter | : Pointer to the filter kernel that should refer to a (size+1)/2 array. The first value refers to the central coefficient, the next one to the right coefficients. Left coefficients could be deduced by symmetry. |
size | : Filter size. This value should be odd. |
sigma | : Gaussian standard deviation. If it is equal to zero or negative, it is computed from filter size as sigma = (size-1)/6. |
normalize | : Flag indicating whether to normalize the filter coefficients or not. |
Definition at line 997 of file vpImageFilter.h.
References vpImageException::incorrectInitializationError, and vpMath::sqr().
Referenced by vpTemplateTracker::setGaussianFilterSize(), and vpTemplateTracker::vpTemplateTracker().
|
inlinestatic |
Return the coefficients of a Gaussian filter.
FilterType | : Either float, to accelerate the computation time, or double, to have greater precision. |
[out] | filter | : Pointer to the half size filter kernel that should refer to a (size+1)/2 array. The first value refers to the central coefficient, the next one to the right coefficients. Left coefficients could be deduced by symmetry. |
[in] | size | : Filter size. This value should be odd and positive. |
[in] | sigma | : Gaussian standard deviation ![]() |
[in] | normalize | : Flag indicating whether to normalize the filter coefficients or not. In that case ![]() |
The function computes the (size+1)/2 values of the Gaussian filter coefficients as:
Definition at line 953 of file vpImageFilter.h.
References vpImageException::incorrectInitializationError, and vpMath::sqr().
Referenced by gaussianBlur(), vpTemplateTracker::setGaussianFilterSize(), and vpTemplateTracker::vpTemplateTracker().
|
static |
Definition at line 625 of file vpImageFilter.cpp.
References vpImageConvert::convert(), getGaussXPyramidal(), getGaussYPyramidal(), vpImage< Type >::getHeight(), and vpImage< Type >::getWidth().
Referenced by vpTemplateTracker::initHessienDesiredPyr(), vpTemplateTracker::initTrackingPyr(), and vpTemplateTracker::trackPyr().
|
static |
Definition at line 646 of file vpImageFilter.cpp.
References filterGaussXPyramidal(), vpImage< Type >::getHeight(), vpImage< Type >::getWidth(), and vpImage< Type >::resize().
Referenced by getGaussPyramidal().
|
static |
Definition at line 660 of file vpImageFilter.cpp.
References filterGaussYPyramidal(), vpImage< Type >::getHeight(), vpImage< Type >::getWidth(), and vpImage< Type >::resize().
Referenced by getGaussPyramidal().
|
inlinestatic |
Definition at line 1049 of file vpImageFilter.h.
References vpImage< Type >::getHeight(), vpImage< Type >::getWidth(), and vpImage< Type >::resize().
|
inlinestatic |
Definition at line 1031 of file vpImageFilter.h.
References derivativeFilterX(), vpImage< Type >::getHeight(), vpImage< Type >::getWidth(), and vpImage< Type >::resize().
Referenced by vpTemplateTrackerMIInverseCompositional::initCompInverse(), vpTemplateTrackerZNCCForwardAdditional::initHessienDesired(), vpTemplateTrackerZNCCInverseCompositional::initHessienDesired(), and vpTemplateTrackerMIESM::initHessienDesired().
|
inlinestatic |
Compute the gradient along X after applying a gaussian filter along Y.
FilterType | : Either float, to accelerate the computation time, or double, to have greater precision. |
I | : Input image |
dIx | : Gradient along X. |
gaussianKernel | : Gaussian kernel which values should be computed using vpImageFilter::getGaussianKernel(). |
gaussianDerivativeKernel | : Gaussian derivative kernel which values should be computed using vpImageFilter::getGaussianDerivativeKernel(). |
size | : Size of the Gaussian and Gaussian derivative kernels. |
Definition at line 1076 of file vpImageFilter.h.
Referenced by vpTemplateTrackerZNCCInverseCompositional::initCompInverse(), vpTemplateTrackerMIInverseCompositional::initCompInverse(), vpTemplateTrackerZNCCForwardAdditional::initHessienDesired(), vpTemplateTrackerZNCCInverseCompositional::initHessienDesired(), vpTemplateTrackerMIESM::initHessienDesired(), vpTemplateTrackerMIForwardAdditional::initHessienDesired(), vpTemplateTrackerMIForwardCompositional::initHessienDesired(), vpTemplateTracker::initTracking(), vpTemplateTrackerSSDESM::trackNoPyr(), vpTemplateTrackerSSDForwardAdditional::trackNoPyr(), vpTemplateTrackerSSDForwardCompositional::trackNoPyr(), vpTemplateTrackerZNCCForwardAdditional::trackNoPyr(), vpTemplateTrackerMIESM::trackNoPyr(), vpTemplateTrackerMIForwardAdditional::trackNoPyr(), and vpTemplateTrackerMIForwardCompositional::trackNoPyr().
|
inlinestatic |
Definition at line 1107 of file vpImageFilter.h.
References vpImage< Type >::getHeight(), vpImage< Type >::getWidth(), and vpImage< Type >::resize().
|
inlinestatic |
Definition at line 1086 of file vpImageFilter.h.
References derivativeFilterY(), vpImage< Type >::getHeight(), vpImage< Type >::getWidth(), and vpImage< Type >::resize().
Referenced by vpTemplateTrackerMIInverseCompositional::initCompInverse(), vpTemplateTrackerZNCCForwardAdditional::initHessienDesired(), vpTemplateTrackerZNCCInverseCompositional::initHessienDesired(), and vpTemplateTrackerMIESM::initHessienDesired().
|
inlinestatic |
Compute the gradient along Y after applying a gaussian filter along X.
FilterType | : Either float, to accelerate the computation time, or double, to have greater precision. |
I | : Input image |
dIy | : Gradient along Y. |
gaussianKernel | : Gaussian kernel which values should be computed using vpImageFilter::getGaussianKernel(). |
gaussianDerivativeKernel | : Gaussian derivative kernel which values should be computed using vpImageFilter::getGaussianDerivativeKernel(). |
size | : Size of the Gaussian and Gaussian derivative kernels. |
Definition at line 1138 of file vpImageFilter.h.
Referenced by vpTemplateTrackerZNCCInverseCompositional::initCompInverse(), vpTemplateTrackerMIInverseCompositional::initCompInverse(), vpTemplateTrackerZNCCForwardAdditional::initHessienDesired(), vpTemplateTrackerZNCCInverseCompositional::initHessienDesired(), vpTemplateTrackerMIESM::initHessienDesired(), vpTemplateTrackerMIForwardAdditional::initHessienDesired(), vpTemplateTrackerMIForwardCompositional::initHessienDesired(), vpTemplateTracker::initTracking(), vpTemplateTrackerSSDESM::trackNoPyr(), vpTemplateTrackerSSDForwardAdditional::trackNoPyr(), vpTemplateTrackerSSDForwardCompositional::trackNoPyr(), vpTemplateTrackerZNCCForwardAdditional::trackNoPyr(), vpTemplateTrackerMIESM::trackNoPyr(), vpTemplateTrackerMIForwardAdditional::trackNoPyr(), and vpTemplateTrackerMIForwardCompositional::trackNoPyr().
|
inlinestatic |
Get Sobel kernel for X-direction.
FilterType | Either float, to accelerate the computation time, or double, to have greater precision. |
filter | : Pointer to a double array already allocated. |
size | : Kernel size computed as: kernel_size = size*2 + 1 (max size is 20). |
Definition at line 1154 of file vpImageFilter.h.
References vpArray2D< Type >::data, vpException::dimensionError, vpArray2D< Type >::getCols(), vpArray2D< Type >::getRows(), and vpArray2D< Type >::t().
Referenced by vpMbTracker::setProjectionErrorKernelSize(), and vpMbTracker::vpMbTracker().
|
inlinestatic |
Get Sobel kernel for Y-direction.
FilterType | : Either float, to accelerate the computation time, or double, to have greater precision. |
filter | : Pointer to a double array already allocated. |
size | : Kernel size computed as: kernel_size = size*2 + 1 (max size is 20). |
Definition at line 1175 of file vpImageFilter.h.
References vpArray2D< Type >::conv2(), vpArray2D< Type >::data, vpException::dimensionError, vpArray2D< Type >::getCols(), and vpArray2D< Type >::getRows().
Referenced by vpMbTracker::setProjectionErrorKernelSize(), and vpMbTracker::vpMbTracker().
|
static |
Calculates the median value of a single channel. The algorithm is based on based on https://github.com/arnaudgelas/OpenCVExamples/blob/master/cvMat/Statistics/Median/Median.cpp.
[in] | channel | : Single channel image in OpenCV format. |
Definition at line 151 of file vpImageFilter.cpp.
Referenced by computeCannyThreshold(), and median().
|
static |
Calculates the median value of a single channel. The algorithm is based on based on https://github.com/arnaudgelas/OpenCVExamples/blob/master/cvMat/Statistics/Median/Median.cpp.
[in] | Isrc | : Gray-level image in ViSP format. |
Definition at line 181 of file vpImageFilter.cpp.
References vpImageConvert::convert(), and median().
Calculates the median value of a vpRGBa image. The result is ordered in RGB format.
[in] | Isrc | : RGB image in ViSP format. Alpha channel is ignored. |
Definition at line 196 of file vpImageFilter.cpp.
References vpImageConvert::convert(), and median().
|
static |
Apply a filter to an image using two separable kernels. For instance, the Sobel kernel can be decomposed to:
Thus, the convolution operation can be performed as:
Using two separable kernels reduce the number of operations and can be faster for large kernels.
I | : Image to filter |
If | : Filtered image. |
kernelH | : Separable kernel (performed first). |
kernelV | : Separable kernel (performed last). |
Definition at line 113 of file vpImageFilter.cpp.
References vpImage< Type >::getHeight(), vpImage< Type >::getWidth(), vpImage< Type >::resize(), and vpArray2D< Type >::size().