Collections functions
Encryption functions
General functions
Render functions
Theme permission functions
Video 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 sql_value(
        
"SELECT `type` AS `value`
           FROM resource_type_field
          WHERE ref = '" 
escape_check($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 1st December 2020 23:05 Europe/London time based on the source file dated 18th May 2020 17:14 Europe/London time.