generated from NativeScript/plugin-seed
-
-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathindex.d.ts
53 lines (48 loc) · 1.84 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
import { MLKitViewBase, DetectionType, BarcodeFormats } from './common';
import { EventData } from '@nativescript/core';
export interface StillImageDetectionOptions {
detectorType: DetectionType;
barcodeScanning?: {
barcodeFormat?: [BarcodeFormats];
};
faceDetection?: {
faceTracking?: boolean;
minimumFaceSize: ?number;
detectionMode?: 'fast' | 'accurate';
landmarkMode?: 'all' | 'none';
contourMode?: 'all' | 'none';
classificationMode?: 'all' | 'none';
};
imageLabeling?: {
confidenceThreshold?: number;
};
objectDetection?: {
multiple: boolean;
classification: boolean;
};
selfieSegmentation?: {
enableRawSizeMask?: boolean;
smoothingRatio?: number;
};
}
export interface DetectionEvent extends EventData {
data: { [key: string]: any } | Array<{ [key: string]: any }>;
type: DetectionType;
}
export { BarcodeFormats, barcodeFormatsProperty, CameraPosition, cameraPositionProperty, DetectionType, faceDetectionMinFaceSizeProperty, faceDetectionPerformanceModeProperty, faceDetectionTrackingEnabledProperty, imageLabelerConfidenceThresholdProperty as imageLablerConfidenceThresholdProperty, objectDetectionClassifyProperty, objectDetectionMultipleProperty } from './common';
export declare class MLKitView extends MLKitViewBase {
static isAvailable(): boolean;
static detectionEvent: string;
stopPreview(): void;
toggleCamera(): void;
startPreview(): void;
requestCameraPermission(): Promise<void>;
hasCameraPermission(): boolean;
on(event: 'detection', callback: (args: DetectionEvent) => void, thisArg?: any);
// Needed when 'on' method is overriden.
/**
* @hidden
*/
on(eventNames: string, callback: (data: EventData) => void, thisArg?: any): void;
}
export function detectWithStillImage(image: any, options?: StillImageDetectionOptions): Promise<{ [key: string]: any }>;