17 # include <vcl_msvc_warnings.h> 39 template <
class sType,
class dType,
class MapFunctor,
class InterpFunctor>
45 unsigned const out_w = out.
ni();
46 unsigned const out_h = out.
nj();
50 for (
unsigned p = 0; p < out.
nplanes(); ++p)
52 for (
unsigned oy = 0; oy < out_h; ++oy)
54 for (
unsigned ox = 0; ox < out_w; ++ox)
58 mapper(
double(ox),
double(oy), ix, iy);
59 out(ox, oy, p) = dType(interp(in, ix, iy, p));
Concrete view of image data of type T held in memory.
void vil_warp(const vil_image_view< sType > &in, vil_image_view< dType > &out, MapFunctor mapper, InterpFunctor interp)
Warp an image under a 2D map.
unsigned ni() const
Width.
unsigned nj() const
Height.
unsigned nplanes() const
Number of planes.