From 14e0d4355011a3f89d9fd057ccd756bac95c27d8 Mon Sep 17 00:00:00 2001 From: Vincent Rabaud Date: Tue, 2 Jan 2024 22:18:35 +0100 Subject: [PATCH] Fix aruco detector thread safety. Concurrently writing to a vector is not thread-safe. --- modules/objdetect/src/aruco/aruco_detector.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/objdetect/src/aruco/aruco_detector.cpp b/modules/objdetect/src/aruco/aruco_detector.cpp index 97a40746a8..031d4849b3 100644 --- a/modules/objdetect/src/aruco/aruco_detector.cpp +++ b/modules/objdetect/src/aruco/aruco_detector.cpp @@ -780,7 +780,7 @@ struct ArucoDetector::ArucoDetectorImpl { vector idsTmp(ncandidates, -1); vector rotated(ncandidates, 0); vector validCandidates(ncandidates, 0); - vector was(ncandidates, false); + vector was(ncandidates, false); bool checkCloseContours = true; int maxDepth = 0;