From c4b269ec69bca86e351174b1eea58d70a921eed6 Mon Sep 17 00:00:00 2001
From: Sebastian Hahta <joseha@utu.fi>
Date: Tue, 10 Nov 2020 16:03:08 +0200
Subject: [PATCH] document OpenCV bug

---
 components/calibration/src/object.cpp | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/components/calibration/src/object.cpp b/components/calibration/src/object.cpp
index 4236b864a..879816b0e 100644
--- a/components/calibration/src/object.cpp
+++ b/components/calibration/src/object.cpp
@@ -42,8 +42,9 @@ int ArUCoObject::detect(cv::InputArray im, std::vector<cv::Point2d>& result, con
 	std::vector<std::vector<cv::Point2f>> corners;
 	std::vector<int> ids;
 	cv::Mat im_gray;
-	// OpenCV bug: detectMarkers consumes all available memory when any
-	// distortion parameters are passes
+	// OpenCV bug: detectMarkers() consumes all available memory with
+	// when CORNER_REFINE_CONTOUR is used with camera parameters
+	// https://github.com/opencv/opencv_contrib/issues/2738
 	const cv::Mat d;
 	if (im.size() == cv::Size(0, 0)) {
 		return -1;
-- 
GitLab