void _KLTComputeGradients( _KLT_FloatImage img, float sigma, _KLT_FloatImage gradx, _KLT_FloatImage grady) { /* Compute kernels, if necessary */ if (fabs(sigma - sigma_last) > 0.05) _computeKernels(sigma, &gauss_kernel, &gaussderiv_kernel); _convolveSeparate(img, gaussderiv_kernel, gauss_kernel, gradx); _convolveSeparate(img, gauss_kernel, gaussderiv_kernel, grady); }
void _KLTComputeGradients( _KLT_FloatImage img, float sigma, _KLT_FloatImage gradx, _KLT_FloatImage grady) { /* Output images must be large enough to hold result */ assert(gradx->ncols >= img->ncols); assert(gradx->nrows >= img->nrows); assert(grady->ncols >= img->ncols); assert(grady->nrows >= img->nrows); /* Compute kernels, if necessary */ if (fabs(sigma - sigma_last) > 0.05) _computeKernels(sigma, &gauss_kernel, &gaussderiv_kernel); _convolveSeparate(img, gaussderiv_kernel, gauss_kernel, gradx); _convolveSeparate(img, gauss_kernel, gaussderiv_kernel, grady); }
void _KLTComputeSmoothedImage( _KLT_FloatImage img, float sigma, _KLT_FloatImage smooth) { /* Compute kernel, if necessary; gauss_deriv is not used */ if (fabs(sigma - sigma_last) > 0.05) _computeKernels(sigma, &gauss_kernel, &gaussderiv_kernel); _convolveSeparate(img, gauss_kernel, gauss_kernel, smooth); }
void _KLTComputeSmoothedImage( _KLT_FloatImage img, float sigma, _KLT_FloatImage smooth) { /* Output image must be large enough to hold result */ assert(smooth->ncols >= img->ncols); assert(smooth->nrows >= img->nrows); /* Compute kernel, if necessary; gauss_deriv is not used */ if (fabs(sigma - sigma_last) > 0.05) _computeKernels(sigma, &gauss_kernel, &gaussderiv_kernel); _convolveSeparate(img, gauss_kernel, gauss_kernel, smooth); }