Program Listing for File visual-pipeline-brisk.h

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

#ifndef ASLAM_BRISK_PIPELINE_H_
#define ASLAM_BRISK_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 BriskVisualPipeline : public VisualPipeline {
public:
  ASLAM_POINTER_TYPEDEFS(BriskVisualPipeline);
  ASLAM_DISALLOW_EVIL_CONSTRUCTORS(BriskVisualPipeline);

protected:
  BriskVisualPipeline();

public:
  BriskVisualPipeline(const Camera::ConstPtr& camera, bool copy_images, size_t octaves,
                      double uniformity_radius, double absolute_threshold,
                      size_t max_number_of_keypoints, bool rotation_invariant,
                      bool scale_invariant);

  BriskVisualPipeline(std::unique_ptr<Undistorter>& preprocessing, bool copy_images, size_t octaves,
                      double uniformity_radius, double absolute_threshold,
                      size_t max_number_of_keypoints, bool rotation_invariant,
                      bool scale_invariant);

  virtual ~BriskVisualPipeline();

  void initializeBrisk(size_t octaves, double uniformity_radius,
                       double absolute_threshold, size_t max_number_of_keypoints,
                       bool rotation_invariant, bool scale_invariant);

protected:
  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_;
  double uniformity_radius_;
  double absolute_threshold_;
  size_t max_number_of_keypoints_;
  bool rotation_invariant_;
  bool scale_invariant_;
};

}  // namespace aslam

#endif // ASLAM_BRISK_PIPELINE_H_