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

Move selectPack() to ProcessorBase

parent 1005e6ae
No related branches found
No related tags found
1 merge request!157Kfpackmanager
...@@ -74,6 +74,16 @@ void ProcessorBase::remove() ...@@ -74,6 +74,16 @@ void ProcessorBase::remove()
} }
} }
KFPackPtr ProcessorBase::selectPack(const CaptureBasePtr & _cap)
{
if (_cap)
return kf_pack_buffer_.selectPack(_cap->getTimeStamp(), time_tolerance_);
return nullptr;
}
///////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////
void KFPackBuffer::removeUpTo(const TimeStamp& _time_stamp) void KFPackBuffer::removeUpTo(const TimeStamp& _time_stamp)
...@@ -147,4 +157,6 @@ bool KFPackBuffer::checkTimeTolerance(const TimeStamp& _time_stamp1, const Scala ...@@ -147,4 +157,6 @@ bool KFPackBuffer::checkTimeTolerance(const TimeStamp& _time_stamp1, const Scala
return (std::fabs(_time_stamp1 - _time_stamp2) <= std::min(_time_tolerance1, _time_tolerance2)); return (std::fabs(_time_stamp1 - _time_stamp2) <= std::min(_time_tolerance1, _time_tolerance2));
} }
} // namespace wolf } // namespace wolf
...@@ -174,6 +174,10 @@ class ProcessorBase : public NodeBase, public std::enable_shared_from_this<Proce ...@@ -174,6 +174,10 @@ class ProcessorBase : public NodeBase, public std::enable_shared_from_this<Proce
void setTimeTolerance(Scalar _time_tolerance); void setTimeTolerance(Scalar _time_tolerance);
protected:
KFPackPtr selectPack(const CaptureBasePtr & _cap);
}; };
} }
......
...@@ -203,14 +203,6 @@ void ProcessorTracker::setKeyFrame(CaptureBasePtr _capture_ptr) ...@@ -203,14 +203,6 @@ void ProcessorTracker::setKeyFrame(CaptureBasePtr _capture_ptr)
} }
} }
KFPackPtr ProcessorTracker::selectPack(const CaptureBasePtr & _cap)
{
if (_cap)
return kf_pack_buffer_.selectPack(_cap->getTimeStamp(), time_tolerance_);
return nullptr;
}
void ProcessorTracker::computeProcessingStep() void ProcessorTracker::computeProcessingStep()
{ {
// First determine the processing phase by checking the status of the tracker pointers // First determine the processing phase by checking the status of the tracker pointers
......
...@@ -209,8 +209,6 @@ class ProcessorTracker : public ProcessorBase ...@@ -209,8 +209,6 @@ class ProcessorTracker : public ProcessorBase
void addNewFeatureIncoming(FeatureBasePtr _feature_ptr); void addNewFeatureIncoming(FeatureBasePtr _feature_ptr);
private:
KFPackPtr selectPack(const CaptureBasePtr & _cap);
}; };
inline void ProcessorTracker::setMaxNewFeatures(const unsigned int& _max_new_features) inline void ProcessorTracker::setMaxNewFeatures(const unsigned int& _max_new_features)
......
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