Skip to content

Commit

Permalink
Fix aruco detector thread safety.
Browse files Browse the repository at this point in the history
Concurrently writing to a vector<bool> is not thread-safe.
  • Loading branch information
vrabaud committed Jan 2, 2024
1 parent a8ec658 commit 14e0d43
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/objdetect/src/aruco/aruco_detector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -780,7 +780,7 @@ struct ArucoDetector::ArucoDetectorImpl {
vector<int> idsTmp(ncandidates, -1);
vector<int> rotated(ncandidates, 0);
vector<uint8_t> validCandidates(ncandidates, 0);
vector<bool> was(ncandidates, false);
vector<uint8_t> was(ncandidates, false);
bool checkCloseContours = true;

int maxDepth = 0;
Expand Down

0 comments on commit 14e0d43

Please sign in to comment.