Warp an image. More...
Go to the source code of this file.
Functions | |
template<class sType , class dType , class MapFunctor , class InterpFunctor > | |
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. |
Warp an image.
Modifications 031201 IMS Convert to vil2. Used templates to simplify interface and code.
Definition in file vil_warp.h.
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.
The size of the output map and the mapper defines the region of the input image to be scanned.
mapper,is | the inverse of the mapping from the input image's co-ordinate frame to the output image's frame. i.e. out() = in(mapper(x,y)). It should be a functor with a signature void mapper(double x_in, double y_in, double* x_out, double* y_out); |
interp,is | an interpolator, with a signature similar to S vil_bilin_interp_safe(const vil_image_view<T>&, double, double, unsigned) |
Note that if you want to store a warp with an image to create a registered image, the vimt library (in contrib/mul/vimt) provides efficient registered images with transforms up to projective.
Definition at line 40 of file vil_warp.h.