xGradImg,yGradImg = | gaussianGradient2dImg (inImg,inStdDev) |
xGradImg,yGradImg = | gaussianGradient2dImg (inImg,inStdDevX,inStdDevY,inOptGradientGaussianCoverage) |
image = | gaussianXGradient2dImg (inImg,inStdDev) |
image = | gaussianYGradient2dImg (inImg,inStdDev) |
Compute X and Y gradients of an input image convolving it with 2d Gaussian kernels.
Used Gaussian gradient kernel and
coefficients are defined as follow :
where :
Size of this finite kernel is controlled by InOptGradientGaussianCoverage attribute.
This parameter defined the minimum distribution spread ratio which should be reach regards to an infinite Gaussian distribution.
We define for example such that :
where :
On output image values are given by:
A detailled analysis of this filter has been done in J. Canny (1986) "A computational approach to edge detection", IEEE Trans. Pattern Analysis and Machine Intelligence, vol 8, pages 679-714.
Output images OutOptGradXImg and OutOptGradYImg are optional (at least one must be provided). Input and output images must have same size.
Here is an example of a Gaussian gradient operation applied to an 8-bits grey levels input image (with ):