Page History
...
Section | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
General information about scripts
User scripts are designed for partial automation of processes while the while configuring Face - Intellect software package configuring. In the Intellect.Programming Guide document there is the description of programming objects and methods which are in use for scripts creation in the Intellect software.
Script for photo verification
Purpose of The 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.
enables comparison of the face captured in the frame with the user photo stored on the disk at <Intellect installation folder>\Bmp\<Person>.
To perform photo verification, do the following:
Create the script:
whereCode Block if(Event.SourceType == "MACRO" && Event.Action == "RUN" && Event.SourceID == "1") { DoReactStr("FIRSERVER","1","VERIFY_START","cam_id<1>,p_id<15>,wait<10>"); }
the id of the FIR server,//1 -
theid firserver, p_id<15> -
.name of the file with photo in the Intellect\Bmp\Person folder without resolution(e.g., 15 for 15.bmp file), wait<10> - time in seconds
}
- Perform the first macro. If the user from the photo will does not appear in front of the camera in 10 seconds, the Verification declined event will be displayed. In case of the user appearance the Successful verification event will be displayed immediately showing the similarity percentage of the captured face with the user photo stored on the disk.
The photo verification is completed.
Note | ||
---|---|---|
| ||
File with photo must have the .bmp extension. But the file format can be one from the list: jpg, bmp , or png. |
Script for adding a reference 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.
Info | ||
---|---|---|
| ||
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. |
...
Code Block |
---|
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 ADDthe 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 If there are any errors while adding the reference face, the ADD_PERSON_FROM_FILE_ERROR event 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(see FIRSERVER events).
Tip |
---|
...