Coding standards
Security in ResourceSpace
Developer reference
Database
Action functions
Admin functions
Ajax functions
Annotation functions
API functions
Collections functions
Comment functions
Config functions
CSV export functions
Dash functions
Debug functions
Encryption functions
Facial recognition functions
File functions
General functions
Language functions
Log functions
Login functions
Message functions
Migration functions
Node functions
PDF functions
Plugin functions
Render functions
Reporting functions
Request functions
Research functions
Slideshow functions
Theme permission functions
User functions
Video functions
Database functions
Metadata functions
Resource functions
Search functions
Map functions
Job functions
Tab functions
Test 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 15th September 2024 16:35 Europe/London time based on the source file dated 31st October 2021 14:15 Europe/London time.