Functions
contrib/brl/bseg/brip/brip_subpix_convolution.h File Reference

A class to compute subpixel convolutions by using shifted operators. More...

#include <vil/algo/vil_correlate_1d.h>
#include <vil/algo/vil_correlate_2d.h>
#include <vil/vil_transpose.h>
#include <vgl/vgl_point_2d.h>

Go to the source code of this file.

Functions

template<class srcT , class destT , class kernelT , class accumT >
void brip_subpix_convolve_2d (const vil_image_view< srcT > &src_im, vil_image_view< destT > &dest_im, kernelT kernel, accumT ac, int N)
 Convolve an image(src_im) with shifted kernels to compute the value at the subpixel positions.
template<class srcT , class kernelT , class accumT >
void brip_subpix_convolve_2d (const vil_image_view< srcT > &src_im, const vcl_vector< vgl_point_2d< accumT > > &pts, vcl_vector< accumT > &res, kernelT kernel, accumT ac, int)
 Convolve the image with the given kernel at the given subpixel locations (pts) only.
template<class srcT , class kernelT , class accumT >
void brip_subpix_convolve_2d (const vil_image_view< srcT > &src_im, const vcl_vector< vgl_point_2d< accumT > > &pts, const vcl_vector< accumT > &thetas, vcl_vector< accumT > &res, kernelT kernel, accumT ac, int)
 Convolve the image with the given kernel at the given subpixel locations (pts) only at the given orientation.
template<class srcT , class destT , class kernelT , class accumT >
void brip_subpix_convolve_2d_sep (const vil_image_view< srcT > &src_im, vil_image_view< destT > &dest_im, kernelT kernel, accumT ac, int N)
 Convolve an image(src_im) with shifted kernels to compute the value at the subpixel positions.

Detailed Description

A class to compute subpixel convolutions by using shifted operators.

Author:
Amir Tamrakar
Date:
9 Sept 2006
    Modifications
     <none yet>
   

Definition in file brip_subpix_convolution.h.


Function Documentation

template<class srcT , class destT , class kernelT , class accumT >
void brip_subpix_convolve_2d ( const vil_image_view< srcT > &  src_im,
vil_image_view< destT > &  dest_im,
kernelT  kernel,
accumT  ac,
int  N 
) [inline]

Convolve an image(src_im) with shifted kernels to compute the value at the subpixel positions.

The subpixel values are computed at 1/2^N intervals in each dimension. e.g., N=0: regular convolution, N=1: compute at mid-pixel locations, N=2: compute at quarter pixel locations

I'm using vil_correlate_2d_at_pt to evaluate the dot_product at pixel/subpixel locations dest_im is resized to [2^N*src_im.ni() x 2^N*src_im.nj()]

Definition at line 28 of file brip_subpix_convolution.h.

template<class srcT , class kernelT , class accumT >
void brip_subpix_convolve_2d ( const vil_image_view< srcT > &  src_im,
const vcl_vector< vgl_point_2d< accumT > > &  pts,
vcl_vector< accumT > &  res,
kernelT  kernel,
accumT  ac,
int   
) [inline]

Convolve the image with the given kernel at the given subpixel locations (pts) only.

Definition at line 93 of file brip_subpix_convolution.h.

template<class srcT , class kernelT , class accumT >
void brip_subpix_convolve_2d ( const vil_image_view< srcT > &  src_im,
const vcl_vector< vgl_point_2d< accumT > > &  pts,
const vcl_vector< accumT > &  thetas,
vcl_vector< accumT > &  res,
kernelT  kernel,
accumT  ac,
int   
) [inline]

Convolve the image with the given kernel at the given subpixel locations (pts) only at the given orientation.

Definition at line 139 of file brip_subpix_convolution.h.

template<class srcT , class destT , class kernelT , class accumT >
void brip_subpix_convolve_2d_sep ( const vil_image_view< srcT > &  src_im,
vil_image_view< destT > &  dest_im,
kernelT  kernel,
accumT  ac,
int  N 
) [inline]

Convolve an image(src_im) with shifted kernels to compute the value at the subpixel positions.

The subpixel values are computed at 1/2^N intervals in each dimension. e.g., N=0: regular convolution, N=1: compute at mid-pixel locations, N=2: compute at quarter pixel locations

To speed up the convolution, I'm performing 2 independent convolutions with 1-d kernels. dest_im is resized to [2^N*src_im.ni() x 2^N*src_im.nj()]

Definition at line 192 of file brip_subpix_convolution.h.