From 0b5300f74bf90424436b3cb489a975976de540bd Mon Sep 17 00:00:00 2001 From: Sun Aries <281614085@qq.com> Date: Fri, 2 Apr 2021 16:23:21 +0800 Subject: [PATCH] consider the rectangle marker in the future. It is now had been what was wanted to be here. Or we may do some asserts before e.g. `CV_ASSERT(candidateBits.rows == candidateBits.cols); `. --- modules/aruco/src/aruco.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/aruco/src/aruco.cpp b/modules/aruco/src/aruco.cpp index ca515bb35..7a4d2537e 100644 --- a/modules/aruco/src/aruco.cpp +++ b/modules/aruco/src/aruco.cpp @@ -564,7 +564,7 @@ static uint8_t _identifyOneCandidate(const Ptr& dictionary, InputArr Mat onlyBits = candidateBits.rowRange(params->markerBorderBits, candidateBits.rows - params->markerBorderBits) - .colRange(params->markerBorderBits, candidateBits.rows - params->markerBorderBits); + .colRange(params->markerBorderBits, candidateBits.cols - params->markerBorderBits); // try to indentify the marker if(!dictionary->identify(onlyBits, idx, rotation, params->errorCorrectionRate))