Autonomy Software C++ 24.5.1
Welcome to the Autonomy Software repository of the Mars Rover Design Team (MRDT) at Missouri University of Science and Technology (Missouri S&T)! API reference contains the source code and other resources for the development of the autonomy software for our Mars rover. The Autonomy Software project aims to compete in the University Rover Challenge (URC) by demonstrating advanced autonomous capabilities and robust navigation algorithms.
Loading...
Searching...
No Matches
TagGenerator.hpp File Reference

Defines the OpenCV ArUco Generator. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void GenerateOpenCVArucoMarker (cv::aruco::PredefinedDictionaryType eDictionary, unsigned short sMarker)
 Generate an ArUco Tag.
 

Detailed Description

Defines the OpenCV ArUco Generator.

Author
Eli Byrd (edbgk.nosp@m.k@ms.nosp@m.t.edu), ClayJay3 (clayt.nosp@m.onra.nosp@m.ycowe.nosp@m.n@gm.nosp@m.ail.c.nosp@m.om)
Date
2023-07-09

Function Documentation

◆ GenerateOpenCVArucoMarker()

void GenerateOpenCVArucoMarker ( cv::aruco::PredefinedDictionaryType  eDictionary,
unsigned short  sMarker 
)

Generate an ArUco Tag.

Parameters
eDictionary- The OpenCV Dictonary to pull from
sMarker- The id of the marker to generate
Author
Eli Byrd (edbgk.nosp@m.k@ms.nosp@m.t.edu), ClayJay3 (clayt.nosp@m.onra.nosp@m.ycowe.nosp@m.n@gm.nosp@m.ail.c.nosp@m.om)
Date
2023-07-09
26{
27 switch (eDictionary)
28 {
33 if (sMarker > 49)
34 {
35 return;
36 }
37 break;
42 if (sMarker > 99)
43 {
44 return;
45 }
46 break;
51 if (sMarker > 249)
52 {
53 return;
54 }
55 break;
60 if (sMarker > 999)
61 {
62 return;
63 }
64 break;
65 default: break;
66 }
67
68 std::string szMarkerFilename = "marker";
69 szMarkerFilename += std::to_string(eDictionary);
70 szMarkerFilename += "_";
71 szMarkerFilename += std::to_string(sMarker);
72 szMarkerFilename += ".png";
73
74 cv::Mat cvMarkerImage;
76 cv::aruco::generateImageMarker(cvDictionary, sMarker, 200, cvMarkerImage, 1);
77 cv::imwrite(szMarkerFilename.c_str(), cvMarkerImage);
78}
bool imwrite(const String &filename, InputArray img, const std::vector< int > &params=std::vector< int >())
void generateImageMarker(const Dictionary &dictionary, int id, int sidePixels, OutputArray img, int borderBits=1)
Dictionary getPredefinedDictionary(PredefinedDictionaryType name)
Here is the call graph for this function:
Here is the caller graph for this function: