Newer
Older
PrismSoftware / ECTrainer2 / Marker.h
#pragma once

#include "myOpenCV.h"
#include <vector>

class Marker
{
	const cv::Point2f MARGIN = cv::Size2f(0.05F, 0.05F);
	const float OUTER_MARGIN = 0.01F;
	const float HEIGHT = 0.1F;

	std::vector<std::vector<cv::Point2f>> _Corners;
	cv::Ptr<cv::aruco::Dictionary> _Dictionary;
	int _Size;
	cv::Mat _Homography;

public:
	Marker();
	void Generate(cv::Size imgsize);
	void DrawMarker(cv::Mat& img);
	bool Detect(cv::Mat& img);
};