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:
@@ -888,7 +888,7 @@ extern "C" ANSFR_API int CheckFaceEmbedding(ANSCENTER::ANSFacialRecogni
|
|||||||
ANS_DBG("ANSFR","CheckFaceEmbedding: HandlePtr=%p, *Handle=%p, bufLen=%u",
|
ANS_DBG("ANSFR","CheckFaceEmbedding: HandlePtr=%p, *Handle=%p, bufLen=%u",
|
||||||
(void*)Handle, (void*)(Handle ? *Handle : nullptr), bufferLength);
|
(void*)Handle, (void*)(Handle ? *Handle : nullptr), bufferLength);
|
||||||
|
|
||||||
return 1; // by pass
|
//return 1; // by pass
|
||||||
try {
|
try {
|
||||||
if (!Handle || !*Handle || !jpeg_string || bufferLength == 0) return -1;
|
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);
|
cv::Mat frame = cv::imdecode(cv::Mat(1, bufferLength, CV_8UC1, jpeg_string), cv::IMREAD_COLOR);
|
||||||
|
|||||||
Reference in New Issue
Block a user