Documentation for Face Intellect 7.1. Documentation for other versions of Intellect is available too.

Previous page Next page

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

On the page:
 

General information about scripts

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.

Script for photo verification

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:

  1. 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.

  2. Perform the first macro. If the user from the photo will not appear in front of camera in 10 seconds the Verification declined event will be displayed. In case of user appearance the Successful verification event will be displayed immediately.

The photo verification is completed.

Attention!

File with photo must have the .bmp extension. But the file format can be one from the list: jpg, bmp, png.

Script for adding a face to the database from a file

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.

Note.

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:

  • filename – full name of the file containing the photo. It can be in jpg, bmp, gif or png format.
  • name – the name of the added user.
  • surname – the surname of the added user.
  • department – the department to which the user shall be added.
  • comment – any text commentary.

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.

  • No labels