EstervQrCode 1.1.1
Library for qr code manipulation
aruco_dictionary.hpp
1 // This file is part of OpenCV project.
2 // It is subject to the license terms in the LICENSE file found in the top-level directory
3 // of this distribution and at http://opencv.org/license.html
4 #ifndef OPENCV_OBJDETECT_DICTIONARY_HPP
5 #define OPENCV_OBJDETECT_DICTIONARY_HPP
6 
7 #include <opencv2/core.hpp>
8 
9 namespace cv {
10 namespace aruco {
11 
14 
15 
30 
31  public:
35 
37 
44  CV_WRAP Dictionary(const Mat &bytesList, int _markerSize, int maxcorr = 0);
45 
57 
60  CV_WRAP void writeDictionary(FileStorage& fs, const String& name = String());
61 
66  CV_WRAP bool identify(const Mat &onlyBits, CV_OUT int &idx, CV_OUT int &rotation, double maxCorrectionRate) const;
67 
72  CV_WRAP int getDistanceToId(InputArray bits, int id, bool allRotations = true) const;
73 
74 
77  CV_WRAP void generateImageMarker(int id, int sidePixels, OutputArray _img, int borderBits = 1) const;
78 
79 
82  CV_WRAP static Mat getByteListFromBits(const Mat &bits);
83 
84 
87  CV_WRAP static Mat getBitsFromByteList(const Mat &byteList, int markerSize);
88 };
89 
90 
91 
92 
122 };
123 
124 
128 
129 
133 
146 CV_EXPORTS_W Dictionary extendDictionary(int nMarkers, int markerSize, const Dictionary &baseDictionary = Dictionary(),
147  int randomSeed=0);
148 
149 
150 
152 }
153 }
154 
155 #endif
File Storage Node class.
Definition: persistence.hpp:482
XML/YAML/JSON file storage class that encapsulates all the information necessary for writing or readi...
Definition: persistence.hpp:304
n-dimensional dense array class
Definition: mat.hpp:812
This type is very similar to InputArray except that it is used for input/output and output function p...
Definition: mat.hpp:296
Dictionary is a set of unique ArUco markers of the same size.
Definition: aruco_dictionary.hpp:29
CV_WRAP bool readDictionary(const cv::FileNode &fn)
Read a new dictionary from FileNode.
CV_WRAP Dictionary(const Mat &bytesList, int _markerSize, int maxcorr=0)
Basic ArUco dictionary constructor.
CV_WRAP void writeDictionary(FileStorage &fs, const String &name=String())
Write a dictionary to FileStorage, format is the same as in readDictionary().
CV_WRAP int getDistanceToId(InputArray bits, int id, bool allRotations=true) const
Returns Hamming distance of the input bits to the specific id.
static CV_WRAP Mat getBitsFromByteList(const Mat &byteList, int markerSize)
Transform list of bytes to matrix of bits.
static CV_WRAP Mat getByteListFromBits(const Mat &bits)
Transform matrix of bits to list of bytes with 4 marker rotations.
CV_WRAP bool identify(const Mat &onlyBits, CV_OUT int &idx, CV_OUT int &rotation, double maxCorrectionRate) const
Given a matrix of bits. Returns whether if marker is identified or not.
CV_PROP_RW int markerSize
number of bits per dimension
Definition: aruco_dictionary.hpp:33
CV_PROP_RW int maxCorrectionBits
maximum number of bits that can be corrected
Definition: aruco_dictionary.hpp:34
CV_WRAP void generateImageMarker(int id, int sidePixels, OutputArray _img, int borderBits=1) const
Generate a canonical marker image.
CV_PROP_RW Mat bytesList
marker code information. See class description for more details
Definition: aruco_dictionary.hpp:32
std::string String
Definition: cvstd.hpp:151
CV__DEBUG_NS_END typedef const _InputArray & InputArray
Definition: mat.hpp:442
const int * idx
Definition: core_c.h:668
#define CV_EXPORTS_W_SIMPLE
Definition: cvdef.h:473
#define CV_EXPORTS
Definition: cvdef.h:435
#define CV_OUT
Definition: cvdef.h:478
#define CV_EXPORTS_W
Definition: cvdef.h:472
#define CV_PROP_RW
Definition: cvdef.h:480
#define CV_WRAP
Definition: cvdef.h:481
PredefinedDictionaryType
Predefined markers dictionaries/sets.
Definition: aruco_dictionary.hpp:99
CV_EXPORTS Dictionary getPredefinedDictionary(PredefinedDictionaryType name)
Returns one of the predefined dictionaries defined in PredefinedDictionaryType.
CV_EXPORTS_W Dictionary extendDictionary(int nMarkers, int markerSize, const Dictionary &baseDictionary=Dictionary(), int randomSeed=0)
Extend base dictionary by new nMarkers.
@ DICT_6X6_100
6x6 bits, minimum hamming distance between any two codes = 12, 100 codes
Definition: aruco_dictionary.hpp:109
@ DICT_ARUCO_MIP_36h12
6x6 bits, minimum hamming distance between any two codes = 12, 250 codes
Definition: aruco_dictionary.hpp:121
@ DICT_5X5_50
5x5 bits, minimum hamming distance between any two codes = 8, 50 codes
Definition: aruco_dictionary.hpp:104
@ DICT_4X4_1000
4x4 bits, minimum hamming distance between any two codes = 2, 1000 codes
Definition: aruco_dictionary.hpp:103
@ DICT_APRILTAG_25h9
5x5 bits, minimum hamming distance between any two codes = 9, 35 codes
Definition: aruco_dictionary.hpp:118
@ DICT_7X7_100
7x7 bits, minimum hamming distance between any two codes = 18, 100 codes
Definition: aruco_dictionary.hpp:113
@ DICT_APRILTAG_16h5
4x4 bits, minimum hamming distance between any two codes = 5, 30 codes
Definition: aruco_dictionary.hpp:117
@ DICT_7X7_250
7x7 bits, minimum hamming distance between any two codes = 17, 250 codes
Definition: aruco_dictionary.hpp:114
@ DICT_ARUCO_ORIGINAL
6x6 bits, minimum hamming distance between any two codes = 3, 1024 codes
Definition: aruco_dictionary.hpp:116
@ DICT_4X4_100
4x4 bits, minimum hamming distance between any two codes = 3, 100 codes
Definition: aruco_dictionary.hpp:101
@ DICT_6X6_250
6x6 bits, minimum hamming distance between any two codes = 11, 250 codes
Definition: aruco_dictionary.hpp:110
@ DICT_5X5_1000
5x5 bits, minimum hamming distance between any two codes = 5, 1000 codes
Definition: aruco_dictionary.hpp:107
@ DICT_7X7_50
7x7 bits, minimum hamming distance between any two codes = 19, 50 codes
Definition: aruco_dictionary.hpp:112
@ DICT_5X5_100
5x5 bits, minimum hamming distance between any two codes = 7, 100 codes
Definition: aruco_dictionary.hpp:105
@ DICT_APRILTAG_36h11
6x6 bits, minimum hamming distance between any two codes = 11, 587 codes
Definition: aruco_dictionary.hpp:120
@ DICT_7X7_1000
7x7 bits, minimum hamming distance between any two codes = 14, 1000 codes
Definition: aruco_dictionary.hpp:115
@ DICT_6X6_1000
6x6 bits, minimum hamming distance between any two codes = 9, 1000 codes
Definition: aruco_dictionary.hpp:111
@ DICT_4X4_250
4x4 bits, minimum hamming distance between any two codes = 3, 250 codes
Definition: aruco_dictionary.hpp:102
@ DICT_APRILTAG_36h10
6x6 bits, minimum hamming distance between any two codes = 10, 2320 codes
Definition: aruco_dictionary.hpp:119
@ DICT_6X6_50
6x6 bits, minimum hamming distance between any two codes = 13, 50 codes
Definition: aruco_dictionary.hpp:108
@ DICT_4X4_50
4x4 bits, minimum hamming distance between any two codes = 4, 50 codes
Definition: aruco_dictionary.hpp:100
@ DICT_5X5_250
5x5 bits, minimum hamming distance between any two codes = 6, 250 codes
Definition: aruco_dictionary.hpp:106
"black box" representation of the file storage associated with a file on disk.
Definition: calib3d.hpp:441