Resurgence (PY2022)
Codebase for the Husky Robotics 2021-2022 rover Resurgence
Loading...
Searching...
No Matches
Detector.h
1#pragma once
2
3#include "../camera/CameraParams.h"
4#include "MarkerSet.h"
5#include "Tag.h"
6
7#include <memory>
8#include <vector>
9
10#include <opencv2/aruco.hpp>
11#include <opencv2/core.hpp>
12
13namespace AR {
14
19class Detector {
20private:
22 cam::CameraParams camera_params_;
24 cv::Mat map1_, map2_;
25 std::vector<Tag> _detectTagsImpl(const cv::Mat& input,
27 bool undistort);
28
29public:
30 Detector();
31 Detector(std::shared_ptr<MarkerSet> marker_set, cam::CameraParams camera_params,
34 std::vector<Tag> detectTags(const cv::Mat& input,
35 std::vector<std::vector<cv::Point2f>>& rejected_points,
36 bool undistort = true);
37 std::vector<Tag> detectTags(const cv::Mat& input, bool undistort = true);
38 cv::aruco::DetectorParameters getDetectorParams();
39 void setDetectorParams(cv::aruco::DetectorParameters params);
40 bool empty() const;
41};
42
43
44} // namespace AR
Represents a set of intrinsic camera parameters.
Definition CameraParams.h:60
void undistort(InputArray src, OutputArray dst, InputArray cameraMatrix, InputArray distCoeffs, InputArray newCameraMatrix=noArray())
std::shared_ptr< _Tp > Ptr
static Ptr< DetectorParameters > create()