From 881d783fa3990fb953130cf52c9083c9484f133f Mon Sep 17 00:00:00 2001 From: Tuan Nghia Nguyen Date: Sat, 22 Aug 2026 20:05:54 +1000 Subject: [PATCH] ANSFR: re-enable CheckFaceEmbedding validation Comments out the unconditional `return 1` added in b5a88b9, so the function runs its real body again: the argument guards (null Handle / zero-length buffer -> -1), cv::imdecode, and ANSFacialRecognition::CheckFace with the detector confidence threshold, isValidFace's geometry gate and the _minFaceSize filter. The bypass line is left in place commented rather than deleted, so it stays easy to flip back on. Co-Authored-By: Claude Opus 5 --- modules/ANSFR/dllmain.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ANSFR/dllmain.cpp b/modules/ANSFR/dllmain.cpp index 4d8a010..8eef0cc 100644 --- a/modules/ANSFR/dllmain.cpp +++ b/modules/ANSFR/dllmain.cpp @@ -888,7 +888,7 @@ extern "C" ANSFR_API int CheckFaceEmbedding(ANSCENTER::ANSFacialRecogni ANS_DBG("ANSFR","CheckFaceEmbedding: HandlePtr=%p, *Handle=%p, bufLen=%u", (void*)Handle, (void*)(Handle ? *Handle : nullptr), bufferLength); - return 1; // by pass + //return 1; // by pass try { if (!Handle || !*Handle || !jpeg_string || bufferLength == 0) return -1; cv::Mat frame = cv::imdecode(cv::Mat(1, bufferLength, CV_8UC1, jpeg_string), cv::IMREAD_COLOR);