Home || Visual Search || Applications || Architecture || Important Messages || OGL || Src

void Impala::Core::Array::Trait::FuncKalman::UpdateKalman (  )  [inline]

this function does reestimation of the sigmas using the residual

Definition at line 176 of file FunctorKalman.h.

References ComputeResiduals(), InitialiseSigma(), mBeta, mGamma, mInitialised, mOcclusion, mOutliers, mPixelCount, mResidualAvrg, mResidualThisFrame, mSigmaG, mSigmaI, and mSigmaW.

00177     {
00178         //eq.14
00179         mResidualThisFrame /= mPixelCount;
00180         mResidualThisFrame *= mBeta;
00181         if(mResidualThisFrame == 0)
00182             mResidualThisFrame = 1; 
00183 
00184         if(mPixelCount * mGamma > mOutliers) // if no occlusion
00185         {
00186             mOcclusion = false;
00187             ComputeResiduals();
00188             if(!mInitialised)
00189                 InitialiseSigma();
00190             //eq.11
00191             mSigmaG = (mSigmaG*mSigmaI)/(mSigmaG+mSigmaI);
00192             //eq.15
00193             mSigmaW = mResidualAvrg - mSigmaI - mSigmaG;
00194             // following found in Hieus code, makes some sense, but only because the
00195             // assumption about residual and sigmas are incorrect (I can't define them, sorry)
00196             if(mSigmaW<0)
00197                 mSigmaW = 0;
00198             //eq.9 (prediction of sigmaG for the next time step)
00199             mSigmaG += mSigmaW;
00200         }
00201         else
00202         {
00203             if(!mOcclusion)
00204             {
00205                 //undo prediction of sigmaG (eq.9) (only if the last time sigmaG was predicted)
00206                 mSigmaG -= mSigmaW;
00207             }
00208             mOcclusion = true;
00209         }
00210         mPixelCount = 0;
00211         mOutliers = 0;
00212     }

Here is the call graph for this function:


Generated on Thu Jan 13 09:18:44 2011 for ImpalaSrc by  doxygen 1.5.1