Functions
core/vil/vil_warp.h File Reference

Warp an image. More...

#include <vil/vil_fwd.h>
#include <vcl_cassert.h>

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.

Detailed Description

Warp an image.

Author:
awf@robots.ox.ac.uk
Date:
04 Dec 00
    Modifications
     031201 IMS Convert to vil2. Used templates to simplify interface and code.
   

Definition in file vil_warp.h.


Function Documentation

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.

The size of the output map and the mapper defines the region of the input image to be scanned.

Parameters:
mapper,isthe 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,isan 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.