vil_dog_filter_5tap.h
Go to the documentation of this file.
1 // This is core/vil/algo/vil_dog_filter_5tap.h
2 #ifndef vil_dog_filter_5tap_h_
3 #define vil_dog_filter_5tap_h_
4 //:
5 // \file
6 // \brief Computes difference of gaussians (using a 5 tap filter).
7 // \author Tim Cootes
8 
10 #include <vil/vil_math.h>
11 
12 //: Smooth source with gaussian filter and compute difference
13 // Uses a 5-tap filter with gaussian width sigma.
14 // \param sigma Width of gaussian
15 // \param smooth_im Result of smoothing the src_im
16 // \param dog_im src_im - smooth_im
17 // \relatesalso vil_image_view
18 template <class T>
20  vil_image_view<T>& smooth_im,
21  vil_image_view<T>& dog_im,
22  double sigma)
23 {
24  vil_gauss_filter_5tap_params smooth_params(sigma);
25  vil_gauss_filter_5tap(src_im,smooth_im,smooth_params,dog_im);
26  vil_math_image_difference(src_im,smooth_im,dog_im);
27 }
28 
29 #endif
Smooths images.
Various mathematical manipulations of 2D images.
Concrete view of image data of type T held in memory.
Definition: vil_fwd.h:13
void vil_gauss_filter_5tap(const srcT *src_im, std::ptrdiff_t src_ystep, unsigned ni, unsigned nj, destT *dest_im, std::ptrdiff_t dest_ystep, const vil_gauss_filter_5tap_params &params, destT *work)
Smooth a single plane src_im to produce dest_im.
void vil_math_image_difference(const vil_image_view< aT > &imA, const vil_image_view< bT > &imB, vil_image_view< sumT > &im_sum)
Compute difference of two images (im_sum = imA-imB).
Definition: vil_math.h:890
void vil_dog_filter_5tap(const vil_image_view< T > &src_im, vil_image_view< T > &smooth_im, vil_image_view< T > &dog_im, double sigma)
Smooth source with gaussian filter and compute difference.