2.1.0 • Published 9 months ago

@nativescript/mlkit-core v2.1.0

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
9 months ago

@nativescript/mlkit-core

ns plugin add @nativescript/mlkit-core

Usage

Core

Important: Ensure you've included xmlns:ui="@nativescript/mlkit-core" on the Page element

<ui:MLKitView
  cameraPosition="back"
   detectionType="all" 
   detection="onDetection"
/>

Angular

import { MLKitModule } from '@nativescript/mlkit-core/angular';

@NgModule({
    imports: [
    MLKitModule
    ],
    declarations: [
        AppComponent
    ],
    bootstrap: [AppComponent]
})
<MLKitView
cameraPosition="back"
detectionType="all" 
(detection)="onDetection"
></MLKitView>

Vue

import Vue from 'nativescript-vue'
import MLKit from '@nativescript/mlkit-core/vue'

Vue.use(MLKit)
<MLKitView
cameraPosition="back"
detectionType="all" 
@detection="onDetection"
></MLKitView>

Optional modules

Important: Detection works only for optional modules installed

Barcode Scanning

ns plugin add @nativescript/mlkit-barcode-scanning
import { DetectionType, DetectionEvent } from '@nativescript/mlkit-core';
import { BarcodeResult } from '@nativescript/mlkit-barcode-scanning';
onDetection(event: DetectionEvent){
    if(event.type === DetectionType.Barcode){
        const barcode: BarcodeResult = data;
    }
}

Face Detection

ns plugin add @nativescript/mlkit-face-detection
import { DetectionType, DetectionEvent } from '@nativescript/mlkit-core';
import { FaceResult } from '@nativescript/mlkit-face-detection';
onDetection(event: DetectionEvent){
    if(event.type === DetectionType.Face){
        const faces: FaceResult[] = data;
    }
}

Image Labeling

ns plugin add @nativescript/mlkit-image-labeling
import { DetectionType, DetectionEvent } from '@nativescript/mlkit-core';
import { ImageLabelingResult } from '@nativescript/mlkit-image-labeling';
onDetection(event: DetectionEvent){
    if(event.type === DetectionType.Image){
        const labels: ImageLabelingResult[] = data;
    }
}

Object Detection

ns plugin add @nativescript/mlkit-object-detection
import { DetectionType, DetectionEvent } from '@nativescript/mlkit-core';
import { ObjectResult } from '@nativescript/mlkit-object-detection'
onDetection(event: DetectionEvent){
    if(event.type === DetectionType.Object){
        const objects: ObjectResult[] = data;
    }
}

Pose Detection

ns plugin add @nativescript/mlkit-pose-detection
import { DetectionType, DetectionEvent } from '@nativescript/mlkit-core';
import { PoseResult } from '@nativescript/mlkit-pose-detection';
onDetection(event: DetectionEvent){
    if(event.type === DetectionType.Pose){
        const poses: PoseResult[] = data;
    }
}

Text Recognition

ns plugin add @nativescript/mlkit-text-recognition
import { DetectionType, DetectionEvent } from '@nativescript/mlkit-core';
import { TextResult } from '@nativescript/mlkit-text-recognition';
onDetection(event: DetectionEvent){
    if(event.type === DetectionType.Text){
        const text: TextResult[] = data;
    }
}

License

Apache License Version 2.0

3.0.0-alpha.6

9 months ago

3.0.0-alpha.5

9 months ago

3.0.0-alpha.4

9 months ago

3.0.0-alpha.1

1 year ago

3.0.0-alpha.0

1 year ago

3.0.0-alpha.3

1 year ago

3.0.0-alpha.2

1 year ago

2.1.0

1 year ago

1.0.8

2 years ago

2.0.0-alpha.0

2 years ago

2.0.0-alpha.1

2 years ago

2.0.0

2 years ago

1.0.7

2 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.0-alpha.7

3 years ago

1.0.0-alpha.6

3 years ago

1.0.0-alpha.5

3 years ago

1.0.0-alpha.8

3 years ago

1.0.0-alpha.4

4 years ago

1.0.0-alpha.3

4 years ago

1.0.0-alpha.2

4 years ago

1.0.0-alpha.1

4 years ago

1.0.0-alpha.0

4 years ago