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 <noreply@anthropic.com>
This commit is contained in:
2026-08-22 20:05:54 +10:00
co-authored by Claude Opus 5
parent c9ff9ee2f3
commit 881d783fa3
+1 -1
View File
@@ -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);