Grid sampling functions for 2D images. More...
#include "vimt_sample_grid_bilin.h"
#include <vil/vil_sample_grid_bilin.h>
#include <vil/vil_bilin_interp.h>
#include <vnl/vnl_vector.h>
#include <vgl/vgl_point_2d.h>
#include <vgl/vgl_vector_2d.h>
Go to the source code of this file.
Defines | |
#define | vimt_sample_grid_bilin_txx_ |
#define | VIMT_SAMPLE_GRID_BILIN_INSTANTIATE(imType, vecType) |
Functions | |
bool | vimt_grid_bilin_corner_in_image (const vgl_point_2d< double > &p, const vil_image_view_base &image) |
template<class imType , class vecType > | |
void | vimt_sample_grid_bilin (vnl_vector< vecType > &vec, const vimt_image_2d_of< imType > &image, const vgl_point_2d< double > &p0, const vgl_vector_2d< double > &u, const vgl_vector_2d< double > &v, int n1, int n2) |
Sample grid from image, using bilinear interpolation. | |
template<class imType , class vecType > | |
void | vimt_sample_grid_bilin_edgena (vnl_vector< vecType > &vec, const vimt_image_2d_of< imType > &image, const vgl_point_2d< double > &p0, const vgl_vector_2d< double > &u, const vgl_vector_2d< double > &v, int n1, int n2) |
Sample grid from image, using bilinear interpolation. |
Grid sampling functions for 2D images.
Definition in file vimt_sample_grid_bilin.txx.
#define VIMT_SAMPLE_GRID_BILIN_INSTANTIATE | ( | imType, | |
vecType | |||
) |
template void vimt_sample_grid_bilin(vnl_vector<vecType >&, \ const vimt_image_2d_of<imType >&, \ const vgl_point_2d<double >&, \ const vgl_vector_2d<double >&, \ const vgl_vector_2d<double >&, \ int, int); \ template void vimt_sample_grid_bilin_edgena(vnl_vector<vecType >&, \ const vimt_image_2d_of<imType >&, \ const vgl_point_2d<double >&, \ const vgl_vector_2d<double >&, \ const vgl_vector_2d<double >&, \ int, int)
Definition at line 254 of file vimt_sample_grid_bilin.txx.
#define vimt_sample_grid_bilin_txx_ |
Definition at line 3 of file vimt_sample_grid_bilin.txx.
bool vimt_grid_bilin_corner_in_image | ( | const vgl_point_2d< double > & | p, |
const vil_image_view_base & | image | ||
) | [inline] |
Definition at line 16 of file vimt_sample_grid_bilin.txx.
void vimt_sample_grid_bilin | ( | vnl_vector< vecType > & | vec, |
const vimt_image_2d_of< imType > & | image, | ||
const vgl_point_2d< double > & | p0, | ||
const vgl_vector_2d< double > & | u, | ||
const vgl_vector_2d< double > & | v, | ||
int | n1, | ||
int | n2 | ||
) |
Sample grid from image, using bilinear interpolation.
Grid points are p+i.u+j.v where i=[0..n1-1], j=[0..n2-1] Vector vec is resized to n1*n2*np elements, where np=image.nplanes(). vec[0]..vec[np-1] are the values from point p0 Samples are taken along direction v first, then along u. Points outside image return zero.
Definition at line 34 of file vimt_sample_grid_bilin.txx.
void vimt_sample_grid_bilin_edgena | ( | vnl_vector< vecType > & | vec, |
const vimt_image_2d_of< imType > & | image, | ||
const vgl_point_2d< double > & | p0, | ||
const vgl_vector_2d< double > & | u, | ||
const vgl_vector_2d< double > & | v, | ||
int | n1, | ||
int | n2 | ||
) |
Sample grid from image, using bilinear interpolation.
Grid points are p+i.u+j.v where i=[0..n1-1], j=[0..n2-1] Vector vec is resized to n1*n2*np elements, where np=image.nplanes(). vec[0]..vec[np-1] are the values from point p0 Samples are taken along direction v first, then along u. Points outside image return NA.
Definition at line 148 of file vimt_sample_grid_bilin.txx.