Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes | Related Functions
vil_image_view< T > Class Template Reference

Concrete view of image data of type T held in memory. More...

#include <vil_image_view.h>

Inheritance diagram for vil_image_view< T >:
Inheritance graph
[legend]

List of all members.

Public Types

typedef T pixel_type
 The pixel type of this image.
typedef T * iterator
typedef T const * const_iterator

Public Member Functions

 vil_image_view ()
 Dflt ctor.
 vil_image_view (unsigned ni, unsigned nj, unsigned n_planes=1, unsigned n_interleaved_planes=1)
 Create an image of ni x nj pixels in (n_planes * n_interleaved_planes) planes.
 vil_image_view (const T *top_left, unsigned ni, unsigned nj, unsigned nplanes, vcl_ptrdiff_t i_step, vcl_ptrdiff_t j_step, vcl_ptrdiff_t plane_step)
 Set this view to look at someone else's memory data.
 vil_image_view (const vil_memory_chunk_sptr &mem_chunk, const T *top_left, unsigned ni, unsigned nj, unsigned nplanes, vcl_ptrdiff_t i_step, vcl_ptrdiff_t j_step, vcl_ptrdiff_t plane_step)
 Set this view to look at another view's data.
 vil_image_view (const vil_image_view< T > &rhs)
 Copy constructor.
 vil_image_view (const vil_image_view_base &rhs)
 Construct from various vil_image_view types.
 vil_image_view (const vil_image_view_base_sptr &rhs)
 Construct from various vil_image_view types.
virtual ~vil_image_view ()
bool is_contiguous () const
 True if data all in one unbroken block and top_left_ptr() is lowest data address.
iterator begin ()
iterator end ()
const_iterator begin () const
const_iterator end () const
T * top_left_ptr ()
 Pointer to the first (top left in plane 0) pixel.
const T * top_left_ptr () const
 Pointer to the first (top left in plane 0) pixel.
vcl_ptrdiff_t istep () const
 Add this to your pixel pointer to get next i pixel.
vcl_ptrdiff_t jstep () const
 Add this to your pixel pointer to get next j pixel.
vcl_ptrdiff_t planestep () const
 Add this to your pixel pointer to get pixel on next plane.
 operator safe_bool () const
 Cast to bool is true if pointing at some data.
bool operator! () const
 Return false if pointing at some data.
unsigned size_bytes () const
 The number of bytes in the data.
const vil_memory_chunk_sptrmemory_chunk () const
 Smart pointer to the object holding the data for this view.
vil_memory_chunk_sptrmemory_chunk ()
 Smart pointer to the object holding the data for this view.
bool in_range (int i, int j) const
 Return true if (i,j) is a valid index into this buffer.
bool in_range (int i, int j, int p) const
 Return true if (i,j,p) is a valid index into this buffer.
const T & operator() (unsigned i, unsigned j) const
 Return read-only reference to pixel at (i,j) in plane 0.
T & operator() (unsigned i, unsigned j)
 Return read/write reference to pixel at (i,j) in plane 0.
const T & operator() (unsigned i, unsigned j, unsigned p) const
 Return read-only reference to pixel at (i,j) in plane p.
T & operator() (unsigned i, unsigned j, unsigned p)
 Return read-only reference to pixel at (i,j) in plane p.
virtual void set_size (unsigned ni, unsigned nj)
 resize current planes to ni x nj.
virtual void set_size (unsigned ni, unsigned nj, unsigned nplanes)
 resize to ni x nj x nplanes.
void deep_copy (const vil_image_view< T > &src)
 Make a copy of the data in src and set this to view it.
void clear ()
 Make empty.
void set_to_memory (const T *top_left, unsigned ni, unsigned nj, unsigned nplanes, vcl_ptrdiff_t i_step, vcl_ptrdiff_t j_step, vcl_ptrdiff_t plane_step)
 Set this view to look at someone else's memory data.
void fill (T value)
 Fill view with given value.
virtual void print (vcl_ostream &) const
 Print a 1-line summary of contents.
virtual vcl_string is_a () const
 Return class name.
virtual bool is_class (vcl_string const &s) const
 True if this is (or is derived from) class s.
vil_pixel_format pixel_format () const
 Return a description of the concrete data pixel type.
bool operator== (const vil_image_view_base &other) const
 True if they share same view of same image data.
bool operator!= (const vil_image_view_base &rhs) const
 True if they do not share same view of same image data.
bool operator< (const vil_image_view_base &rhs) const
 Provides an ordering.
bool operator>= (const vil_image_view_base &rhs) const
 Provides an ordering.
bool operator> (const vil_image_view_base &rhs) const
 Provides an ordering.
bool operator<= (const vil_image_view_base &rhs) const
 Provides an ordering.
const vil_image_view< T > & operator= (const vil_image_view< T > &rhs)
 Copy a view. The rhs and lhs will point to the same image data.
const vil_image_view< T > & operator= (const vil_image_view_base &rhs)
 Copy a view. The rhs and lhs will point to the same image data.
const vil_image_view< T > & operator= (const vil_image_view_base_sptr &rhs)
 Copy a view. The rhs and lhs will point to the same image data.
unsigned ni () const
 Width.
unsigned nj () const
 Height.
unsigned nplanes () const
 Number of planes.
unsigned long size () const
 The number of pixels.

Protected Member Functions

void release_memory ()
 Disconnect this view from the underlying data,.

Protected Attributes

T * top_left_
 Pointer to pixel at origin.
vcl_ptrdiff_t istep_
 Add this to a pixel pointer to move one column left.
vcl_ptrdiff_t jstep_
 Add this to a pixel pointer to move one row down.
vcl_ptrdiff_t planestep_
 Add this to a pixel pointer to move one plane back.
vil_memory_chunk_sptr ptr_
 Reference to actual image data.
unsigned ni_
 Number of columns.
unsigned nj_
 Number of rasters.
unsigned nplanes_
 Number of planes.

Private Attributes

 VCL_SAFE_BOOL_DEFINE

Related Functions

(Note that these are not member functions.)

template<class S , class T >
void vil_cartesian_differential_invariants_3 (const vil_image_view< S > &src, vil_image_view< T > &dest, double scale, unsigned max_kernel_width=0)
 Compute up to 3rd order C.d.i. of an image.
template<class srcT , class destT , class kernelT , class accumT >
void vil_convolve_1d (const vil_image_view< srcT > &src_im, vil_image_view< destT > &dest_im, const kernelT *kernel, vcl_ptrdiff_t k_lo, vcl_ptrdiff_t k_hi, accumT ac, vil_convolve_boundary_option start_option, vil_convolve_boundary_option end_option)
 Convolve kernel[i] (i in [k_lo,k_hi]) with srcT in i-direction.
template<class srcT , class destT , class kernelT , class accumT >
void vil_convolve_2d (const vil_image_view< srcT > &src_im, vil_image_view< destT > &dest_im, const vil_image_view< kernelT > &kernel, accumT ac)
 Convolve kernel with srcT.
void vil_corners (const vil_image_view< float > &grad_i, const vil_image_view< float > &grad_j, vil_image_view< float > &dest, double k)
 Compute Forstner/Harris corner strength function given gradient images.
void vil_corners_rohr (const vil_image_view< float > &grad_i, const vil_image_view< float > &grad_j, vil_image_view< float > &dest)
 Compute corner strength using Rohr's recommended method.
template<class T >
void vil_corners (const vil_image_view< T > &src, vil_image_view< float > &dest, double k=0.04)
 Compute Harris corner strength function.
template<class T >
void vil_corners_rohr (const vil_image_view< T > &src, vil_image_view< float > &dest)
 Compute corner strength using Karl Rohr's recommended method.
template<class srcT , class destT , class kernelT , class accumT >
void vil_correlate_1d (const vil_image_view< srcT > &src_im, vil_image_view< destT > &dest_im, const kernelT *kernel, vcl_ptrdiff_t k_lo, vcl_ptrdiff_t k_hi, accumT ac, vil_convolve_boundary_option start_option, vil_convolve_boundary_option end_option)
 correlate kernel[i] (i in [k_lo,k_hi]) with srcT in i-direction.
template<class srcT , class kernelT , class accumT >
accumT vil_correlate_2d_at_pt (const srcT *src_im, vcl_ptrdiff_t s_istep, vcl_ptrdiff_t s_jstep, vcl_ptrdiff_t s_pstep, const vil_image_view< kernelT > &kernel, accumT)
 Evaluate dot product between kernel and src_im.
template<class srcT , class destT , class kernelT , class accumT >
void vil_correlate_2d (const vil_image_view< srcT > &src_im, vil_image_view< destT > &dest_im, const vil_image_view< kernelT > &kernel, accumT ac)
 Correlate kernel with srcT.
void vil_distance_transform (vil_image_view< float > &image)
 Compute distance function from zeros in original image.
void vil_distance_transform_one_way (vil_image_view< float > &image)
 Compute directed distance function from zeros in original image.
void vil_distance_transform (const vil_image_view< bool > &mask, vil_image_view< float > &distance_image, float max_dist)
 Compute distance function from true elements in mask.
void vil_distance_transform_r2 (vil_image_view< float > &image)
 Compute distance function from zeros in original image.
template<class T >
void vil_dog_filter_5tap (const vil_image_view< T > &src_im, vil_image_view< T > &smooth_im, vil_image_view< T > &dog_im, double sigma)
 Smooth source with gaussian filter and compute difference.
template<class T >
void vil_dog_pyramid (const vil_image_view< T > &src_image, vcl_vector< vil_image_view< T > > &smooth_pyramid, vcl_vector< vil_image_view< T > > &dog_pyramid, unsigned min_size)
 Compute a pyramid of difference of gaussian images.
template<class srcT , class destT , class accumT >
void vil_exp_filter_i (const vil_image_view< srcT > &src_im, vil_image_view< destT > &dest_im, accumT k)
 Apply exponential filter along i to src_im to produce dest_im.
template<class srcT , class destT , class accumT >
void vil_exp_filter_j (const vil_image_view< srcT > &src_im, vil_image_view< destT > &dest_im, accumT k)
 Apply exponential filter along j to src_im to produce dest_im.
template<class srcT , class destT , class accumT >
void vil_exp_filter_2d (const vil_image_view< srcT > &src_im, vil_image_view< destT > &dest_im, accumT ki, accumT kj)
 Apply exponential filter along i and j to src_im to produce dest_im.
template<class srcT , class destT , class accumT >
void vil_exp_grad_filter_i (const vil_image_view< srcT > &src_im, vil_image_view< destT > &dest_im, accumT k)
 Apply exponential gradient filter to src_im (along i direction).
template<class srcT , class destT , class accumT >
void vil_exp_grad_filter_j (const vil_image_view< srcT > &src_im, vil_image_view< destT > &dest_im, accumT k)
 Apply exponential gradient filter to src_im (along j direction).
template<class T >
void vil_find_peaks_3x3 (vcl_vector< unsigned > &pi, vcl_vector< unsigned > &pj, const vil_image_view< T > &image, const T &min_thresh, bool clear_list=true)
 Return (pi,pj) for all points in image strictly above their 8 neighbours.
template<class T >
void vil_find_peaks_3x3_subpixel (vcl_vector< double > &px, vcl_vector< double > &py, vcl_vector< double > &val, const vil_image_view< T > &image, const T &min_thresh, bool clear_list=true)
 Return sub-pixel (px,py,val) for all points in image strictly above their 8 neighbours.
template<class T >
void vil_find_plateaus_3x3 (vcl_vector< unsigned > &pi, vcl_vector< unsigned > &pj, const vil_image_view< T > &image, const T &min_thresh, bool clear_list=true)
 Return (pi,pj) for all points in image greater than or equal to all 8 neighbours.
template<class T >
void vil_flood_fill_row (vil_image_view< T > &image, unsigned i, unsigned j, T v, T new_v, unsigned &ilo, unsigned &ihi)
 Search along i direction either side for limits of pixels matching v.
template<class T >
void vil_flood_fill4 (vil_image_view< T > &image, unsigned seed_i, unsigned seed_j, T v, T new_v)
 Flood fill on a 4-connected region.
template<class T >
void vil_flood_fill4 (vil_image_view< T > &image, unsigned seed_i, unsigned seed_j, T v, T new_v, vcl_vector< vil_chord > &region)
 Flood fill on a 4-connected region, and record region.
template<class T >
void vil_flood_fill8 (vil_image_view< T > &image, unsigned seed_i, unsigned seed_j, T v, T new_v)
 Flood fill on a 8-connected region.
template<class T >
void vil_flood_fill8 (vil_image_view< T > &image, unsigned seed_i, unsigned seed_j, T v, T new_v, vcl_vector< vil_chord > &region)
 Flood fill on a 8-connected region, and record region.
template<class T >
void vil_gauss_reduce (const vil_image_view< T > &src, vil_image_view< T > &dest, vil_image_view< T > &work_im)
 Smooth and subsample src_im to produce dest_im.
template<class T >
void vil_gauss_reduce_2_3 (const vil_image_view< T > &src_im, vil_image_view< T > &dest_im, vil_image_view< T > &work_im)
 Smooth and subsample src_im to produce dest_im (2/3 size).
template<class T >
void vil_gauss_reduce_121 (const vil_image_view< T > &src, vil_image_view< T > &dest)
 Smooth and subsample src_im to produce dest_im.
template<class T >
void vil_gauss_reduce_general (const vil_image_view< T > &src_im, vil_image_view< T > &dest_im, const vil_gauss_reduce_params &params)
 Smooth and subsample src_im by an arbitrary factor to produce dest_im.
template<class T >
void vil_grid_merge (const vil_image_view< T > &image1, const vil_image_view< T > &image2, vil_image_view< T > &dest_image, unsigned box_ni, unsigned box_nj)
 Merge two images in a chequer-board pattern.
template<class T >
void vil_histogram (const vil_image_view< T > &image, vcl_vector< double > &histo, double min, double max, unsigned n_bins)
 Construct histogram from pixels in given image.
void vil_histogram_byte (const vil_image_view< vxl_byte > &image, vcl_vector< double > &histo)
 Construct histogram from pixels in given image of bytes.
void vil_histogram_equalise (vil_image_view< vxl_byte > &image)
 Apply histogram equalisation to given image.
template<class srcT , class kernelT , class accumT >
accumT vil_norm_corr_2d_at_pt (const srcT *src_im, vcl_ptrdiff_t s_istep, vcl_ptrdiff_t s_jstep, vcl_ptrdiff_t s_pstep, const vil_image_view< kernelT > &kernel, accumT)
 Evaluate dot product between kernel and src_im.
template<class srcT , class destT , class kernelT , class accumT >
void vil_normalised_correlation_2d (const vil_image_view< srcT > &src_im, vil_image_view< destT > &dest_im, const vil_image_view< kernelT > &kernel, accumT ac)
 Normalised cross-correlation of (pre-normalised) kernel with srcT.
void vil_orientations (const vil_image_view< float > &grad_i, const vil_image_view< float > &grad_j, vil_image_view< float > &orient_im, vil_image_view< float > &grad_mag)
 Compute orientation (in radians) and gradient magnitude at each pixel.
void vil_orientations (const vil_image_view< float > &grad_i, const vil_image_view< float > &grad_j, vil_image_view< vxl_byte > &orient_im, vil_image_view< float > &grad_mag, unsigned n_orientations=256)
 Compute discrete orientation and gradient magnitude at each pixel.
void vil_orientations_at_edges (const vil_image_view< float > &grad_i, const vil_image_view< float > &grad_j, vil_image_view< vxl_byte > &orient_im, vil_image_view< float > &grad_mag, float grad_threshold, unsigned n_orientations=255)
 Compute discrete orientation and gradient magnitude at edge pixels.
template<class T >
void vil_orientations_from_sobel (const vil_image_view< T > &src_image, vil_image_view< float > &orient_im, vil_image_view< float > &grad_mag)
 Compute orientation and gradient magnitude using sobel to get gradients.
template<class T >
void vil_orientations_from_sobel (const vil_image_view< T > &src_image, vil_image_view< vxl_byte > &orient_im, vil_image_view< float > &grad_mag, unsigned n_orientations=256)
 Compute discrete orientation and gradient using sobel operations.
template<class srcT , class destT >
void vil_quad_distance_function (const vil_image_view< srcT > &src, double ai, double aj, vil_image_view< destT > &dest)
 Apply quadratic distance transform along each row of src.
template<class srcT , class destT , class posT >
void vil_quad_distance_function (const vil_image_view< srcT > &src, double ai, double aj, vil_image_view< destT > &dest, vil_image_view< posT > &pos)
 Apply quadratic distance transform along each row of src.
template<class srcT , class destT >
void vil_sobel_1x3 (const vil_image_view< srcT > &src, vil_image_view< destT > &grad_i, vil_image_view< destT > &grad_j)
 Compute gradients of an image using 1x3 Sobel filters.
template<class srcT , class destT >
void vil_sobel_1x3 (const vil_image_view< srcT > &src, vil_image_view< destT > &grad_ij)
 Compute gradients of an image using 1x3 Sobel filters.
template<class srcT , class destT >
void vil_sobel_3x3 (const vil_image_view< srcT > &src, vil_image_view< destT > &grad_i, vil_image_view< destT > &grad_j)
 Compute gradients of an image using 3x3 Sobel filters.
template<class srcT , class destT >
void vil_sobel_3x3 (const vil_image_view< srcT > &src, vil_image_view< destT > &grad_ij)
 Compute gradients of an image using 3x3 Sobel filters.
template<class T >
void vil_suppress_non_max_3x3 (const vil_image_view< T > &src_im, vil_image_view< T > &dest_im, T threshold=0, T non_max_value=0)
 Suppress all non-maximal (non peaks) pixels in the image.
template<class srcT , class destT >
void vil_suppress_non_max_edges (const vil_image_view< srcT > &grad_i, const vil_image_view< srcT > &grad_j, double grad_mag_threshold, vil_image_view< destT > &grad_mag)
 Given gradient images, computes magnitude image containing maximal edges.
template<class srcT , class destT >
void vil_suppress_non_max_edges_subpixel (const vil_image_view< srcT > &grad_i, const vil_image_view< srcT > &grad_j, double grad_mag_threshold, vil_image_view< destT > &grad_mag_orient_offset)
 Given gradient images, computes a subpixel edgemap with magnitudes and orientations.
template<class T >
void vil_suppress_non_plateau_3x3 (const vil_image_view< T > &src_im, vil_image_view< T > &dest_im, T threshold=0, T non_max_value=0)
 Suppress all non-plateau pixels in the image.
template<class srcT >
void vil_threshold_above (const vil_image_view< srcT > &src, vil_image_view< bool > &dest, srcT t)
 Apply threshold such that dest(i,j,p)=true if src(i,j,p)>=t.
template<class srcT >
void vil_threshold_below (const vil_image_view< srcT > &src, vil_image_view< bool > &dest, srcT t)
 Apply threshold such that dest(i,j,p)=true if src(i,j,p)<=t.
template<class srcT >
void vil_threshold_inside (const vil_image_view< srcT > &src, vil_image_view< bool > &dest, srcT t0, srcT t1)
 Apply threshold such that dest(i,j,p)=true if t0<=src(i,j,p)<=t1.
template<class srcT >
void vil_threshold_outside (const vil_image_view< srcT > &src, vil_image_view< bool > &dest, srcT t0, srcT t1)
 Apply threshold such that dest(i,j,p)=true if src(i,j,p)<=t0 or src(i,j,p)>=t1.
template<class T >
void vil_tile_images (vil_image_view< T > &big_image, const vcl_vector< vil_image_view< T > > &patches)
 Create a big image by tiling images in patches (must be of same size).
template<class T >
void vsl_b_write (vsl_b_ostream &os, const vil_image_view< T > &image)
 Binary save vil_image_view<T> to stream.
template<class T >
void vsl_b_read (vsl_b_istream &is, vil_image_view< T > &image)
 Binary load vil_image_view<T> from stream.
template<class T >
void vsl_b_read (vsl_b_istream &is, vil_image_view< T > *&p)
 Binary load vil_image_view<T> from stream onto the heap.
template<class T >
void vsl_print_summary (vcl_ostream &os, const vil_image_view< T > &image)
 Print human readable summary of a vil_image_view<T> object to a stream.
template<class T >
double vil_bicub_interp_safe (const vil_image_view< T > &view, double x, double y, unsigned p=0)
 Compute bicubic interpolation at (x,y), with bound checks.
template<class T >
double vil_bicub_interp (const vil_image_view< T > &view, double x, double y, unsigned p=0)
 Compute bicubic interpolation at (x,y), with minimal bound checks.
template<class T >
double vil_bicub_interp_safe_extend (const vil_image_view< T > &view, double x, double y, unsigned p=0)
 Compute bicubic interpolation at (x,y), with bound checks.
template<class T >
double vil_bilin_interp_safe (const vil_image_view< T > &view, double x, double y, unsigned p=0)
 Compute bilinear interpolation at (x,y), with bound checks.
template<class T >
double vil_bilin_interp_safe_edgena (const vil_image_view< T > &view, double x, double y, unsigned p=0)
 Compute bilinear interpolation at (x,y), with bound checks.
template<class T >
double vil_bilin_interp (const vil_image_view< T > &view, double x, double y, unsigned p=0)
 Compute bilinear interpolation at (x,y), with minimal bound checks.
template<class T >
double vil_bilin_interp_safe_extend (const vil_image_view< T > &view, double x, double y, unsigned p=0)
 Compute bilinear interpolation at (x,y), with bound checks.
template<class T >
void vil_clamp (const vil_image_view< T > &src, vil_image_view< T > &dest, T lo, T hi)
 Clamp an image view between two values.
template<class T >
void vil_clamp_below (vil_image_view< T > &src, T t, T v)
 Clamp an image view above a given value t, setting it to v if below or on t.
template<class T >
void vil_clamp_below (vil_image_view< T > &src, T t)
 Clamp an image view above a given value t, setting it to this t if below t.
template<class inP , class outP >
void vil_convert_cast (const vil_image_view< inP > &src, vil_image_view< outP > &dest)
 Cast one pixel type to another.
template<class inP , class outP >
void vil_convert_round (const vil_image_view< inP > &src, vil_image_view< outP > &dest)
 Convert one pixel type to another with rounding.
template<class T >
void vil_convert_stretch_range (const vil_image_view< T > &src, vil_image_view< vxl_byte > &dest)
 Convert src to byte image dest by stretching to range [0,255].
template<class T >
void vil_copy_reformat (const vil_image_view< T > &src, vil_image_view< T > &dest)
 Copy src to dest, without changing dest's view parameters.
template<class T >
void vil_copy_to_window (const vil_image_view< T > &src, vil_image_view< T > &dest, unsigned i0, unsigned j0)
 Copy src to window in dest.
template<class T >
void vil_copy_deep (const vil_image_view< T > &src, vil_image_view< T > &dest)
 Deep copy src to dest.
template<class T >
vil_image_view< T > vil_copy_deep (const vil_image_view< T > &src)
 Create a deep copy of an image, with completely new underlying memory.
template<class T >
vil_image_view< T > vil_crop (const vil_image_view< T > &im, unsigned i0, unsigned n_i, unsigned j0, unsigned n_j)
 Create a view which is a cropped version of src.
template<class T >
vil_image_view< T > vil_decimate (const vil_image_view< T > &im, unsigned i_factor, unsigned j_factor=0)
 Create a view which is a decimated version of src.
template<class T >
void vil_fill (vil_image_view< T > &view, T value)
 Fill view with given value.
template<class T >
void vil_fill_line (vil_image_view< T > &im, int ai, int aj, int bi, int bj, T value)
 Fill line from (ai,aj) to (bi,bj) using Bresenham's algorithm.
template<class T >
void vil_fill_row (vil_image_view< T > &view, unsigned j, T value)
 Fill row j in view with given value.
template<class T >
void vil_fill_col (vil_image_view< T > &view, unsigned i, T value)
 Fill column i in view with given value.
template<class srcT >
void vil_fill_mask (vil_image_view< srcT > &image, const vil_image_view< bool > &mask, srcT value, bool b=true)
 Writes given value into each pixel of image under the elements of the mask set to b.
template<class T >
void vil_fill_disk (vil_image_view< T > &image, double ci, double cj, double r, T value)
 Fills pixels in disk with centre (ci,cj), radius r, with given value.
template<class T >
vil_image_view< T > vil_flatten_planes (const vil_image_view< T > &im)
 Rearrange multiple planes into a multiple tiles of a single-plane image.
template<class T >
vil_image_view< T > vil_flip_lr (const vil_image_view< T > &v)
 Create a reflected view in which i -> ni-1-i.
template<class T >
vil_image_view< T > vil_flip_ud (const vil_image_view< T > &v)
 Create a reflected view in which y -> nj-1-j.
template<class T >
bool vil_image_view_deep_equality (const vil_image_view< T > &lhs, const vil_image_view< T > &rhs)
 True if the actual images are identical.
vil_image_view_base_sptr vil_load (const char *, bool verbose=true)
 Convenience function for loading an image into an image view.
template<class T >
void vil_math_value_range_percentiles (const vil_image_view< T > &im, const vcl_vector< double > &fraction, vcl_vector< T > &value)
 Compute the values corresponding to several percentiles of the range of im.
template<class T >
void vil_math_value_range_percentile (const vil_image_view< T > &im, const double fraction, T &value)
 Compute the value corresponding to a percentile of the range of im.
template<class imT , class sumT >
sumT vil_math_ssd (const vil_image_view< imT > &imA, const vil_image_view< imT > &imB, sumT)
 Sum of squared differences between two images.
template<class imT , class sumT >
sumT vil_math_ssd_complex (const vil_image_view< vcl_complex< imT > > &imA, const vil_image_view< vcl_complex< imT > > &imB, sumT)
 Sum squared magnitude differences between two complex images.
template<class aT , class sumT >
void vil_math_mean_over_planes (const vil_image_view< aT > &src, vil_image_view< sumT > &dest)
 Calc the mean of each pixel over all the planes.
template<class inT , class outT , class sumT >
void vil_math_mean_over_planes (const vil_image_view< inT > &src, vil_image_view< outT > &dest, sumT)
 Calc the mean of each pixel over all the planes.
template<class imT , class sumT >
void vil_math_sum (sumT &sum, const vil_image_view< imT > &im, unsigned p)
 Sum of elements in plane p of image.
template<class imT , class sumT >
void vil_math_mean (sumT &mean, const vil_image_view< imT > &im, unsigned p)
 Mean of elements in plane p of image.
template<class imT >
void vil_math_median (imT &median, const vil_image_view< imT > &im, unsigned p)
 Median of elements in plane p of an image.
template<class imT , class sumT >
void vil_math_sum_squares (sumT &sum, sumT &sum_sq, const vil_image_view< imT > &im, unsigned p)
 Sum of squares of elements in plane p of image.
template<class imT , class sumT >
void vil_math_mean_and_variance (sumT &mean, sumT &var, const vil_image_view< imT > &im, unsigned p)
 Mean and variance of elements in plane p of image.
template<class T >
void vil_math_sqrt (vil_image_view< T > &image)
 Compute square-root of each pixel element (or zero if negative).
template<class T >
void vil_math_truncate_range (vil_image_view< T > &image, T min_v, T max_v)
 Truncate each pixel value so it fits into range [min_v,max_v].
template<class T >
void vil_math_scale_values (vil_image_view< T > &image, double scale)
 Multiply values in-place in image view by scale.
template<class imT , class offsetT >
void vil_math_scale_and_offset_values (vil_image_view< imT > &image, double scale, offsetT offset)
 Multiply values in-place in image view by scale and add offset.
template<class aT , class bT , class sumT >
void vil_math_image_sum (const vil_image_view< aT > &imA, const vil_image_view< bT > &imB, vil_image_view< sumT > &im_sum)
 Compute sum of two images (im_sum = imA+imB).
template<class aT , class bT , class sumT >
void vil_math_image_product (const vil_image_view< aT > &imA, const vil_image_view< bT > &imB, vil_image_view< sumT > &im_product)
 Compute pixel-wise product of two images (im_prod(i,j) = imA(i,j)*imB(i,j).
template<class aT , class bT , class maxT >
void vil_math_image_max (const vil_image_view< aT > &imA, const vil_image_view< bT > &imB, vil_image_view< maxT > &im_max)
 Compute the max of two images (im_max = max(imA, imB)).
template<class aT , class bT , class minT >
void vil_math_image_min (const vil_image_view< aT > &imA, const vil_image_view< bT > &imB, vil_image_view< minT > &im_min)
 Compute the min of two images (im_min = min(imA, imB)).
template<class aT , class bT , class sumT >
void vil_math_image_ratio (const vil_image_view< aT > &imA, const vil_image_view< bT > &imB, vil_image_view< sumT > &im_ratio)
 Compute pixel-wise ratio of two images : im_ratio(i,j) = imA(i,j)/imB(i,j).
template<class aT , class bT , class sumT >
void vil_math_image_difference (const vil_image_view< aT > &imA, const vil_image_view< bT > &imB, vil_image_view< sumT > &im_sum)
 Compute difference of two images (im_sum = imA-imB).
template<class aT , class bT , class sumT >
void vil_math_image_abs_difference (const vil_image_view< aT > &imA, const vil_image_view< bT > &imB, vil_image_view< sumT > &im_sum)
 Compute absolute difference of two images (im_sum = |imA-imB|).
template<class aT , class bT >
double vil_math_image_abs_difference (const vil_image_view< aT > &imA, const vil_image_view< bT > &imB)
 Compute sum of absolute difference between two images (|imA-imB|).
template<class aT , class bT , class magT >
void vil_math_image_vector_mag (const vil_image_view< aT > &imA, const vil_image_view< bT > &imB, vil_image_view< magT > &im_mag)
 Compute magnitude of two images taken as vector components, sqrt(A^2 + B^2).
template<class aT , class bT , class scaleT >
void vil_math_add_image_fraction (vil_image_view< aT > &imA, scaleT fa, const vil_image_view< bT > &imB, scaleT fb)
 imA = fa*imA + fb*imB (Useful for moving averages!).
template<class aT , class sumT >
void vil_math_integral_image (const vil_image_view< aT > &imA, vil_image_view< sumT > &im_sum)
 Compute integral image im_sum(i+1,j+1) = sum (x<=i,y<=j) imA(x,y).
template<class aT , class sumT >
void vil_math_integral_sqr_image (const vil_image_view< aT > &imA, vil_image_view< sumT > &im_sum, vil_image_view< sumT > &im_sum_sq)
 Compute integral image im_sum_sq(i+1,j+1) = sum (x<=i,y<=j) imA(x,y)^2.
template<class T >
vil_nearest_interp_unsafe (const vil_image_view< T > &view, double x, double y, unsigned p=0)
 Compute nearest neighbour interpolation at (x,y), no bound checks. Requires -0.5<=x<ni-0.5, -0.5<=y<nj-0.5.
template<class T >
vil_nearest_interp_safe (const vil_image_view< T > &view, double x, double y, unsigned p=0)
 Compute nearest neighbour interpolation at (x,y), with bound checks.
template<class T >
vil_nearest_interp (const vil_image_view< T > &view, double x, double y, unsigned p=0)
 Compute nearest neighbour interpolation at (x,y), with minimal bound checks.
template<class T >
vil_nearest_interp_safe_extend (const vil_image_view< T > &view, double x, double y, unsigned p=0)
 Compute nearest neighbour interpolation at (x,y), with bound checks.
template<class T >
vil_image_view< T > vil_new_image_view_plane_i_j (unsigned ni, unsigned nj, unsigned nplanes, T)
 Create a new image view whose j_step is 1.
template<class T >
vil_image_view< T > vil_new_image_view_i_j_plane (unsigned ni, unsigned nj, unsigned nplanes, T)
 Create a new image view whose plane step is 1 and whose j_step is nplanes.
vil_image_view_base_sptr vil_new_image_view_base_sptr (const vil_image_view_base &)
 Create a shallow copy of an image and wrap it in a vil_image_view_base_sptr.
template<class T >
vil_image_view< T > vil_plane (const vil_image_view< T > &im, unsigned p)
 Return a view of im's plane p.
template<class T >
void vil_print_value (vcl_ostream &s, const T &value, unsigned=0)
 How to print value in vil_print_all(image_view).
template<class T >
void vil_print_all (vcl_ostream &os, const vil_image_view< T > &view, unsigned width=0)
 Print all image data to os in a grid (rounds output to int).
void vil_print_all (vcl_ostream &os, vil_image_view_base_sptr const &view)
 Print all image data to os in a grid.
template<class sType , class dType >
void vil_resample_bicub (const vil_image_view< sType > &src_image, vil_image_view< dType > &dest_image, double x0, double y0, double dx1, double dy1, double dx2, double dy2, int n1, int n2)
 Sample grid of points in one image and place in another, using bicubic interpolation.
template<class sType , class dType >
void vil_resample_bicub (const vil_image_view< sType > &src_image, vil_image_view< dType > &dest_image, int n1, int n2)
 Resample image to a specified width (n1) and height (n2).
template<class sType , class dType >
void vil_resample_bicub_edge_extend (const vil_image_view< sType > &src_image, vil_image_view< dType > &dest_image, double x0, double y0, double dx1, double dy1, double dx2, double dy2, int n1, int n2)
 Sample grid of points in one image and place in another, using bicubic interpolation.
template<class sType , class dType >
void vil_resample_bicub_edge_extend (const vil_image_view< sType > &src_image, vil_image_view< dType > &dest_image, int n1, int n2)
 Resample image to a specified width n1 and height n2.
template<class sType , class dType >
void vil_resample_bilin (const vil_image_view< sType > &src_image, vil_image_view< dType > &dest_image, double x0, double y0, double dx1, double dy1, double dx2, double dy2, int n1, int n2)
 Sample grid of points in one image and place in another, using bilinear interpolation.
template<class sType , class dType >
void vil_resample_bilin (const vil_image_view< sType > &src_image, vil_image_view< dType > &dest_image, int n1, int n2)
 Resample image to a specified width (n1) and height (n2).
template<class sType , class dType >
void vil_resample_bilin_edge_extend (const vil_image_view< sType > &src_image, vil_image_view< dType > &dest_image, double x0, double y0, double dx1, double dy1, double dx2, double dy2, int n1, int n2)
 Sample grid of points in one image and place in another, using bilinear interpolation.
template<class sType , class dType >
void vil_resample_bilin_edge_extend (const vil_image_view< sType > &src_image, vil_image_view< dType > &dest_image, int n1, int n2)
 Resample image to a specified width (n1) and height (n2).
template<class sType , class dType >
void vil_resample_nearest (const vil_image_view< sType > &src_image, vil_image_view< dType > &dest_image, double x0, double y0, double dx1, double dy1, double dx2, double dy2, int n1, int n2)
 Sample grid of points in one image and place in another, using nearest neighbour interpolation.
template<class sType , class dType >
void vil_resample_nearest (const vil_image_view< sType > &src_image, vil_image_view< dType > &dest_image, int n1, int n2)
 Resample image to a specified width (n1) and height (n2).
template<class sType , class dType >
void vil_resample_nearest_edge_extend (const vil_image_view< sType > &src_image, vil_image_view< dType > &dest_image, double x0, double y0, double dx1, double dy1, double dx2, double dy2, int n1, int n2)
 Sample grid of points in one image and place in another, using nearest neighbour interpolation.
template<class sType , class dType >
void vil_resample_nearest_edge_extend (const vil_image_view< sType > &src_image, vil_image_view< dType > &dest_image, int n1, int n2)
 Resample image to a specified width (n1) and height (n2).
template<class sType , class dType >
void vil_rotate_image (const vil_image_view< sType > &src_image, vil_image_view< dType > &dest_image, double theta_deg)
 Rotate image by angle theta.
template<class imType , class vecType >
void vil_sample_grid_bicub (vecType *v, const vil_image_view< imType > &image, double x0, double y0, double dx1, double dy1, double dx2, double dy2, int n1, int n2)
 Sample grid from image, using bicubic interpolation.
template<class imType , class vecType >
void vil_sample_grid_bilin (vecType *v, const vil_image_view< imType > &image, double x0, double y0, double dx1, double dy1, double dx2, double dy2, int n1, int n2)
 Sample grid from image, using bilinear interpolation.
template<class imType , class vecType >
void vil_sample_grid_bilin_edgena (vecType *v, const vil_image_view< imType > &image, double x0, double y0, double dx1, double dy1, double dx2, double dy2, int n1, int n2)
 Sample grid from image, using bilinear interpolation.
template<class imType , class vecType >
void vil_sample_profile_bicub (vecType *v, const vil_image_view< imType > &image, double x0, double y0, double dx, double dy, int n)
 Sample along profile, using bicubic interpolation.
template<class imType , class vecType >
void vil_sample_profile_bilin (vecType *v, const vil_image_view< imType > &image, double x0, double y0, double dx, double dy, int n)
 Sample along profile, using bilinear interpolation.
template<class imType , class vecType >
void vil_sample_profile_bilin_edgena (vecType *v, const vil_image_view< imType > &image, double x0, double y0, double dx, double dy, int n)
 Sample along profile, using bilinear interpolation.
bool vil_save (const vil_image_view_base &, char const *filename)
 Send a vil_image_view to disk, deducing format from filename.
bool vil_save (const vil_image_view_base &, char const *filename, char const *file_format)
 Send a vil_image_view to disk, given filename.
template<class T , class F >
void vil_transform (vil_image_view< T > &image, F functor)
 Apply a unary operation to each pixel in image.
template<class inP , class outP , class Op >
void vil_transform (const vil_image_view< inP > &src, vil_image_view< outP > &dest, Op functor)
 Apply a unary operation to each pixel in src to get dest.
template<class inP , class outP , class Op >
void vil_transform2 (const vil_image_view< inP > &src, vil_image_view< outP > &dest, Op functor)
 Apply a binary function to each pixel in src and dest that modifies dest.
template<class inA , class inB , class outP , class BinOp >
void vil_transform (const vil_image_view< inA > &srcA, const vil_image_view< inB > &srcB, vil_image_view< outP > &dest, BinOp functor)
 Apply a binary operation to each pixel in srcA and srcB to get dest.
template<class inA , class inB , class outP , class BinOp >
void vil_transform (const vil_image_view< inA > &srcA, const vil_image_view< inB > &srcB, const vil_image_view< outP > &dest, BinOp functor)
 Apply a binary operation to each pixel in srcA and srcB to get dest.
template<class T >
vil_image_view< T > vil_transpose (const vil_image_view< T > &v)
 Create a view which appears as the transpose of this view.
template<class T >
vil_image_view< typename
T::value_type > 
vil_view_as_planes (const vil_image_view< T > &v)
 Return a 3-plane view of an RGB image, or a 4-plane view of an RGBA, or a 2-plane view of a complex image.
template<class T >
vil_image_view< vil_rgb< T > > vil_view_as_rgb (const vil_image_view< T > &v)
 Return an RGB component view of a 3-plane image.
template<class T >
vil_image_view< vil_rgba< T > > vil_view_as_rgba (const vil_image_view< T > &v)
 Return an RGBA component view of a 4-plane image.
template<class T >
vil_image_view< vcl_complex< T > > vil_view_as_complex (const vil_image_view< T > &v)
 Return a complex component view of a 2N-plane image.
template<class T >
vil_image_view< T > vil_view_part (vil_image_view< vcl_complex< T > > img, int pt)
 Base function to do the work for both vil_view_real/imag_part.
template<class T >
vil_image_view< T > vil_view_real_part (vil_image_view< vcl_complex< T > > img)
 Return a view of the real part of a complex image.
template<class T >
vil_image_view< T > vil_view_imag_part (vil_image_view< vcl_complex< T > > img)
 Return a view of the imaginary part of a complex image.
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

template<class T>
class vil_image_view< T >

Concrete view of image data of type T held in memory.

Views nplanes() planes of data each of size ni() x nj(). The (i,j) element of the p'th plane is given by im.top_left_ptr()[i*im.istep() + j*im.jstep() + p*im.planestep] The actual image data is either allocated by the class (using set_size), in which case it is deleted only when it has no views observing it, or is allocated outside (and is not deleted on destruction). This allows external images to be accessed without a deep copy.

Note that copying one vil_image_view<T> to another takes a shallow copy by default - it copies the view, not the raw image data. Use the explicit deep_copy() call to take a deep copy.

Definition at line 40 of file vil_image_view.h.


Member Typedef Documentation

template<class T>
typedef T const* vil_image_view< T >::const_iterator

Definition at line 131 of file vil_image_view.h.

template<class T>
typedef T* vil_image_view< T >::iterator

Definition at line 127 of file vil_image_view.h.

template<class T>
typedef T vil_image_view< T >::pixel_type

The pixel type of this image.

Definition at line 120 of file vil_image_view.h.


Constructor & Destructor Documentation

template<class T>
vil_image_view< T >::vil_image_view ( ) [inline]

Dflt ctor.

Creates an empty one-plane image.

Definition at line 63 of file vil_image_view.h.

template<class T >
vil_image_view< T >::vil_image_view ( unsigned  ni,
unsigned  nj,
unsigned  n_planes = 1,
unsigned  n_interleaved_planes = 1 
)

Create an image of ni x nj pixels in (n_planes * n_interleaved_planes) planes.

If n_interleaved_planes > 1, the planes are interleaved. If n_planes > 1, each plane of pixels is stored contiguously. n_planes and n_components should not be both different from 1. n_planes * n_interleaved_planes should be 1 unless T is scalar.

Definition at line 36 of file vil_image_view.txx.

template<class T>
vil_image_view< T >::vil_image_view ( const T *  top_left,
unsigned  ni,
unsigned  nj,
unsigned  nplanes,
vcl_ptrdiff_t  i_step,
vcl_ptrdiff_t  j_step,
vcl_ptrdiff_t  plane_step 
)

Set this view to look at someone else's memory data.

If the data goes out of scope then this view could be invalid, and there's no way of knowing until it's too late - so take care!

Definition at line 49 of file vil_image_view.txx.

template<class T>
vil_image_view< T >::vil_image_view ( const vil_memory_chunk_sptr mem_chunk,
const T *  top_left,
unsigned  n_i,
unsigned  n_j,
unsigned  n_planes,
vcl_ptrdiff_t  i_step,
vcl_ptrdiff_t  j_step,
vcl_ptrdiff_t  plane_step 
)

Set this view to look at another view's data.

Typically used by functions which generate a manipulated view of another's image data. Need to pass the memory chunk to set up the internal smart ptr appropriately

Need to pass the memory chunk to set up the internal smart ptr appropriately

Definition at line 58 of file vil_image_view.txx.

template<class T>
vil_image_view< T >::vil_image_view ( const vil_image_view< T > &  that)

Copy constructor.

The new object will point to the same underlying image as the rhs.

If this view cannot set itself to view the other data (e.g. because the types are incompatible) it will set itself to empty.

Definition at line 94 of file vil_image_view.txx.

template<class T>
vil_image_view< T >::vil_image_view ( const vil_image_view_base that)

Construct from various vil_image_view types.

Sort of copy constructor.

The new object will point to the same underlying image as the rhs You can assign a vil_image_view<compound_type<T>> to a vil_image_view<T> in all reasonable cases - the lhs will have as many planes as the rhs has components. You can assign a vil_image_view<T> to a vil_image_view<compound_type<T>> when the underlying data is formatted appropriately and the lhs has as many components as the rhs has planes. O(1). If the view types are not compatible this object will be set to empty.

If this view cannot set itself to view the other data (e.g. because the types are incompatible) it will set itself to empty.

Definition at line 105 of file vil_image_view.txx.

template<class T>
vil_image_view< T >::vil_image_view ( const vil_image_view_base_sptr that)

Construct from various vil_image_view types.

Sort of copy constructor.

The new object will point to the same underlying image as the rhs.

You can assign a vil_image_view<compound_type<T>> to a vil_image_view<T> in all reasonable cases - the lhs will have as many planes as the rhs has components. You can assign a vil_image_view<T> to a vil_image_view<compound_type<T>> when the underlying data is formatted appropriately and the lhs has as many components as the rhs has planes. O(1).

Exceptions:
vil_exception_pixel_formats_incompatibleif view types are not compatible. Or returns a null image if exceptions are disabled.

If this view cannot set itself to view the other data (e.g. because the types are incompatible) it will set itself to empty.

Definition at line 115 of file vil_image_view.txx.

template<class T>
virtual vil_image_view< T >::~vil_image_view ( ) [inline, virtual]

Definition at line 113 of file vil_image_view.h.


Member Function Documentation

template<class T>
iterator vil_image_view< T >::begin ( ) [inline]

Definition at line 128 of file vil_image_view.h.

template<class T>
const_iterator vil_image_view< T >::begin ( ) const [inline]

Definition at line 132 of file vil_image_view.h.

template<class T>
void vil_image_view< T >::clear ( ) [inline]

Make empty.

Disconnects view from underlying data.

Definition at line 225 of file vil_image_view.h.

template<class T>
void vil_image_view< T >::deep_copy ( const vil_image_view< T > &  src)

Make a copy of the data in src and set this to view it.

Perform deep copy of the src image, placing in this image.

Definition at line 123 of file vil_image_view.txx.

template<class T>
iterator vil_image_view< T >::end ( ) [inline]

Definition at line 129 of file vil_image_view.h.

template<class T>
const_iterator vil_image_view< T >::end ( ) const [inline]

Definition at line 133 of file vil_image_view.h.

template<class T>
void vil_image_view< T >::fill ( value)

Fill view with given value.

Definition at line 708 of file vil_image_view.txx.

template<class T>
bool vil_image_view< T >::in_range ( int  i,
int  j 
) const [inline]

Return true if (i,j) is a valid index into this buffer.

Definition at line 182 of file vil_image_view.h.

template<class T>
bool vil_image_view< T >::in_range ( int  i,
int  j,
int  p 
) const [inline]

Return true if (i,j,p) is a valid index into this buffer.

Definition at line 186 of file vil_image_view.h.

template<class T >
vcl_string vil_image_view< T >::is_a ( ) const [virtual]

Return class name.

Implements vil_image_view_base.

Definition at line 878 of file vil_image_view.txx.

template<class T >
bool vil_image_view< T >::is_class ( vcl_string const &  s) const [virtual]

True if this is (or is derived from) class s.

Reimplemented from vil_image_view_base.

Definition at line 760 of file vil_image_view.txx.

template<class T >
bool vil_image_view< T >::is_contiguous ( ) const

True if data all in one unbroken block and top_left_ptr() is lowest data address.

Definition at line 606 of file vil_image_view.txx.

template<class T>
vcl_ptrdiff_t vil_image_view< T >::istep ( ) const [inline]

Add this to your pixel pointer to get next i pixel.

Note that istep() may well be negative; see e.g. vil_flip_lr

Definition at line 146 of file vil_image_view.h.

template<class T>
vcl_ptrdiff_t vil_image_view< T >::jstep ( ) const [inline]

Add this to your pixel pointer to get next j pixel.

Note that jstep() may well be negative; see e.g. vil_flip_ud

Definition at line 149 of file vil_image_view.h.

template<class T>
const vil_memory_chunk_sptr& vil_image_view< T >::memory_chunk ( ) const [inline]

Smart pointer to the object holding the data for this view.

Will be a null pointer if this view looks at `third-party' data, e.g. using set_to_memory.

Typically used when creating new views of the data

Definition at line 170 of file vil_image_view.h.

template<class T>
vil_memory_chunk_sptr& vil_image_view< T >::memory_chunk ( ) [inline]

Smart pointer to the object holding the data for this view.

Will be a null pointer if this view looks at `third-party' data, e.g. using set_to_memory

Typically used when creating new views of the data

Definition at line 177 of file vil_image_view.h.

unsigned vil_image_view_base::ni ( ) const [inline, inherited]

Width.

Definition at line 49 of file vil_image_view_base.h.

unsigned vil_image_view_base::nj ( ) const [inline, inherited]

Height.

Definition at line 51 of file vil_image_view_base.h.

unsigned vil_image_view_base::nplanes ( ) const [inline, inherited]

Number of planes.

Definition at line 53 of file vil_image_view_base.h.

template<class T>
vil_image_view< T >::operator safe_bool ( ) const [inline]

Cast to bool is true if pointing at some data.

Definition at line 155 of file vil_image_view.h.

template<class T>
bool vil_image_view< T >::operator! ( ) const [inline]

Return false if pointing at some data.

Definition at line 159 of file vil_image_view.h.

template<class T>
bool vil_image_view< T >::operator!= ( const vil_image_view_base rhs) const [inline]

True if they do not share same view of same image data.

This does not do a deep inequality on image data. If the images point to different image data objects that contain identical images, then the result will still be true.

Definition at line 262 of file vil_image_view.h.

template<class T>
const T& vil_image_view< T >::operator() ( unsigned  i,
unsigned  j 
) const [inline]

Return read-only reference to pixel at (i,j) in plane 0.

Definition at line 191 of file vil_image_view.h.

template<class T>
T& vil_image_view< T >::operator() ( unsigned  i,
unsigned  j 
) [inline]

Return read/write reference to pixel at (i,j) in plane 0.

Definition at line 196 of file vil_image_view.h.

template<class T>
const T& vil_image_view< T >::operator() ( unsigned  i,
unsigned  j,
unsigned  p 
) const [inline]

Return read-only reference to pixel at (i,j) in plane p.

Definition at line 201 of file vil_image_view.h.

template<class T>
T& vil_image_view< T >::operator() ( unsigned  i,
unsigned  j,
unsigned  p 
) [inline]

Return read-only reference to pixel at (i,j) in plane p.

Definition at line 206 of file vil_image_view.h.

template<class T >
bool vil_image_view< T >::operator< ( const vil_image_view_base rhs) const

Provides an ordering.

Useful for ordered containers. There is no guaranteed meaning to the less than operator, except that (a<b && b<a) is false and !(a<b) && !(b<a) is equivalent to a==b

Definition at line 804 of file vil_image_view.txx.

template<class T>
bool vil_image_view< T >::operator<= ( const vil_image_view_base rhs) const [inline]

Provides an ordering.

Definition at line 277 of file vil_image_view.h.

template<class T>
const vil_image_view< T > & vil_image_view< T >::operator= ( const vil_image_view< T > &  rhs)

Copy a view. The rhs and lhs will point to the same image data.

Definition at line 553 of file vil_image_view.txx.

template<class T>
const vil_image_view< T > & vil_image_view< T >::operator= ( const vil_image_view_base rhs)

Copy a view. The rhs and lhs will point to the same image data.

You can assign a vil_image_view<compound_type<T>> to a vil_image_view<T> in all reasonable cases - the lhs will have as many planes as the rhs has components. You can assign a vil_image_view<T> to a vil_image_view<compound_type<T>> when the underlying data is formatted appropriately and the lhs has as many components as the rhs has planes. O(1). If the view types are not compatible this object will be set to empty.

Definition at line 560 of file vil_image_view.txx.

template<class T>
const vil_image_view<T>& vil_image_view< T >::operator= ( const vil_image_view_base_sptr rhs) [inline]

Copy a view. The rhs and lhs will point to the same image data.

You can assign a vil_image_view<compound_type<T>> to a vil_image_view<T> in all reasonable cases - the lhs will have as many planes as the rhs has components. You can assign a vil_image_view<T> to a vil_image_view<compound_type<T>> when the underlying data is formatted appropriately and the lhs has as many components as the rhs has planes. O(1). If the view types are not compatible this object will be set to empty. If the pointer is null, this object will be set to empty. See also vil_convert_to_component_order().

Definition at line 300 of file vil_image_view.h.

template<class T >
bool vil_image_view< T >::operator== ( const vil_image_view_base rhs) const

True if they share same view of same image data.

This does not do a deep equality on image data. If the images point to different image data objects that contain identical images, then the result will still be false.

Definition at line 779 of file vil_image_view.txx.

template<class T >
bool vil_image_view< T >::operator> ( const vil_image_view_base rhs) const

Provides an ordering.

Useful for ordered containers. There is no guaranteed meaning to the less than operator, except that (a>b) is equivalent to (b<a)

Definition at line 826 of file vil_image_view.txx.

template<class T>
bool vil_image_view< T >::operator>= ( const vil_image_view_base rhs) const [inline]

Provides an ordering.

Definition at line 271 of file vil_image_view.h.

template<class T>
vil_pixel_format vil_image_view< T >::pixel_format ( ) const [inline, virtual]

Return a description of the concrete data pixel type.

The value corresponds directly to pixel_type.

Implements vil_image_view_base.

Definition at line 250 of file vil_image_view.h.

template<class T>
vcl_ptrdiff_t vil_image_view< T >::planestep ( ) const [inline]

Add this to your pixel pointer to get pixel on next plane.

Note that planestep() may well be negative, e.g. with BMP file images

Definition at line 152 of file vil_image_view.h.

template<class T >
void vil_image_view< T >::print ( vcl_ostream &  os) const [virtual]

Print a 1-line summary of contents.

Implements vil_image_view_base.

Definition at line 768 of file vil_image_view.txx.

template<class T>
void vil_image_view< T >::release_memory ( ) [inline, protected]

Disconnect this view from the underlying data,.

Definition at line 58 of file vil_image_view.h.

template<class T >
void vil_image_view< T >::set_size ( unsigned  ni,
unsigned  nj 
) [virtual]

resize current planes to ni x nj.

If already correct size, this function returns quickly

Implements vil_image_view_base.

Definition at line 596 of file vil_image_view.txx.

template<class T >
void vil_image_view< T >::set_size ( unsigned  ni,
unsigned  nj,
unsigned  nplanes 
) [virtual]

resize to ni x nj x nplanes.

If already correct size, this function returns quickly

Implements vil_image_view_base.

Definition at line 661 of file vil_image_view.txx.

template<class T>
void vil_image_view< T >::set_to_memory ( const T *  top_left,
unsigned  ni,
unsigned  nj,
unsigned  nplanes,
vcl_ptrdiff_t  i_step,
vcl_ptrdiff_t  j_step,
vcl_ptrdiff_t  plane_step 
)

Set this view to look at someone else's memory data.

Set this view to look at someone else's memory.

If the data goes out of scope then this view could be invalid, and there's no way of knowing until it's too late -- so take care!

Note that though top_left is passed in as const, the data may be manipulated through the view.

Definition at line 689 of file vil_image_view.txx.

unsigned long vil_image_view_base::size ( ) const [inline, inherited]

The number of pixels.

Definition at line 56 of file vil_image_view_base.h.

template<class T>
unsigned vil_image_view< T >::size_bytes ( ) const [inline]

The number of bytes in the data.

Definition at line 163 of file vil_image_view.h.

template<class T>
T* vil_image_view< T >::top_left_ptr ( ) [inline]

Pointer to the first (top left in plane 0) pixel.

Note that this is not necessarily the lowest data memory address.

Definition at line 139 of file vil_image_view.h.

template<class T>
const T* vil_image_view< T >::top_left_ptr ( ) const [inline]

Pointer to the first (top left in plane 0) pixel.

Note that this is not necessarily the lowest data memory address.

Definition at line 142 of file vil_image_view.h.


Friends And Related Function Documentation

template<class T >
double vil_bicub_interp ( const vil_image_view< T > &  view,
double  x,
double  y,
unsigned  p = 0 
) [related]

Compute bicubic interpolation at (x,y), with minimal bound checks.

If (x,y) is outside interpolatable image region and NDEBUG is not defined the code will fail an ASSERT. The safe interpolatable region is [1,view.ni()-2]*[1,view.nj()-2].

Definition at line 113 of file vil_bicub_interp.h.

template<class T >
double vil_bicub_interp_safe ( const vil_image_view< T > &  view,
double  x,
double  y,
unsigned  p = 0 
) [related]

Compute bicubic interpolation at (x,y), with bound checks.

If (x,y) is outside interpolatable image region, zero is returned. The safe interpolatable region is [1,view.ni()-2]*[1,view.nj()-2].

Definition at line 82 of file vil_bicub_interp.h.

template<class T >
double vil_bicub_interp_safe_extend ( const vil_image_view< T > &  view,
double  x,
double  y,
unsigned  p = 0 
) [related]

Compute bicubic interpolation at (x,y), with bound checks.

If (x,y) is outside safe interpolatable image region, nearest pixel value is returned. The safe interpolatable region is [1,view.ni()-2]*[1,view.nj()-2].

Definition at line 142 of file vil_bicub_interp.h.

template<class T >
double vil_bilin_interp ( const vil_image_view< T > &  view,
double  x,
double  y,
unsigned  p = 0 
) [related]

Compute bilinear interpolation at (x,y), with minimal bound checks.

If (x,y) is outside interpolatable image region and NDEBUG is not defined the code will fail an ASSERT. The safe interpolatable region is [0,view.ni()-1]*[0,view.nj()-1].

Definition at line 173 of file vil_bilin_interp.h.

template<class T >
double vil_bilin_interp_safe ( const vil_image_view< T > &  view,
double  x,
double  y,
unsigned  p = 0 
) [related]

Compute bilinear interpolation at (x,y), with bound checks.

If (x,y) is outside interpolatable image region, zero is returned. The safe interpolatable region is [0,view.ni()-1]*[0,view.nj()-1].

Definition at line 128 of file vil_bilin_interp.h.

template<class T >
double vil_bilin_interp_safe_edgena ( const vil_image_view< T > &  view,
double  x,
double  y,
unsigned  p = 0 
) [related]

Compute bilinear interpolation at (x,y), with bound checks.

If (x,y) is outside interpolatable image region, NA is returned. The safe interpolatable region is [0,view.ni()-1]*[0,view.nj()-1].

Definition at line 142 of file vil_bilin_interp.h.

template<class T >
double vil_bilin_interp_safe_extend ( const vil_image_view< T > &  view,
double  x,
double  y,
unsigned  p = 0 
) [related]

Compute bilinear interpolation at (x,y), with bound checks.

If (x,y) is outside safe interpolatable image region, nearest pixel value is returned. The safe interpolatable region is [0,view.ni()-1]*[0,view.nj()-1].

Definition at line 203 of file vil_bilin_interp.h.

template<class S , class T >
void vil_cartesian_differential_invariants_3 ( const vil_image_view< S > &  src,
vil_image_view< T > &  dest,
double  scale,
unsigned  max_kernel_width = 0 
) [related]

Compute up to 3rd order C.d.i. of an image.

Finds the first 8 Cartesian differential invariants of an image. That is 1x1st order, 3x2nd order and 4x3rd order. The results are returned in 8 adjacent planes (for each input plane) The results are unscaled. If the range of your input is $r$, you can normalise the results by dividing the planes by $r, r^{-1}, r^{-1}, r^{-1}, r^{-2}, r^{-2}, r^{-2}, r^{-2}$

See Romeny et al. Proc.IPMI1993, pp77-93. and Walker et al. Proc.BMVC1997 pp541-549.

Parameters:
max_kernel_width.Set this value (to an odd number) if you want to restrict the size of the kernel. 0 will let the function choose an appropriate kernel size for the scale.
template<class T >
void vil_clamp ( const vil_image_view< T > &  src,
vil_image_view< T > &  dest,
lo,
hi 
) [related]

Clamp an image view between two values.

Definition at line 23 of file vil_clamp.h.

template<class T >
void vil_clamp_below ( vil_image_view< T > &  src,
t,
v 
) [related]

Clamp an image view above a given value t, setting it to v if below or on t.

Definition at line 85 of file vil_clamp.h.

template<class T >
void vil_clamp_below ( vil_image_view< T > &  src,
t 
) [related]

Clamp an image view above a given value t, setting it to this t if below t.

Definition at line 105 of file vil_clamp.h.

template<class inP , class outP >
void vil_convert_cast ( const vil_image_view< inP > &  src,
vil_image_view< outP > &  dest 
) [related]

Cast one pixel type to another.

There must be a cast operator from inP to outP

If the two pixel types are the same, the destination may only be a shallow copy of the source.

Definition at line 242 of file vil_convert.h.

template<class inP , class outP >
void vil_convert_round ( const vil_image_view< inP > &  src,
vil_image_view< outP > &  dest 
) [related]

Convert one pixel type to another with rounding.

This should only be used to convert scalar pixel types to other scalar pixel types, or RGBs to RGBs. This function only rounds in terms of the destination type.

If the two pixel types are the same, the destination may only be a shallow copy of the source.

Definition at line 440 of file vil_convert.h.

template<class T >
void vil_convert_stretch_range ( const vil_image_view< T > &  src,
vil_image_view< vxl_byte > &  dest 
) [related]

Convert src to byte image dest by stretching to range [0,255].

Definition at line 508 of file vil_convert.h.

template<class srcT , class destT , class kernelT , class accumT >
void vil_convolve_1d ( const vil_image_view< srcT > &  src_im,
vil_image_view< destT > &  dest_im,
const kernelT *  kernel,
vcl_ptrdiff_t  k_lo,
vcl_ptrdiff_t  k_hi,
accumT  ac,
vil_convolve_boundary_option  start_option,
vil_convolve_boundary_option  end_option 
) [related]

Convolve kernel[i] (i in [k_lo,k_hi]) with srcT in i-direction.

On exit dest_im(i,j) = sum src(i-x,j)*kernel(x) (x=k_lo..k_hi)

Note:
This function reverses the kernel. If you don't want the kernel reversed, use vil_correlate_1d instead. The kernel must not be larger than src_im.ni()
Parameters:
kernelshould point to tap 0.
dest_imwill be resized to size of src_im.

Definition at line 246 of file vil_convolve_1d.h.

template<class srcT , class destT , class kernelT , class accumT >
void vil_convolve_2d ( const vil_image_view< srcT > &  src_im,
vil_image_view< destT > &  dest_im,
const vil_image_view< kernelT > &  kernel,
accumT  ac 
) [related]

Convolve kernel with srcT.

dest is resized to (1+src_im.ni()-kernel.ni())x(1+src_im.nj()-kernel.nj()) (a one plane image). On exit dest(x,y) = sum_ij src_im(x-i,y-j)*kernel(i,j)

Definition at line 20 of file vil_convolve_2d.h.

template<class T >
void vil_copy_deep ( const vil_image_view< T > &  src,
vil_image_view< T > &  dest 
) [related]

Deep copy src to dest.

O(size).

template<class T >
vil_image_view< T > vil_copy_deep ( const vil_image_view< T > &  src) [related]

Create a deep copy of an image, with completely new underlying memory.

O(size).

template<class T >
void vil_copy_reformat ( const vil_image_view< T > &  src,
vil_image_view< T > &  dest 
) [related]

Copy src to dest, without changing dest's view parameters.

This is useful if you want to copy an image into a window on another image. src and dest must have identical sizes, and types. O(size).

template<class T >
void vil_copy_to_window ( const vil_image_view< T > &  src,
vil_image_view< T > &  dest,
unsigned  i0,
unsigned  j0 
) [related]

Copy src to window in dest.

Size of window is defined by src. O(src.size).

template<class T>
void vil_corners ( const vil_image_view< float > &  grad_i,
const vil_image_view< float > &  grad_j,
vil_image_view< float > &  dest,
double  k 
) [related]

Compute Forstner/Harris corner strength function given gradient images.

Compute Harris corner strength function given gradient images.

grad_i and grad_j are assumed to be the i and j gradient images (single plane), such as produced by vil_sobel_3x3(). At each pixel compute the Forstner/Harris corner function: det(H)-k*sqr(trace(H)), where H is the 2x2 matrix of second derivatives, generated by applying a Sobel operator to the gradient images.

The local peaks of the output image correspond to corner candidates.

grad_i and grad_j are assumed to be the i and j gradient images (single plane), such as produced by vil_sobel_3x3(). At each pixel compute the Harris corner function: det(H)-k*sqr(trace(H)), where H is the 2x2 matrix of second derivatives, generated by applying a Sobel operator to the gradient images.

The local peaks of the output image correspond to corner candidates.

Definition at line 21 of file vil_corners.cxx.

template<class T >
void vil_corners ( const vil_image_view< T > &  src,
vil_image_view< float > &  dest,
double  k = 0.04 
) [related]

Compute Harris corner strength function.

At each pixel compute the Harris corner function: det(H)-k*sqr(trace(H)), where H is the 2x2 matrix of second derivatives, generated by applying a Sobel operator twice. The filters thus effectively have 5x5 support.

The local peaks of the output image correspond to corner candidates.

Definition at line 49 of file vil_corners.h.

template<class T>
void vil_corners_rohr ( const vil_image_view< float > &  grad_i,
const vil_image_view< float > &  grad_j,
vil_image_view< float > &  dest 
) [related]

Compute corner strength using Rohr's recommended method.

This computes the determinant of the matrix C=g.g' after the elements of C have been smoothed. g is the vector of first derivatives (gx,gy)' It relies only on first derivatives.

Definition at line 183 of file vil_corners.cxx.

template<class T >
void vil_corners_rohr ( const vil_image_view< T > &  src,
vil_image_view< float > &  dest 
) [related]

Compute corner strength using Karl Rohr's recommended method.

This computes the determinant of the matrix C=g.g' after the elements of C have been smoothed. g is the vector of first derivatives (gx,gy)' It relies only on first derivatives.

Definition at line 65 of file vil_corners.h.

template<class srcT , class destT , class kernelT , class accumT >
void vil_correlate_1d ( const vil_image_view< srcT > &  src_im,
vil_image_view< destT > &  dest_im,
const kernelT *  kernel,
vcl_ptrdiff_t  k_lo,
vcl_ptrdiff_t  k_hi,
accumT  ac,
vil_convolve_boundary_option  start_option,
vil_convolve_boundary_option  end_option 
) [related]

correlate kernel[i] (i in [k_lo,k_hi]) with srcT in i-direction.

On exit dest_im(i,j) = sum src(i+x,j)*kernel(x) (x=k_lo..k_hi)

Note:
This function does not reverse the kernel. If you want the kernel reversed, use vil_convolve_1d instead.
Parameters:
kernelshould point to tap 0.
dest_imwill be resized to size of src_im.

Definition at line 59 of file vil_correlate_1d.h.

template<class srcT , class destT , class kernelT , class accumT >
void vil_correlate_2d ( const vil_image_view< srcT > &  src_im,
vil_image_view< destT > &  dest_im,
const vil_image_view< kernelT > &  kernel,
accumT  ac 
) [related]

Correlate kernel with srcT.

dest is resized to (1+src_im.ni()-kernel.ni())x(1+src_im.nj()-kernel.nj()) (a one plane image). On exit dest(x,y) = sum_ij src_im(x+i,y+j)*kernel(i,j)

Definition at line 54 of file vil_correlate_2d.h.

template<class srcT , class kernelT , class accumT >
accumT vil_correlate_2d_at_pt ( const srcT *  src_im,
vcl_ptrdiff_t  s_istep,
vcl_ptrdiff_t  s_jstep,
vcl_ptrdiff_t  s_pstep,
const vil_image_view< kernelT > &  kernel,
accumT   
) [related]

Evaluate dot product between kernel and src_im.

Returns sum_ijp src_im[i*istep+j*jstep+p*pstep]*kernel(i,j,p)

Definition at line 17 of file vil_correlate_2d.h.

template<class T >
vil_image_view< T > vil_crop ( const vil_image_view< T > &  im,
unsigned  i0,
unsigned  n_i,
unsigned  j0,
unsigned  n_j 
) [related]

Create a view which is a cropped version of src.

Doesn't modify underlying data. O(1).

Returns:
an n_i x n_j window of im with offset (i0,j0)

Definition at line 21 of file vil_crop.h.

template<class T >
vil_image_view< T > vil_decimate ( const vil_image_view< T > &  im,
unsigned  i_factor,
unsigned  j_factor = 0 
) [related]

Create a view which is a decimated version of src.

Doesn't modify underlying data. O(1).

The factor describes the number of input rows (or columns) that are equivalent to one output. If you don't specify the j_factor, it will be set equal to i_factor.

Definition at line 23 of file vil_decimate.h.

template<class T>
void vil_distance_transform ( vil_image_view< float > &  image) [related]

Compute distance function from zeros in original image.

Image is assumed to be filled with max_dist where there is background, and zero at the places of interest. On exit, the values are the 8-connected distance to the nearest original zero region.

Definition at line 17 of file vil_distance_transform.cxx.

template<class T>
void vil_distance_transform ( const vil_image_view< bool > &  mask,
vil_image_view< float > &  distance_image,
float  max_dist 
) [related]

Compute distance function from true elements in mask.

On exit, the values are the 8-connected distance to the nearest original zero region (or max_dist, if that is smaller).

Definition at line 85 of file vil_distance_transform.cxx.

template<class T>
void vil_distance_transform_one_way ( vil_image_view< float > &  image) [related]

Compute directed distance function from zeros in original image.

Image is assumed to be filled with max_dist where there is background, and zero at the places of interest. On exit, the values are the 8-connected distance to the nearest original zero region above or to the left of current point. One pass of distance transform, going from low to high i,j.

Definition at line 38 of file vil_distance_transform.cxx.

template<class T>
void vil_distance_transform_r2 ( vil_image_view< float > &  image) [related]

Compute distance function from zeros in original image.

Image is assumed to be filled with max_dist where there is background, and zero at the places of interest. On exit, the values are the 24-connected distance to the nearest original zero region. (ie considers neighbours in a +/-2 pixel region around each point). More accurate than vil_distance_transform(image), but approximately twice the processing required.

Definition at line 231 of file vil_distance_transform.cxx.

template<class T >
void vil_dog_filter_5tap ( const vil_image_view< T > &  src_im,
vil_image_view< T > &  smooth_im,
vil_image_view< T > &  dog_im,
double  sigma 
) [related]

Smooth source with gaussian filter and compute difference.

Uses a 5-tap filter with gaussian width sigma.

Parameters:
sigmaWidth of gaussian
smooth_imResult of smoothing the src_im
dog_imsrc_im - smooth_im

Definition at line 19 of file vil_dog_filter_5tap.h.

template<class T >
void vil_dog_pyramid ( const vil_image_view< T > &  src_image,
vcl_vector< vil_image_view< T > > &  smooth_pyramid,
vcl_vector< vil_image_view< T > > &  dog_pyramid,
unsigned  min_size 
) [related]

Compute a pyramid of difference of gaussian images.

Computes each layer of a pyramid by smoothing then computing the difference from the original image. The smoothed is then subsampled using a reduction factor of 1.5 (ie each level is 2/3 the size of the level below) and used to produced the next level.

min_size defines the smallest dimension (restricting the number of levels that will be constructed)

This is useful for finding locally interesting points and their associated scales - see "Object Recognition from Scale Invariant Features" D.Lowe, ICCV1999, pp.1150-1157.

Definition at line 29 of file vil_dog_pyramid.h.

template<class srcT , class destT , class accumT >
void vil_exp_filter_2d ( const vil_image_view< srcT > &  src_im,
vil_image_view< destT > &  dest_im,
accumT  ki,
accumT  kj 
) [related]

Apply exponential filter along i and j to src_im to produce dest_im.

Symmetric exponential filter of the form exp(c*|j|) applied. c=log(k) Uses fast recursive implementation.

Definition at line 15 of file vil_exp_filter_2d.h.

template<class srcT , class destT , class accumT >
void vil_exp_filter_i ( const vil_image_view< srcT > &  src_im,
vil_image_view< destT > &  dest_im,
accumT  k 
) [related]

Apply exponential filter along i to src_im to produce dest_im.

Symmetric exponential filter of the form exp(c*|i|) applied. c=log(k) Uses fast recursive implementation.

Definition at line 52 of file vil_exp_filter_1d.h.

template<class srcT , class destT , class accumT >
void vil_exp_filter_j ( const vil_image_view< srcT > &  src_im,
vil_image_view< destT > &  dest_im,
accumT  k 
) [related]

Apply exponential filter along j to src_im to produce dest_im.

Symmetric exponential filter of the form exp(c*|j|) applied. c=log(k) Uses fast recursive implementation.

Definition at line 77 of file vil_exp_filter_1d.h.

template<class srcT , class destT , class accumT >
void vil_exp_grad_filter_i ( const vil_image_view< srcT > &  src_im,
vil_image_view< destT > &  dest_im,
accumT  k 
) [related]

Apply exponential gradient filter to src_im (along i direction).

Exponential gradient filter of the form sign(i)*exp(c*|i|) applied. c=log(k) Uses fast recursive implementation.

Definition at line 58 of file vil_exp_grad_filter_1d.h.

template<class srcT , class destT , class accumT >
void vil_exp_grad_filter_j ( const vil_image_view< srcT > &  src_im,
vil_image_view< destT > &  dest_im,
accumT  k 
) [related]

Apply exponential gradient filter to src_im (along j direction).

Exponential gradient filter of the form sign(j)*exp(c*|j|) applied. c=log(k) Uses fast recursive implementation.

Definition at line 83 of file vil_exp_grad_filter_1d.h.

template<class T >
void vil_fill ( vil_image_view< T > &  view,
value 
) [related]

Fill view with given value.

O(size).

Definition at line 17 of file vil_fill.h.

template<class T >
void vil_fill_col ( vil_image_view< T > &  view,
unsigned  i,
value 
) [related]

Fill column i in view with given value.

O(nj).

Definition at line 145 of file vil_fill.h.

template<class T >
void vil_fill_disk ( vil_image_view< T > &  image,
double  ci,
double  cj,
double  r,
value 
) [related]

Fills pixels in disk with centre (ci,cj), radius r, with given value.

Fills all planes of image with the value.

Definition at line 198 of file vil_fill.h.

template<class T >
void vil_fill_line ( vil_image_view< T > &  im,
int  ai,
int  aj,
int  bi,
int  bj,
value 
) [related]

Fill line from (ai,aj) to (bi,bj) using Bresenham's algorithm.

Only modifies first plane.

Definition at line 55 of file vil_fill.h.

template<class srcT >
void vil_fill_mask ( vil_image_view< srcT > &  image,
const vil_image_view< bool > &  mask,
srcT  value,
bool  b = true 
) [related]

Writes given value into each pixel of image under the elements of the mask set to b.

If mask.nplanes()==1 then the same mask is applied to every image plane, otherwise there must be the same number of mask planes as image planes.

Definition at line 162 of file vil_fill.h.

template<class T >
void vil_fill_row ( vil_image_view< T > &  view,
unsigned  j,
value 
) [related]

Fill row j in view with given value.

O(ni).

Definition at line 130 of file vil_fill.h.

template<class T >
void vil_find_peaks_3x3 ( vcl_vector< unsigned > &  pi,
vcl_vector< unsigned > &  pj,
const vil_image_view< T > &  image,
const T &  min_thresh,
bool  clear_list = true 
) [related]

Return (pi,pj) for all points in image strictly above their 8 neighbours.

Compute position of all local peaks (pi[k],pj[k]) above given threshold value.

Parameters:
clear_listIf true (the default) then empty lists before adding new examples
See also:
vil_find_plateaus_3x3()

Definition at line 34 of file vil_find_peaks.h.

template<class T >
void vil_find_peaks_3x3_subpixel ( vcl_vector< double > &  px,
vcl_vector< double > &  py,
vcl_vector< double > &  val,
const vil_image_view< T > &  image,
const T &  min_thresh,
bool  clear_list = true 
) [related]

Return sub-pixel (px,py,val) for all points in image strictly above their 8 neighbours.

Interpolation sub-pixel position of all local peaks (px[k],py[k]) above given threshold value by fitting a paraboloid. Interpolated peak values are returned in val.

Parameters:
clear_listIf true (the default) then empty lists before adding new examples.

Definition at line 143 of file vil_find_peaks.h.

template<class T >
void vil_find_plateaus_3x3 ( vcl_vector< unsigned > &  pi,
vcl_vector< unsigned > &  pj,
const vil_image_view< T > &  image,
const T &  min_thresh,
bool  clear_list = true 
) [related]

Return (pi,pj) for all points in image greater than or equal to all 8 neighbours.

Compute position of all local plateau points (pi[k],pj[k]) above given threshold value.

Parameters:
clear_listIf true (the default) then empty lists before adding new examples
See also:
vil_find_peaks_3x3()

Definition at line 34 of file vil_find_plateaus.h.

template<class T >
vil_image_view< T > vil_flatten_planes ( const vil_image_view< T > &  im) [related]

Rearrange multiple planes into a multiple tiles of a single-plane image.

A ni x nj x nplanes images will be arranged into an ni x (nj*nplanes) x 1 image. A view transformation will be used if possible.

Definition at line 18 of file vil_flatten.h.

template<class T >
vil_image_view< T > vil_flip_lr ( const vil_image_view< T > &  v) [related]

Create a reflected view in which i -> ni-1-i.

i.e. vil_flip_lr(view)(i,j,p) = view(ni-1-i,j,p) O(1).

Definition at line 20 of file vil_flip.h.

template<class T >
vil_image_view< T > vil_flip_ud ( const vil_image_view< T > &  v) [related]

Create a reflected view in which y -> nj-1-j.

i.e. vil_flip_ud(view)(i,j,p) = view(i,nj-1-j,p) O(1).

Definition at line 33 of file vil_flip.h.

template<class T >
void vil_flood_fill4 ( vil_image_view< T > &  image,
unsigned  seed_i,
unsigned  seed_j,
v,
new_v 
) [related]

Flood fill on a 4-connected region.

Find every point in 4-connected region with values image(i,j)==v containing (seed_i,seed_j), and change their values to new_v

Note, currently uses inefficient (x,y) access to image. Could be improved using fast pointer access to work along the rows.

Definition at line 41 of file vil_flood_fill.h.

template<class T >
void vil_flood_fill4 ( vil_image_view< T > &  image,
unsigned  seed_i,
unsigned  seed_j,
v,
new_v,
vcl_vector< vil_chord > &  region 
) [related]

Flood fill on a 4-connected region, and record region.

Find every point in 4-connected region with values image(i,j)==v containing (seed_i,seed_j), and change their values to new_v

On exit region is filled with a set of image chords which cover the region.

Note, currently uses inefficient (x,y) access to image. Could be improved using fast pointer access to work along the rows.

Definition at line 94 of file vil_flood_fill.h.

template<class T >
void vil_flood_fill8 ( vil_image_view< T > &  image,
unsigned  seed_i,
unsigned  seed_j,
v,
new_v 
) [related]

Flood fill on a 8-connected region.

Find every point in 8-connected region with values image(i,j)==v containing (seed_i,seed_j), and change their values to new_v

Note, currently uses inefficient (x,y) access to image. Could be improved using fast pointer access to work along the rows.

Definition at line 149 of file vil_flood_fill.h.

template<class T >
void vil_flood_fill8 ( vil_image_view< T > &  image,
unsigned  seed_i,
unsigned  seed_j,
v,
new_v,
vcl_vector< vil_chord > &  region 
) [related]

Flood fill on a 8-connected region, and record region.

Find every point in 8-connected region with values image(i,j)==v containing (seed_i,seed_j), and change their values to new_v

On exit region is filled with a set of image chords which cover the region.

Note, currently uses inefficient (x,y) access to image. Could be improved using fast pointer access to work along the rows.

Definition at line 205 of file vil_flood_fill.h.

template<class T >
void vil_flood_fill_row ( vil_image_view< T > &  image,
unsigned  i,
unsigned  j,
v,
new_v,
unsigned &  ilo,
unsigned &  ihi 
) [related]

Search along i direction either side for limits of pixels matching v.

Fills in all such pixels with new_v. Returns limits in ilo and ihi

Definition at line 17 of file vil_flood_fill.h.

template<class T >
void vil_gauss_reduce ( const vil_image_view< T > &  src,
vil_image_view< T > &  dest,
vil_image_view< T > &  work_im 
) [related]

Smooth and subsample src_im to produce dest_im.

Applies 1-5-8-5-1 smoothing filter in x and y, then samples every other pixel. work_im provides workspace

template<class T >
void vil_gauss_reduce_121 ( const vil_image_view< T > &  src,
vil_image_view< T > &  dest 
) [related]

Smooth and subsample src_im to produce dest_im.

Applies 1-2-1 smoothing filter in x and y, then samples every other pixel.

template<class T >
void vil_gauss_reduce_2_3 ( const vil_image_view< T > &  src_im,
vil_image_view< T > &  dest_im,
vil_image_view< T > &  work_im 
) [related]

Smooth and subsample src_im to produce dest_im (2/3 size).

Applies filter in x and y, then samples every other pixel. work_im provides workspace

template<class T >
void vil_gauss_reduce_general ( const vil_image_view< T > &  src_im,
vil_image_view< T > &  dest_im,
const vil_gauss_reduce_params params 
) [related]

Smooth and subsample src_im by an arbitrary factor to produce dest_im.

Definition at line 110 of file vil_gauss_reduce.h.

template<class T >
void vil_grid_merge ( const vil_image_view< T > &  image1,
const vil_image_view< T > &  image2,
vil_image_view< T > &  dest_image,
unsigned  box_ni,
unsigned  box_nj 
) [related]

Merge two images in a chequer-board pattern.

image1 and image2 are merged by copying boxes of size (box_ni x box_nj) alternatively from each one. Useful for comparing two images.

Definition at line 17 of file vil_grid_merge.h.

template<class T >
void vil_histogram ( const vil_image_view< T > &  image,
vcl_vector< double > &  histo,
double  min,
double  max,
unsigned  n_bins 
) [related]

Construct histogram from pixels in given image.

Definition at line 17 of file vil_histogram.h.

template<class T>
void vil_histogram_byte ( const vil_image_view< vxl_byte > &  image,
vcl_vector< double > &  histo 
) [related]

Construct histogram from pixels in given image of bytes.

Resulting histogram has 256 bins

Definition at line 10 of file vil_histogram.cxx.

template<class T>
void vil_histogram_equalise ( vil_image_view< vxl_byte > &  image) [related]

Apply histogram equalisation to given image.

Definition at line 11 of file vil_histogram_equalise.cxx.

template<class T >
bool vil_image_view_deep_equality ( const vil_image_view< T > &  lhs,
const vil_image_view< T > &  rhs 
) [related]

True if the actual images are identical.

$\bigwedge_{i,j,p} {\textstyle src}(i,j,p) == {\textstyle dest}(i,j,p)$ The data may be formatted differently in each memory chunk. O(size).

Definition at line 852 of file vil_image_view.txx.

template<class T>
vil_image_view_base_sptr vil_load ( const char *  ,
bool  verbose = true 
) [related]

Convenience function for loading an image into an image view.

Definition at line 130 of file vil_load.cxx.

template<class aT , class bT , class scaleT >
void vil_math_add_image_fraction ( vil_image_view< aT > &  imA,
scaleT  fa,
const vil_image_view< bT > &  imB,
scaleT  fb 
) [related]

imA = fa*imA + fb*imB (Useful for moving averages!).

Can do running sum using vil_add_image_fraction(running_mean,1-f,new_im,f) to update current mean by a fraction f of new_im

Definition at line 933 of file vil_math.h.

template<class aT , class bT , class sumT >
void vil_math_image_abs_difference ( const vil_image_view< aT > &  imA,
const vil_image_view< bT > &  imB,
vil_image_view< sumT > &  im_sum 
) [related]

Compute absolute difference of two images (im_sum = |imA-imB|).

Definition at line 825 of file vil_math.h.

template<class aT , class bT >
double vil_math_image_abs_difference ( const vil_image_view< aT > &  imA,
const vil_image_view< bT > &  imB 
) [related]

Compute sum of absolute difference between two images (|imA-imB|).

Definition at line 861 of file vil_math.h.

template<class aT , class bT , class sumT >
void vil_math_image_difference ( const vil_image_view< aT > &  imA,
const vil_image_view< bT > &  imB,
vil_image_view< sumT > &  im_sum 
) [related]

Compute difference of two images (im_sum = imA-imB).

Definition at line 792 of file vil_math.h.

template<class aT , class bT , class maxT >
void vil_math_image_max ( const vil_image_view< aT > &  imA,
const vil_image_view< bT > &  imB,
vil_image_view< maxT > &  im_max 
) [related]

Compute the max of two images (im_max = max(imA, imB)).

Definition at line 679 of file vil_math.h.

template<class aT , class bT , class minT >
void vil_math_image_min ( const vil_image_view< aT > &  imA,
const vil_image_view< bT > &  imB,
vil_image_view< minT > &  im_min 
) [related]

Compute the min of two images (im_min = min(imA, imB)).

Definition at line 712 of file vil_math.h.

template<class aT , class bT , class sumT >
void vil_math_image_product ( const vil_image_view< aT > &  imA,
const vil_image_view< bT > &  imB,
vil_image_view< sumT > &  im_product 
) [related]

Compute pixel-wise product of two images (im_prod(i,j) = imA(i,j)*imB(i,j).

If images have the same number of planes, then im_prod(i,j,p) = imA(i,j,p)*imB(i,j,p). If imB only has one plane, then im_prod(i,j,p) = imA(i,j,p)*imB(i,j,0).

Definition at line 640 of file vil_math.h.

template<class aT , class bT , class sumT >
void vil_math_image_ratio ( const vil_image_view< aT > &  imA,
const vil_image_view< bT > &  imB,
vil_image_view< sumT > &  im_ratio 
) [related]

Compute pixel-wise ratio of two images : im_ratio(i,j) = imA(i,j)/imB(i,j).

Pixels cast to type sumT before calculation. If imB(i,j,p)==0, im_ration(i,j,p)=0

If images have the same number of planes, then im_ratio(i,j,p) = imA(i,j,p)/imB(i,j,p). If imB only has one plane, then im_ratio(i,j,p) = imA(i,j,p)/imB(i,j,0).

Definition at line 751 of file vil_math.h.

template<class aT , class bT , class sumT >
void vil_math_image_sum ( const vil_image_view< aT > &  imA,
const vil_image_view< bT > &  imB,
vil_image_view< sumT > &  im_sum 
) [related]

Compute sum of two images (im_sum = imA+imB).

Definition at line 604 of file vil_math.h.

template<class aT , class bT , class magT >
void vil_math_image_vector_mag ( const vil_image_view< aT > &  imA,
const vil_image_view< bT > &  imB,
vil_image_view< magT > &  im_mag 
) [related]

Compute magnitude of two images taken as vector components, sqrt(A^2 + B^2).

Definition at line 893 of file vil_math.h.

template<class aT , class sumT >
void vil_math_integral_image ( const vil_image_view< aT > &  imA,
vil_image_view< sumT > &  im_sum 
) [related]

Compute integral image im_sum(i+1,j+1) = sum (x<=i,y<=j) imA(x,y).

Useful thing for quickly computing mean over large regions, as demonstrated in Viola and Jones (CVPR01). The sum of elements in the ni x nj square with corner (i,j) is given by im_sum(i,j)+im_sum(i+ni,j+nj)-im_sum(i+ni,j)-im_sum(i,j+nj)

Definition at line 964 of file vil_math.h.

template<class aT , class sumT >
void vil_math_integral_sqr_image ( const vil_image_view< aT > &  imA,
vil_image_view< sumT > &  im_sum,
vil_image_view< sumT > &  im_sum_sq 
) [related]

Compute integral image im_sum_sq(i+1,j+1) = sum (x<=i,y<=j) imA(x,y)^2.

Also computes sum im_sum(i+1,j+1) = sum (x<=i,y<=j) imA(x,y)

Useful thing for quickly computing mean and variance over large regions, as demonstrated in Viola and Jones (CVPR01).

The sum of elements in the ni x nj square with corner (i,j) is given by im_sum(i,j)+im_sum(i+ni,j+nj)-im_sum(i+ni,j)-im_sum(i,j+nj)

Similar result holds for sum of squares, allowing rapid calculation of variance etc.

Definition at line 1013 of file vil_math.h.

template<class imT , class sumT >
void vil_math_mean ( sumT &  mean,
const vil_image_view< imT > &  im,
unsigned  p 
) [related]

Mean of elements in plane p of image.

Definition at line 257 of file vil_math.h.

template<class imT , class sumT >
void vil_math_mean_and_variance ( sumT &  mean,
sumT &  var,
const vil_image_view< imT > &  im,
unsigned  p 
) [related]

Mean and variance of elements in plane p of image.

Definition at line 307 of file vil_math.h.

template<class aT , class sumT >
void vil_math_mean_over_planes ( const vil_image_view< aT > &  src,
vil_image_view< sumT > &  dest 
) [related]

Calc the mean of each pixel over all the planes.

Definition at line 200 of file vil_math.h.

template<class inT , class outT , class sumT >
void vil_math_mean_over_planes ( const vil_image_view< inT > &  src,
vil_image_view< outT > &  dest,
sumT   
) [related]

Calc the mean of each pixel over all the planes.

Definition at line 222 of file vil_math.h.

template<class imT >
void vil_math_median ( imT &  median,
const vil_image_view< imT > &  im,
unsigned  p 
) [related]

Median of elements in plane p of an image.

For integral types, if the median is half way between two values, the result will be the floor of the average.

Definition at line 275 of file vil_math.h.

template<class imT , class offsetT >
void vil_math_scale_and_offset_values ( vil_image_view< imT > &  image,
double  scale,
offsetT  offset 
) [related]

Multiply values in-place in image view by scale and add offset.

Definition at line 428 of file vil_math.h.

template<class T >
void vil_math_scale_values ( vil_image_view< T > &  image,
double  scale 
) [related]

Multiply values in-place in image view by scale.

Definition at line 420 of file vil_math.h.

template<class T >
void vil_math_sqrt ( vil_image_view< T > &  image) [related]

Compute square-root of each pixel element (or zero if negative).

Definition at line 331 of file vil_math.h.

template<class imT , class sumT >
sumT vil_math_ssd ( const vil_image_view< imT > &  imA,
const vil_image_view< imT > &  imB,
sumT   
) [related]

Sum of squared differences between two images.

Definition at line 163 of file vil_math.h.

template<class imT , class sumT >
sumT vil_math_ssd_complex ( const vil_image_view< vcl_complex< imT > > &  imA,
const vil_image_view< vcl_complex< imT > > &  imB,
sumT   
) [related]

Sum squared magnitude differences between two complex images.

Definition at line 181 of file vil_math.h.

template<class imT , class sumT >
void vil_math_sum ( sumT &  sum,
const vil_image_view< imT > &  im,
unsigned  p 
) [related]

Sum of elements in plane p of image.

Definition at line 240 of file vil_math.h.

template<class imT , class sumT >
void vil_math_sum_squares ( sumT &  sum,
sumT &  sum_sq,
const vil_image_view< imT > &  im,
unsigned  p 
) [related]

Sum of squares of elements in plane p of image.

Definition at line 290 of file vil_math.h.

template<class T >
void vil_math_truncate_range ( vil_image_view< T > &  image,
min_v,
max_v 
) [related]

Truncate each pixel value so it fits into range [min_v,max_v].

If value < min_v value=min_v If value > max_v value=max_v

Definition at line 342 of file vil_math.h.

template<class T >
void vil_math_value_range_percentile ( const vil_image_view< T > &  im,
const double  fraction,
T &  value 
) [related]

Compute the value corresponding to a percentile of the range of im.

Percentile is expressed as fraction, e.g. 0.05, or 0.95.

Parameters:
imThe image to examine.
fractionThe fraction of the data range (from the lower end).
Return values:
valueThe image data value corresponding to the specified percentile.
Note:
This function requires the sorting of large parts of the image data and can be very expensive in terms of both processing and memory.

Definition at line 148 of file vil_math.h.

template<class T >
void vil_math_value_range_percentiles ( const vil_image_view< T > &  im,
const vcl_vector< double > &  fraction,
vcl_vector< T > &  value 
) [related]

Compute the values corresponding to several percentiles of the range of im.

Percentiles are expressed as fraction, e.g. 0.05, or 0.95.

Parameters:
imThe image to examine.
fractionThe fractions of the data range (from the lower end).
Return values:
valueThe image data values corresponding to the specified percentiles.
Note:
This function requires the sorting of large parts of the image data and can be very expensive in terms of both processing and memory.

Definition at line 83 of file vil_math.h.

template<class T >
T vil_nearest_interp ( const vil_image_view< T > &  view,
double  x,
double  y,
unsigned  p = 0 
) [related]

Compute nearest neighbour interpolation at (x,y), with minimal bound checks.

If (x,y) is outside interpolatable image region and NDEBUG is not defined the code will fail an ASSERT. The safe interpolatable region is [-0.5,view.ni()-0.5)*[0.5,view.nj()-0.5).

Definition at line 98 of file vil_nearest_interp.h.

template<class T >
T vil_nearest_interp_safe ( const vil_image_view< T > &  view,
double  x,
double  y,
unsigned  p = 0 
) [related]

Compute nearest neighbour interpolation at (x,y), with bound checks.

If (x,y) is outside interpolatable image region, zero is returned. The safe interpolatable region is [-0.5,view.ni()-0.5)*[0,view.nj()-0.5).

Definition at line 64 of file vil_nearest_interp.h.

template<class T >
T vil_nearest_interp_safe_extend ( const vil_image_view< T > &  view,
double  x,
double  y,
unsigned  p = 0 
) [related]

Compute nearest neighbour interpolation at (x,y), with bound checks.

If (x,y) is outside safe interpolatable image region, nearest pixel value is returned. The safe interpolatable region is [-0.5,view.ni()-0.5)*[-0.5,view.nj()-0.5).

Definition at line 136 of file vil_nearest_interp.h.

template<class T >
T vil_nearest_interp_unsafe ( const vil_image_view< T > &  view,
double  x,
double  y,
unsigned  p = 0 
) [related]

Compute nearest neighbour interpolation at (x,y), no bound checks. Requires -0.5<=x<ni-0.5, -0.5<=y<nj-0.5.

No bound checks are done.

Definition at line 37 of file vil_nearest_interp.h.

template<class T>
vil_image_view_base_sptr vil_new_image_view_base_sptr ( const vil_image_view_base ) [related]

Create a shallow copy of an image and wrap it in a vil_image_view_base_sptr.

Note:
vil_image_view_base_sptr almost certainly doesn't behave as you would expect, and this function should really only be used by experts.

Definition at line 278 of file vil_new.cxx.

template<class T >
vil_image_view< T > vil_new_image_view_i_j_plane ( unsigned  ni,
unsigned  nj,
unsigned  nplanes,
 
) [related]

Create a new image view whose plane step is 1 and whose j_step is nplanes.

Pixel data type is the type of the last (dummy) argument. i_step will be nplanes x nj.

Definition at line 195 of file vil_new.h.

template<class T >
vil_image_view< T > vil_new_image_view_plane_i_j ( unsigned  ni,
unsigned  nj,
unsigned  nplanes,
 
) [related]

Create a new image view whose j_step is 1.

Pixel data type is the type of the last (dummy) argument. i_step will be nj, planestep will be ni x nj.

Definition at line 182 of file vil_new.h.

template<class srcT , class kernelT , class accumT >
accumT vil_norm_corr_2d_at_pt ( const srcT *  src_im,
vcl_ptrdiff_t  s_istep,
vcl_ptrdiff_t  s_jstep,
vcl_ptrdiff_t  s_pstep,
const vil_image_view< kernelT > &  kernel,
accumT   
) [related]

Evaluate dot product between kernel and src_im.

Assumes that the kernel has been normalised to have zero mean and unit variance

Definition at line 20 of file vil_normalised_correlation_2d.h.

template<class srcT , class destT , class kernelT , class accumT >
void vil_normalised_correlation_2d ( const vil_image_view< srcT > &  src_im,
vil_image_view< destT > &  dest_im,
const vil_image_view< kernelT > &  kernel,
accumT  ac 
) [related]

Normalised cross-correlation of (pre-normalised) kernel with srcT.

dest is resized to (1+src_im.ni()-kernel.ni())x(1+src_im.nj()-kernel.nj()) (a one plane image). On exit dest(x,y) = sum_ij src_im(x+i,y+j)*kernel(i,j)/sd_under_region

Assumes that the kernel has been normalised to have zero mean and unit variance

Definition at line 69 of file vil_normalised_correlation_2d.h.

template<class T>
void vil_orientations ( const vil_image_view< float > &  grad_i,
const vil_image_view< float > &  grad_j,
vil_image_view< float > &  orient_im,
vil_image_view< float > &  grad_mag 
) [related]

Compute orientation (in radians) and gradient magnitude at each pixel.

Images assumed to be single plane

Definition at line 11 of file vil_orientations.cxx.

template<class T>
void vil_orientations ( const vil_image_view< float > &  grad_i,
const vil_image_view< float > &  grad_j,
vil_image_view< vxl_byte > &  orient_im,
vil_image_view< float > &  grad_mag,
unsigned  n_orientations = 256 
) [related]

Compute discrete orientation and gradient magnitude at each pixel.

Computes orientation at each pixel and scales to range [0,n_orientations-1].

Orientation of i corresponds to angles in range [(i-0.5)dA,(i+0.5)dA] where dA=2*pi/n_orientations.

Images assumed to be single plane

Definition at line 53 of file vil_orientations.cxx.

template<class T>
void vil_orientations_at_edges ( const vil_image_view< float > &  grad_i,
const vil_image_view< float > &  grad_j,
vil_image_view< vxl_byte > &  orient_im,
vil_image_view< float > &  grad_mag,
float  grad_threshold,
unsigned  n_orientations = 255 
) [related]

Compute discrete orientation and gradient magnitude at edge pixels.

Computes orientation at each pixel and scales to range [0,n_orientations]. If gradient magnitude is less than grad_threshold, then orientation of zero is set, meaning undefined orientation.

Orientation of i>0 corresponds to angles in range [(i-1.5)dA,(i-0.5)dA] where dA=2*pi/n_orientations.

Images assumed to be single plane

Definition at line 106 of file vil_orientations.cxx.

template<class T >
void vil_orientations_from_sobel ( const vil_image_view< T > &  src_image,
vil_image_view< float > &  orient_im,
vil_image_view< float > &  grad_mag 
) [related]

Compute orientation and gradient magnitude using sobel to get gradients.

Definition at line 54 of file vil_orientations.h.

template<class T >
void vil_orientations_from_sobel ( const vil_image_view< T > &  src_image,
vil_image_view< vxl_byte > &  orient_im,
vil_image_view< float > &  grad_mag,
unsigned  n_orientations = 256 
) [related]

Compute discrete orientation and gradient using sobel operations.

Computes orientation at each pixel and scales to range [0,n_orientations-1].

Orientation of i corresponds to angles in range [(i-0.5)dA,(i+0.5)dA] where dA=2*pi/n_orientations.

Images assumed to be single plane

Definition at line 72 of file vil_orientations.h.

template<class T >
vil_image_view< T > vil_plane ( const vil_image_view< T > &  im,
unsigned  p 
) [related]

Return a view of im's plane p.

O(1).

Definition at line 20 of file vil_plane.h.

template<class T >
void vil_print_all ( vcl_ostream &  os,
const vil_image_view< T > &  view,
unsigned  width = 0 
) [related]

Print all image data to os in a grid (rounds output to int).

Definition at line 77 of file vil_print.h.

template<class T>
void vil_print_all ( vcl_ostream &  os,
vil_image_view_base_sptr const &  view 
) [related]

Print all image data to os in a grid.

Definition at line 439 of file vil_print.cxx.

template<class T >
void vil_print_value ( vcl_ostream &  s,
const T &  value,
unsigned  = 0 
) [related]

How to print value in vil_print_all(image_view).

template<class srcT , class destT >
void vil_quad_distance_function ( const vil_image_view< srcT > &  src,
double  ai,
double  aj,
vil_image_view< destT > &  dest 
) [related]

Apply quadratic distance transform along each row of src.

$ dest(x,y)=min_i,j (src(x+i,y+j)+ai(i^2)+aj(j^2)) $

Definition at line 159 of file vil_quad_distance_function.h.

template<class srcT , class destT , class posT >
void vil_quad_distance_function ( const vil_image_view< srcT > &  src,
double  ai,
double  aj,
vil_image_view< destT > &  dest,
vil_image_view< posT > &  pos 
) [related]

Apply quadratic distance transform along each row of src.

$ dest(x,y)=min_i,j (src(x+i,y+j)+ai(i^2)+aj(j^2)) $ (pos(x,y,0),pos(x,y,1)) gives the position (x+i,y+j) leading to minima

Definition at line 198 of file vil_quad_distance_function.h.

template<class sType , class dType >
void vil_resample_bicub ( const vil_image_view< sType > &  src_image,
vil_image_view< dType > &  dest_image,
double  x0,
double  y0,
double  dx1,
double  dy1,
double  dx2,
double  dy2,
int  n1,
int  n2 
) [related]

Sample grid of points in one image and place in another, using bicubic interpolation.

dest_image(i,j,p) is sampled from the src_image at (x0+i.dx1+j.dx2,y0+i.dy1+j.dy2), where i=[0..n1-1], j=[0..n2-1] dest_image resized to (n1,n2,src_image.nplanes()) Points outside image return zero.

See also:
vil_resample_bilin

dest_image(i,j,p) is sampled from the src_image at (x0+i.dx1+j.dx2,y0+i.dy1+j.dy2), where i=[0..n1-1], j=[0..n2-1] dest_image resized to (n1,n2,src_image.nplanes()) Points outside image return zero.

Definition at line 34 of file vil_resample_bicub.txx.

template<class sType , class dType >
void vil_resample_bicub ( const vil_image_view< sType > &  src_image,
vil_image_view< dType > &  dest_image,
int  n1,
int  n2 
) [related]

Resample image to a specified width (n1) and height (n2).

See also:
vil_resample_bilin
template<class sType , class dType >
void vil_resample_bicub_edge_extend ( const vil_image_view< sType > &  src_image,
vil_image_view< dType > &  dest_image,
double  x0,
double  y0,
double  dx1,
double  dy1,
double  dx2,
double  dy2,
int  n1,
int  n2 
) [related]

Sample grid of points in one image and place in another, using bicubic interpolation.

dest_image(i,j,p) is sampled from the src_image at (x0+i.dx1+j.dx2,y0+i.dy1+j.dy2), where i=[0..n1-1], j=[0..n2-1] dest_image resized to (n1,n2,src_image.nplanes()) Points outside image return the nearest valid value.

See also:
vil_resample_bilin

dest_image(i,j,p) is sampled from the src_image at (x0+i.dx1+j.dx2,y0+i.dy1+j.dy2), where i=[0..n1-1], j=[0..n2-1] dest_image resized to (n1,n2,src_image.nplanes()) Points outside image return zero.

Definition at line 131 of file vil_resample_bicub.txx.

template<class sType , class dType >
void vil_resample_bicub_edge_extend ( const vil_image_view< sType > &  src_image,
vil_image_view< dType > &  dest_image,
int  n1,
int  n2 
) [related]

Resample image to a specified width n1 and height n2.

Points outside image return the nearest valid value.

See also:
vil_resample_bilin
template<class sType , class dType >
void vil_resample_bilin ( const vil_image_view< sType > &  src_image,
vil_image_view< dType > &  dest_image,
double  x0,
double  y0,
double  dx1,
double  dy1,
double  dx2,
double  dy2,
int  n1,
int  n2 
) [related]

Sample grid of points in one image and place in another, using bilinear interpolation.

dest_image(i,j,p) is sampled from the src_image at (x0+i.dx1+j.dx2,y0+i.dy1+j.dy2), where i=[0..n1-1], j=[0..n2-1] dest_image resized to (n1,n2,src_image.nplanes()) Points outside image return zero.

See also:
vil_resample_bicub

dest_image(i,j,p) is sampled from the src_image at (x0+i.dx1+j.dx2,y0+i.dy1+j.dy2), where i=[0..n1-1], j=[0..n2-1] dest_image resized to (n1,n2,src_image.nplanes()) Points outside image return zero.

Definition at line 35 of file vil_resample_bilin.txx.

template<class sType , class dType >
void vil_resample_bilin ( const vil_image_view< sType > &  src_image,
vil_image_view< dType > &  dest_image,
int  n1,
int  n2 
) [related]

Resample image to a specified width (n1) and height (n2).

See also:
vil_resample_bicub
template<class sType , class dType >
void vil_resample_bilin_edge_extend ( const vil_image_view< sType > &  src_image,
vil_image_view< dType > &  dest_image,
double  x0,
double  y0,
double  dx1,
double  dy1,
double  dx2,
double  dy2,
int  n1,
int  n2 
) [related]

Sample grid of points in one image and place in another, using bilinear interpolation.

dest_image(i,j,p) is sampled from the src_image at (x0+i.dx1+j.dx2,y0+i.dy1+j.dy2), where i=[0..n1-1], j=[0..n2-1] dest_image resized to (n1,n2,src_image.nplanes()) Points outside image return the value of the nearest valid pixel.

dest_image(i,j,p) is sampled from the src_image at (x0+i.dx1+j.dx2,y0+i.dy1+j.dy2), where i=[0..n1-1], j=[0..n2-1] dest_image resized to (n1,n2,src_image.nplanes()) Points outside image return zero.

Definition at line 157 of file vil_resample_bilin.txx.

template<class sType , class dType >
void vil_resample_bilin_edge_extend ( const vil_image_view< sType > &  src_image,
vil_image_view< dType > &  dest_image,
int  n1,
int  n2 
) [related]

Resample image to a specified width (n1) and height (n2).

template<class sType , class dType >
void vil_resample_nearest ( const vil_image_view< sType > &  src_image,
vil_image_view< dType > &  dest_image,
double  x0,
double  y0,
double  dx1,
double  dy1,
double  dx2,
double  dy2,
int  n1,
int  n2 
) [related]

Sample grid of points in one image and place in another, using nearest neighbour interpolation.

dest_image(i,j,p) is sampled from the src_image at (x0+i.dx1+j.dx2,y0+i.dy1+j.dy2), where i=[0..n1-1], j=[0..n2-1] dest_image resized to (n1,n2,src_image.nplanes()) Points outside image return zero.

Definition at line 41 of file vil_resample_nearest.txx.

template<class sType , class dType >
void vil_resample_nearest ( const vil_image_view< sType > &  src_image,
vil_image_view< dType > &  dest_image,
int  n1,
int  n2 
) [related]

Resample image to a specified width (n1) and height (n2).

template<class sType , class dType >
void vil_resample_nearest_edge_extend ( const vil_image_view< sType > &  src_image,
vil_image_view< dType > &  dest_image,
double  x0,
double  y0,
double  dx1,
double  dy1,
double  dx2,
double  dy2,
int  n1,
int  n2 
) [related]

Sample grid of points in one image and place in another, using nearest neighbour interpolation.

Sample grid of points in one image and place in another, using bilinear interpolation.

dest_image(i,j,p) is sampled from the src_image at (x0+i.dx1+j.dx2,y0+i.dy1+j.dy2), where i=[0..n1-1], j=[0..n2-1] dest_image resized to (n1,n2,src_image.nplanes()) Points outside image return the value of the nearest valid pixel.

dest_image(i,j,p) is sampled from the src_image at (x0+i.dx1+j.dx2,y0+i.dy1+j.dy2), where i=[0..n1-1], j=[0..n2-1] dest_image resized to (n1,n2,src_image.nplanes()) Points outside image return zero.

Definition at line 163 of file vil_resample_nearest.txx.

template<class sType , class dType >
void vil_resample_nearest_edge_extend ( const vil_image_view< sType > &  src_image,
vil_image_view< dType > &  dest_image,
int  n1,
int  n2 
) [related]

Resample image to a specified width (n1) and height (n2).

template<class sType , class dType >
void vil_rotate_image ( const vil_image_view< sType > &  src_image,
vil_image_view< dType > &  dest_image,
double  theta_deg 
) [related]

Rotate image by angle theta.

template<class imType , class vecType >
void vil_sample_grid_bicub ( vecType *  v,
const vil_image_view< imType > &  image,
double  x0,
double  y0,
double  dx1,
double  dy1,
double  dx2,
double  dy2,
int  n1,
int  n2 
) [related]

Sample grid from image, using bicubic interpolation.

Grid points are (x0+i.dx1+j.dx2,y0+i.dy1+j.dy2), where i=[0..n1-1], j=[0..n2-1] Vector v is filled with n1*n2*np elements, where np=image.nplanes()*image.ncomponents() v[0]..v[np-1] are the values from point (x0,y0) Samples are taken along direction (dx2,dy2) first, then along (dx1,dy1). Points outside image return zero.

template<class imType , class vecType >
void vil_sample_grid_bilin ( vecType *  v,
const vil_image_view< imType > &  image,
double  x0,
double  y0,
double  dx1,
double  dy1,
double  dx2,
double  dy2,
int  n1,
int  n2 
) [related]

Sample grid from image, using bilinear interpolation.

Grid points are (x0+i.dx1+j.dx2,y0+i.dy1+j.dy2), where i=[0..n1-1], j=[0..n2-1] Vector v is filled with n1*n2*np elements, where np=image.nplanes()*image.ncomponents() v[0]..v[np-1] are the values from point (x0,y0) Samples are taken along direction (dx2,dy2) first, then along (dx1,dy1). Points outside image return zero.

template<class imType , class vecType >
void vil_sample_grid_bilin_edgena ( vecType *  v,
const vil_image_view< imType > &  image,
double  x0,
double  y0,
double  dx1,
double  dy1,
double  dx2,
double  dy2,
int  n1,
int  n2 
) [related]

Sample grid from image, using bilinear interpolation.

Grid points are (x0+i.dx1+j.dx2,y0+i.dy1+j.dy2), where i=[0..n1-1], j=[0..n2-1] Vector v is filled with n1*n2*np elements, where np=image.nplanes()*image.ncomponents() v[0]..v[np-1] are the values from point (x0,y0) Samples are taken along direction (dx2,dy2) first, then along (dx1,dy1). Points outside image return NA.

template<class imType , class vecType >
void vil_sample_profile_bicub ( vecType *  v,
const vil_image_view< imType > &  image,
double  x0,
double  y0,
double  dx,
double  dy,
int  n 
) [related]

Sample along profile, using bicubic interpolation.

Profile points are (x0+i.dx,y0+i.dy), where i=[0..n-1]. Vector v is filled with n*np elements, where np=image.nplanes()*image.ncomponents() v[0]..v[np-1] are the values from point (x0,y0) Points outside image return zero.

template<class imType , class vecType >
void vil_sample_profile_bilin ( vecType *  v,
const vil_image_view< imType > &  image,
double  x0,
double  y0,
double  dx,
double  dy,
int  n 
) [related]

Sample along profile, using bilinear interpolation.

Profile points are (x0+i.dx,y0+i.dy), where i=[0..n-1]. Vector v is filled with n*np elements, where np=image.nplanes()*image.ncomponents() v[0]..v[np-1] are the values from point (x0,y0) Points outside image return zero.

template<class imType , class vecType >
void vil_sample_profile_bilin_edgena ( vecType *  v,
const vil_image_view< imType > &  image,
double  x0,
double  y0,
double  dx,
double  dy,
int  n 
) [related]

Sample along profile, using bilinear interpolation.

Profile points are (x0+i.dx,y0+i.dy), where i=[0..n-1]. Vector v is filled with n*np elements, where np=image.nplanes()*image.ncomponents() v[0]..v[np-1] are the values from point (x0,y0) Points outside image return NA.

template<class T>
bool vil_save ( const vil_image_view_base ,
char const *  filename 
) [related]

Send a vil_image_view to disk, deducing format from filename.

Definition at line 122 of file vil_save.cxx.

template<class T>
bool vil_save ( const vil_image_view_base ,
char const *  filename,
char const *  file_format 
) [related]

Send a vil_image_view to disk, given filename.

Definition at line 30 of file vil_save.cxx.

template<class srcT , class destT >
void vil_sobel_1x3 ( const vil_image_view< srcT > &  src,
vil_image_view< destT > &  grad_i,
vil_image_view< destT > &  grad_j 
) [related]

Compute gradients of an image using 1x3 Sobel filters.

Computes both i and j gradients of an ni x nj plane of data 1 pixel border around grad images is set to zero

template<class srcT , class destT >
void vil_sobel_1x3 ( const vil_image_view< srcT > &  src,
vil_image_view< destT > &  grad_ij 
) [related]

Compute gradients of an image using 1x3 Sobel filters.

Computes both i and j gradients of an nx x ny plane of data grad_ij has twice as many planes as src, with dest plane (2i) being the i-gradient of source plane i and dest plane (2i+1) being the j-gradient. 1 pixel border around grad images is set to zero

template<class srcT , class destT >
void vil_sobel_3x3 ( const vil_image_view< srcT > &  src,
vil_image_view< destT > &  grad_i,
vil_image_view< destT > &  grad_j 
) [related]

Compute gradients of an image using 3x3 Sobel filters.

Computes both i and j gradients of an ni x nj plane of data 1 pixel border around grad images is set to zero

template<class srcT , class destT >
void vil_sobel_3x3 ( const vil_image_view< srcT > &  src,
vil_image_view< destT > &  grad_ij 
) [related]

Compute gradients of an image using 3x3 Sobel filters.

Computes both i and j gradients of an nx x ny plane of data grad_ij has twice as many planes as src, with dest plane (2i) being the i-gradient of source plane i and dest plane (2i+1) being the j-gradient. 1 pixel border around grad images is set to zero

template<class T >
void vil_suppress_non_max_3x3 ( const vil_image_view< T > &  src_im,
vil_image_view< T > &  dest_im,
threshold = 0,
non_max_value = 0 
) [related]

Suppress all non-maximal (non peaks) pixels in the image.

If image(i,j) is strictly larger than all neighbouring pixels, and is above the threshold, then it is retained. All other pixels are set to non_max_value.

non_max_value must be below the threshold (so the default value of zero is inappropriate if the image contains peaks of interest with negative values)

Note that where there are neighbouring pixels with identical values on a raised plateau, then all the pixels on the plateau will be suppressed. This can cause some peaks to be missed. The effect can be reduced by using float images and pre-smoothing slightly. Alternatively, use vil_suppress_non_plateau_3x3() to retain plateau points as well as strict maxima.

See also:
vil_suppress_non_plateau_3x3()

Definition at line 33 of file vil_suppress_non_max.h.

template<class srcT , class destT >
void vil_suppress_non_max_edges ( const vil_image_view< srcT > &  grad_i,
const vil_image_view< srcT > &  grad_j,
double  grad_mag_threshold,
vil_image_view< destT > &  grad_mag 
) [related]

Given gradient images, computes magnitude image containing maximal edges.

Computes magnitude image. Zeros any below a threshold. Points with magnitude above a threshold are tested against gradient along normal to the edge and retained only if they are higher than their neighbours.

Note: Currently assumes single plane only. 2 pixel border around output set to zero. If two neighbouring edges have exactly the same strength, it retains both (ie an edge is eliminated if it is strictly lower than a neighbour, but not if it is the same as two neighbours).

template<class srcT , class destT >
void vil_suppress_non_max_edges_subpixel ( const vil_image_view< srcT > &  grad_i,
const vil_image_view< srcT > &  grad_j,
double  grad_mag_threshold,
vil_image_view< destT > &  grad_mag_orient_offset 
) [related]

Given gradient images, computes a subpixel edgemap with magnitudes and orientations.

Computes magnitude image. Zeros any below a threshold. Points with magnitude above a threshold are tested against gradient along normal to the edge and retained only if they are higher than their neighbours. The magnitude of retained points is revised using parabolic interpolation in the normal direction. The same interpolation provides a subpixel offset from the integral pixel location.

This algorithm returns a 3-plane image where the planes are:

  • 0 - The interpolated peak magnitude
  • 1 - The orientation (in radians)
  • 2 - The offset to the subpixel peak in the gradient direction All non-maximal edge pixel have the value zero in all three planes.
    See also:
    vil_orientations_at_edges
    The subpixel location for pixel (i,j) is computed as
        double theta = grad_mag_orient_offset(i,j,1);
        double offset = grad_mag_orient_offset(i,j,2);
        double x = i + vcl_cos(theta)*offset;
        double y = j + vcl_sin(theta)*offset;
    

Note: Currently assumes single plane only. 2 pixel border around output set to zero. If two neighbouring edges have exactly the same strength, it retains both (ie an edge is eliminated if it is strictly lower than a neighbour, but not if it is the same as two neighbours).

template<class T >
void vil_suppress_non_plateau_3x3 ( const vil_image_view< T > &  src_im,
vil_image_view< T > &  dest_im,
threshold = 0,
non_max_value = 0 
) [related]

Suppress all non-plateau pixels in the image.

If image(i,j) is greater than or equal to all neighbouring pixels, and is above the threshold, then it is retained. All other pixels are set to non_max_value.

non_max_value must be below the threshold (so the default value of zero is inappropriate if the image contains plateaus of interest with negative values)

See also:
vil_suppress_non_max_3x3()

Definition at line 26 of file vil_suppress_non_plateau.h.

template<class srcT >
void vil_threshold_above ( const vil_image_view< srcT > &  src,
vil_image_view< bool > &  dest,
srcT  t 
) [related]

Apply threshold such that dest(i,j,p)=true if src(i,j,p)>=t.

template<class srcT >
void vil_threshold_below ( const vil_image_view< srcT > &  src,
vil_image_view< bool > &  dest,
srcT  t 
) [related]

Apply threshold such that dest(i,j,p)=true if src(i,j,p)<=t.

template<class srcT >
void vil_threshold_inside ( const vil_image_view< srcT > &  src,
vil_image_view< bool > &  dest,
srcT  t0,
srcT  t1 
) [related]

Apply threshold such that dest(i,j,p)=true if t0<=src(i,j,p)<=t1.

template<class srcT >
void vil_threshold_outside ( const vil_image_view< srcT > &  src,
vil_image_view< bool > &  dest,
srcT  t0,
srcT  t1 
) [related]

Apply threshold such that dest(i,j,p)=true if src(i,j,p)<=t0 or src(i,j,p)>=t1.

template<class T >
void vil_tile_images ( vil_image_view< T > &  big_image,
const vcl_vector< vil_image_view< T > > &  patches 
) [related]

Create a big image by tiling images in patches (must be of same size).

Creates a large image by putting smaller images into an approximately square grid. If there are n small images, the grid will have sqrt(n) columns.

See also:
contrib/mul/tools/tile_images_2d

Definition at line 21 of file vil_tile_images.h.

template<class T , class F >
void vil_transform ( vil_image_view< T > &  image,
functor 
) [related]

Apply a unary operation to each pixel in image.

Parameters:
functorshould take a value of type T and return same type

Definition at line 19 of file vil_transform.h.

template<class inP , class outP , class Op >
void vil_transform ( const vil_image_view< inP > &  src,
vil_image_view< outP > &  dest,
Op  functor 
) [related]

Apply a unary operation to each pixel in src to get dest.

Parameters:
functorshould take a value of type inP, and return a value of type outP

Definition at line 74 of file vil_transform.h.

template<class inA , class inB , class outP , class BinOp >
void vil_transform ( const vil_image_view< inA > &  srcA,
const vil_image_view< inB > &  srcB,
vil_image_view< outP > &  dest,
BinOp  functor 
) [related]

Apply a binary operation to each pixel in srcA and srcB to get dest.

Definition at line 134 of file vil_transform.h.

template<class inA , class inB , class outP , class BinOp >
void vil_transform ( const vil_image_view< inA > &  srcA,
const vil_image_view< inB > &  srcB,
const vil_image_view< outP > &  dest,
BinOp  functor 
) [related]

Apply a binary operation to each pixel in srcA and srcB to get dest.

non-const dest version, assumes dest is already correct size.

Definition at line 151 of file vil_transform.h.

template<class inP , class outP , class Op >
void vil_transform2 ( const vil_image_view< inP > &  src,
vil_image_view< outP > &  dest,
Op  functor 
) [related]

Apply a binary function to each pixel in src and dest that modifies dest.

Parameters:
functorshould take two parameters (inP src, outP &dest);

Definition at line 104 of file vil_transform.h.

template<class T >
vil_image_view< T > vil_transpose ( const vil_image_view< T > &  v) [related]

Create a view which appears as the transpose of this view.

i.e. transpose(i,j,p) = view(j,i,p). O(1).

Definition at line 19 of file vil_transpose.h.

template<class T >
vil_image_view< vcl_complex< T > > vil_view_as_complex ( const vil_image_view< T > &  v) [related]

Return a complex component view of a 2N-plane image.

Returns:
an empty view if it can't do the conversion (e.g. planestep != 1) O(1).
Warning:
This view translation is a slight bodge. The underlying data is a still a component T. This means that consistency check between the view and the underlying data will fail. For example vsl_b_write(os, vil_view_as_complex(img); and vsl_b_read(...) will fail. Simply deep copy the view before checking (or saving) the image to avoid problems.

Definition at line 84 of file vil_view_as.h.

template<class T >
vil_image_view< typename T::value_type > vil_view_as_planes ( const vil_image_view< T > &  v) [related]

Return a 3-plane view of an RGB image, or a 4-plane view of an RGBA, or a 2-plane view of a complex image.

Class T must be a compound pixel type.

Returns:
an empty view if it can't do the conversion. O(1).

Definition at line 26 of file vil_view_as.h.

template<class T >
vil_image_view< vil_rgb< T > > vil_view_as_rgb ( const vil_image_view< T > &  v) [related]

Return an RGB component view of a 3-plane image.

Returns:
an empty view if it can't do the conversion (e.g. planestep != 1) O(1).

Definition at line 47 of file vil_view_as.h.

template<class T >
vil_image_view< vil_rgba< T > > vil_view_as_rgba ( const vil_image_view< T > &  v) [related]

Return an RGBA component view of a 4-plane image.

Returns:
an empty view if it can't do the conversion (e.g. planestep != 1) O(1).

Definition at line 63 of file vil_view_as.h.

template<class T >
vil_image_view< T > vil_view_imag_part ( vil_image_view< vcl_complex< T > >  img) [related]

Return a view of the imaginary part of a complex image.

O(1).

Warning:
This view translation is a slight bodge. The underlying data is a still a scalar complex<T>. This means that consistency check between the view and the underlying data will fail. For example vsl_b_write(os, vil_view_imag_part(img, i); and vsl_b_read(...) will fail. Simply deep copy the view before checking (or saving) the image to avoid problems.

Definition at line 137 of file vil_view_as.h.

template<class T >
vil_image_view< T > vil_view_part ( vil_image_view< vcl_complex< T > >  img,
int  pt 
) [related]

Base function to do the work for both vil_view_real/imag_part.

O(1).

Warning:
This view translation is a slight bodge. The underlying data is a still a scalar complex<T>. This means that consistency check between the view and the underlying data will fail. For example vsl_b_write(os, vil_view_part(img, i); and vsl_b_read(...) will fail. Simply deep copy the view before checking (or saving) the image to avoid problems.

Definition at line 105 of file vil_view_as.h.

template<class T >
vil_image_view< T > vil_view_real_part ( vil_image_view< vcl_complex< T > >  img) [related]

Return a view of the real part of a complex image.

O(1).

Warning:
This view translation is a slight bodge. The underlying data is a still a scalar complex<T>. This means that consistency check between the view and the underlying data will fail. For example vsl_b_write(os, vil_view_real_part(img, i); and vsl_b_read(...) will fail. Simply deep copy the view before checking (or saving) the image to avoid problems.

Definition at line 123 of file vil_view_as.h.

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 
) [related]

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.

template<class T >
void vsl_b_read ( vsl_b_istream &  is,
vil_image_view< T > &  image 
) [related]

Binary load vil_image_view<T> from stream.

Definition at line 40 of file vil_io_image_view.h.

template<class T >
void vsl_b_read ( vsl_b_istream &  is,
vil_image_view< T > *&  p 
) [related]

Binary load vil_image_view<T> from stream onto the heap.

Definition at line 100 of file vil_io_image_view.h.

template<class T >
void vsl_b_write ( vsl_b_ostream &  os,
const vil_image_view< T > &  image 
) [related]

Binary save vil_image_view<T> to stream.

Definition at line 16 of file vil_io_image_view.h.

template<class T >
void vsl_print_summary ( vcl_ostream &  os,
const vil_image_view< T > &  image 
) [related]

Print human readable summary of a vil_image_view<T> object to a stream.

Definition at line 117 of file vil_io_image_view.h.


Member Data Documentation

template<class T>
vcl_ptrdiff_t vil_image_view< T >::istep_ [protected]

Add this to a pixel pointer to move one column left.

Definition at line 48 of file vil_image_view.h.

template<class T>
vcl_ptrdiff_t vil_image_view< T >::jstep_ [protected]

Add this to a pixel pointer to move one row down.

Definition at line 50 of file vil_image_view.h.

unsigned vil_image_view_base::ni_ [protected, inherited]

Number of columns.

Definition at line 31 of file vil_image_view_base.h.

unsigned vil_image_view_base::nj_ [protected, inherited]

Number of rasters.

Definition at line 33 of file vil_image_view_base.h.

unsigned vil_image_view_base::nplanes_ [protected, inherited]

Number of planes.

Definition at line 35 of file vil_image_view_base.h.

template<class T>
vcl_ptrdiff_t vil_image_view< T >::planestep_ [protected]

Add this to a pixel pointer to move one plane back.

Definition at line 52 of file vil_image_view.h.

template<class T>
vil_memory_chunk_sptr vil_image_view< T >::ptr_ [protected]

Reference to actual image data.

Definition at line 55 of file vil_image_view.h.

template<class T>
T* vil_image_view< T >::top_left_ [protected]

Pointer to pixel at origin.

Definition at line 46 of file vil_image_view.h.

template<class T>
vil_image_view< T >::VCL_SAFE_BOOL_DEFINE [private]

Definition at line 43 of file vil_image_view.h.


The documentation for this class was generated from the following files: