Implementation of mutual information based on B-splines. More...
#include <mia/core/splineparzenmi.hh>
Public Member Functions | |
CSplineParzenMI (size_t rbins, PSplineKernel rkernel, size_t mbins, PSplineKernel mkernel, double cut_histogram) | |
template<typename MovIterator , typename RefIterator > | |
void | fill (MovIterator mov_begin, MovIterator mov_end, RefIterator ref_begin, RefIterator ref_end) |
template<typename MovIterator , typename RefIterator , typename MaskIterator > | |
void | fill (MovIterator mov_begin, MovIterator mov_end, RefIterator ref_begin, RefIterator ref_end, MaskIterator mask_begin, MaskIterator mask_end) |
double | get_gradient (double moving, double reference) const |
double | get_gradient_slow (double moving, double reference) const |
void | reset () |
double | value () const |
Protected Member Functions | |
void | fill_histograms (const std::vector< double > &values, double rmin, double rmax, double mmin, double mmax) |
Implementation of mutual information based on B-splines.
This class implements a spline parzen windows based evaluation of the mutual information between two images and its gradient w.r.t. to one image.
For details see P. Thévenaz, M. Unser, "Optimization of Mutual Information for Multiresolution Image Registration," IEEE Tran on Img Proc, vol. 9, no. 12, pp. 2083-2099, December 2000.
Definition at line 44 of file splineparzenmi.hh.
CSplineParzenMI::CSplineParzenMI | ( | size_t | rbins, |
PSplineKernel | rkernel, | ||
size_t | mbins, | ||
PSplineKernel | mkernel, | ||
double | cut_histogram | ||
) |
Constructor of the mutual information class
rbins | number of bins in reference intensity range |
rkernel | B-spline kernel for filling and evaluating reference intensities |
mbins | number of bins in moving intensity range |
mkernel | B-spline kernel for filling and evaluating moving intensities |
cut_histogram | the percentage of the histogram to clamp at the lower and upper end in order to eliminate outliers [0, 40] |
void CSplineParzenMI::fill | ( | MovIterator | mov_begin, |
MovIterator | mov_end, | ||
RefIterator | ref_begin, | ||
RefIterator | ref_end | ||
) |
Fill the histogram structures and caches
MovIterator | forward iterator type for moving image |
RefIterator | forward iterator type for reference image |
mov_begin | begin of moving image range |
mov_end | end of moving image range |
ref_begin | begin of reference image range |
ref_end | end of reference image range |
Definition at line 178 of file splineparzenmi.hh.
References cvdebug().
void CSplineParzenMI::fill | ( | MovIterator | mov_begin, |
MovIterator | mov_end, | ||
RefIterator | ref_begin, | ||
RefIterator | ref_end, | ||
MaskIterator | mask_begin, | ||
MaskIterator | mask_end | ||
) |
Fill the histogram structures and caches by using a mask
MovIterator | forward iterator type for moving image |
RefIterator | forward iterator type for reference image |
mov_begin | begin of moving image range |
mov_end | end of moving image range |
ref_begin | begin of reference image range |
ref_end | end of reference image range |
mask_begin | begin of mask image range |
mask_end | end of mask image range |
Definition at line 247 of file splineparzenmi.hh.
References cvdebug(), cvinfo(), THistogram< Feeder >::get_reduced_range(), NS_MIA_END, THistogram< Feeder >::push(), and THistogram< Feeder >::push_range().
|
protected |
these function is for test purpouses only
double CSplineParzenMI::get_gradient | ( | double | moving, |
double | reference | ||
) | const |
Evaluate the gradient of the MI with respect to a given intensity pair using an approximation
moving | intensity in the moving image |
reference | intensity in the moving image |
double CSplineParzenMI::get_gradient_slow | ( | double | moving, |
double | reference | ||
) | const |
Evaluate the gradient of the MI with respect to a given intensity pair
moving | intensity in the moving image |
reference | intensity in the moving image |
void CSplineParzenMI::reset | ( | ) |
reset the ranges to force a new evaluation
double CSplineParzenMI::value | ( | ) | const |