Program Listing for File visual-pipeline-freak.h

Return to documentation for file (aslam_cv2/aslam_cv_pipeline/include/aslam/pipeline/visual-pipeline-freak.h)

#ifndef ASLAM_FREAK_PIPELINE_H_
#define ASLAM_FREAK_PIPELINE_H_

#include <aslam/pipeline/visual-pipeline.h>
#include <aslam/pipeline/visual-pipeline-null.h>

namespace cv {
class Feature2D;
}  // namespace cv

namespace aslam {

class Undistorter;

class FreakVisualPipeline : public VisualPipeline {
public:
  ASLAM_POINTER_TYPEDEFS(FreakVisualPipeline);
  ASLAM_DISALLOW_EVIL_CONSTRUCTORS(FreakVisualPipeline);

protected:
  FreakVisualPipeline();

public:
  FreakVisualPipeline(const Camera::ConstPtr& camera, bool copy_images,
                      size_t num_octaves, int hessian_threshold,
                      int num_octave_layers, bool rotation_invariant,
                      bool scale_invariant, float pattern_scale);

  FreakVisualPipeline(std::unique_ptr<Undistorter>& preprocessing,
                      bool copy_images, size_t num_octaves,
                      int hessian_threshold, int num_octave_layers,
                      bool rotation_invariant, bool scale_invariant,
                      float pattern_scale);

  virtual ~FreakVisualPipeline();

  void initializeFreak(size_t num_octaves, int hessian_threshold,
                       int num_octave_layers, bool rotation_invariant,
                       bool scale_invariant, float pattern_scale);


  virtual void processFrameImpl(const cv::Mat& image,
                                VisualFrame* frame) const;
private:
  std::shared_ptr<cv::Feature2D> detector_;
  std::shared_ptr<cv::Feature2D> extractor_;

  size_t octaves_;
  int hessian_threshold_;
  int num_octave_layers_;
  bool rotation_invariant_;
  bool scale_invariant_;
  float pattern_scale_;
};

}  // namespace aslam

#endif // ASLAM_FREAK_PIPELINE_H_