BestShotMobile object#
The BestShotMobile object is a root object of the entire BestShotMobile library. All functionality is based on this object.
This object should be created before beginning of the video stream processing. Call createBestShotMobile() function to create a BestShotMobile instance.
As a wrapper library, the BestShotMobile library requires the FaceEngine instance and the TrackEngine instance. Both pointers are expected as parameters of the createBestShotMobile() function.
Configuration file#
For proper functioning BestShotMobile library requires the configuration file. The file is called "bestshotmobile.conf" and stored in dataPath directory by default. See the "FaceEngine_Handbook" for explanation of the "data" directory and its meaning.
At runtime, the configuration file data is managed by a special object that implements ISettingsProvider interface. The provider is instantiated using createSettingsProvider() function that accepts configuration file location as a parameter or uses a default one if not explicitly defined. For detail of the ISettingsProvider usage see the "FaceEngine_Handbook".
Liveness algorithm types#
There are several supported liveness algorithm types:
-
LivenessType::None - no any liveness checks. Use this liveness type if the liveness check is not required. As a result, BestShotMobile will prepare the best shot, but this best shot will not be checked for liveness.
-
LivenessType::Offline - offline on device check. This algorithm does not require a network connection. All checks are processed on the device.
This type of liveness check is supported only in the Complete SDK version.
- LivenessType::Online - online liveness check on the backend server. It is the recommended to use liveness algorithm type. It is required to fill two fields in configuration file for correct algorithm work
<param name="URL" type="Value::String" text="" />
<param name="Luna-Account-Id" type="Value::String" text="" />
- LivenessType::Offline_OSL - offline on device check using mobile edition of LivenessOneShotRGBEstimator. This algorithm does not require a network connection. All checks are processed on the device.
This type of liveness check is supported only in the Complete SDK version.
Pushing data#
To catch the best shot from the video stream user should split the video stream to the frames and then push it one by one to the BestShotMobile object through the IBestShotMobile::pushFrame method.
Frames are handled in the separated thread by asynchronous scenario in the BestShotMobile library.
Receiving results#
User should use callbacks to receive results from the BestShotMobile library . See the "IBestShotMobileObserver interface" chapter for details.