From 2fa5e42ffbe87f806f97cd500c42443e2fb09ad3 Mon Sep 17 00:00:00 2001
From: "Kilic, Deniz" <d.kilic@fz-juelich.de>
Date: Fri, 24 Feb 2023 15:10:43 +0100
Subject: [PATCH] fix: Reset CodeMarker offset for visualization

- Multicolor with code introduces offset for visualization
- Switch to pure code marker did not reset the offset
- Now resets offset such that code marker visualizes correctly as well
---
 src/recognition.cpp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/recognition.cpp b/src/recognition.cpp
index 8b17fe6ee..d4255bc33 100644
--- a/src/recognition.cpp
+++ b/src/recognition.cpp
@@ -662,6 +662,7 @@ void detail::refineWithAruco(
         // NOTE: For now, add as parameter of findMulticolorMarker
         codeOpt.setOffsetCropRect2Roi(offsetCropRect2Roi);
         findCodeMarker(subImg, crossList, options.method, codeOpt, intrinsicCameraParams);
+        codeOpt.setOffsetCropRect2Roi({0, 0});
 
         resolveMoreThanOneCode(lengthini, crossList, blob, offsetCropRect2Roi);
 
-- 
GitLab