General Settings
The functions described below should be used to adjust the operation of the face recognition, as needed by the user. Like the other devices configuration parameters, the HTTP method used for modification is POST and the content-type is application/JSON. The parameter will be a JSON object corresponding to the configuration parameters you want to modify.
Mask Usage
This feature allows face recognition of users who are wearing masks. That is, if the device is installed in a location where masking is mandatory, this feature must be enabled for the correct recognition of users. The parameter that sets the activation of this function is mask_detection_enabled. The possible input values are: "0" (disabled), which indicates that access will be authorized or not regardless of mask usage; "1" (required), denotes that access only is authorized for users wearing a mask; and "2" (recommended), indicates that access is authorized for users not wearing a mask, but a message is showed to the user suggesting the use of a mask. By factory default, this parameter is set with the value "0".
Note: The access restriction by mask usage only has an effect when the device is operating in Standalone mode. In Online mode, the parameter "face_mask" is sent in the user identification response indicating if the user is wearing a mask to validate the access rule on the server-side.
Request Example
This request sets the mandatory mask usage parameter.
$.ajax({
url: "/set_configuration.fcgi?session=" + session,
type: 'POST',
contentType: 'application/json',
data: JSON.stringify(
{
"face_id": {
"mask_detection_enabled": "1",
}
}
)
});
Detection Mode
This feature offers the possibility to use face recognition in two different modes, the vehicular and the pedestrian. Pedestrian mode is the usual mode and is the factory default. Vehicle mode allows the recognition of people that are in vehicles. In other words, if the device is installed in a location where detection will be made on users that are inside a vehicle, this function must be enabled to correctly recognize users. The parameter that defines the activation of this function is the vehicle_mode. The possible input values are: "0" (disabled) or "1" (enabled). By factory default, this parameter comes with the value "0" - pedestrian mode.
Request Example
This request sets up the detection mode parameters.
$.ajax({
url: "/set_configuration.fcgi?session=" + session,
type: 'POST',
contentType: 'application/json',
data: JSON.stringify(
{
"face_id": {
"vehicle_mode": "1"
}
}
)
});
Time to re-release the same face(s)
Through this setting, it is possible to adjust the time in which the same user can be identified again, after the last face identification. The parameter that defines this time is max_identified_duration. By factory default, this parameter comes with the value "30000", which corresponds to 30 seconds, because the parameter's unit is in milliseconds.
Request Example
This request sets the parameter for adjusting the time to re-release the same face.
$.ajax({
url: "/set_configuration.fcgi?session=" + session,
type: 'POST',
contentType: 'application/json',
data: JSON.stringify(
{
"face_id": {
"max_identified_duration": "30000"
}
}
)
});
Region of Interest
This function makes it possible to make adjustments on the device's camera to define the region where the user's face should be identified. Two adjustments can be made: Zoom or Vertical Image Shift. The parameter that defines the zoom applied is in the zoom module and the one that defines the vertical shifting is the vertical_crop. The possible input values for zoom are numbers in the range: 3.25 (maximum zoom) to 1.0 (minimum zoom). The possible input values for vertical image shift are numbers between the range: -0.36 (maximum shift up - maximum zoom) to 0.36 (maximum shift down - maximum zoom). The factory default input value is 1.5 for Zoom and -0.06 for the vertical shift.
Note: Although it is possible to change these parameters remotely, it is recommended that these adjustments are not made in such a way, because for a good adjustment of the region of interest it is important to visually check the changes in the display of the terminal itself. In addition, the zoom and vertical shift values have a dependency relationship with each other. As we decrease the zoom, the vertical shift is limited.
Request Example
This request sets up the zoom parameters.
$.ajax({
url: "/set_configuration.fcgi?session=" + session,
type: 'POST',
contentType: 'application/json',
data: JSON.stringify(
{
"camera_overlay": {
"zoom": "1.5"
}
}
)
});
This request sets the vertical shift parameter of the image.
$.ajax({
url: "/set_configuration.fcgi?session=" + session,
type: 'POST',
contentType: 'application/json',
data: JSON.stringify(
{
"camera_overlay": {
"vertical_crop": "-0.06"
}
}
)
});
Activation of the white LEDs
This setting allows you to set the ambient brightness level required for the white LEDs to light up during identification. There are 4 possible options for lighting: low brightness, medium brightness, high brightness and light on in any environment. The configuration must be done through the light_threshold_led_activation
parameter of the face_module
. The possible input values and the respective conditions are: "40" (low brightness), "280" (medium brightness), "1500" (high brightness) and "1000000" (light on in any environment).
Request Example
This request configures the white LEDs to light up in environments with low brightness.
$.ajax({
url: "/set_configuration.fcgi?session=" + session,
type: 'POST',
contentType: 'application/json',
data: JSON.stringify(
{
"face_module": {
"light_threshold_led_activation": "40"
}
}
)
});
Identification limitation to the display region
This setting limits face identification to the visible region of iDFace's display. By default, the region of the field of view where the device can detect the presence of faces and identify the user is larger than the region displayed on the device's display. The configuration must be done through the limit_identification_to_display_region
parameter of the face_id
module. Values "0" for disabling the functionality or "1" to limit the facial identification to the region visible on the screen.
Request Example
This resquest limits the facial identification to the display region.
$.ajax({
url: "/set_configuration.fcgi?session=" + session,
type: 'POST',
contentType: 'application/json',
data: JSON.stringify(
{
"face_id": {
"limit_identification_to_display_region": "1"
}
}
)
});
Liveness mode
This setting changes the parameters used for liveness detection during the facial recognition process, adopting either standard or more rigorous values. This causes a more restrictive identification in the steps taken to determine if the face found belongs to an individual physically present or not. The configuration must be done using the liveness_mode
parameter in the face_id
module. Accepted values are "0" for default mode and "1" for rigorous mode.
Example request
This request activates the rigorous liveness mode.
$.ajax({
url: "set_configuration.fcgi?session=" + session,
type: 'POST',
contentType: 'application/json',
data: JSON.stringify(
{
"face_id": {
"liveness_mode": "1"
}
}
)
});
Identification Distance (cm)
This setting changes one of the parameters used in the facial recognition process, namely, the distance (in centimeters) at which the individual's face must be in relation to the device. This way, even with the distance range safely recognized by the device (from 30cm to 200cm), it is possible to configure a more precise value in order to adapt to the context of the environment (very large environments may require a smaller distance for the release to be more efficient). The configuration must be done using the min_detect_bounds_width
parameter in the face_id
module. However, the parameters do not receive the identification distance in centimeters (cm), but the result of a calculation.
Calculation
- min_detect_bounds_width = 11.6/distance_cm
Example request
This request sets the identification distance of the device to 40cm.
$.ajax({
url: "set_configuration.fcgi?session=" + session,
type: 'POST',
contentType: 'application/json',
data: JSON.stringify(
{
"face_id": {
"min_detect_bounds_width": "0.29"
}
}
)
});
LED brightness
This setting allows you to change changing the brightness of the white LEDs activated during the facial recognition process. The values determine the power of the LED and are represented by a percentage. Thus, the valid values are in the range 0 to 100. The configuration must be done using the brightness
parameter in the led_white
module. The values are between "0" for LED off and "100" for LED at maximum possible brightness.
Example request
This request sets the brightness of the LEDs to 70%.
$.ajax({
url: "set_configuration.fcgi?session=" + session,
type: 'POST',
contentType: 'application/json',
data: JSON.stringify(
{
"led_white": {
"brightness": "70"
}
}
)
});