Skip to content
Snippets Groups Projects
Commit 451aba0a authored by Joan Vallvé Navarro's avatar Joan Vallvé Navarro
Browse files

new processor created

parent d5426d0e
No related branches found
No related tags found
1 merge request!419Resolve "Processor motion model"
Pipeline #6718 passed
This commit is part of merge request !419. Comments created here will be created in the context of that merge request.
/*
* 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_ */
/*
* processor_frame_factor.cpp
*
* Created on: Sep 6, 2021
* Author: joanvallve
*/
#include "../../include/core/processor/processor_frame_factor.h"
namespace wolf
{
ProcessorFrameFactor::ProcessorFrameFactor(ParamsProcessorMotionModelPtr _params) :
params_motion_model_(_params)
{
}
ProcessorFrameFactor::~ProcessorFrameFactor()
{
}
void ProcessorFrameFactor::processKeyFrame(FrameBasePtr _keyframe_ptr, const double& _time_tolerance)
{
// TODO
}
} /* namespace wolf */
// Register in the FactoryProcessor
#include "core/processor/factory_processor.h"
namespace wolf {
WOLF_REGISTER_PROCESSOR(ProcessorFrameFactor);
WOLF_REGISTER_PROCESSOR_AUTO(ProcessorFrameFactor);
} // namespace wolf
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