Go to the documentation of this file.00001
00002 #ifndef vimt_correlate_2d_h_
00003 #define vimt_correlate_2d_h_
00004
00005
00006
00007
00008
00009 #include <vil/algo/vil_correlate_2d.h>
00010 #include <vimt/vimt_image_2d_of.h>
00011 #include <vgl/vgl_fwd.h>
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 template <class srcT, class destT, class kernelT, class accumT>
00024 inline void vimt_correlate_2d(const vimt_image_2d_of<srcT>& src_im,
00025 vimt_image_2d_of<destT>& dest_im,
00026 const vil_image_view<kernelT>& kernel,
00027 vgl_point_2d<double> kernel_ref_pt,
00028 accumT ac)
00029 {
00030 vil_correlate_2d(src_im.image(),dest_im.image(),kernel,ac);
00031 vimt_transform_2d offset;
00032 offset.set_translation(-kernel_ref_pt.x(),-kernel_ref_pt.y());
00033 dest_im.set_world2im(offset * src_im.world2im());
00034 }
00035
00036 #endif // vimt_correlate_2d_h_