Skip to content
Snippets Groups Projects
Commit fde7de68 authored by Joan Solà Ortega's avatar Joan Solà Ortega
Browse files

Add some documentation

parent 58408b26
No related branches found
No related tags found
1 merge request!317Motion cleanup
......@@ -92,6 +92,31 @@ void ProcessorMotion::processCapture(CaptureBasePtr _incoming_ptr)
case RUNNING_WITH_PACK_BEFORE_ORIGIN :
{
/*
* Legend:
* * : any frame or keyframe
* x : any capture
* k : arriving keyframe
* o : origin capture
* l : last capture
* e : existing capture -> new KF splits its buffer in two parts
* n : new capture -> part of the split buffer will be given to this
* --- : buffer history
*
* Trajectory before the KF, and arriving KF 'k'
*
* k
* * ========= * === ... === * ========= *
* x ----------e ... ----o ----------l
*
* Trajectory after the KF, and arriving KF 'k'
*
* k
* * === * === * === ... === * ========= *
* x ----n ----e ... ----o ----------l
*/
// extract pack elements
FrameBasePtr keyframe_from_callback = pack->key_frame;
TimeStamp ts_from_callback = keyframe_from_callback->getTimeStamp();
......@@ -147,6 +172,35 @@ void ProcessorMotion::processCapture(CaptureBasePtr _incoming_ptr)
case RUNNING_WITH_PACK_AFTER_ORIGIN :
{
/*
* Legend:
* * : any frame or keyframe
* x : any capture
* k : arriving keyframe
* o : origin capture
* l : last capture -> new KF splits its buffer in two parts
* n : new capture -> part of the split buffer will be given to this
* --- : buffer history
*
* Trajectory before the KF, and arriving KF 'k'
*
* k
* * ========= * ========= *
* x ----------o ----------l
*
* Trajectory after the KF, and arriving KF 'k'
*
* k
* * ========= * === * === *
* x ----------o ----n ----l
*
* Trajectory after the KF, and after reset
*
* k
* * ========= * === * === *
* x ----------x ----o ----l
*/
// extract pack elements
FrameBasePtr keyframe_from_callback = pack->key_frame;
TimeStamp ts_from_callback = keyframe_from_callback->getTimeStamp();
......@@ -200,6 +254,31 @@ void ProcessorMotion::processCapture(CaptureBasePtr _incoming_ptr)
if (permittedKeyFrame() && voteForKeyFrame())
{
/*
* Legend:
* * : any keyframe
* + : last frame
* x : any capture
* o : origin capture
* l : last capture
* i : incoming capture
* e : existing capture -> new KF splits its buffer in two parts
* n : new capture -> part of the split buffer will be given to this
* --- : buffer history
*
* Trajectory before the KF
*
* * ========= * ========= +
* x ----------o ----------l i
*
* Trajectory after creating KF at last and reset
*
* * ========= * ========= * = +
* x ----------x ----------o --l
*
*/
// Set the frame of last_ptr as key
auto key_frame_ptr = last_ptr_->getFrame();
key_frame_ptr->setKey();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment