User scripts are designed for partial automation of processes while the Face-Intellect software package configuring. In the Intellect.Programming Guide document there is description of programming objects and methods which are in use for scripts creation in the Intellect software.
Purpose of verification mode is the possibility to search for faces on the captured photo in the stream from camera by command wihout adding the reference face to the database.
Face recognition server will not analyze faces captured by detection continuously, but only by command. The mode selection is performed when the recognized face is saved to the database.
To perform photo verification, do the following:
Create the script:
if(Event.SourceType == "MACRO" && Event.Action == "RUN" && Event.SourceID == "1") { DoReactStr("FIRSERVER","1","VERIFY_START","cam_id<1>,p_id<15>,wait<10>"); } |
where 1 - the id of the FIR server, p_id<15> - the name of the file with photo in the Intellect\Bmp\Person folder without resolution, wait<10> - time in seconds.
The photo verification is completed.
File with photo must have the .bmp extension. But the file format can be one from the list: jpg, bmp, png. |
A reference face can be added do the database from a file with photo using the ADD_PERSON_FROM_FILE reaction of the FIRSERVER object.
When the reference face is added to the database, a new user is automatically created in the Face-Intellect software with the photo from specified file assigned. |
Parameters:
Example of the script usage:
if(Event.SourceType == "MACRO" && Event.Action == "RUN" && Event.SourceID == "1") { DoReactStr("FIRSERVER","1","ADD_PERSON_FROM_FILE","filename<c:\iso_small.jpg>,name<Jane>,surname<Kramer>,department<Department 1>,comment<>"); } |
If the face has been added successfully, the ADD_PERSON_FROM_FILE_OK event is displayed in the Debug window. Example:
FIRSERVER|1|ADD_PERSON_FROM_FILE_OK|operator<>,surname<Kramer>,filename<c:\iso_small.jpg>,int_obj_id<1>,core_global<1>,department<Department 1>,time<11:47:13>,_TRANSPORT_ID<>,fraction<181>,action<ADD_PERSON_FROM_FILE_OK>,date<06-09-16>,name<Jane>,comment<>
In case of an error the ADD_PERSON_FROM_FILE_ERROR is displayed. Example:
FIRSERVER|1|ADD_PERSON_FROM_FILE_ERROR|operator<>,surname<Kramer>,filename<c:\iso_small.jpg1>,int_obj_id<1>,core_global<1>,error<File 'c:\iso_small.jpg1' not found>,department<Department 1>,time<11:48:01>,_TRANSPORT_ID<>,fraction<884>,action<ADD_PERSON_FROM_FILE_ERROR>,date<06-09-16>,name<Jane>,comment<>
The error description is given in the error<> parameter.