5.0.0 • Published 4 years ago

cordova-plugin-hms-ml v5.0.0

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
4 years ago

cordova-plugin-hms-ml

Contents

  1. Introduction
  2. Installation Guide
  3. Cordova Example API Method Definition
  4. Configure Description
  5. Licensing and Terms

1. Introduction

This Cordova SDK code encapsulates the Huawei Ml Kit interface. It provides many APIs for your reference or use.

The package is described as follows:

  • src/main/com/huawei/hms/cordova/mlkit: core layer that exposes MlKitSDK functionality to JS side.
  • www/: Public interfaces for interacting MlKitSDK through Cordova.

2. Installation Guide

  1. Download cordova-plugin-hms-ml.
  2. Add Android platform to your project if you haven't yet.
cordova platform add android
  1. Add this plugin to your project by running the following command in root directory of your project:
cordova plugin add PATH_TO_CORDOVA_MLKIT_PLUGIN
  1. Run your app.
cordova run android

3. Cordova SDK API method definitions

Modules Overview

ModuleDescription
BankCardAnalyseIf you want to get information such as cart number, validity period on bank cards, you can use this service.
ImageClassificationAnalyseThe image classification service classifies elements in images into intuitive categories, such as people, objects, environments, activities, or artwork, to define image themes and application scenarios.
ImageDocumentAnalyseThe document recognition service can recognize text with paragraph formats in document images.
StillFaceAnalyseThe face detection service can detect the face contour, recognize facial features, and determine facial expressions for a person.
GeneralCardAnalyseThe general card recognition service provides a universal development framework based on the text recognition technology.
IDCardAnalyseIf you are interested in a place, you can create a geofence based on the place. When the device enters the geofence or stays for a duration of time, a notification can be sent to your app.
ImageSegmentationThe image segmentation service segments same elements (such as human body, plant, and sky) from an image. The elements supported include human body, sky, plant, food, cat, dog, flower, water, sand, building, mountain, and others.
ImageLandMarkAnalyseThe landmark recognition service enables you to obtain the landmark name, landmark longitude and latitude, and confidence of the input image.
ImageObjectAnalyserThe object detection and tracking service can detect and track multiple objects in an image.
ProductVisionSearchAnalyseA user can take a photo of a product, or scan it, to search for similar items online.
ImageTextAnalyseThe text recognition service extracts text from images of receipts, business cards, and documents.
TranslatorThe text translation service can translate text into different languages.
LangDetectionThe language detection service can detect the language of text. Both single-language text and multi-language text are supported.
TtsAnalyseText to speech (TTS) can convert text information into speech output. Rich timbres are supported to produce more natural sounds.

Functions Overview

Return TypeFunction
voidrequestPermissions(permissionList, successCallback, errorCallback)
voidhasPermissions(permissionListInput, successCallback, errorCallback)
voidimageTextAnalyser(ImageTextAnalyserInput, successCallback, errorCallback)
voidgetTextAnalyserInfo(successCallback, errorCallback)
voidstopTextAnalyser(successCallback, errorCallback)
voiddocumentImageAnalyser(documentImageAnalyserInput, successCallback, errorCallback)
voidstopDocumentImageAnalyser(successCallback, errorCallback)
voidimageClassificationAnalyser(imageClassificationInput, successCallback, errorCallback)
voidstopImageClassificationAnalyser(successCallback, errorCallback)
voidremoteTranslator(translateInput, successCallback, errorCallback)
voidremoteLangDetection(remoteLangDetectionInput, successCallback, errorCallback)
voidstopTranslatorService(successCallback, errorCallback)
voidstopLangDetectionService(successCallback, errorCallback)
voidstillFaceAnalyser(faceAnalyserInput, successCallback, errorCallback)
voidstilFaceAnalyserInfo(successCallback, errorCallback)
voidstopStillFaceAnalyser(successCallback, errorCallback)
voidbankCardDetector(bankCardSDKDetectorInput, successCallback, errorCallback)
voidstopBankCardDetector(successCallback, errorCallback)
voidgeneralCardDetector(generalCardDetectorInput, successCallback, errorCallback)
voidimgSegmentation(imgSegmentationInput, successCallback, errorCallback)
voidimgLandMarkAnalyser(imgLandMarkAnalyserInput, successCallback, errorCallback)
voidproductVisionSearch(productVisionSearchInput, successCallback, errorCallback)
voidstopProductVisionSearch(successCallback, errorCallback)
voididCardAnalyser(idCardAnalyserInput, successCallback, errorCallback)
voidobjectAnalyser(objectAnalyserInput, successCallback, errorCallback)
voidttsAnalyser(ttsAnalyserInput, successCallback, errorCallback)
voidttsAnalyserPause(successCallback, errorCallback)
voidttsAnalyserResume(successCallback, errorCallback)
voidttsAnalyserStop(successCallback, errorCallback)

4. Configure Description

No.

5. Licensing and Terms

Apache 2.0 license.