Program Listing for File markerlabeler.h

Return to documentation for file (/tmp/ws/src/aruco_ros/aruco/include/aruco/markerlabeler.h)

#ifndef _aruco_MarkerLabeler_
#define _aruco_MarkerLabeler_

#include "aruco_export.h"
#include "dictionary.h"
#include <opencv2/core/core.hpp>

namespace aruco
{
class Marker;
class ARUCO_EXPORT MarkerLabeler
{
public:
  static cv::Ptr<MarkerLabeler> create(Dictionary::DICT_TYPES dict_type,
                                       float error_correction_rate = 0);

  static cv::Ptr<MarkerLabeler> create(std::string detector, std::string params = "");

  virtual bool detect(const cv::Mat& in, int& marker_id, int& nRotations,
                      std::string& additionalInfo) = 0;
  virtual int getBestInputSize()
  {
    return -1;
  }

  virtual int getNSubdivisions() const
  {
    return -1;
  }

  // returns an string that describes the labeler and can be used to create it
  virtual std::string getName() const = 0;
  virtual ~MarkerLabeler()
  {
  }
};
};  // namespace aruco
#endif