Awesome
capacitor-plugin-dynamsoft-label-recognizer
Capacitor plugin of Dynamsoft Label Recognizer which brings text recognition ability to your apps.
Versions
For Capacitor v6, use v2.x.
For Capacitor v5, use v1.x.
For Capacitor v4, use v0.x.
SDK Versions Used for Different Platforms
Product | Android | iOS | Web |
---|
Dynamsoft Label Recognizer | 2.x | 2.x | 2.x |
Install
npm install capacitor-plugin-dynamsoft-label-recognizer
npx cap sync
Demo
Vanilla JS example
API
<docgen-index>
</docgen-index>
<docgen-api>
<!--Update the source file JSDoc comments and rerun docgen to update the docs below-->
initialize()
initialize() => Promise<void>
initLicense(...)
initLicense(options: { license: string; }) => Promise<void>
Param | Type |
---|
options | <code>{ license: string; }</code> |
recognizeBase64String(...)
recognizeBase64String(options: { base64: string; }) => Promise<{ results: DLRResult[]; }>
Param | Type |
---|
options | <code>{ base64: string; }</code> |
Returns: <code>Promise<{ results: DLRResult[]; }></code>
recognizeBitmap(...)
recognizeBitmap(options: { className?: string; methodName?: string; }) => Promise<{ results: DLRResult[]; }>
Android and iOS only method which directly read camera frames from capacitor-plugin-camera
Param | Type |
---|
options | <code>{ className?: string; methodName?: string; }</code> |
Returns: <code>Promise<{ results: DLRResult[]; }></code>
updateRuntimeSettings(...)
updateRuntimeSettings(options: { settings: RuntimeSettings; }) => Promise<void>
Param | Type |
---|
options | <code>{ settings: <a href="#runtimesettings">RuntimeSettings</a>; }</code> |
resetRuntimeSettings()
resetRuntimeSettings() => Promise<void>
setEngineResourcesPath(...)
setEngineResourcesPath(options: { path: string; }) => Promise<void>
Param | Type |
---|
options | <code>{ path: string; }</code> |
addListener('onResourcesLoadStarted', ...)
addListener(eventName: 'onResourcesLoadStarted', listenerFunc: onResourcesLoadStartedListener) => Promise<PluginListenerHandle>
Param | Type |
---|
eventName | <code>'onResourcesLoadStarted'</code> |
listenerFunc | <code><a href="#onresourcesloadstartedlistener">onResourcesLoadStartedListener</a></code> |
Returns: <code>Promise<<a href="#pluginlistenerhandle">PluginListenerHandle</a>></code>
addListener('onResourcesLoaded', ...)
addListener(eventName: 'onResourcesLoaded', listenerFunc: onResourcesLoadedListener) => Promise<PluginListenerHandle>
Param | Type |
---|
eventName | <code>'onResourcesLoaded'</code> |
listenerFunc | <code><a href="#onresourcesloadedlistener">onResourcesLoadedListener</a></code> |
Returns: <code>Promise<<a href="#pluginlistenerhandle">PluginListenerHandle</a>></code>
removeAllListeners()
removeAllListeners() => Promise<void>
Interfaces
DLRResult
Prop | Type |
---|
location | <code><a href="#dlrquadrilateral">DLRQuadrilateral</a></code> |
confidence | <code>number</code> |
lineResults | <code>DLRLineResult[]</code> |
DLRQuadrilateral
Prop | Type |
---|
points | <code>DLRPoint[]</code> |
DLRPoint
Prop | Type |
---|
x | <code>number</code> |
y | <code>number</code> |
DLRLineResult
Prop | Type |
---|
text | <code>string</code> |
location | <code><a href="#dlrquadrilateral">DLRQuadrilateral</a></code> |
confidence | <code>number</code> |
isCheckDigitMatched | <code>boolean</code> |
RuntimeSettings
Prop | Type |
---|
template | <code>string</code> |
customModelConfig | <code><a href="#custommodelconfig">CustomModelConfig</a></code> |
CustomModelConfig
Prop | Type |
---|
customModelFolder | <code>string</code> |
customModelFileNames | <code>string[]</code> |
PluginListenerHandle
Prop | Type |
---|
remove | <code>() => Promise<void></code> |
Type Aliases
onResourcesLoadStartedListener
<code>(resourcePath: string): void</code>
onResourcesLoadedListener
<code>(resourcePath: string): void</code>
</docgen-api>