svo
Semi-Direct Visual Odometry
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes
svo::FrameHandlerBase Class Reference

Base class for various VO pipelines. Manages the map and the state machine. More...

#include <frame_handler_base.h>

Inheritance diagram for svo::FrameHandlerBase:
svo::FrameHandlerMono

List of all members.

Public Types

enum  Stage {
  STAGE_PAUSED, STAGE_FIRST_FRAME, STAGE_SECOND_FRAME, STAGE_DEFAULT_FRAME,
  STAGE_RELOCALIZING
}
enum  TrackingQuality { TRACKING_INSUFFICIENT, TRACKING_BAD, TRACKING_GOOD }
enum  UpdateResult { RESULT_NO_KEYFRAME, RESULT_IS_KEYFRAME, RESULT_FAILURE }

Public Member Functions

 FrameHandlerBase ()
virtual ~FrameHandlerBase ()
const Mapmap () const
 Get the current map.
void reset ()
 Will reset the map as soon as the current frame is finished processing.
void start ()
 Start processing.
Stage stage () const
 Get the current stage of the algorithm.
TrackingQuality trackingQuality () const
 Get tracking quality.
double lastProcessingTime () const
 Get the processing time of the previous iteration.
size_t lastNumObservations () const
 Get the number of feature observations of the last frame.

Protected Member Functions

bool startFrameProcessingCommon (const double timestamp)
 Before a frame is processed, this function is called.
int finishFrameProcessingCommon (const size_t update_id, const UpdateResult dropout, const size_t num_observations)
 When a frame is finished processing, this function is called.
void resetCommon ()
 Reset the map and frame handler to start from scratch.
virtual void resetAll ()
 Reset the frame handler. Implement in derived class.
virtual void setTrackingQuality (const size_t num_observations)
 Set the tracking quality based on the number of tracked features.
virtual void optimizeStructure (FramePtr frame, size_t max_n_pts, int max_iter)
 Optimize some of the observed 3D points.

Protected Attributes

Stage stage_
 Current stage of the algorithm.
bool set_reset_
 Flag that the user can set. Will reset the system before the next iteration.
bool set_start_
 Flag the user can set to start the system when the next image is received.
Map map_
 Map of keyframes created by the slam system.
vk::Timer timer_
 Stopwatch to measure time to process frame.
vk::RingBuffer< double > acc_frame_timings_
 Total processing time of the last 10 frames, used to give some user feedback on the performance.
vk::RingBuffer< size_t > acc_num_obs_
 Number of observed features of the last 10 frames, used to give some user feedback on the tracking performance.
size_t num_obs_last_
 Number of observations in the previous frame.
TrackingQuality tracking_quality_
 An estimate of the tracking quality based on the number of tracked features.

Detailed Description

Base class for various VO pipelines. Manages the map and the state machine.


Member Enumeration Documentation

Enumerator:
STAGE_PAUSED 
STAGE_FIRST_FRAME 
STAGE_SECOND_FRAME 
STAGE_DEFAULT_FRAME 
STAGE_RELOCALIZING 
Enumerator:
TRACKING_INSUFFICIENT 
TRACKING_BAD 
TRACKING_GOOD 
Enumerator:
RESULT_NO_KEYFRAME 
RESULT_IS_KEYFRAME 
RESULT_FAILURE 

Constructor & Destructor Documentation


Member Function Documentation

int svo::FrameHandlerBase::finishFrameProcessingCommon ( const size_t  update_id,
const UpdateResult  dropout,
const size_t  num_observations 
) [protected]

When a frame is finished processing, this function is called.

size_t svo::FrameHandlerBase::lastNumObservations ( ) const [inline]

Get the number of feature observations of the last frame.

double svo::FrameHandlerBase::lastProcessingTime ( ) const [inline]

Get the processing time of the previous iteration.

const Map& svo::FrameHandlerBase::map ( ) const [inline]

Get the current map.

virtual void svo::FrameHandlerBase::optimizeStructure ( FramePtr  frame,
size_t  max_n_pts,
int  max_iter 
) [protected, virtual]

Optimize some of the observed 3D points.

void svo::FrameHandlerBase::reset ( ) [inline]

Will reset the map as soon as the current frame is finished processing.

virtual void svo::FrameHandlerBase::resetAll ( ) [inline, protected, virtual]

Reset the frame handler. Implement in derived class.

Reimplemented in svo::FrameHandlerMono.

void svo::FrameHandlerBase::resetCommon ( ) [protected]

Reset the map and frame handler to start from scratch.

virtual void svo::FrameHandlerBase::setTrackingQuality ( const size_t  num_observations) [protected, virtual]

Set the tracking quality based on the number of tracked features.

Stage svo::FrameHandlerBase::stage ( ) const [inline]

Get the current stage of the algorithm.

void svo::FrameHandlerBase::start ( ) [inline]

Start processing.

bool svo::FrameHandlerBase::startFrameProcessingCommon ( const double  timestamp) [protected]

Before a frame is processed, this function is called.

Get tracking quality.


Member Data Documentation

vk::RingBuffer<double> svo::FrameHandlerBase::acc_frame_timings_ [protected]

Total processing time of the last 10 frames, used to give some user feedback on the performance.

vk::RingBuffer<size_t> svo::FrameHandlerBase::acc_num_obs_ [protected]

Number of observed features of the last 10 frames, used to give some user feedback on the tracking performance.

Map of keyframes created by the slam system.

Number of observations in the previous frame.

Flag that the user can set. Will reset the system before the next iteration.

Flag the user can set to start the system when the next image is received.

Current stage of the algorithm.

vk::Timer svo::FrameHandlerBase::timer_ [protected]

Stopwatch to measure time to process frame.

An estimate of the tracking quality based on the number of tracked features.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines