mirror of
https://github.com/opencv/opencv.git
synced 2026-07-31 00:03:03 +04:00
Merge branch 4.x
This commit is contained in:
@@ -20,6 +20,8 @@ enum CornerRefineMethod{
|
||||
CORNER_REFINE_APRILTAG, ///< Tag and corners detection based on the AprilTag 2 approach @cite wang2016iros
|
||||
};
|
||||
|
||||
static constexpr float DEFAULT_VALID_BIT_ID_THRESHOLD{0.49f};
|
||||
|
||||
/** @brief struct DetectorParameters is used by ArucoDetector
|
||||
*/
|
||||
struct CV_EXPORTS_W_SIMPLE DetectorParameters {
|
||||
@@ -49,7 +51,7 @@ struct CV_EXPORTS_W_SIMPLE DetectorParameters {
|
||||
aprilTagQuadSigma = 0.0;
|
||||
aprilTagMinClusterPixels = 5;
|
||||
aprilTagMaxNmaxima = 10;
|
||||
aprilTagCriticalRad = (float)(10* CV_PI /180);
|
||||
aprilTagCriticalRad = (float)(10 * CV_PI / 180);
|
||||
aprilTagMaxLineFitMse = 10.0;
|
||||
aprilTagMinWhiteBlackDiff = 5;
|
||||
aprilTagDeglitch = 0;
|
||||
@@ -57,6 +59,7 @@ struct CV_EXPORTS_W_SIMPLE DetectorParameters {
|
||||
useAruco3Detection = false;
|
||||
minSideLengthCanonicalImg = 32;
|
||||
minMarkerLengthRatioOriginalImg = 0.0;
|
||||
validBitIdThreshold = DEFAULT_VALID_BIT_ID_THRESHOLD;
|
||||
}
|
||||
|
||||
/** @brief Read a new set of DetectorParameters from FileNode (use FileStorage.root()).
|
||||
@@ -168,12 +171,12 @@ struct CV_EXPORTS_W_SIMPLE DetectorParameters {
|
||||
*/
|
||||
CV_PROP_RW double maxErroneousBitsInBorderRate;
|
||||
|
||||
/** @brief minimun standard deviation in pixels values during the decodification step to apply Otsu
|
||||
/** @brief minimum standard deviation in pixels values during the decodification step to apply Otsu
|
||||
* thresholding (otherwise, all the bits are set to 0 or 1 depending on mean higher than 128 or not) (default 5.0)
|
||||
*/
|
||||
CV_PROP_RW double minOtsuStdDev;
|
||||
|
||||
/// error correction rate respect to the maximun error correction capability for each dictionary (default 0.6).
|
||||
/// error correction rate respect to the maximum error correction capability for each dictionary (default 0.6).
|
||||
CV_PROP_RW double errorCorrectionRate;
|
||||
|
||||
/** @brief April :: User-configurable parameters.
|
||||
@@ -231,6 +234,9 @@ struct CV_EXPORTS_W_SIMPLE DetectorParameters {
|
||||
|
||||
/// range [0,1], eq (2) from paper. The parameter tau_i has a direct influence on the processing speed.
|
||||
CV_PROP_RW float minMarkerLengthRatioOriginalImg;
|
||||
|
||||
/// range [0,1], define the acceptable threshold when comparing the detected marker to the dictionary during marker identification.
|
||||
CV_PROP_RW float validBitIdThreshold;
|
||||
};
|
||||
|
||||
/** @brief struct RefineParameters is used by ArucoDetector
|
||||
|
||||
@@ -65,6 +65,12 @@ class CV_EXPORTS_W_SIMPLE Dictionary {
|
||||
*/
|
||||
CV_WRAP bool identify(const Mat &onlyBits, CV_OUT int &idx, CV_OUT int &rotation, double maxCorrectionRate) const;
|
||||
|
||||
/** @brief Given a matrix of pixel ratio raging from 0 to 1. Returns whether if marker is identified or not.
|
||||
*
|
||||
* Returns reference to the marker id in the dictionary (if any) and its rotation.
|
||||
*/
|
||||
CV_WRAP bool identify(const Mat &onlyCellPixelRatio, CV_OUT int &idx, CV_OUT int &rotation, double maxCorrectionRate, float validBitIdThreshold) const;
|
||||
|
||||
/** @brief Returns Hamming distance of the input bits to the specific id.
|
||||
*
|
||||
* If `allRotations` flag is set, the four possible marker rotations are considered
|
||||
@@ -84,6 +90,10 @@ class CV_EXPORTS_W_SIMPLE Dictionary {
|
||||
/** @brief Transform list of bytes to matrix of bits
|
||||
*/
|
||||
CV_WRAP static Mat getBitsFromByteList(const Mat &byteList, int markerSize, int rotationId = 0);
|
||||
|
||||
/** @brief Get ground truth bits float
|
||||
*/
|
||||
CV_WRAP Mat getMarkerBits(int markerId, int rotationId = 0) const;
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user