Collections functions
General functions
Render functions
Theme permission functions
Resource functions

initFacialRecognition()

Parameters

This function accepts no parameters.

Location

include/facial_recognition_functions.php lines 11 to 42

Definition

 
function initFacialRecognition()
    {
    global 
$facial_recognition_tag_field$facial_recognition_face_recognizer_models_location$annotate_enabled,
           
$annotate_fields;

    if(!
is_numeric($facial_recognition_tag_field) || >= $facial_recognition_tag_field)
        {
        return 
false;
        }

    if(!
file_exists($facial_recognition_face_recognizer_models_location))
        {
        return 
false;
        }

    
$facial_recognition_rtf_type ps_value(
        
"SELECT `type` AS `value`
           FROM resource_type_field
          WHERE ref = ?
        "
,array("i",$facial_recognition_tag_field),
        
null"schema");

    if(
FIELD_TYPE_DYNAMIC_KEYWORDS_LIST != $facial_recognition_rtf_type)
        {
        return 
false;
        }

    
$annotate_enabled true;
    
$annotate_fields[] = $facial_recognition_tag_field;

    return 
true;
    }

This article was last updated 5th October 2022 02:35 Europe/London time based on the source file dated 31st October 2021 14:15 Europe/London time.