Functions
contrib/mul/mipa/mipa_sample_histo_boxes.h File Reference

Functions to sample blocks of histograms. More...

#include <vil/vil_image_view.h>
#include <vnl/vnl_vector.h>

Go to the source code of this file.

Functions

template<class srcT , class vT >
void mipa_sample_histo_boxes_3L (const vil_image_view< srcT > &h_im, unsigned i0, unsigned j0, vnl_vector< vT > &vec, unsigned ni, unsigned nj)
 Extract data from an image of histograms over nested boxes.
template<class srcT , class vT >
void mipa_sample_histo_boxes_3L_inv (vil_image_view< srcT > &h_im, unsigned i0, unsigned j0, const vnl_vector< vT > &vec, unsigned ni, unsigned nj)
 Performs inverse transform mapping from the sample vector back to a hist image.

Detailed Description

Functions to sample blocks of histograms.

Author:
Tim Cootes

Definition in file mipa_sample_histo_boxes.h.


Function Documentation

template<class srcT , class vT >
void mipa_sample_histo_boxes_3L ( const vil_image_view< srcT > &  h_im,
unsigned  i0,
unsigned  j0,
vnl_vector< vT > &  vec,
unsigned  ni,
unsigned  nj 
)

Extract data from an image of histograms over nested boxes.

Assume h_im(i,j,A) gives frequency stored in angle bin A for (i,j)th histogram, organised so that h_im.planestep()=1 This copies the individual histograms from a rectangular region of the image with corner (i0,j0).

It samples a grid of 2ni x 2nj histos, ie h_im([i0,i0+2ni),[j0,j0+2nj)).

The first 4*nA*ni*nj elements of v are copies of the histograms. The next nA*ni*nj elements are a set of pooled histograms, adding the 4 histos in each 2 x 2 block. The final nA elements give a total histogram, adding all the histograms in the region together.

Definition at line 26 of file mipa_sample_histo_boxes.txx.

template<class srcT , class vT >
void mipa_sample_histo_boxes_3L_inv ( vil_image_view< srcT > &  h_im,
unsigned  i0,
unsigned  j0,
const vnl_vector< vT > &  vec,
unsigned  ni,
unsigned  nj 
)

Performs inverse transform mapping from the sample vector back to a hist image.

Note only the first 4*nA*ni*nj elements of v are accessed

Definition at line 81 of file mipa_sample_histo_boxes.txx.