From 2512b21f47d25f11e0e923114bcfad1e30dbd166 Mon Sep 17 00:00:00 2001 From: rlagneau Date: Wed, 25 Oct 2023 14:12:13 +0200 Subject: [PATCH] [CORPS] Avoids to look at points that have already been explored and rejected --- modules/core/src/image/vpCannyEdgeDetection.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/core/src/image/vpCannyEdgeDetection.cpp b/modules/core/src/image/vpCannyEdgeDetection.cpp index d93b0a636a..274ba7f6b6 100644 --- a/modules/core/src/image/vpCannyEdgeDetection.cpp +++ b/modules/core/src/image/vpCannyEdgeDetection.cpp @@ -464,8 +464,10 @@ vpCannyEdgeDetection::performEdgeTracking() if (it->second == STRONG_EDGE) { m_edgeMap[it->first.first][it->first.second] = 255; } - else if (recursiveSearchForStrongEdge(it->first)) { - m_edgeMap[it->first.first][it->first.second] = 255; + else if (it->second == WEAK_EDGE) { + if (recursiveSearchForStrongEdge(it->first)) { + m_edgeMap[it->first.first][it->first.second] = 255; + } } } }