00001 // This is core/vil/vil_sample_grid_bicub.h 00002 #ifndef vil_sample_grid_bicub_h_ 00003 #define vil_sample_grid_bicub_h_ 00004 //: 00005 // \file 00006 // \brief Bicubic grid sampling function for 2D images 00007 // 00008 // The vil bicub source files were derived from the corresponding 00009 // vil bilin files, thus the vil bilin/bicub source files are very 00010 // similar. If you modify something in this file, there is a 00011 // corresponding bilin file that would likely also benefit from 00012 // the same change. 00013 00014 #include <vil/vil_image_view.h> 00015 00016 //: Sample grid from image, using bicubic interpolation 00017 // Grid points are (x0+i.dx1+j.dx2,y0+i.dy1+j.dy2), where i=[0..n1-1], j=[0..n2-1] 00018 // Vector v is filled with n1*n2*np elements, where np=image.nplanes()*image.ncomponents() 00019 // v[0]..v[np-1] are the values from point (x0,y0) 00020 // Samples are taken along direction (dx2,dy2) first, then along (dx1,dy1). 00021 // Points outside image return zero. 00022 // \relatesalso vil_image_view 00023 template <class imType, class vecType> 00024 void vil_sample_grid_bicub(vecType* v, 00025 const vil_image_view<imType>& image, 00026 double x0, double y0, double dx1, double dy1, 00027 double dx2, double dy2, int n1, int n2); 00028 00029 #endif // vil_sample_grid_bicub_h_