capacitor-luna-id-sdk
v7.1.6
Published
LUNA SDK is a face recognition and analysis system that provides efficient and accurate processing of faces in images and video streams
Downloads
1,531
Maintainers
Readme
capacitor-luna-id-sdk
LUNA SDK is a face recognition and analysis system that provides efficient and accurate processing of faces in images and video streams, and can run on a wide variety of mobile operating systems.
Install
npm install capacitor-luna-id-sdk
npx cap syncLICENCING & Configuration
- Get
licence.conffrom VisionLabs - Configure Luna Platform 5 and get
LunaAccountID - Configure
LunaServerURL
iOS
- Add to
./node_modules/capacitor-luna-id-sdk/ios/Frameworks/fsdk.framework/data/license.confyour ownlicence.conffile; - Add to
Info.plist
<key>LunaServerURL</key>
<string>https://[path-to-luna-platform-api]/6/</string><key>LunaAccountID</key>
<string><your luna account id></string>Android
Add to your project android/app/src/main/assets/data/license.conf license file
Add to your root project local.properties
DEFAULT_BASE_URL="https://[path-to-luna-platform-api]/6/"
DEFAULT_LUNA_ACCOUNT_ID="<your luna account id>"
vl.login=YOUR_LOGIN
vl.pass=YOUR_PASSWORDAPI
initialize(...)
initialize(options?: LunaOptions | undefined) => anyInitialize plugin with configs
| Param | Type |
| ------------- | --------------------------------------------------- |
| options | LunaOptions |
Returns: any
Since: 1.0.8
start(...)
start(options?: StartOptions | undefined) => anyStart face recognition
| Param | Type |
| ------------- | ----------------------------------------------------- |
| options | StartOptions |
Returns: any
Since: 1.0.0
Interfaces
LunaOptions
| Prop | Type |
| -------------------------- | ------------------------------------------------- |
| livenessEnabled | boolean |
| occludeCheck | boolean |
| trackFaceIdentity | boolean |
| eyesCheck | boolean |
| glassesCheckEnabled | boolean |
| interactionEnabled | boolean |
| interactionTimeout | number |
| plistLicenseFileName | string |
| lunaConfig | LunaConfig |
| headers | Headers |
LunaConfig
| Prop | Type | Description | Since |
| ----------------------------- | ------------------------------------------------------- | ------------ | ----- |
| detectorStep | number | | |
| skipFrames | number | | |
| compressionQuality | number | | |
| minimalTrackLength | number | | |
| bestShotsCount | number | Android only | 5.0.0 |
| numberOfBestShots | number | ios only | 5.0.0 |
| borderDistance | number | | |
| detectFrameSize | number | | |
| bestShotInterval | number | | |
| headPitch | number | | |
| headYaw | number | | |
| headRoll | number | | |
| ags | number | | |
| eyesCheck | boolean | | |
| locationEnabled | boolean | ios only | 5.0.0 |
| interactionEnabled | boolean | | |
| interactionTimeout | number | | |
| uploadImagesForLiveness | boolean | | |
| livenessErrorTimeout | number | | |
| livenessQuality | number | | |
| livenessType | LivenessType | | |
| licenseParams | LicenseParams | android only | 5.3.0 |
LicenseParams
| Prop | Type |
| --------------- | ------------------- |
| server | string |
| eId | string |
| productId | string |
InitializeResponse
| Prop | Type | Description | Since |
| ------------------ | -------------------- | ---------------- | ----- |
| initialized | boolean | is initialized. | 1.0.0 |
| initializing | boolean | is initializing. | 7.0.4 |
StartOptions
| Prop | Type | Description | Default | Since |
| ---------------------------- | -------------------- | ----------------------------------------------------------------------------------- | -------------------- | ----- |
| disableErrors | boolean | Define whether to record video or not. | : false | 5.0.1 |
| disableInteractionTips | boolean | Define whether to disable interaction Tips. | : false | 5.0.1 |
| ignoreVideoWithoutFace | boolean | Define whether to start record video from camera activated or from face is deteced. | : false | 5.0.1 |
| interactionEnabled | boolean | Define whether to enable interaction or not. | : true | 5.0.1 |
| interactionTimeoutMs | number | Define timeout for interaction. | : 30000 | 5.0.1 |
| recordVideo | boolean | Define whether to record video or not. | : false | 5.0.0 |
BestShot
| Prop | Type | Description | Since |
| ------------------ | ------------------- | ----------------------------------------------------------- | ----- |
| base64String | string | The base64 encoded string representation of found bestShot. | 1.0.0 |
| videoPath | string | The URI of video recorded from stream. | 5.0.0 |
Type Aliases
Headers
Record<string, string> & Partial<Record<RestrictedHeaders, never>>
RestrictedHeaders
'Authorization' | 'Luna-Account-Id'
Enums
LivenessType
| Members |
| ------------------ |
| None |
| ByDescriptor |
| ByPhoto |
