00001 // This is core/vil/algo/vil_dog_filter_5tap.h 00002 #ifndef vil_dog_filter_5tap_h_ 00003 #define vil_dog_filter_5tap_h_ 00004 //: 00005 // \file 00006 // \brief Computes difference of gaussians (using a 5 tap filter). 00007 // \author Tim Cootes 00008 00009 #include <vil/algo/vil_gauss_filter.h> 00010 #include <vil/vil_math.h> 00011 00012 //: Smooth source with gaussian filter and compute difference 00013 // Uses a 5-tap filter with gaussian width sigma. 00014 // \param sigma Width of gaussian 00015 // \param smooth_im Result of smoothing the src_im 00016 // \param dog_im src_im - smooth_im 00017 // \relatesalso vil_image_view 00018 template <class T> 00019 void vil_dog_filter_5tap(const vil_image_view<T>& src_im, 00020 vil_image_view<T>& smooth_im, 00021 vil_image_view<T>& dog_im, 00022 double sigma) 00023 { 00024 vil_gauss_filter_5tap_params smooth_params(sigma); 00025 vil_gauss_filter_5tap(src_im,smooth_im,smooth_params,dog_im); 00026 vil_math_image_difference(src_im,smooth_im,dog_im); 00027 } 00028 00029 #endif