#include <Surprise/SurpriseMapFFT.H>
Public Member Functions | |
SurpriseMapFFT () | |
Constructor; you must call init() before using. | |
void | init (const uint qlen=1, const double updatefac=0.7, const double neighupdatefac=0.7, const double sampleval=0.0, const double samplevar=1.0, const float neighsigma=0.5f, const float locsigma=3.0f, const Point2D< int > &probe=Point2D< int >(-1,-1), const double slfac=1.0, const double ssfac=0.1, const double sfsfac=1.0, const double sfpfac=1.0, const std::string &descrName="blank", const std::string &tagName="blank") |
initialization | |
~SurpriseMapFFT () | |
Virtual destructor ensures proper destruction of derived classes. | |
void | reset () |
Reset to initial state. | |
Image< double > | surprise (const SurpriseImage< T > &sample, const Image< double > &inputI, const Image< double > &var) |
Update by receiving a new sample and sample measurement error. | |
const SurpriseImage< T > & | getSurpriseImage (const uint index) const |
Access to underlying SurpriseImage members: | |
const SurpriseImage< T > & | getSurpriseImageSFFT (const uint i) const |
Access to underlying SurpriseImage members for FFT spectal mag. | |
const SurpriseImage< T > & | getSurpriseImagePFFT (const uint i) const |
Access to underlying SurpriseImage members for FFT phase. | |
void | setFFTModels (const SurpriseImage< T > &models, const Image< float > &weights, const float wmin, std::vector< Image< double > > &sfs, std::vector< Image< double > > &sfp) |
A Surprise Map.
This class contains a SurpriseImage of our current models at each pixel, plus an ImageCache of SurpriseImage objects built to represent the neighborhood distributions.
Definition at line 59 of file SurpriseMapFFT.H.
SurpriseMapFFT< T >::SurpriseMapFFT | ( | ) | [inline] |
Constructor; you must call init() before using.
Definition at line 56 of file SurpriseMapFFT.C.
SurpriseMapFFT< T >::~SurpriseMapFFT | ( | ) | [inline] |
Virtual destructor ensures proper destruction of derived classes.
Definition at line 107 of file SurpriseMapFFT.C.
const SurpriseImage< T > & SurpriseMapFFT< T >::getSurpriseImage | ( | const uint | index | ) | const [inline] |
Access to underlying SurpriseImage members:
Definition at line 322 of file SurpriseMapFFT.C.
References ASSERT.
const SurpriseImage< T > & SurpriseMapFFT< T >::getSurpriseImagePFFT | ( | const uint | i | ) | const [inline] |
Access to underlying SurpriseImage members for FFT phase.
Definition at line 340 of file SurpriseMapFFT.C.
References ASSERT.
const SurpriseImage< T > & SurpriseMapFFT< T >::getSurpriseImageSFFT | ( | const uint | i | ) | const [inline] |
Access to underlying SurpriseImage members for FFT spectal mag.
Definition at line 331 of file SurpriseMapFFT.C.
References ASSERT.
void SurpriseMapFFT< T >::init | ( | const uint | qlen = 1 , |
|
const double | updatefac = 0.7 , |
|||
const double | neighupdatefac = 0.7 , |
|||
const double | sampleval = 0.0 , |
|||
const double | samplevar = 1.0 , |
|||
const float | neighsigma = 0.5f , |
|||
const float | locsigma = 3.0f , |
|||
const Point2D< int > & | probe = Point2D<int>(-1, -1) , |
|||
const double | slfac = 1.0 , |
|||
const double | ssfac = 0.1 , |
|||
const double | sfsfac = 1.0 , |
|||
const double | sfpfac = 1.0 , |
|||
const std::string & | descrName = "blank" , |
|||
const std::string & | tagName = "blank" | |||
) | [inline] |
initialization
qlen | number of maps | |
updatefac | factor by which the current model is combined with a new model on an update. Valid values are in [0..1] | |
neighupdatefac | factor by which local data is combined with neighborhood models, or 0.0 to use the value of updatefac | |
sampleval | the value of the samples previously received. | |
samplevar | a variance expressing the intrinsic variability in the measurement of those samples. | |
neighsigma | sigma to use for the neighborhoods as a fraction of max(map width, map height) | |
locsigma | sigma to use for local neighborhood, in pixels |
Definition at line 66 of file SurpriseMapFFT.C.
References Image< T >::freeMem().
void SurpriseMapFFT< T >::reset | ( | void | ) | [inline] |
Reset to initial state.
Definition at line 112 of file SurpriseMapFFT.C.
Image< double > SurpriseMapFFT< T >::surprise | ( | const SurpriseImage< T > & | sample, | |
const Image< double > & | inputI, | |||
const Image< double > & | var | |||
) | [inline] |
Update by receiving a new sample and sample measurement error.
The returned image is the surprise (combined temporal and spatial for each map, then combined over all maps) resulting from that update
Definition at line 130 of file SurpriseMapFFT.C.
References Image< T >::getDims(), Image< T >::getHeight(), getMinMax(), Image< T >::getWidth(), inplaceRectify(), log(), max(), Image< T >::size(), and ZEROS.