Functions to sample blocks of histograms. More...
Go to the source code of this file.
Defines | |
#define | mipa_sample_histo_boxes_txx_ |
#define | MIPA_SAMPLE_HISTO_BOXES_INSTANTIATE(srcT, vT) |
#define | MIPA_SAMPLE_HISTO_BOXES_INV_INSTANTIATE(srcT, vT) |
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. |
Functions to sample blocks of histograms.
Definition in file mipa_sample_histo_boxes.txx.
#define MIPA_SAMPLE_HISTO_BOXES_INSTANTIATE | ( | srcT, | |
vT | |||
) |
template 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)
Definition at line 122 of file mipa_sample_histo_boxes.txx.
#define MIPA_SAMPLE_HISTO_BOXES_INV_INSTANTIATE | ( | srcT, | |
vT | |||
) |
template 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)
Definition at line 129 of file mipa_sample_histo_boxes.txx.
#define mipa_sample_histo_boxes_txx_ |
Definition at line 2 of file mipa_sample_histo_boxes.txx.
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.
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.