diff options
author | Martin Miller | 2017-04-11 10:57:04 -0500 |
---|---|---|
committer | Martin Miller | 2017-04-11 10:57:04 -0500 |
commit | 1c543489862cd0bf9c559cee6575baf20f84b2d0 (patch) | |
tree | d968bf97d9d6a6bd444fd97b24054f720456c84f /src/feature.cpp | |
parent | 16972c736994fa49b04d1e967516278660e4be2d (diff) | |
download | refslam-1c543489862cd0bf9c559cee6575baf20f84b2d0.zip refslam-1c543489862cd0bf9c559cee6575baf20f84b2d0.tar.gz |
Remove features after 5 timesteps without measurements
Diffstat (limited to 'src/feature.cpp')
-rw-r--r-- | src/feature.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/feature.cpp b/src/feature.cpp index fbb1376..84575d1 100644 --- a/src/feature.cpp +++ b/src/feature.cpp @@ -36,6 +36,7 @@ Feature::Feature ( int id, const Vector3d &xs, const Vector3d &xr, xb0w = xbw; q0 = q; _patch = p; + lastseen = 0; } /* ----- end of method Feature::Feature (constructor) ----- */ /* @@ -61,6 +62,7 @@ Feature::Feature ( int id, const Vector3d &xs, const Vector3d &xbw, xb0w = xbw; q0 = q; _patch = p; + lastseen = 0; } @@ -1023,6 +1025,7 @@ Feature::sane ( ) void Feature::dx ( const Vector3d &del ) { + lastseen += 1; X += del; return ; } /* ----- end of method Feature::dx ----- */ @@ -1131,3 +1134,16 @@ Feature::reflectedPatch( const Camera &cam, const Quaterniond &q1 ) return cam.reflectPatch(_patch, q0, q1); } +void +Feature::seen ( ) +{ + lastseen = 0; + return ; +} /* ----- end of method Feature::seen ----- */ + +bool +Feature::since ( int N ) const +{ + return (lastseen<N) ; +} /* ----- end of method Feature::since ----- */ + |