Skip to content
Snippets Groups Projects

Resolve "Processor motion model"

Merged Joan Vallvé Navarro requested to merge 407-processor-motion-model into devel
2 files
+ 116
0
Compare changes
  • Side-by-side
  • Inline
Files
2
/*
* processor_frame_factor.h
*
* Created on: Sep 6, 2021
* Author: joanvallve
*/
#ifndef INCLUDE_CORE_PROCESSOR_PROCESSOR_FRAME_FACTOR_H_
#define INCLUDE_CORE_PROCESSOR_PROCESSOR_FRAME_FACTOR_H_
#include "core/processor/processor_base.h"
namespace wolf
{
WOLF_STRUCT_PTR_TYPEDEFS(ParamsProcessorFrameFactor);
struct ParamsProcessorFrameFactor : public ParamsProcessorBase
{
ParamsProcessorFrameFactor() = default;
ParamsProcessorFrameFactor(std::string _unique_name, const wolf::ParamsServer & _server) :
ParamsProcessorBase(_unique_name, _server)
{
}
std::string print() const override
{
return ParamsProcessorBase::print();
}
};
WOLF_PTR_TYPEDEFS(ProcessorFrameFactor);
class ProcessorFrameFactor : public ProcessorBase
{
public:
ProcessorFrameFactor(ParamsProcessorMotionModelPtr);
// Factory method for high level API
WOLF_PROCESSOR_CREATE(ProcessorFrameFactor, ParamsProcessorFrameFactor);
virtual ~ProcessorFrameFactor() override;
void configure(SensorBasePtr _sensor) override {};
protected:
/** \brief process an incoming capture NEVER CALLED
*/
virtual void processCapture(CaptureBasePtr) override {};
/** \brief process an incoming key-frame: applies the motion model between consecutive keyframes
*/
virtual void processKeyFrame(FrameBasePtr _keyframe_ptr, const double& _time_tolerance) override;
/** \brief trigger in capture
*/
virtual bool triggerInCapture(CaptureBasePtr) const override {return false;};
/** \brief trigger in key-frame
*/
virtual bool triggerInKeyFrame(FrameBasePtr _keyframe_ptr, const double& _time_tolerance) const override {return true;};
/** \brief store key frame
*/
virtual bool storeKeyFrame(FrameBasePtr) override {return false;};
/** \brief store capture
*/
virtual bool storeCapture(CaptureBasePtr) override {return false;};
/** \brief Vote for KeyFrame generation
*/
virtual bool voteForKeyFrame() const override {return false;};
// ATTRIBUTES
ParamsProcessorFrameFactorPtr params_processor_;
};
} /* namespace wolf */
#endif /* INCLUDE_CORE_PROCESSOR_PROCESSOR_FRAME_FACTOR_H_ */
Loading