diff --git a/_config.yml b/_config.yml index 7d55943..4ddf3e2 100644 --- a/_config.yml +++ b/_config.yml @@ -42,7 +42,8 @@ dcp_ios: /code-parser/docs/mobile/programming/ios/ dcp_ios_api: /code-parser/docs/mobile/programming/ios/api-reference/ -useVersionTree: true +useVersionTree: false +isDCV: true baseurl: "/label-recognition/docs/mobile" diff --git a/_data/full_tree.yml b/_data/full_tree.yml deleted file mode 100644 index 6ac26a9..0000000 --- a/_data/full_tree.yml +++ /dev/null @@ -1,13 +0,0 @@ -tree_file_list: - - sidelist-full-tree.html - - sidelist-programming/programming-android-v1.2.1.html - - sidelist-programming/programming-android-v2.0.0.html - - sidelist-programming/programming-android-v2.2.20.html - - sidelist-programming/programming-android-v3.0.20.html - - sidelist-programming/programming-android.html - - sidelist-programming/programming-objectivec-swift-v1.2.1.html - - sidelist-programming/programming-objectivec-swift-v2.0.0.html - - sidelist-programming/programming-objectivec-swift-v2.2.20.html - - sidelist-programming/programming-objectivec-swift-v3.0.20.html - - sidelist-programming/programming-objectivec-swift.html - diff --git a/_data/product_version.yml b/_data/product_version.yml deleted file mode 100644 index c1c4d96..0000000 --- a/_data/product_version.yml +++ /dev/null @@ -1,16 +0,0 @@ -useGroupedVersion: true - -version_info_list: - - value: latest version (3.2.30) - - value: 3.x - child: - - 3.0.20 - - value: 2.x - child: - - 2.2.20 - - 2.0.0 - - value: 1.x - child: - - 1.2.1 - - 1.2.0 - - 1.0.0 diff --git a/_includes/release-notes/product-highlight-1.0.md b/_includes/release-notes/product-highlight-1.0.md deleted file mode 100644 index bbd7ba5..0000000 --- a/_includes/release-notes/product-highlight-1.0.md +++ /dev/null @@ -1,9 +0,0 @@ - - -- Supports text recognition from BMP, JPEG, PNG and single-page TIFF files. -- Supports zonal OCR and provides three ways to localize text areas: - - Pre-define an area manually in pixel or percentage. - - Specify an area relative to the barcode zone, which allows you to recognize accompanying texts near the barcode. - - Specify an area relative to blocks which share the same colour or uses the same font colour. A common example would be a price tag, where the text of interest is always on a yellow square background, the yellow square can serve as the reference region. -- Supports specifying a regular expression to improve recognition accuracy and robustness. - diff --git a/_includes/release-notes/product-highlight-1.2.md b/_includes/release-notes/product-highlight-1.2.md deleted file mode 100644 index 320a5d4..0000000 --- a/_includes/release-notes/product-highlight-1.2.md +++ /dev/null @@ -1,14 +0,0 @@ - - -- Added timeout mechanism. DLR checks at a few points whether the elapsed time for the current image is longer than its value. If so, DLR will end the flow. Timeout prevents one image from costing too much time. - -- Added parameters for lines filtering: - - `LineStringLengthRange` is used to define the minimum and maximum string length when running the recognition process on a specific line. - - `MaxLineCharacterSpacing` is used to control the spacing between characters treated as one line. - -- Improved the regular expression parameter by supporting more [RegEx pattern syntaxes]({{ site.parameters-reference }}label-recognition-parameter/parameter-control.html#textregexpattern). - -- Improved the recognition accuracy when dealing with skewed and italics characters. - -- Improved the recognition accuracy for serif fonts. - diff --git a/_includes/release-notes/product-highlight-2.0.md b/_includes/release-notes/product-highlight-2.0.md deleted file mode 100644 index 65d6cfc..0000000 --- a/_includes/release-notes/product-highlight-2.0.md +++ /dev/null @@ -1,18 +0,0 @@ - - -- Added image processing modes to enhance the usage scenarios like MRZ reading: - - Texture area detection - - Color Conversion - - Binarization - - Grayscale image processing - -- Added dictionary-based correction. The dictionary is minimal and customizable to only cover a scenario-oriented vocabulary. - -- Improved the overall performance by replacing Caffe engine with OpenCV dnn engine - -- Improved the readability of recognizing skewed characters. - -- Improved the MRZ reading performance. - -- Added a `core` library. Migrated the core structs/classes from the LabelRecognizer library to the `core` library. - diff --git a/_includes/release-notes/product-highlight-2.2.md b/_includes/release-notes/product-highlight-2.2.md deleted file mode 100644 index 96e0012..0000000 --- a/_includes/release-notes/product-highlight-2.2.md +++ /dev/null @@ -1,8 +0,0 @@ - - -- Improved the performance of the MRZ scenario. The recognition speed is improved by about 70%. - -- Added character normalization modes to normalize the text. This feature will improve the read rate when processing the text in nonstandard fonts like dot matrix. - -- New parameter control and recognition methods are added to fit more usage scenarios. - diff --git a/_includes/release-notes/product-highlight-3.0.0.md b/_includes/release-notes/product-highlight-3.0.0.md deleted file mode 100644 index 2c9db35..0000000 --- a/_includes/release-notes/product-highlight-3.0.0.md +++ /dev/null @@ -1,16 +0,0 @@ - -`DynamsoftLabelRecognizer` SDK has been revamped to integrate with `DynamsoftCaptureVision (DCV)` architecture, which is newly established to aggregate the features of functional products powered by Dynamsoft. The features are designed to be pluggable, customizable and interactable. In addition, the functional products share the computation so that their processing speed is much higher than working individually. - -* `DynamsoftCaptureVision` architecture consists of: - * `ImageSourceAdapter(ISA)`, the standard input interface for you to convert image data from different sources into the standard input image data. In addition, `ISA` incorporates an image buffer management system that allows instant access to the buffered image data. - * `CaptureVisionRouter (CVR)`, an engine for you to update templates, retrieve images from `ISA`, coordinate corresponding functional products and dispatch the results to the receivers. - * Functional products that perform image processing, content understanding and semantic processing. The functional products are pluggable and passively called by CVR when they are required. - * Result receiver interfaces. You can implement `CapturedResultReceiver (CRR)` to receive the `CapturedResults` that output when the processing on an image is finalized. You can also implement `IntermediateResultReceiver (IRR)` to get timely results from different stages of the workflow. -* The parameter template system has been comprehensively upgraded. - * Multiple algorithm task settings are available. You can define barcode decoding, label recognizing, document scanning and semantic processing tasks in one template file. - * Extended the feature of the ROI system. By configuring the `target ROI` parameters, you can not only specify an `ROI` on the original image but also define the dependencies of the algorithm tasks. This feature enables you to customize the workflow when processing complex scenarios. - * The image processing parameters are separated from the task parameters so that the template settings become more clear and concise. -* The `intermediate result` system has been improved. - * Achieved the `intermediate result` sharing between different functional products. The results that have the same image source and processing parameters are directly reused, which speeds up the image processing workflow. You don’t need to add any additional code to enable the `intermediate result` sharing. The library can recognize all the reusable results automatically based on the template file you uploaded. - * The readability and interactivity of the `intermediate results` are enhanced. `IntermediateResultReceiver` allows you to receive up to 27 different types of `Intermediate results`. You can clearly read which stage of the algorithm each result is output from. In addition, `IntermediateResultManager` allows you to intervene in the workflows by modifying the `intermediate results`. - diff --git a/_includes/sidelist-full-tree.html b/_includes/sidelist-full-tree.html deleted file mode 100644 index 0dc0690..0000000 --- a/_includes/sidelist-full-tree.html +++ /dev/null @@ -1,8 +0,0 @@ -
  • - iOS Edition Introduction -
  • -{%- include liquid_searchVersionTreeFile.html ver=include.ver curPath=include.curPath targetRelativePath="sidelist-programming/programming-objectivec-swift.html" -%} -
  • - Android Edition Introduction -
  • -{%- include liquid_searchVersionTreeFile.html ver=include.ver curPath=include.curPath targetRelativePath="sidelist-programming/programming-android.html" -%} diff --git a/_includes/sidelist-programming/programming-android-v1.2.1.html b/_includes/sidelist-programming/programming-android-v1.2.1.html deleted file mode 100644 index 654fd5c..0000000 --- a/_includes/sidelist-programming/programming-android-v1.2.1.html +++ /dev/null @@ -1,35 +0,0 @@ -
  • DEVELOPMENT
  • -
  • User Guide
  • - -
  • API Reference - -
  • -
  • USEFUL RESOURCES
  • - -
  • Release Notes - -
  • \ No newline at end of file diff --git a/_includes/sidelist-programming/programming-android-v2.0.0.html b/_includes/sidelist-programming/programming-android-v2.0.0.html deleted file mode 100644 index d8f2d9f..0000000 --- a/_includes/sidelist-programming/programming-android-v2.0.0.html +++ /dev/null @@ -1,33 +0,0 @@ -
  • DEVELOPMENT
  • -
  • User Guide
  • - -
  • API Reference - -
  • -
  • USEFUL RESOURCES
  • - -
  • Release Notes - -
  • \ No newline at end of file diff --git a/_includes/sidelist-programming/programming-android-v2.2.20.html b/_includes/sidelist-programming/programming-android-v2.2.20.html deleted file mode 100644 index 078120d..0000000 --- a/_includes/sidelist-programming/programming-android-v2.2.20.html +++ /dev/null @@ -1,85 +0,0 @@ -
  • DEVELOPMENT
  • -
  • User Guide
  • -
  • Demo & Samples - -
  • -
  • API Reference - -
  • -
  • USEFUL RESOURCES
  • - -
  • Release Notes - -
  • \ No newline at end of file diff --git a/_includes/sidelist-programming/programming-android-v3.0.20.html b/_includes/sidelist-programming/programming-android-v3.0.20.html deleted file mode 100644 index 935bb70..0000000 --- a/_includes/sidelist-programming/programming-android-v3.0.20.html +++ /dev/null @@ -1,235 +0,0 @@ -
  • DEVELOPMENT ON ANDROID
  • - -
  • User Guide - -
  • -
  • Demo & Samples - -
  • -
  • API Reference - -
  • - -
  • USEFUL RESOURCES
  • -
  • Release Notes - -
  • -
  • Upgrade Instructions
  • - -
  • OTHERS
  • -
  • Develop for iOS (Objective-C & Swift)
  • diff --git a/_includes/sidelist-programming/programming-android.html b/_includes/sidelist-programming/programming-android.html deleted file mode 100644 index 2672468..0000000 --- a/_includes/sidelist-programming/programming-android.html +++ /dev/null @@ -1,243 +0,0 @@ -
  • DEVELOPMENT ON ANDROID
  • - -
  • User Guide - -
  • -
  • Demo & Samples - -
  • -
  • API Reference - -
  • - -
  • USEFUL RESOURCES
  • -
  • Release Notes - -
  • -
  • Upgrade Instructions
  • - -
  • OTHERS
  • -
  • Develop for iOS (Objective-C & Swift)
  • diff --git a/_includes/sidelist-programming/programming-objectivec-swift-v1.2.1.html b/_includes/sidelist-programming/programming-objectivec-swift-v1.2.1.html deleted file mode 100644 index 8955e75..0000000 --- a/_includes/sidelist-programming/programming-objectivec-swift-v1.2.1.html +++ /dev/null @@ -1,34 +0,0 @@ -
  • DEVELOPMENT
  • -
  • User Guide
  • - -
  • API Reference - -
  • -
  • USEFUL RESOURCES
  • - -
  • Release Notes - -
  • \ No newline at end of file diff --git a/_includes/sidelist-programming/programming-objectivec-swift-v2.0.0.html b/_includes/sidelist-programming/programming-objectivec-swift-v2.0.0.html deleted file mode 100644 index 7f7879d..0000000 --- a/_includes/sidelist-programming/programming-objectivec-swift-v2.0.0.html +++ /dev/null @@ -1,31 +0,0 @@ -
  • DEVELOPMENT
  • -
  • User Guide
  • - -
  • API Reference - -
  • -
  • USEFUL RESOURCES
  • - -
  • Release Notes - -
  • \ No newline at end of file diff --git a/_includes/sidelist-programming/programming-objectivec-swift-v2.2.20.html b/_includes/sidelist-programming/programming-objectivec-swift-v2.2.20.html deleted file mode 100644 index 7dc055c..0000000 --- a/_includes/sidelist-programming/programming-objectivec-swift-v2.2.20.html +++ /dev/null @@ -1,82 +0,0 @@ -
  • DEVELOPMENT
  • - -
  • User Guide
  • -
  • Demo & Samples - -
  • -
  • API Reference - -
  • -
  • USEFUL RESOURCES
  • - -
  • Release Notes - -
  • \ No newline at end of file diff --git a/_includes/sidelist-programming/programming-objectivec-swift-v3.0.20.html b/_includes/sidelist-programming/programming-objectivec-swift-v3.0.20.html deleted file mode 100644 index b13d34f..0000000 --- a/_includes/sidelist-programming/programming-objectivec-swift-v3.0.20.html +++ /dev/null @@ -1,296 +0,0 @@ -
  • DEVELOPMENT ON IOS
  • - -
  • User Guide - -
  • -
  • Demo & Samples - -
  • -
  • API Reference - -
  • - -
  • USEFUL RESOURCES
  • -
  • Release Notes - -
  • -
  • Upgrade Instructions
  • - -
  • OTHERS
  • -
  • Develop for Android (Java & Kotlin)
  • diff --git a/_includes/sidelist-programming/programming-objectivec-swift.html b/_includes/sidelist-programming/programming-objectivec-swift.html deleted file mode 100644 index b6e19d0..0000000 --- a/_includes/sidelist-programming/programming-objectivec-swift.html +++ /dev/null @@ -1,248 +0,0 @@ -
  • DEVELOPMENT ON IOS
  • - -
  • User Guide - -
  • -
  • Demo & Samples - -
  • -
  • API Reference - -
  • - -
  • USEFUL RESOURCES
  • -
  • Release Notes - -
  • -
  • Upgrade Instructions
  • - -
  • OTHERS
  • -
  • Develop for Android (Java & Kotlin)
  • diff --git a/_layouts/default-layout.html b/_layouts/default-layout.html deleted file mode 100644 index 00f2eb0..0000000 --- a/_layouts/default-layout.html +++ /dev/null @@ -1,110 +0,0 @@ - - - -{%- include head.html -%} -{%- assign noTitleIndex = "" -%} -{%- if page.noTitleIndex or page.url contains 'release-notes' -%} - {%- assign noTitleIndex = "noTitleIndex" -%} -{%- endif -%} - - {% assign url = 'https://www.dynamsoft.com/shared/head/' %} - {% remote_include {{ url }} %} - - {%- include dlrNav.html -%} -
    Table of contents
    -
    -
    -
    -
    - {%- include main-page-head.html -%} -
    -
    -
    -
    -

    Thanks for downloading Dynamsoft Label Recognizer Package!

    -

    Your download will start shortly. If your download does not begin, click here to retry.

    -
    - {{ content }} - -
    -
    -
    -

    This page is compatible for:

    -

    Version 7.5.0

    -
    -
    -

    Is this page helpful?

    - YesYes - NoNo -
    -
    {%- if page.needAutoGenerateSidebar -%} -

    In this article:

    -
    - {%- endif -%} -
    -
    - -
    - -
    -
    -
    -
    -
    - {%- include liquid_autoGenerateHistoryList.html -%} {%- include auto-version-list.html -%} -
    -
    -
    -
    - {%- include page_footer.html -%} -
    - - - - - - {%- include livehelp.html -%} - - - - - - - - - - - - diff --git a/_layouts/developing.html b/_layouts/developing.html deleted file mode 100644 index 0c9314f..0000000 --- a/_layouts/developing.html +++ /dev/null @@ -1,93 +0,0 @@ - - - -{%- include head.html -%} - - -
    - {%- include page_header.html -%} -
    -
    -
    -
    - -
    -
    -
    -
    -
    - -
    -
    - {%- include main-page-head.html -%} -
    -
    -
    -

    in the process of development

    -

    Back to Homepage

    - {{ content }} -
    -
    -
    -
    -
    -
    - {%- include page_footer.html -%} -
    - - - - {%- if page.needAutoGenerateSidebar -%} - - {%- else -%} - - {%- endif -%} - - - - - - diff --git a/_layouts/home-page.html b/_layouts/home-page.html deleted file mode 100644 index 89aa900..0000000 --- a/_layouts/home-page.html +++ /dev/null @@ -1,50 +0,0 @@ - - - -{%- include head.html -%} - - - - - {% assign url = 'https://www.dynamsoft.com/shared/head/' %} - {% remote_include {{ url }} %} - -
    -
    -
    - - {{ content }} -
    -
    -
    -
    - {%- include page_footer.html -%} -
    - - - - - - - diff --git a/_layouts/search-page.html b/_layouts/search-page.html deleted file mode 100644 index 0d1a7ea..0000000 --- a/_layouts/search-page.html +++ /dev/null @@ -1,318 +0,0 @@ - - - -{%- include head.html -%} - - - - {% assign url = 'https://www.dynamsoft.com/shared/head/' %} - {% remote_include {{ url }} %} - -
    -
    - -
    -
    -
    - -
    Documentation
    -
    -
    -
    -
    -
    -
    -
    - -
    -
    -
    -
    -
    -
    -
    Table of contents
    -
    -
    -
    -
    -
    -
    -
    -

    Search

    - - -
    -
    -
    - -
    -
    -
    -
    -
    - {%- include page_footer.html -%} -
    - - - - - {%- if page.needAutoGenerateSidebar -%} - {%- unless page.needGenerateH3Content -%} - - {%- else -%} - - {%- endunless -%} - {%- else -%} - - {%- endif -%} - - - - {%- include livehelp.html -%} - - - \ No newline at end of file diff --git a/assets/js/dlrMobileVersionSearch.json b/assets/js/dlrMobileVersionSearch.json deleted file mode 100644 index ebc1683..0000000 --- a/assets/js/dlrMobileVersionSearch.json +++ /dev/null @@ -1,250 +0,0 @@ -[ - { - "version": "3.2.30", - "matchList": { - "android":{ - "dcvRepoMobile": [ - { - "path": "/programming/android/api-reference/utility", - "version": "1.2.20" - }, { - "path": "/programming/android/api-reference/license", - "version": "3.2.20" - }, { - "path": "/programming/android/api-reference/capture-vision-router", - "version": "2.2.30" - }, { - "path": "/programming/android/api-reference/core", - "version": "3.2.30" - }, { - "path": "/programming/android/api-reference/image-processing", - "version": "2.2.30" - } - ], - "dcvRepoCore": [ - { - "path": "/enums/utility", - "version": "1.2.20" - }, { - "path": "/enums/license", - "version": "3.2.20" - }, { - "path": "/enums/capture-vision-router", - "version": "2.2.30" - }, { - "path": "/enums/core", - "version": "3.2.30" - },{ - "path": "/parameters/reference/capture-vision-template", - "version": "2.2.30" - },{ - "path": "/parameters/reference/target-roi-def", - "version": "2.2.30" - },{ - "path": "/parameters/reference/label-recognizer-task-settings", - "version": "3.2.30" - },{ - "path": "/parameters/reference/image-parameter", - "version": "2.2.30" - },{ - "path": "/parameters/reference/text-line-specification", - "version": "3.2.30" - },{ - "path": "/parameters/reference/image-source-options", - "version": "3.2.30" - },{ - "path": "/parameters/reference/global-parameter", - "version": "2.2.30" - } - ], - "dce": "4.2.10" - }, - "ios":{ - "dcvRepoMobile": [ - { - "path": "/programming/objectivec-swift/api-reference/utility", - "version": "1.2.20" - }, { - "path": "/programming/objectivec-swift/api-reference/license", - "version": "3.2.20" - }, { - "path": "/programming/objectivec-swift/api-reference/capture-vision-router", - "version": "2.2.30" - }, { - "path": "/programming/objectivec-swift/api-reference/core", - "version": "3.2.30" - }, { - "path": "/programming/objectivec-swift/api-reference/image-processing", - "version": "2.2.30" - } - ], - "dcvRepoCore": [ - { - "path": "/enums/utility", - "version": "1.2.20" - }, { - "path": "/enums/license", - "version": "3.2.20" - }, { - "path": "/enums/capture-vision-router", - "version": "2.2.30" - }, { - "path": "/enums/core", - "version": "3.2.30" - },{ - "path": "/parameters/reference/capture-vision-template", - "version": "2.2.30" - },{ - "path": "/parameters/reference/target-roi-def", - "version": "2.2.30" - },{ - "path": "/parameters/reference/label-recognizer-task-settings", - "version": "3.2.30" - },{ - "path": "/parameters/reference/image-parameter", - "version": "2.2.30" - },{ - "path": "/parameters/reference/text-line-specification", - "version": "3.2.30" - },{ - "path": "/parameters/reference/image-source-options", - "version": "3.2.30" - },{ - "path": "/parameters/reference/global-parameter", - "version": "2.2.30" - } - ], - "dce": "4.2.10" - } - } - },{ - "version": "3.0.20", - "matchList": { - "android":{ - "dcvRepoMobile": [ - { - "path": "/programming/android/api-reference/utility", - "version": "1.0.21" - }, { - "path": "/programming/android/api-reference/license", - "version": "3.0.20" - }, { - "path": "/programming/android/api-reference/capture-vision-router", - "version": "2.0.21" - }, { - "path": "/programming/android/api-reference/core", - "version": "3.0.20" - }, { - "path": "/programming/android/api-reference/image-processing", - "version": "2.0.21" - } - ], - "dcvRepoCore": [ - { - "path": "/enums/utility", - "version": "1.0.21" - }, { - "path": "/enums/license", - "version": "3.0.20" - }, { - "path": "/enums/capture-vision-router", - "version": "2.0.21" - }, { - "path": "/enums/core", - "version": "3.0.20" - },{ - "path": "/parameters/reference/capture-vision-template", - "version": "2.0.21" - },{ - "path": "/parameters/reference/target-roi-def", - "version": "2.0.21" - },{ - "path": "/parameters/reference/label-recognizer-task-settings", - "version": "3.0.20" - },{ - "path": "/parameters/reference/image-parameter", - "version": "2.0.21" - },{ - "path": "/parameters/reference/text-line-specification", - "version": "3.0.20" - },{ - "path": "/parameters/reference/image-source-options", - "version": "3.0.20" - },{ - "path": "/parameters/reference/global-parameter", - "version": "2.0.21" - } - ], - "dce": "4.0.2" - }, - "ios":{ - "dcvRepoMobile": [ - { - "path": "/programming/objectivec-swift/api-reference/utility", - "version": "1.0.21" - }, { - "path": "/programming/objectivec-swift/api-reference/license", - "version": "3.0.20" - }, { - "path": "/programming/objectivec-swift/api-reference/capture-vision-router", - "version": "2.0.21" - }, { - "path": "/programming/objectivec-swift/api-reference/core", - "version": "3.0.20" - }, { - "path": "/programming/objectivec-swift/api-reference/image-processing", - "version": "2.0.21" - } - ], - "dcvRepoCore": [ - { - "path": "/enums/utility", - "version": "1.0.21" - }, { - "path": "/enums/license", - "version": "3.0.20" - }, { - "path": "/enums/capture-vision-router", - "version": "2.0.21" - }, { - "path": "/enums/core", - "version": "3.0.20" - },{ - "path": "/parameters/reference/capture-vision-template", - "version": "2.0.21" - },{ - "path": "/parameters/reference/target-roi-def", - "version": "2.0.21" - },{ - "path": "/parameters/reference/label-recognizer-task-settings", - "version": "3.0.20" - },{ - "path": "/parameters/reference/image-parameter", - "version": "2.0.21" - },{ - "path": "/parameters/reference/text-line-specification", - "version": "3.0.20" - },{ - "path": "/parameters/reference/image-source-options", - "version": "3.0.20" - },{ - "path": "/parameters/reference/global-parameter", - "version": "2.0.21" - } - ], - "dce": "4.0.2" - } - } - },{ - "version": "2.2.20", - "matchList": { - "android": { - "dce": "3.0.3" - }, - "ios": { - "dce": "3.0.3" - } - } - } -] - \ No newline at end of file diff --git a/programming-old/android/api-reference/barcode-result.md b/programming-old/android/api-reference/barcode-result.md deleted file mode 100644 index f536807..0000000 --- a/programming-old/android/api-reference/barcode-result.md +++ /dev/null @@ -1,111 +0,0 @@ ---- -layout: default-layout -title: Dynamsoft Core Android Class - BarcodeResult -description: This page shows the BarcodeResult Class of Dynamsoft Core for Android Language. -keywords: BarcodeResult, Android -needAutoGenerateSidebar: true -needGenerateH3Content: true -noTitleIndex: true -permalink: /programming/android/api-reference/barcode-result.html ---- - - -# BarcodeResult - -> You are viewing a history document page of Dynamsoft Label Recognizer Android v2.2.20. - -Stores the barcode result. - -```java -class com.dynamsoft.core.BarcodeResult -``` - -## Attributes - -| Attribute | Type | -|---------- | ---- | -| [`barcodeFormat`](#barcodeformat) | *int* | -| [`barcodeFormat_2`](#barcodeformat_2) | *int* | -| [`text`](#text) | *String* | -| [`bytes`](#bytes) | *byte[]* | -| [`location`](#location) | [`Quadrilateral`](quadrilateral.md) | -| [`moduleSize`](#modulesize) | *int* | -| [`pageNumber`](#pagenumber) | *int* | - -  - -### barcodeFormat - -Barcode type in BarcodeFormat group 1. - -```java -int barcodeFormat -``` - -**See also** - -[`EnumBarcodeFormat`]({{ site.enumerations }}barcode-format.html) - -  - -### barcodeFormat_2 - -Barcode type in BarcodeFormat group 2. - -```java -int barcodeFormat_2 -``` - -**See also** - -[`EnumBarcodeFormat_2`]({{ site.enumerations }}barcode-format-2.html) - -  - -### text - -The barcode text. - -```java -String text -``` - -  - -### bytes - -The barcode content in a byte array. - -```java -byte[] bytes -``` - -  - -### location - -The location of current recognized text. - -```java -Quadrilateral location -``` - -  - -### moduleSize - -The barcode module size (the minimum bar width in pixel). - -```java -int moduleSize -``` - -  - -### pageNumber - -The page number the barcode located in. The index is 0-based. - -```java -int pageNumber -``` diff --git a/programming-old/android/api-reference/class/dlr-character-result.md b/programming-old/android/api-reference/class/dlr-character-result.md deleted file mode 100644 index 4507754..0000000 --- a/programming-old/android/api-reference/class/dlr-character-result.md +++ /dev/null @@ -1,54 +0,0 @@ ---- -layout: default-layout -title: DLRCharacterResult - Dynamsoft Label Recognition Android Class -description: This page shows the DLRCharacterResult struct of Dynamsoft Label Recognition for Android Language. -keywords: DLRCharacterResult, android -needAutoGenerateSidebar: true -permalink: /programming/android/api-reference/class/dlr-character-result.html ---- - - -# DLRCharacterResult - -> You are viewing a history document page of Dynamsoft Label Recognizer Android v1.x. - -Stores the character result. - - -## Attributes - -| Attribute | Type | -|---------- | ---- | -| [`characterH`](#characterh) | *char* | -| [`characterM`](#characterm) | *char* | -| [`characterL`](#characterl) | *char* | -| [`location`](#location) | [`DLRQuadrilateral`](dlr-quadrilateral.md) | - - -### characterH -The recognized character with highest confidence. - -```java -char com.dynamsoft.dlr.DLRCharacterResult.characterH -``` - -### characterM -The recognized character with middle confidence. - -```java -char com.dynamsoft.dlr.DLRCharacterResult.characterM -``` - -### characterL -The recognized character with lowest confidence. - -```java -char com.dynamsoft.dlr.DLRCharacterResult.characterL -``` - -### location -The location of current character. - -```java -DLRQuadrilateral com.dynamsoft.dlr.DLRCharacterResult.location -``` diff --git a/programming-old/android/api-reference/class/dlr-image-data.md b/programming-old/android/api-reference/class/dlr-image-data.md deleted file mode 100644 index 82f17d1..0000000 --- a/programming-old/android/api-reference/class/dlr-image-data.md +++ /dev/null @@ -1,59 +0,0 @@ ---- -layout: default-layout -title: DLRImageData - Dynamsoft Label Recognition Android Class -description: This page shows the DLRImageData struct of Dynamsoft Label Recognition for Android Language. -keywords: DLRImageData, android -needAutoGenerateSidebar: true -permalink: /programming/android/api-reference/class/dlr-image-data.html ---- - - -# DLRImageData - -> You are viewing a history document page of Dynamsoft Label Recognizer Android v1.x. - -Stores the image data. - - -## Attributes - -| Attribute | Type | -|---------- | ---- | -| [`bytes`](#bytes) | *byte[]* | -| [`width`](#width) | *int* | -| [`height`](#height) | *int* | -| [`stride`](#stride) | *int* | -| [`format`](#format) | [`DLRImagePixelFormat`]({{ site.enumerations }}other-enums.html#dlrimagepixelformat) | - - -### bytes -The image data content in a byte array. -```java -byte[] com.dynamsoft.dlr.DLRImageData.bytes -``` - -### width -The width of the image in pixels. -```java -int com.dynamsoft.dlr.DLRImageData.width -``` - -### height -The height of the image in pixels. -```java -int com.dynamsoft.dlr.DLRImageData.height -``` - -### stride -The stride (or scan width) of the image. -```java -int com.dynamsoft.dlr.DLRImageData.stride -``` - -### format -The image pixel format used in the image byte array. -```java -DLRImagePixelFormat com.dynamsoft.dlr.DLRImageData.format -``` - - diff --git a/programming-old/android/api-reference/class/dlr-line-result.md b/programming-old/android/api-reference/class/dlr-line-result.md deleted file mode 100644 index 9a8c0f7..0000000 --- a/programming-old/android/api-reference/class/dlr-line-result.md +++ /dev/null @@ -1,72 +0,0 @@ ---- -layout: default-layout -title: DLRLineResult - Dynamsoft Label Recognition Android Class -description: This page shows the DLRLineResult struct of Dynamsoft Label Recognition for Android Language. -keywords: DLRLineResult, struct, android -needAutoGenerateSidebar: true -permalink: /programming/android/api-reference/class/dlr-line-result.html ---- - - -# DLRLineResult - -> You are viewing a history document page of Dynamsoft Label Recognizer Android v1.x. - -Stores the line result. - - -## Attributes - -| Attribute | Type | -|---------- | ---- | -| [`lineSpecificationName`](#linespecificationname) | *String* | -| [`text`](#text) | *String* | -| [`characterModelName`](#charactermodelname) | *String* | -| [`location`](#location) | [`DLRQuadrilateral`](dlr-quadrilateral.md) | -| [`confidence`](#confidence) | *int* | -| [`characterResults`](#characterresults) | [`DLRCharacterResult[]`](dlr-character-result.md) | - - -### lineSpecificationName -The name of the line specification used to recognize current line result. - -```java -String com.dynamsoft.dlr.DLRLineResult.lineSpecificationName -``` - -### text -The recognized text, ends by '\0'. - -```java -String com.dynamsoft.dlr.DLRLineResult.text -``` - -### characterModelName -The character model used to recognize the text. - -```java -String com.dynamsoft.dlr.DLRLineResult.characterModelName -``` - -### location -The location of current line. - -```java -DLRQuadrilateral com.dynamsoft.dlr.DLRLineResult.location -``` - - -### confidence -The confidence of the result. It ranges from 0 to 100. - -```java -int com.dynamsoft.dlr.DLRLineResult.confidence -``` - -### characterResults -The character results array. - -```java -DLRCharacterResult[] com.dynamsoft.dlr.DLRLineResult.characterResults -``` - diff --git a/programming-old/android/api-reference/class/dlr-point.md b/programming-old/android/api-reference/class/dlr-point.md deleted file mode 100644 index bfb8b5b..0000000 --- a/programming-old/android/api-reference/class/dlr-point.md +++ /dev/null @@ -1,39 +0,0 @@ ---- -layout: default-layout -title: DLRPoint - Dynamsoft Label Recognition Android Class -description: This page shows the DLRPoint struct of Dynamsoft Label Recognition for Android Language. -keywords: DLRPoint, struct, android -needAutoGenerateSidebar: true -permalink: /programming/android/api-reference/class/dlr-point.html ---- - - -# DLRPoint - -> You are viewing a history document page of Dynamsoft Label Recognizer Android v1.x. - -Stores an x- and y-coordinate pair in two-dimensional space. - - -## Attributes - -| Attribute | Type | -|---------- | ---- | -| [`x`](#x) | *int* | -| [`y`](#y) | *int* | - - -### x -The X coordinate of the point. - -```java -int com.dynamsoft.dlr.DLRPoint.x -``` - - -### y -The Y coordinate of the point. - -```java -int com.dynamsoft.dlr.DLRPoint.y -``` diff --git a/programming-old/android/api-reference/class/dlr-quadrilateral.md b/programming-old/android/api-reference/class/dlr-quadrilateral.md deleted file mode 100644 index 9b142c7..0000000 --- a/programming-old/android/api-reference/class/dlr-quadrilateral.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -layout: default-layout -title: DLRQuadrilateral - Dynamsoft Label Recognition Android Class -description: This page shows the DLRQuadrilateral struct of Dynamsoft Label Recognition for Android Language. -keywords: DLRQuadrilateral, struct, android -needAutoGenerateSidebar: true -permalink: /programming/android/api-reference/class/dlr-quadrilateral.html ---- - - -# DLRQuadrilateral - -> You are viewing a history document page of Dynamsoft Label Recognizer Android v1.x. - -Stores the quadrilateral. - - -## Attributes - -| Attribute | Type | -|---------- | ---- | -| [`points`](#points) | [`DLRPoint[]`](dlr-point.md) | - - -### points -Four vertexes in a clockwise direction of a quadrilateral. Index 0 represents the left-most vertex. -```java -DLRPoint[] com.dynamsoft.dlr.DLRQuadrilateral.points -``` - - - diff --git a/programming-old/android/api-reference/class/dlr-reference-region.md b/programming-old/android/api-reference/class/dlr-reference-region.md deleted file mode 100644 index 388bd0d..0000000 --- a/programming-old/android/api-reference/class/dlr-reference-region.md +++ /dev/null @@ -1,158 +0,0 @@ ---- -layout: default-layout -title: DLRReferenceRegion - Dynamsoft Label Recognition Android Class -description: This page shows the DLRReferenceRegion struct of Dynamsoft Label Recognition for Android Language. -keywords: DLRReferenceRegion, struct, android -needAutoGenerateSidebar: true -permalink: /programming/android/api-reference/class/dlr-reference-region.html ---- - - -# DLRReferenceRegion - -> You are viewing a history document page of Dynamsoft Label Recognizer Android v1.x. - -Stores the reference region information. - - -## Attributes - -| Attribute | Type | -|---------- | ---- | -| [`localizationSourceType`](#localizationsourcetype) | [`DLRLocalizationSourceType`]({{ site.enumerations }}other-enums.html#dlrlocalizationsourcetype) | -| [`points`](#points) | [`DLRPoint[]`](dlr-point.md) | -| [`regionMeasuredByPercentage`](#regionmeasuredbypercentage) | *int* | -| [`regionPredetectionModesIndex`](#regionpredetectionmodesindex) | *int* | -| [`barcodeFormatIds`](#barcodeformatids) | *int* | -| [`barcodeFormatIds_2`](#barcodeformatids_2) | *int* | -| [`barcodeTextRegExPattern`](#barcodetextregexpattern) | *String* | - -### localizationSourceType -The source type used to localize the reference region(s). - -```java -int com.dynamsoft.dlr.DLRReferenceRegion.localizationSourceType -``` - -**Value Range** - -A value of [`DLRLocalizationSourceType`]({{ site.enumerations }}other-enums.html#dlrlocalizationsourcetype) Enumeration items. - -**Default value** - -`DLR_LST_MANUAL_SPECIFICATION` - -**Remarks** - - - -### points -Four vertexes in a clockwise direction of a quadrilateral. Index 0 represents the left-most vertex. -```java -DLRPoint[] com.dynamsoft.dlr.DLRReferenceRegion.points -``` - -**Remarks** - -It works only when [localizationSourceType](#localizationsourcetype) is setting to DLR_LST_MANUAL_SPECIFICATION.
    - The library will localize reference region(s) based on the quadrilateral set by current setting.
    - -### regionMeasuredByPercentage -Whether or not to use percentage to measure the coordinate. - -```java -int com.dynamsoft.dlr.DLRReferenceRegion.regionMeasuredByPercentage -``` - -**Value Range** - -[0, 1] - -**Default value** - -1 - -**Remarks** - -It works only when [localizationSourceType](#localizationsourcetype) is setting to DLR_LST_MANUAL_SPECIFICATION.
    - 0: not by percentage
    - 1: by percentage
    - When it's set to 1, the values of points indicate percentage (from 0 to 100); Otherwise, they indicate coordinates in pixel. - - -### regionPredetectionModesIndex -The index of a specific region predetection mode in the regionPredetectionModes parameter. - -```java -int com.dynamsoft.dlr.DLRReferenceRegion.regionPredetectionModesIndex -``` - -**Value Range** - -[-1, 0x7fffffff] - -**Default value** - --1 - -**Remarks** - -It works only when [localizationSourceType](#localizationsourcetype) is setting to DLR_LST_PREDETECTED_REGION.
    - The library will localize reference region(s) based on the detected regions from the specified region predetection mode.
    - -1: all region predetection modes in the regionPredetectionModes parameter - - -### barcodeFormatIds -The formats of the barcode in BarcodeFormat group 1. - -```java -int com.dynamsoft.dlr.DLRReferenceRegion.barcodeFormatIds -``` - -**Value Range** - -A combined value of [`DLRBarcodeFormat`]({{ site.enumerations }}other-enums.html#dlrbarcodeformat) Enumeration items - -**Default value** - -DLR_BF_ALL - -**Remarks** - -Barcode formats in DLRBarcodeFormat group 1 can be combined.
    - It works only when [localizationSourceType](#localizationsourcetype) is setting to DLR_LST_BARCODE.
    - The library will localize reference region(s) based on the barcodes whose format meets current setting. - - -### barcodeFormatIds_2 -The formats of the barcode in BarcodeFormat group 2. - -```java -int com.dynamsoft.dlr.DLRReferenceRegion.barcodeFormatIds_2 -``` - -**Value Range** - -A combined value of [`DLRBarcodeFormat_2`]({{ site.enumerations }}other-enums.html#dlrbarcodeformat_2) Enumeration items - -**Default value** - -DLR_BF2_NULL - -**Remarks** - -Barcode formats in DLRBarcodeFormat group 2 can be combined.
    - It works only when [localizationSourceType](#localizationsourcetype) is setting to DLR_LST_BARCODE.
    - The library will localize reference region(s) based on the barcodes whose format meets current setting. - -### barcodeTextRegExPattern -The regular express pattern of barcode text. - -```java -String com.dynamsoft.dlr.DLRReferenceRegion.barcodeTextRegExPattern -``` - -**Remarks** - -It works only when [localizationSourceType](#localizationsourcetype) is setting to DLR_LST_BARCODE.
    - The library will localize reference region(s) based on the barcodes whose text meets current setting. diff --git a/programming-old/android/api-reference/class/dlr-result-v1.0.md b/programming-old/android/api-reference/class/dlr-result-v1.0.md deleted file mode 100644 index 3291bfd..0000000 --- a/programming-old/android/api-reference/class/dlr-result-v1.0.md +++ /dev/null @@ -1,66 +0,0 @@ ---- -layout: default-layout -title: DLRResult - Dynamsoft Label Recognition Android Class -description: This page shows the DLRResult struct of Dynamsoft Label Recognition for Android Language. -keywords: DLRResult, struct, android -needAutoGenerateSidebar: true -permalink: /programming/android/api-reference/class/dlr-result-v1.0.html ---- - - -# DLRResult - -> You are viewing a history document page of Dynamsoft Label Recognizer Android v1.x. - -Stores the recognized result. - - - -## Attributes - -| Attribute | Type | -|---------- | ---- | -| [`referenceRegionName`](#referenceregionname) | *String* | -| [`textAreaName`](#textareaname) | *String* | -| [`location`](#location) | [`DLRQuadrilateral`](dlr-quadrilateral.md) | -| [`confidence`](#confidence) | *int* | -| [`lineResults`](#lineresults) | [`DLRLineResult[]`](dlr-line-result.md) | - - -### referenceRegionName -The name of the reference region which is used to recognize the current result. - -```java -String com.dynamsoft.dlr.DLRResult.referenceRegionName -``` - -### textAreaName -The name of the text area used to recognize current result. - -```java -String com.dynamsoft.dlr.DLRResult.textAreaName -``` - -### location -The location of current recognized text. - -```java -DLRQuadrilateral com.dynamsoft.dlr.DLRResult.location -``` - - -### confidence -The confidence of the result. It ranges from 0 to 100. - -```java -int com.dynamsoft.dlr.DLRResult.confidence -``` - - -### lineResults -The line results array. - -```java -DLRLineResult[] com.dynamsoft.dlr.DLRResult.lineResults -``` - diff --git a/programming-old/android/api-reference/class/dlr-result.md b/programming-old/android/api-reference/class/dlr-result.md deleted file mode 100644 index 0190a18..0000000 --- a/programming-old/android/api-reference/class/dlr-result.md +++ /dev/null @@ -1,73 +0,0 @@ ---- -layout: default-layout -title: DLRResult - Dynamsoft Label Recognition Android Class -description: This page shows the DLRResult struct of Dynamsoft Label Recognition for Android Language. -keywords: DLRResult, struct, android -needAutoGenerateSidebar: true -permalink: /programming/android/api-reference/class/dlr-result.html ---- - - -# DLRResult - -> You are viewing a history document page of Dynamsoft Label Recognizer Android v1.x. - -Stores the recognized result. - - - -## Attributes - -| Attribute | Type | -|---------- | ---- | -| [`referenceRegionName`](#referenceregionname) | *String* | -| [`textAreaName`](#textareaname) | *String* | -| [`location`](#location) | [`DLRQuadrilateral`](dlr-quadrilateral.md) | -| [`confidence`](#confidence) | *int* | -| [`lineResults`](#lineresults) | [`DLRLineResult[]`](dlr-line-result.md) | -| [`pageNumber`](#pagenumber) | *int* | - - -### referenceRegionName -The name of the reference region which is used to recognize the current result. - -```java -String com.dynamsoft.dlr.DLRResult.referenceRegionName -``` - -### textAreaName -The name of the text area used to recognize current result. - -```java -String com.dynamsoft.dlr.DLRResult.textAreaName -``` - -### location -The location of current recognized text. - -```java -DLRQuadrilateral com.dynamsoft.dlr.DLRResult.location -``` - - -### confidence -The confidence of the result. It ranges from 0 to 100. - -```java -int com.dynamsoft.dlr.DLRResult.confidence -``` - - -### lineResults -The line results array. - -```java -DLRLineResult[] com.dynamsoft.dlr.DLRResult.lineResults -``` - -### pageNumber -The page number the result located in. The index is 0-based. - -```java -int com.dynamsoft.dlr.DLRResult.pageNumber -``` diff --git a/programming-old/android/api-reference/class/dlr-runtime-settings.md b/programming-old/android/api-reference/class/dlr-runtime-settings.md deleted file mode 100644 index cbd4ed2..0000000 --- a/programming-old/android/api-reference/class/dlr-runtime-settings.md +++ /dev/null @@ -1,130 +0,0 @@ ---- -layout: default-layout -title: DLRRuntimeSettings - Dynamsoft Label Recognition Android Class -description: This page shows the DLRRuntimeSettings struct of Dynamsoft Label Recognition for Android Language. -keywords: DLRRuntimeSettings, struct, android -needAutoGenerateSidebar: true -permalink: /programming/android/api-reference/class/dlr-runtime-settings.html ---- - - -# DLRRuntimeSettings - -> You are viewing a history document page of Dynamsoft Label Recognizer Android v1.x. - -Defines a struct to configure the text recognizer runtime settings. These settings control the text recognition process. - - -## Attributes - -| Attribute | Type | -|---------- | ---- | -| [`maxThreadCount`](#maxthreadcount) | *int* | -| [`characterModelName`](#charactermodelname) | *String* | -| [`linesCount`](#linescount) | *int* | -| [`regionPredetectionModes`](#regionpredetectionmodes) | *int\[\]* | -| [`referenceRegion`](#referenceregion) | [`DLRReferenceRegion`](dlr-reference-region.md) | -| [`textArea`](#textarea) | [`DLRQuadrilateral`](dlr-quadrilateral.md) | -| [`grayscaleTransformationModes`](#grayscaletransformationmodes) | *int\[\]* | - - -### maxThreadCount -Sets the number of threads the algorithm will use to recognize label. - -```java -int com.dynamsoft.dlr.DLRRuntimeSettings.maxThreadCount -``` - -**Value Range** - -[1, 4] - -**Default value** - -4 - -**Remarks** - -To keep a balance between speed and quality, the library concurrently runs four different threads by default. - -### characterModelName -The name of the CharacterModel. - -```java -String com.dynamsoft.dlr.DLRRuntimeSettings.characterModelName -``` - -### linesCount -Sets the text lines count of the text area. - -```java -int com.dynamsoft.dlr.DLRRuntimeSettings.linesCount -``` - -**Value Range** - -[0, 200] - -**Default value** - -0 - -**Remarks** - -0: line count is not certain. - - -### regionPredetectionModes -Sets the region pre-detection mode. - -```java -int[] com.dynamsoft.dlr.DLRRuntimeSettings.regionPredetectionModes[] -``` - -**Value Range** - -Each array item can be any one of the [`DLRRegionPredetectionMode`]({{ site.enumerations }}parameter-mode-enums.html#dlrregionpredetectionmode) Enumeration items. - -**Default value** - -`[DLR_RPM_SKIP,DLR_RPM_SKIP,DLR_RPM_SKIP,DLR_RPM_SKIP,DLR_RPM_SKIP,DLR_RPM_SKIP,DLR_RPM_SKIP,DLR_RPM_SKIP]` - -**Remarks** - -The array index represents the priority of the item. The smaller index is, the higher priority is. - - -### referenceRegion -Sets the reference region to search for text. - -```java -DLRReferenceRegion com.dynamsoft.dlr.DLRRuntimeSettings.referenceRegion -``` - -### textArea -Sets the text area relative to the reference region. - -```java -DLRQuadrilateral com.dynamsoft.dlr.DLRRuntimeSettings.textArea -``` - -### grayscaleTransformationModes -Sets the grayscale transformation mode. - -```java -int[] com.dynamsoft.dlr.DLRRuntimeSettings.grayscaleTransformationModes[] -``` - -**Value Range** - -Each array item can be any one of the [`DLRGrayscaleTransformationMode`]({{ site.enumerations }}parameter-mode-enums.html#dlrgrayscaletransformationmode) Enumeration items. - -**Default value** - -`[DLR_GTM_ORIGINAL,DLR_GTM_SKIP,DLR_GTM_SKIP,DLR_GTM_SKIP,DLR_GTM_SKIP,DLR_GTM_SKIP,DLR_GTM_SKIP,DLR_GTM_SKIP]` - -**Remarks** - -The array index represents the priority of the item. The smaller index is, the higher priority is. - - diff --git a/programming-old/android/api-reference/class/dm-lts-connection-parameters-v1.2.md b/programming-old/android/api-reference/class/dm-lts-connection-parameters-v1.2.md deleted file mode 100644 index 603734c..0000000 --- a/programming-old/android/api-reference/class/dm-lts-connection-parameters-v1.2.md +++ /dev/null @@ -1,175 +0,0 @@ ---- -layout: default-layout -title: DMLTSConnectionParameters - Dynamsoft Label Recognition Android Class -description: This page shows the DMLTSConnectionParameters struct of Dynamsoft Label Recognition for Android Language. -keywords: DMLTSConnectionParameters, struct, android -needAutoGenerateSidebar: true -permalink: /programming/android/api-reference/class/dm-lts-connection-parameters-v1.2.html ---- - - -# DMLTSConnectionParameters - -> You are viewing a history document page of Dynamsoft Label Recognizer Android v1.x. - -Defines a struct to configure the parameters to connect to license tracking server. - - -## Attributes - -| Attribute | Type | -|---------- | ---- | -| [`mainServerURL`](#mainserverurl) | *String* | -| [`standbyServerURL`](#standbyserverurl) | *String* | -| [`handshakeCode`](#handshakecode) | *String* | -| [`sessionPassword`](#sessionpassword) | *String* | -| [`chargeWay`](#chargeway) | *int* | -| [`UUIDGenerationMethod`](#uuidgenerationmethod) | *int* | -| [`maxBufferDays`](#maxbufferdays) | *int* | -| [`limitedLicenseModules`](#limitedlicensemodules) | *List* | - - -### mainServerURL -The URL of the license tracking server. - -```java -String com.dynamsoft.dlr.DMLTSConnectionParameters.mainServerURL -``` - -**Value Range** - -Any string value - -**Default value** - -"" - -**Remarks** - -If you choose "Dynamsoft-hosting", then no need to change the value of MainServerURL and StandbyServerURL. When both are set to null (default value), it will connect to Dynamsoft's license tracking servers for online verification. - - -### standbyServerURL -The URL of the standby license tracking server. - -```java -String com.dynamsoft.dlr.DMLTSConnectionParameters.standbyServerURL -``` - -**Value Range** - -Any string value - -**Default value** - -"" - -**Remarks** - -If you choose "Dynamsoft-hosting", then no need to change the value of MainServerURL and StandbyServerURL. When both are set to null (default value), it will connect to Dynamsoft's license tracking servers for online verification. - - -### handshakeCode -The handshake code. - -```java -String com.dynamsoft.dlr.DMLTSConnectionParameters.handshakeCode -``` - -**Value Range** - -Any string value - -**Default value** - -"" - -### sessionPassword -The session password of the handshake code set in license tracking server. - -```java -String com.dynamsoft.dlr.DMLTSConnectionParameters.sessionPassword -``` - -**Value Range** - -Any string value - -**Default value** - -"" - -### chargeWay -Sets the charge way. - -```java -int com.dynamsoft.dlr.DMLTSConnectionParameters.chargeWay -``` - -**Value Range** - -A value of [`EnumDMChargeWay`]({{ site.enumerations }}other-enums.html#dm_chargeway) Enumeration items. - -**Default value** - -`DM_CW_AUTO` - -**See also** - -[`EnumDMChargeWay`]({{ site.enumerations }}other-enums.html#dm_chargeway) - - -### UUIDGenerationMethod -Sets the method to generate UUID. - -```java -int com.dynamsoft.dlr.DMLTSConnectionParameters.UUIDGenerationMethod -``` - -**Value Range** - -A value of [`EnumDMUUIDGenerationMethod`]({{ site.enumerations }}other-enums.html#dm_uuidgenerationmethod) Enumeration items. - -**Default value** - -`DM_UUIDGM_RANDOM` - -**See also** - -[`EnumDMUUIDGenerationMethod`]({{ site.enumerations }}other-enums.html#dm_uuidgenerationmethod) - - -### maxBufferDays -Sets the max days to buffer the license info. - -```java -int com.dynamsoft.dlr.DMLTSConnectionParameters.maxBufferDays -``` - -**Value Range** - -[0,0x7fffffff] - -**Default value** - -7 - -### limitedLicenseModules -Sets the license modules to use. - -```java -List com.dynamsoft.dlr.DMLTSConnectionParameters.limitedLicenseModules -``` - -**Value Range** - -A list of the [`EnumDMLicenseModule`]({{ site.enumerations }}other-enums.html#dm_licensemodule) Enumeration items. - -**Default value** - -null - -**See also** - -[`EnumDMLicenseModule`]({{ site.enumerations }}other-enums.html#dm_licensemodule) - diff --git a/programming-old/android/api-reference/class/dm-lts-connection-parameters.md b/programming-old/android/api-reference/class/dm-lts-connection-parameters.md deleted file mode 100644 index 1d4be3b..0000000 --- a/programming-old/android/api-reference/class/dm-lts-connection-parameters.md +++ /dev/null @@ -1,211 +0,0 @@ ---- -layout: default-layout -title: DMLTSConnectionParameters - Dynamsoft Label Recognition Android Class -description: This page shows the DMLTSConnectionParameters struct of Dynamsoft Label Recognition for Android Language. -keywords: DMLTSConnectionParameters, struct, android -needAutoGenerateSidebar: true -permalink: /programming/android/api-reference/class/dm-lts-connection-parameters.html ---- - - -# DMLTSConnectionParameters - -> You are viewing a history document page of Dynamsoft Label Recognizer Android v1.x. - -Defines a struct to configure the parameters to connect to license tracking server. - - -## Attributes - -| Attribute | Type | -|---------- | ---- | -| [`mainServerURL`](#mainserverurl) | *String* | -| [`standbyServerURL`](#standbyserverurl) | *String* | -| [`handshakeCode`](#handshakecode) | *String* | -| [`sessionPassword`](#sessionpassword) | *String* | -| [`chargeWay`](#chargeway) | *int* | -| [`UUIDGenerationMethod`](#uuidgenerationmethod) | *int* | -| [`maxBufferDays`](#maxbufferdays) | *int* | -| [`limitedLicenseModules`](#limitedlicensemodules) | *List* | -| [`organizationID`](#organizationid) | *String* | -| [`products`](#products) | *int* | - - -### mainServerURL -The URL of the license tracking server. - -```java -String com.dynamsoft.dlr.DMLTSConnectionParameters.mainServerURL -``` - -**Value Range** - -Any string value - -**Default value** - -"" - -**Remarks** - -If you choose "Dynamsoft-hosting", then no need to change the value of MainServerURL and StandbyServerURL. When both are set to null (default value), it will connect to Dynamsoft's license tracking servers for online verification. - - -### standbyServerURL -The URL of the standby license tracking server. - -```java -String com.dynamsoft.dlr.DMLTSConnectionParameters.standbyServerURL -``` - -**Value Range** - -Any string value - -**Default value** - -"" - -**Remarks** - -If you choose "Dynamsoft-hosting", then no need to change the value of MainServerURL and StandbyServerURL. When both are set to null (default value), it will connect to Dynamsoft's license tracking servers for online verification. - - -### handshakeCode -The handshake code. - -```java -String com.dynamsoft.dlr.DMLTSConnectionParameters.handshakeCode -``` - -**Value Range** - -Any string value - -**Default value** - -"" - -### sessionPassword -The session password of the handshake code set in license tracking server. - -```java -String com.dynamsoft.dlr.DMLTSConnectionParameters.sessionPassword -``` - -**Value Range** - -Any string value - -**Default value** - -"" - -### chargeWay -Sets the charge way. - -```java -int com.dynamsoft.dlr.DMLTSConnectionParameters.chargeWay -``` - -**Value Range** - -A value of [`EnumDMChargeWay`]({{ site.enumerations }}other-enums.html#dm_chargeway) Enumeration items. - -**Default value** - -`DM_CW_AUTO` - -**See also** - -[`EnumDMChargeWay`]({{ site.enumerations }}other-enums.html#dm_chargeway) - - -### UUIDGenerationMethod -Sets the method to generate UUID. - -```java -int com.dynamsoft.dlr.DMLTSConnectionParameters.UUIDGenerationMethod -``` - -**Value Range** - -A value of [`EnumDMUUIDGenerationMethod`]({{ site.enumerations }}other-enums.html#dm_uuidgenerationmethod) Enumeration items. - -**Default value** - -`DM_UUIDGM_RANDOM` - -**See also** - -[`EnumDMUUIDGenerationMethod`]({{ site.enumerations }}other-enums.html#dm_uuidgenerationmethod) - - -### maxBufferDays -Sets the max days to buffer the license info. - -```java -int com.dynamsoft.dlr.DMLTSConnectionParameters.maxBufferDays -``` - -**Value Range** - -[0,0x7fffffff] - -**Default value** - -7 - -### limitedLicenseModules -Sets the license modules to use. - -```java -List com.dynamsoft.dlr.DMLTSConnectionParameters.limitedLicenseModules -``` - -**Value Range** - -A list of the [`EnumDMLicenseModule`]({{ site.enumerations }}other-enums.html#dm_licensemodule) Enumeration items. - -**Default value** - -null - -**See also** - -[`EnumDMLicenseModule`]({{ site.enumerations }}other-enums.html#dm_licensemodule) - - -### organizationID -The organization ID got from Dynamsoft. - -```java -String com.dynamsoft.dlr.DMLTSConnectionParameters.organizationID -``` - -**Value Range** - -Any string value - -**Default value** - -"" - -### products -Sets the products to get the license for. Product values can be combined. - -```java -int com.dynamsoft.dlr.DMLTSConnectionParameters.products -``` - -**Value Range** - -A combine value of [`EnumProduct`]({{ site.enumerations }}other-enums.html#product) Enumeration items. - -**Default value** - -`PROD_ALL` - -**See also** - -[`EnumProduct`]({{ site.enumerations }}other-enums.html#product) \ No newline at end of file diff --git a/programming-old/android/api-reference/class/index.md b/programming-old/android/api-reference/class/index.md deleted file mode 100644 index 044a444..0000000 --- a/programming-old/android/api-reference/class/index.md +++ /dev/null @@ -1,25 +0,0 @@ ---- -layout: default-layout -title: Android Structs - Dynamsoft Label Recognition Android API Reference -description: This page shows all Structs of Dynamsoft Label Recognition for Android API Reference. -keywords: api reference, android -needAutoGenerateSidebar: false -permalink: /programming/android/api-reference/class/index.html ---- - - -# Dynamsoft Label Recognition - Android Structs - -> You are viewing a history document page of Dynamsoft Label Recognizer Android v1.x. - - -- [`DMLTSConnectionParameters`](dm-lts-connection-parameters.md) -- [`DLRCharacterResult`](dlr-character-result.md) -- [`DLRImageData`](dlr-image-data.md) -- [`DLRLineResult`](dlr-line-result.md) -- [`DLRPoint`](dlr-point.md) -- [`DLRQuadrilateral`](dlr-quadrilateral.md) -- [`DLRReferenceRegion`](dlr-reference-region.md) -- [`DLRResult`](dlr-result.md) -- [`DLRRuntimeSettings`](dlr-runtime-settings.md) -- [`LabelRecognitionException`](label-recognition-exception.md) diff --git a/programming-old/android/api-reference/class/label-recognition-exception.md b/programming-old/android/api-reference/class/label-recognition-exception.md deleted file mode 100644 index 47dba00..0000000 --- a/programming-old/android/api-reference/class/label-recognition-exception.md +++ /dev/null @@ -1,30 +0,0 @@ ---- -layout: default-layout -title: LabelRecognitionException Class - Dynamsoft Label Recognition Android API Reference -description: This page shows the LabelRecognitionException Class of Dynamsoft Label Recognition for Android SDK. -keywords: LabelRecognitionException, class, api reference, android -needAutoGenerateSidebar: false -permalink: /programming/android/api-reference/class/label-recognition-exception.html ---- - - -# LabelRecognitionException - -> You are viewing a history document page of Dynamsoft Label Recognizer Android v1.x. - -Exception for signalling label recognition errors. - - -## Method - -| Method | Type | -|---------- | ----------- | -| [`getErrorCode`][#geterrorcode]| *int* | - -### getErrorCode - -Gets the error code. - -```java -int com.dynamsoft.dlr.LabelRecognitionException.getErrorCode() -``` \ No newline at end of file diff --git a/programming-old/android/api-reference/core-exception.md b/programming-old/android/api-reference/core-exception.md deleted file mode 100644 index bf4086f..0000000 --- a/programming-old/android/api-reference/core-exception.md +++ /dev/null @@ -1,37 +0,0 @@ ---- -layout: default-layout -title: Dynamsoft Core Android class - CoreException -description: This page shows the CoreException class of Dynamsoft Core for Android Language. -keywords: CoreException, android -needAutoGenerateSidebar: true -needGenerateH3Content: true -noTitleIndex: true -permalink: /programming/android/api-reference/core-exception.html ---- - - -# CoreException - -> You are viewing a history document page of Dynamsoft Label Recognizer Android v2.2.20. - -Exception for signalling core module errors. - -```java -class com.dynamsoft.core.CoreException -``` - -## Method - -| Method | Type | -|---------- | ----------- | -| [`getErrorCode`](#geterrorcode)| *int* | - -  - -### getErrorCode - -Gets the error code. - -```java -int getErrorCode() -``` diff --git a/programming-old/android/api-reference/dlr-character-result.md b/programming-old/android/api-reference/dlr-character-result.md deleted file mode 100644 index 89e38b9..0000000 --- a/programming-old/android/api-reference/dlr-character-result.md +++ /dev/null @@ -1,103 +0,0 @@ ---- -layout: default-layout -title: DLRCharacterResult - Dynamsoft Label Recognizer Android Class -description: This page shows the DLRCharacterResult struct of Dynamsoft Label Recognizer for Android Language. -keywords: DLRCharacterResult, android -needAutoGenerateSidebar: true -needGenerateH3Content: true -noTitleIndex: true -permalink: /programming/android/api-reference/dlr-character-result.html ---- - - -# DLRCharacterResult - -> You are viewing a history document page of Dynamsoft Label Recognizer Android v2.2.20. - -Stores the character result. - -```java -class com.dynamsoft.dlr.DLRCharacterResult -``` - -## Attributes - -| Attribute | Type | -|---------- | ---- | -| [`characterH`](#characterh) | *char* | -| [`characterM`](#characterm) | *char* | -| [`characterL`](#characterl) | *char* | -| [`characterHConfidence`](#characterhconfidence) | *int* | -| [`characterMConfidence`](#charactermconfidence) | *int* | -| [`characterLConfidence`](#characterlconfidence) | *int* | -| [`location`](#location) | [`Quadrilateral`](quadrilateral.md) | - -  - -### characterH - -The recognized character with highest confidence. - -```java -char characterH -``` - -  - -### characterM - -The recognized character with middle confidence. - -```java -char characterM -``` - -  - -### characterL - -The recognized character with lowest confidence. - -```java -char characterL -``` - -  - -### characterHConfidence - -The confidence of the recognized character with the highest confidence. - -```java -int characterHConfidence -``` - -  - -### characterMConfidence - -The confidence of the recognized character with the middle confidence. - -```java -int characterMConfidence -``` - -  - -### characterLConfidence - -The confidence of the recognized character with the lowest confidence. - -```java -int characterLConfidence -``` - -  - -### location - -The location of current character. - -```java -com.dynamsoft.core.Quadrilateral location -``` diff --git a/programming-old/android/api-reference/dlr-dictionary-correction-threshold.md b/programming-old/android/api-reference/dlr-dictionary-correction-threshold.md deleted file mode 100644 index 146cee5..0000000 --- a/programming-old/android/api-reference/dlr-dictionary-correction-threshold.md +++ /dev/null @@ -1,59 +0,0 @@ ---- -layout: default-layout -title: DLRDictionaryCorrectionThreshold - Dynamsoft Label Recognizer Android Class -description: This page shows the DLRDictionaryCorrectionThreshold struct of Dynamsoft Label Recognizer for Android Language. -keywords: DLRDictionaryCorrectionThreshold, android -needAutoGenerateSidebar: true -needGenerateH3Content: true -noTitleIndex: true -permalink: /programming/android/api-reference/dlr-dictionary-correction-threshold.html ---- - - -# DLRDictionaryCorrectionThreshold - -> You are viewing a history document page of Dynamsoft Label Recognizer Android v2.2.20. - -Stores the dictionary correction threshold. - -```java -class com.dynamsoft.dlr.DLRDictionaryCorrectionThreshold -``` - -## Attributes - -| Attribute | Type | -|---------- | ---- | -| [`minWordLength`](#minwordlength) | *int* | -| [`maxWordLength`](#maxwordlength) | *int* | -| [`threshold`](#threshold) | *int* | - -  - -### minWordLength - -The minimum value of word length. - -```java -int minWordLength -``` - -  - -### maxWordLength - -The maximum value of word length. - -```java -int maxWordLength -``` - -  - -### threshold - -The threshold for the number of error correction characters. - -```java -int threshold -``` diff --git a/programming-old/android/api-reference/dlr-further-modes.md b/programming-old/android/api-reference/dlr-further-modes.md deleted file mode 100644 index 0c7ebab..0000000 --- a/programming-old/android/api-reference/dlr-further-modes.md +++ /dev/null @@ -1,139 +0,0 @@ ---- -layout: default-layout -title: DLRFurtherModes Struct - Dynamsoft Label Recognizer Android API Reference -description: This page shows the DLRFurtherModes Struct of Dynamsoft Label Recognizer for Android SDK. -keywords: DLRFurtherModes, Android -needAutoGenerateSidebar: true -needGenerateH3Content: true -noTitleIndex: true -permalink: /programming/android/api-reference/dlr-further-modes.html ---- - - -# DLRFurtherModes - -> You are viewing a history document page of Dynamsoft Label Recognizer Android v2.2.20. - -Stores the FurtherModes. - -```java -class com.dynamsoft.dlr.DLRFurtherModes -``` - -## Attributes - -| Attribute | Type | -|---------- | ---- | -| [`colourConversionModes`](#colourconversionmodes) | *int\[\]* | -| [`grayscaleTransformationModes`](#grayscaletransformationmodes) | *int\[\]* | -| [`regionPredetectionModes`](#regionpredetectionmodes) | *int\[\]* | -| [`grayscaleEnhancementModes`](#grayscaleenhancementmodes) | *int\[\]* | -| [`textureDetectionModes`](#texturedetectionmodes) | *int\[\]* | - -  - -### colourConversionModes - -Sets the mode and priority for converting a colour image to a grayscale image. - -```java -int[] colourConversionModes -``` - -**Value Range** - -Each array item can be any one of the [`EnumColourConversionMode`]({{ site.enumerations }}colour-conversion-mode.html) Enumeration items. - -**Default value** - -`[EnumColourConversionMode.CICM_GENERAL, EnumColourConversionMode.CICM_SKIP, EnumColourConversionMode.CICM_SKIP, EnumColourConversionMode.CICM_SKIP, EnumColourConversionMode.CICM_SKIP, EnumColourConversionMode.CICM_SKIP, EnumColourConversionMode.CICM_SKIP, EnumColourConversionMode.CICM_SKIP]` - -**Remarks** - -The array index represents the priority of the item. The smaller index is, the higher priority is. - -  - -### grayscaleTransformationModes - -Sets the mode and priority for the grayscale image conversion. - -```csharp -int[] grayscaleTransformationModes -``` - -**Value Range** - -Each array item can be any one of the [`EnumGrayscaleTransformationMode`]({{ site.enumerations }}grayscale-transformation-mode.html) Enumeration items. - -**Default value** - -`[EnumGrayscaleTransformationMode.GTM_ORIGINAL, EnumGrayscaleTransformationMode.GTM_SKIP, EnumGrayscaleTransformationMode.GTM_SKIP, EnumGrayscaleTransformationMode.GTM_SKIP, EnumGrayscaleTransformationMode.GTM_SKIP, EnumGrayscaleTransformationMode.GTM_SKIP, EnumGrayscaleTransformationMode.GTM_SKIP, EnumGrayscaleTransformationMode.GTM_SKIP]` - -**Remarks** - -The array index represents the priority of the item. The smaller index is, the higher priority is. - -  - -### regionPredetectionModes - -Sets the region pre-detection mode. - -```java -int[] regionPredetectionModes -``` - -**Value Range** - -Each array item can be any one of the [`EnumRegionPredetectionMode`]({{ site.enumerations }}region-predetection-mode.html) Enumeration items. - -**Default value** - -`[EnumRegionPredetectionMode.RPM_GENERAL, EnumRegionPredetectionMode.RPM_SKIP, EnumRegionPredetectionMode.RPM_SKIP, EnumRegionPredetectionMode.RPM_SKIP, EnumRegionPredetectionMode.RPM_SKIP, EnumRegionPredetectionMode.RPM_SKIP, EnumRegionPredetectionMode.RPM_SKIP, EnumRegionPredetectionMode.RPM_SKIP]` - -**Remarks** - The array index represents the priority of the item. The smaller index is, the higher priority is. - -  - -### grayscaleEnhancementModes - -Sets the mode and priority for grayscale image preprocessing algorithms. - -```java -int[] grayscaleEnhancementModes -``` - -**Value Range** - -Each array item can be any one of the [`EnumGrayscaleEnhancementMode`]({{ site.enumerations }}grayscale-enhancement-mode.html) Enumeration items. - -**Default value** - -`[EnumGrayscaleEnhancementMode.GEM_GENERAL, EnumGrayscaleEnhancementMode.GEM_SKIP, EnumGrayscaleEnhancementMode.GEM_SKIP, EnumGrayscaleEnhancementMode.GEM_SKIP, EnumGrayscaleEnhancementMode.GEM_SKIP, EnumGrayscaleEnhancementMode.GEM_SKIP, EnumGrayscaleEnhancementMode.GEM_SKIP, EnumGrayscaleEnhancementMode.GEM_SKIP]` - -**Remarks** - The array index represents the priority of the item. The smaller index is, the higher priority is. - -  - -### textureDetectionModes - -Sets the mode and priority for texture detection. - -```java -int[] textureDetectionModes -``` - -**Value Range** - -Each array item can be any one of the [`EnumTextureDetectionMode`]({{ site.enumerations }}texture-detection-mode.html) Enumeration items. - -**Default value** - -`[EnumTextureDetectionMode.TDM_GENERAL_WIDTH_CONCENTRATION, EnumTextureDetectionMode.TDM_SKIP, EnumTextureDetectionMode.TDM_SKIP, EnumTextureDetectionMode.TDM_SKIP, EnumTextureDetectionMode.TDM_SKIP, EnumTextureDetectionMode.TDM_SKIP, EnumTextureDetectionMode.TDM_SKIP, EnumTextureDetectionMode.TDM_SKIP]` - -**Remarks** - -The array index represents the priority of the item. The smaller index is, the higher priority is. diff --git a/programming-old/android/api-reference/dlr-license-verification-listener.md b/programming-old/android/api-reference/dlr-license-verification-listener.md deleted file mode 100644 index edc0ef1..0000000 --- a/programming-old/android/api-reference/dlr-license-verification-listener.md +++ /dev/null @@ -1,55 +0,0 @@ ---- -layout: default-layout -title: DLRLicenseVerificationListener - Dynamsoft Label Recognizer Android API Reference -description: This page shows the DLRLicenseVerificationListener Interface of Dynamsoft Label Recognizer for Android SDK. -keywords: DLRLicenseVerificationListener, Android -needAutoGenerateSidebar: true -needGenerateH3Content: true -noTitleIndex: true -permalink: /programming/android/api-reference/dlr-license-verification-listener.html ---- - - -# DLRLicenseVerificationListener - -> You are viewing a history document page of Dynamsoft Label Recognizer Android v2.2.20. - -A delegate to handle callback when Dynamsoft License Server returns. - -```java -interface com.dynamsoft.dlr.DLRLicenseVerificationListener -``` - -## Methods - -| Method | Description | -|----------------------|-------------| -| [`DLRLicenseVerificationCallback`](#dlrlicenseverificationcallback) | The callback of Dynamsoft License Server.| - -  - -### DLRLicenseVerificationCallback - -The callback of Dynamsoft License Server. - -```java -void DLRLicenseVerificationCallback(boolean isSuccess, Exception error); -``` - -**Parameters** - -`isSuccess`: Whether the license verification was successful. -`error`: The error message from dynamsoft license server. - -**Code Snippet** - -```java -LabelRecognizer.initLicense("t0260NwAAAHV***************", new DLRLicenseVerificationListener() { - @Override - public void DLRLicenseVerificationCallback(boolean b, Exception e) { - if (!b && e != null) { - e.printStackTrace(); - } - } -} -``` diff --git a/programming-old/android/api-reference/dlr-line-result.md b/programming-old/android/api-reference/dlr-line-result.md deleted file mode 100644 index 5b8aa91..0000000 --- a/programming-old/android/api-reference/dlr-line-result.md +++ /dev/null @@ -1,92 +0,0 @@ ---- -layout: default-layout -title: DLRLineResult - Dynamsoft Label Recognizer Android Class -description: This page shows the DLRLineResult struct of Dynamsoft Label Recognizer for Android Language. -keywords: DLRLineResult, struct, android -needAutoGenerateSidebar: true -needGenerateH3Content: true -noTitleIndex: true -permalink: /programming/android/api-reference/dlr-line-result.html ---- - - -# DLRLineResult - -> You are viewing a history document page of Dynamsoft Label Recognizer Android v2.2.20. - -Stores the line result. - -```java -class com.dynamsoft.dlr.DLRLineResult -``` - -## Attributes - -| Attribute | Type | -|---------- | ---- | -| [`lineSpecificationName`](#linespecificationname) | *String* | -| [`text`](#text) | *String* | -| [`characterModelName`](#charactermodelname) | *String* | -| [`location`](#location) | [`Quadrilateral`](quadrilateral.md) | -| [`confidence`](#confidence) | *int* | -| [`characterResults`](#characterresults) | [`DLRCharacterResult[]`](dlr-character-result.md) | - -  - -### lineSpecificationName - -The name of the line specification used to recognize current line result. - -```java -String lineSpecificationName -``` - -  - -### text - -The recognized text, ends by '\0'. - -```java -String text -``` - -  - -### characterModelName - -The character model used to recognize the text. - -```java -String characterModelName -``` - -  - -### location - -The location of current line. - -```java -com.dynamsoft.core.Quadrilateral location -``` - -  - -### confidence - -The confidence of the result. It ranges from 0 to 100. - -```java -int confidence -``` - -  - -### characterResults - -The character results array. - -```java -DLRCharacterResult[] characterResults -``` diff --git a/programming-old/android/api-reference/dlr-line-specification.md b/programming-old/android/api-reference/dlr-line-specification.md deleted file mode 100644 index ab0985d..0000000 --- a/programming-old/android/api-reference/dlr-line-specification.md +++ /dev/null @@ -1,71 +0,0 @@ ---- -layout: default-layout -title: DLRLineSpecification Struct - Dynamsoft Label Recognizer Android API Reference -description: This page shows the DLRLineSpecification Struct of Dynamsoft Label Recognizer for Android SDK. -keywords: DLRLineSpecification, Android -needAutoGenerateSidebar: true -needGenerateH3Content: true -noTitleIndex: true -permalink: /programming/android/api-reference/dlr-line-specification.html ---- - - -# DLRLineSpecification - -> You are viewing a history document page of Dynamsoft Label Recognizer Android v2.2.20. - -Stores the settings of text line. - -```java -class com.dynamsoft.dlr.DLRLineSpecification -``` - -## Attributes - -| Attribute | Type | -|---------- | ---- | -| [`grayscaleEnhancementModes`](#grayscaleenhancementmodes) | *int\[\]* | -| [`binarizationModes`](#binarizationmodes) | *int\[\]* | - -  - -### grayscaleEnhancementModes - -Sets the mode and priority for grayscale image preprocessing algorithms. - -```java -int[] grayscaleEnhancementModes -``` - -**Value Range** - -Each array item can be any one of the [`EnumGrayscaleEnhancementMode`]({{ site.enumerations }}grayscale-enhancement-mode.html) Enumeration items. - -**Default value** - -`[EnumGrayscaleEnhancementMode.GEM_GENERAL, EnumGrayscaleEnhancementMode.GEM_SKIP, EnumGrayscaleEnhancementMode.GEM_SKIP, EnumGrayscaleEnhancementMode.GEM_SKIP, EnumGrayscaleEnhancementMode.GEM_SKIP, EnumGrayscaleEnhancementMode.GEM_SKIP, EnumGrayscaleEnhancementMode.GEM_SKIP, EnumGrayscaleEnhancementMode.GEM_SKIP]` - -**Remarks** - -The array index represents the priority of the item. The smaller index is, the higher priority is. - -  - -### binarizationModes -Sets the mode and priority for binarization. - -```java -int[] binarizationModes -``` - -**Value Range** - -Each array item can be any one of the [`EnumBinarizationMode`]({{ site.enumerations }}binarization-mode.html) Enumeration items. - -**Default value** - -`[EnumBinarizationMode.BM_LOCAL_BLOCK, EnumBinarizationMode.BM_SKIP, EnumBinarizationMode.BM_SKIP, EnumBinarizationMode.BM_SKIP, EnumBinarizationMode.BM_SKIP, EnumBinarizationMode.BM_SKIP, EnumBinarizationMode.BM_SKIP, EnumBinarizationMode.BM_SKIP]` - -**Remarks** - -The array index represents the priority of the item. The smaller index is, the higher priority is. diff --git a/programming-old/android/api-reference/dlr-reference-region.md b/programming-old/android/api-reference/dlr-reference-region.md deleted file mode 100644 index ec9702d..0000000 --- a/programming-old/android/api-reference/dlr-reference-region.md +++ /dev/null @@ -1,184 +0,0 @@ ---- -layout: default-layout -title: DLRReferenceRegion - Dynamsoft Label Recognizer Android Class -description: This page shows the DLRReferenceRegion struct of Dynamsoft Label Recognizer for Android Language. -keywords: DLRReferenceRegion, struct, android -needAutoGenerateSidebar: true -needGenerateH3Content: true -noTitleIndex: true -permalink: /programming/android/api-reference/dlr-reference-region.html ---- - - -# DLRReferenceRegion - -> You are viewing a history document page of Dynamsoft Label Recognizer Android v2.2.20. - -Stores the reference region information. - -```java -class com.dynamsoft.dlr.DLRReferenceRegion -``` - -## Attributes - -| Attribute | Type | -|---------- | ---- | -| [`localizationSourceType`](#localizationsourcetype) | [`EnumLocalizationSourceType`]({{ site.enumerations }}localization-source-type.html) | -| [`location`](#location) | [`Quadrilateral`](quadrilateral.md) | -| [`regionMeasuredByPercentage`](#regionmeasuredbypercentage) | *int* | -| [`regionPredetectionModesIndex`](#regionpredetectionmodesindex) | *int* | -| [`barcodeFormatIds`](#barcodeformatids) | *int* | -| [`barcodeFormatIds_2`](#barcodeformatids_2) | *int* | -| [`barcodeTextRegExPattern`](#barcodetextregexpattern) | *String* | - -  - -### localizationSourceType - -The source type used to localize the reference region(s). - -```java -int localizationSourceType -``` - -**Value Range** - -A value of [`EnumLocalizationSourceType`]({{ site.enumerations }}localization-source-type.html) Enumeration items. - -**Default value** - -`LST_MANUAL_SPECIFICATION` - -**Remarks** - -  - -### location - -Four vertexes in a clockwise direction of a quadrilateral. Index 0 represents the left-most vertex. - -```java -com.dynamsoft.core.Quadrilateral location -``` - -**Remarks** - -It works only when [localizationSourceType](#localizationsourcetype) is setting to LST_MANUAL_SPECIFICATION.
    -The library will localize reference region(s) based on the quadrilateral set by current setting.
    - -  - -### regionMeasuredByPercentage - -Whether or not to use percentage to measure the coordinate. - -```java -int regionMeasuredByPercentage -``` - -**Value Range** - -[0, 1] - -**Default value** - -1 - -**Remarks** - -It works only when [localizationSourceType](#localizationsourcetype) is setting to LST_MANUAL_SPECIFICATION. - -- 0: not by percentage -- 1: by percentage - -When it's set to 1, the values of points indicate percentage (from 0 to 100); Otherwise, they indicate coordinates in pixel. - -  - -### regionPredetectionModesIndex - -The index of a specific region predetection mode in the regionPredetectionModes parameter. - -```java -int regionPredetectionModesIndex -``` - -**Value Range** - -[-1, 0x7fffffff] - -**Default value** - --1 - -**Remarks** - -It works only when [localizationSourceType](#localizationsourcetype) is setting to LST_PREDETECTED_REGION.
    - The library will localize reference region(s) based on the detected regions from the specified region predetection mode.
    - -1: all region predetection modes in the regionPredetectionModes parameter - -  - -### barcodeFormatIds - -The formats of the barcode in BarcodeFormat group 1. - -```java -int barcodeFormatIds -``` - -**Value Range** - -A combined value of [`EnumBarcodeFormat`]({{ site.enumerations }}barcode-format.html) Enumeration items - -**Default value** - -BF_ALL - -**Remarks** - -Barcode formats in BarcodeFormat group 1 can be combined. - -- It works only when [localizationSourceType](#localizationsourcetype) is setting to LST_BARCODE. -- The library will localize reference region(s) based on the barcodes whose format meets current setting. - -  - -### barcodeFormatIds_2 - -The formats of the barcode in BarcodeFormat group 2. - -```java -int barcodeFormatIds_2 -``` - -**Value Range** - -A combined value of [`EnumBarcodeFormat_2`]({{ site.enumerations }}barcode-format-2.html) Enumeration items - -**Default value** - -BF2_NULL - -**Remarks** - -Barcode formats in BarcodeFormat group 2 can be combined. - -- It works only when [localizationSourceType](#localizationsourcetype) is setting to LST_BARCODE. -- The library will localize reference region(s) based on the barcodes whose format meets current setting. - -  - -### barcodeTextRegExPattern - -The regular express pattern of barcode text. - -```java -String barcodeTextRegExPattern -``` - -**Remarks** - -It works only when [localizationSourceType](#localizationsourcetype) is setting to LST_BARCODE.
    - The library will localize reference region(s) based on the barcodes whose text meets current setting. diff --git a/programming-old/android/api-reference/dlr-result.md b/programming-old/android/api-reference/dlr-result.md deleted file mode 100644 index 7fe436b..0000000 --- a/programming-old/android/api-reference/dlr-result.md +++ /dev/null @@ -1,92 +0,0 @@ ---- -layout: default-layout -title: DLRResult - Dynamsoft Label Recognizer Android Class -description: This page shows the DLRResult struct of Dynamsoft Label Recognizer for Android Language. -keywords: DLRResult, struct, android -needAutoGenerateSidebar: true -needGenerateH3Content: true -noTitleIndex: true -permalink: /programming/android/api-reference/dlr-result.html ---- - - -# DLRResult - -> You are viewing a history document page of Dynamsoft Label Recognizer Android v2.2.20. - -Stores the recognized result. - -```java -class com.dynamsoft.dlr.DLRResult -``` - -## Attributes - -| Attribute | Type | -|---------- | ---- | -| [`referenceRegionName`](#referenceregionname) | *String* | -| [`textAreaName`](#textareaname) | *String* | -| [`location`](#location) | [`Quadrilateral`](quadrilateral.md) | -| [`confidence`](#confidence) | *int* | -| [`lineResults`](#lineresults) | [`DLRLineResult[]`](dlr-line-result.md) | -| [`pageNumber`](#pagenumber) | *int* | - -  - -### referenceRegionName - -The name of the reference region which is used to recognize the current result. - -```java -String referenceRegionName -``` - -  - -### textAreaName - -The name of the text area used to recognize current result. - -```java -String textAreaName -``` - -  - -### location - -The location of current recognized text. - -```java -com.dynamsoft.core.Quadrilateral location -``` - -  - -### confidence - -The confidence of the result. It ranges from 0 to 100. - -```java -int confidence -``` - -  - -### lineResults - -The line results array. - -```java -DLRLineResult[] lineResults -``` - -  - -### pageNumber - -The page number the result located in. The index is 0-based. - -```java -int pageNumber -``` diff --git a/programming-old/android/api-reference/dlr-runtime-settings-v2.0.md b/programming-old/android/api-reference/dlr-runtime-settings-v2.0.md deleted file mode 100644 index afcc6f1..0000000 --- a/programming-old/android/api-reference/dlr-runtime-settings-v2.0.md +++ /dev/null @@ -1,142 +0,0 @@ ---- -layout: default-layout -title: DLRRuntimeSettings - Dynamsoft Label Recognizer Android Class -description: This page shows the DLRRuntimeSettings struct of Dynamsoft Label Recognizer for Android Language. -keywords: DLRRuntimeSettings, struct, android -needAutoGenerateSidebar: true -needGenerateH3Content: true -noTitleIndex: true -permalink: /programming/android/api-reference/dlr-runtime-settings-v2.0.html ---- - - -# DLRRuntimeSettings - -> You are viewing a history document page of Dynamsoft Label Recognizer Android v2.2.20. - -Defines a struct to configure the text recognizer runtime settings. These settings control the text recognition process. - -```java -class com.dynamsoft.dlr.DLRRuntimeSettings -``` - -## Attributes - -| Attribute | Type | -|---------- | ---- | -| [`maxThreadCount`](#maxthreadcount) | *int* | -| [`characterModelName`](#charactermodelname) | *String* | -| [`referenceRegion`](#referenceregion) | [`DLRReferenceRegion`](dlr-reference-region.md) | -| [`textArea`](#textarea) | [`Quadrilateral`](quadrilateral.md) | -| [`dictionaryPath`](#dictionarypath) | *String* | -| [`dictionaryCorrectionThreshold`](#dictionarycorrectionthreshold) | [`DLRDictionaryCorrectionThreshold`](dlr-dictionary-correction-threshold.md) | -| [`binarizationModes`](#binarizationmodes) | *int\[\]* | -| [`furtherModes`](#furthermodes) | [`DLRFurtherModes`](dlr-further-modes.md)| - -  - -### maxThreadCount - -Sets the number of threads the algorithm will use to recognize label. - -```java -int maxThreadCount -``` - -**Value Range** - -[1, 4] - -**Default value** - -4 - -**Remarks** - -To keep a balance between speed and quality, the library concurrently runs four different threads by default. - -  - -### characterModelName - -The name of the CharacterModel. - -```java -String characterModelName -``` - -  - -### referenceRegion - -Sets the reference region to search for text. - -```java -DLRReferenceRegion referenceRegion -``` - -  - -### textArea - -Sets the text area relative to the reference region. - -```java -com.dynamsoft.core.Quadrilateral textArea -``` - -  - -### dictionaryPath - -Sets the path of the dictionary file. - -```java -String dictionaryPath -``` - -  - -### dictionaryCorrectionThreshold - -Sets the threshold of dictionary error correction. - -```java -DLRDictionaryCorrectionThreshold dictionaryCorrectionThreshold -``` - -  - -### binarizationModes - -Sets the mode and priority for binarization. - -```java -int[] binarizationModes -``` - -**Value Range** - -Each array item can be any one of the [`EnumBinarizationMode`]({{ site.enumerations }}binarization-mode.html) Enumeration items. - -**Default value** - -`[EnumBinarizationMode.BM_LOCAL_BLOCK, EnumBinarizationMode.BM_SKIP, EnumBinarizationMode.BM_SKIP, EnumBinarizationMode.BM_SKIP, EnumBinarizationMode.BM_SKIP, EnumBinarizationMode.BM_SKIP, EnumBinarizationMode.BM_SKIP, EnumBinarizationMode.BM_SKIP]` - -**Remarks** - -The array index represents the priority of the item. The smaller index is, the higher priority is. - -  - -### furtherModes - -Sets further modes. - -```java -DLRFurtherModes furtherModes -``` - -**See also** - -[`DLRFurtherModes`](dlr-further-modes.md) diff --git a/programming-old/android/api-reference/dlr-runtime-settings.md b/programming-old/android/api-reference/dlr-runtime-settings.md deleted file mode 100644 index 0b9b84f..0000000 --- a/programming-old/android/api-reference/dlr-runtime-settings.md +++ /dev/null @@ -1,165 +0,0 @@ ---- -layout: default-layout -title: DLRRuntimeSettings - Dynamsoft Label Recognizer Android Class -description: This page shows the DLRRuntimeSettings struct of Dynamsoft Label Recognizer for Android Language. -keywords: DLRRuntimeSettings, struct, android -needAutoGenerateSidebar: true -needGenerateH3Content: true -noTitleIndex: true -permalink: /programming/android/api-reference/dlr-runtime-settings.html ---- - - -# DLRRuntimeSettings - -> You are viewing a history document page of Dynamsoft Label Recognizer Android v2.2.20. - -Defines a struct to configure the text recognizer runtime settings. These settings control the text recognition process. - -```java -class com.dynamsoft.dlr.DLRRuntimeSettings -``` - -## Attributes - -| Attribute | Type | -|---------- | ---- | -| [`maxThreadCount`](#maxthreadcount) | *int* | -| [`characterModelName`](#charactermodelname) | *String* | -| [`referenceRegion`](#referenceregion) | [`DLRReferenceRegion`](dlr-reference-region.md) | -| [`textArea`](#textarea) | [`Quadrilateral`](quadrilateral.md) | -| [`dictionaryPath`](#dictionarypath) | *String* | -| [`dictionaryCorrectionThreshold`](#dictionarycorrectionthreshold) | [`DLRDictionaryCorrectionThreshold`](dlr-dictionary-correction-threshold.md) | -| [`binarizationModes`](#binarizationmodes) | *int\[\]* | -| [`furtherModes`](#furthermodes) | [`DLRFurtherModes`](dlr-further-modes.md)| -| [`timeout`](#timeout) | *int* | - -  - -### maxThreadCount - -Sets the number of threads the algorithm will use to recognize label. - -```java -int maxThreadCount -``` - -**Value Range** - -[1, 4] - -- **Default value** - -4 - -- **Remarks** - -To keep a balance between speed and quality, the library concurrently runs four different threads by default. - -  - -### characterModelName - -The name of the CharacterModel. - -```java -String characterModelName -``` - -  - -### referenceRegion - -Sets the reference region to search for text. - -```java -DLRReferenceRegion referenceRegion -``` - -  - -### textArea - -Sets the text area relative to the reference region. - -```java -com.dynamsoft.core.Quadrilateral textArea -``` - -  - -### dictionaryPath - -Sets the path of the dictionary file. - -```java -String dictionaryPath -``` - -  - -### dictionaryCorrectionThreshold - -Sets the threshold of dictionary error correction. - -```java -DLRDictionaryCorrectionThreshold dictionaryCorrectionThreshold -``` - -  - -### binarizationModes - -Sets the mode and priority for binarization. - -```java -int[] binarizationModes -``` - -**Value Range** - -Each array item can be any one of the [`EnumBinarizationMode`]({{ site.enumerations }}binarization-mode.html) Enumeration items. - -- **Default value** - -`[EnumBinarizationMode.BM_LOCAL_BLOCK, EnumBinarizationMode.BM_SKIP, EnumBinarizationMode.BM_SKIP, EnumBinarizationMode.BM_SKIP, EnumBinarizationMode.BM_SKIP, EnumBinarizationMode.BM_SKIP, EnumBinarizationMode.BM_SKIP, EnumBinarizationMode.BM_SKIP]` - -- **Remarks** - -The array index represents the priority of the item. The smaller index is, the higher priority is. - -  - -### furtherModes - -Sets further modes. - -```java -DLRFurtherModes furtherModes -``` - -**See also** - -[`DLRFurtherModes`](dlr-further-modes.md) - -  - -### timeout - -Sets the maximum amount of time (in milliseconds) that should be spent searching for labels per page. It does not include the time taken to load/decode an image (TIFF, PNG, etc.) from disk into memory. - -```java -int timeout -``` - -**Value Range** - -[0, 0x7fffffff] - -**Default Value** - -10000 - -**Remarks** - -If you want to stop searching for labels after a certain period of time, you can use this parameter to set a timeout. diff --git a/programming-old/android/api-reference/dm-lts-connection-parameters.md b/programming-old/android/api-reference/dm-lts-connection-parameters.md deleted file mode 100644 index 934cff5..0000000 --- a/programming-old/android/api-reference/dm-lts-connection-parameters.md +++ /dev/null @@ -1,240 +0,0 @@ ---- -layout: default-layout -title: Dynamsoft Core Android Class - DMDLSConnectionParameters -description: This page shows the DMDLSConnectionParameters Class of Dynamsoft Core for Android Language. -keywords: DMDLSConnectionParameters, android -needAutoGenerateSidebar: true -needGenerateH3Content: true -noTitleIndex: true -permalink: /programming/android/api-reference/dm-lts-connection-parameters.html ---- - - -# DMDLSConnectionParameters - -> You are viewing a history document page of Dynamsoft Label Recognizer Android v2.2.20. - -Defines a struct to configure the parameters to connect to license tracking server. - -```java -class com.dynamsoft.core.DMDLSConnectionParameters -``` - -## Attributes - -| Attribute | Type | -|---------- | ---- | -| [`mainServerURL`](#mainserverurl) | *String* | -| [`standbyServerURL`](#standbyserverurl) | *String* | -| [`handshakeCode`](#handshakecode) | *String* | -| [`sessionPassword`](#sessionpassword) | *String* | -| [`chargeWay`](#chargeway) | *int* | -| [`UUIDGenerationMethod`](#uuidgenerationmethod) | *int* | -| [`maxBufferDays`](#maxbufferdays) | *int* | -| [`limitedLicenseModules`](#limitedlicensemodules) | *List* | -| [`organizationID`](#organizationid) | *String* | -| [`products`](#products) | *int* | - -  - -### mainServerURL - -The URL of the license tracking server. - -```java -String mainServerURL -``` - -**Value Range** - -Any string value. - -**Default value** - -"" - -**Remarks** - -If you choose "Dynamsoft-hosting", then no need to change the value of MainServerURL and StandbyServerURL. When both are set to null (default value), it will connect to Dynamsoft's license tracking servers for online verification. - -  - -### standbyServerURL - -The URL of the standby license tracking server. - -```java -String standbyServerURL -``` - -**Value Range** - -Any string value. - -**Default value** - -"" - -**Remarks** - -If you choose "Dynamsoft-hosting", then no need to change the value of MainServerURL and StandbyServerURL. When both are set to null (default value), it will connect to Dynamsoft's license tracking servers for online verification. - -  - -### handshakeCode - -The handshake code. - -```java -String handshakeCode -``` - -**Value Range** - -Any string value. - -**Default value** - -"" - -  - -### sessionPassword - -The session password of the handshake code set in license tracking server. - -```java -String sessionPassword -``` - -**Value Range** - -Any string value. - -**Default value** - -"" - -  - -### chargeWay - -Sets the charge way. - -```java -int chargeWay -``` - -**Value Range** - -A value of [`EnumDMChargeWay`]({{ site.enumerations }}dm-charge-way.html) Enumeration items. - -**Default value** - -`DM_CW_AUTO` - -**See also** - -[`EnumDMChargeWay`]({{ site.enumerations }}dm-charge-way.html) - -  - -### UUIDGenerationMethod - -Sets the method to generate UUID. - -```java -int UUIDGenerationMethod -``` - -**Value Range** - -A value of [`EnumDMUUIDGenerationMethod`]({{ site.enumerations }}dm-uuid-generation-method.html) Enumeration items. - -**Default value** - -`DM_UUIDGM_RANDOM` - -**See also** - -[`EnumDMUUIDGenerationMethod`]({{ site.enumerations }}dm-uuid-generation-method.html) - -  - -### maxBufferDays - -Sets the max days to buffer the license info. - -```java -int maxBufferDays -``` - -**Value Range** - -[0,0x7fffffff] - -**Default value** - -7 - -  - -### limitedLicenseModules - -Sets the license modules to use. - -```java -List limitedLicenseModules -``` - -**Value Range** - -A list of the [`EnumDMLicenseModule`]({{ site.enumerations }}dm-license-module.html) Enumeration items. - -**Default value** - -null - -**See also** - -[`EnumDMLicenseModule`]({{ site.enumerations }}dm-license-module.html) - -  - -### organizationID - -The organization ID got from Dynamsoft. - -```java -String organizationID -``` - -**Value Range** - -Any string value. - -**Default value** - -"" - -  - -### products - -Sets the products to get the license for. Product values can be combined. - -```java -int products -``` - -**Value Range** - -A combine value of [`EnumProduct`]({{ site.enumerations }}product.html) Enumeration items. - -**Default value** - -`PROD_ALL` - -**See also** - -[`EnumProduct`]({{ site.enumerations }}product.html) diff --git a/programming-old/android/api-reference/image-data-v2.0.md b/programming-old/android/api-reference/image-data-v2.0.md deleted file mode 100644 index 76e4fa4..0000000 --- a/programming-old/android/api-reference/image-data-v2.0.md +++ /dev/null @@ -1,81 +0,0 @@ ---- -layout: default-layout -title: Dynamsoft Core Android Class - ImageData -description: This page shows the ImageData Class of Dynamsoft Core for Android Language. -keywords: ImageData, android -needAutoGenerateSidebar: true -needGenerateH3Content: true -noTitleIndex: true -permalink: /programming/android/api-reference/image-data-v2.0.html ---- - - -# ImageData - -> You are viewing a history document page of Dynamsoft Label Recognizer Android v2.2.20. - -Stores the image data. - -```java -class com.dynamsoft.core.ImageData -``` - -## Attributes - -| Attribute | Type | -|---------- | ---- | -| [`bytes`](#bytes) | *byte[]* | -| [`width`](#width) | *int* | -| [`height`](#height) | *int* | -| [`stride`](#stride) | *int* | -| [`format`](#format) | [`EnumImagePixelFormat`]({{ site.enumerations }}image-pixel-format.html) | - -  - -### bytes - -The image data content in a byte array. - -```java -byte[] bytes -``` - -  - -### width - -The width of the image in pixels. - -```java -int width -``` - -  - -### height - -The height of the image in pixels. - -```java -int height -``` - -  - -### stride - -The stride (or scan width) of the image. - -```java -int stride -``` - -  - -### format - -The image pixel format used in the image byte array. - -```java -ImagePixelFormat format -``` diff --git a/programming-old/android/api-reference/image-data.md b/programming-old/android/api-reference/image-data.md deleted file mode 100644 index 1c2b03b..0000000 --- a/programming-old/android/api-reference/image-data.md +++ /dev/null @@ -1,104 +0,0 @@ ---- -layout: default-layout -title: Dynamsoft Core Android Class - ImageData -description: This page shows the ImageData Class of Dynamsoft Core for Android Language. -keywords: ImageData, android -needAutoGenerateSidebar: true -needGenerateH3Content: true -noTitleIndex: true -permalink: /programming/android/api-reference/image-data.html ---- - -# ImageData - -> You are viewing a history document page of Dynamsoft Label Recognizer Android v2.2.20. - -Stores the image data. - -```java -class com.dynamsoft.core.ImageData -``` - -## Attributes - -| Attribute | Type | -|---------- | ---- | -| [`bytes`](#bytes) | *byte[]* | -| [`width`](#width) | *int* | -| [`height`](#height) | *int* | -| [`stride`](#stride) | *int* | -| [`format`](#format) | [`EnumImagePixelFormat`]({{ site.enumerations }}image-pixel-format.html?src=android) | -| [`orientation`](#orientation) | *int* | - -## Methods - -| Methods | Type | -| [`toBitmap`](#tobitmap) | Convert `ImageData` to `android.graphics.Bitmap`. | - -  - -### bytes - -The image data content in a byte array. - -```java -byte[] bytes -``` - -  - -### width - -The width of the image in pixels. - -```java -int width -``` - -  - -### height - -The height of the image in pixels. - -```java -int height -``` - -  - -### stride - -The stride (or scan width) of the image. - -```java -int stride -``` - -  - -### format - -The image pixel format used in the image byte array. - -```java -EnumImagePixelFormat format -``` - -  - -### orientation - -The orientation of the image. - -```java -int orientation -``` - -### toBitmap - -Convert `ImageData` to `android.graphics.Bitmap`. - -```java -Bitmap toBitmap() throws CoreException -``` diff --git a/programming-old/android/api-reference/image-source.md b/programming-old/android/api-reference/image-source.md deleted file mode 100644 index 4298cda..0000000 --- a/programming-old/android/api-reference/image-source.md +++ /dev/null @@ -1,33 +0,0 @@ ---- -layout: default-layout -title: Dynamsoft Core Android Interface - ImageSource -description: This page shows the ImageSource Interface of Dynamsoft Core for Android Language. -keywords: ImageSource, android -needAutoGenerateSidebar: true -needGenerateH3Content: true -noTitleIndex: true -permalink: /programming/android/api-reference/image-source.html ---- - -# ImageSource - -> You are viewing a history document page of Dynamsoft Label Recognizer Android v2.2.20. - -Interface for producers of images. It can be implemented by programmers to support other image sources, such as external cameras or image filesets. - -```java -inteface com.dynamsoft.core.ImageSource -``` - -## Methods - -| Methods | Type | -| [`getImage`](#getimage) | Convert `ImageData` to `android.graphics.Bitmap`. | - -### getImage - -Gets an image from an instance of subclass of `ImageSource`. - -```java -ImageData getImage() -``` diff --git a/programming-old/android/api-reference/index-v1.0.md b/programming-old/android/api-reference/index-v1.0.md deleted file mode 100644 index 5a8c491..0000000 --- a/programming-old/android/api-reference/index-v1.0.md +++ /dev/null @@ -1,96 +0,0 @@ ---- -layout: default-layout -title: Main Page - Dynamsoft Label Recognition Android API Reference -description: This is the main page of Dynamsoft Label Recognition for Android API Reference. -keywords: api reference, android -needAutoGenerateSidebar: false -permalink: /programming/android/api-reference/index-v1.0.html ---- - -# Dynamsoft Label Recognition - Android API Reference - -- [`LabelRecognition` Methods](#labelrecognition-methods) -- [Classes](#classes) -- [Enumerations](#enumerations) -- [Error Code](#error-code) - -## LabelRecognition Methods - -### General - - | Method | Description | - |----------------------|-------------| - | [`getVersion`](label-recognition/general.md#getversion) | Returns the version number string for the SDK. | - -  - -### Initialization - - | Method | Description | - |----------------------|-------------| - | [`LabelRecognition`](label-recognition/initialization.md#labelrecognition) | Initialization of `LabelRecognition` object.| - | [`destroy`](label-recognition/initialization.md#destroy) | Destroys an instance of `LabelRecognition` object.| - | [`initLicense`](label-recognition/initialization.md#initlicense) | Sets the license and activates the SDK. | - | [`initLicenseFromLTS`](label-recognition/initialization.md#initlicensefromlts) | Initializes the label recognition license and connects to the specified server for online verification. | - -  - -### Setting - - | Method | Description | - |----------------------|-------------| - | [`getRuntimeSettings`](label-recognition/settings.md#getruntimesettings) | Gets the current settings and saves it into a struct. | - | [`updateRuntimeSettings`](label-recognition/settings.md#updateruntimesettings) | Updates runtime settings with a given struct. | - | [`resetRuntimeSettings`](label-recognition/settings.md#resetruntimesettings) | Resets the runtime settings. | - | [`appendSettingsFromString`](label-recognition/settings.md#appendsettingsfromstring) | Appends LabelRecognitionParameter settings in a string to the SDK object. | - | [`outputSettingsToFile`](label-recognition/settings.md#outputsettingstofile) | Outputs LabelRecognitionParameter settings into a file (JSON file). | - | [`clearAppendedSettings`](label-recognition/settings.md#clearappendedsettings) | Clear all appended LabelRecognitionParameter settings in the SDK object. | - | [`updateReferenceRegionFromBarcodeResults`](label-recognition/settings.md#updatereferenceregionfrombarcoderesults) | Updates reference region which is defined with source type DLR_LST_BARCODE. | - | [`getModeArgument`](label-recognition/settings.md#getmodeargument) | Get argument value for the specified mode parameter. | - | [`setModeArgument`](label-recognition/settings.md#setmodeargument) | Set argument value for the specified mode parameter. | - | [`appendCharacterModelBuffer`](label-recognition/settings.md#appendcharactermodelbuffer) | Appends CharacterModel to the SDK object. | - | [`eraseAllCharacterModels`](label-recognition/settings.md#appendcharactermodelbuffer) | Erases all CharacterModels the SDK object currently loaded. | - | [`eraseCharacterModelByName`](label-recognition/settings.md#appendcharactermodelbuffer) | Erases a name specified CharacterModel from the SDK object. | - -  - -### Recognizing - - | Method | Description | - |----------------------|-------------| - | [`recognizeByBuffer`](label-recognition/recognizing.md#recognizebybuffer) | Recognizes text from memory buffer containing image pixels in defined format. | - | [`recognizeByFile`](label-recognition/recognizing.md#recognizebyfile) | Recognizes text from a specified image file. | - -  - -## [Classes](class/index.md) - -- [`DMLTSConnectionParameters`](dm-lts-connection-parameters.md) -- [`DLRCharacterResult`](class/dlr-character-result.md) -- [`DLRImageData`](class/dlr-image-data.md) -- [`DLRLineResult`](class/dlr-line-result.md) -- [`DLRPoint`](class/dlr-point.md) -- [`DLRQuadrilateral`](class/dlr-quadrilateral.md) -- [`DLRReferenceRegion`](class/dlr-reference-region.md) -- [`DLRResult`](class/dlr-result.md) -- [`DLRRuntimeSettings`](class/dlr-runtime-settings.md) -- [`LabelRecognitionException`](class/label-recognition-exception.md) - -  - -## [Enumerations]({{ site.enumerations }}) - -- [`EnumDLRBarcodeFormat`]({{ site.enumerations }}other-enums.html#dlrbarcodeformat) -- [`EnumDLRBarcodeFormat_2`]({{ site.enumerations }}other-enums.html#dlrbarcodeformat_2) -- [`EnumDLRBinarizationMode`]({{ site.enumerations }}parameter-mode-enums.html#dlrbinarizationmode) -- [`EnumDLRGrayscaleTransformationMode`]({{ site.enumerations }}parameter-mode-enums.html#dlrgrayscaletransformationmode) -- [`EnumDLRImagePixelFormat`]({{ site.enumerations }}other-enums.html#dlrimagepixelformat) -- [`EnumDLRLocalizationSourceType`]({{ site.enumerations }}other-enums.html#dlrlocalizationsourcetype) -- [`EnumDLRRegionPredetectionMode`]({{ site.enumerations }}parameter-mode-enums.html#dlrregionpredetectionmode) -- [`EnumDMChargeWay`]({{ site.enumerations }}other-enums.html#dm_chargeway) -- [`EnumDMLicenseModule`]({{ site.enumerations }}other-enums.html#dm_licensemodule) -- [`EnumDMUUIDGenerationMethod`]({{ site.enumerations }}other-enums.html#dm_uuidgenerationmethod) - -  - -## [Error Code]({{ site.enumerations }}error-code.html) diff --git a/programming-old/android/api-reference/index-v1.2.1.md b/programming-old/android/api-reference/index-v1.2.1.md deleted file mode 100644 index d6c4e33..0000000 --- a/programming-old/android/api-reference/index-v1.2.1.md +++ /dev/null @@ -1,98 +0,0 @@ ---- -layout: default-layout -title: Main Page - Dynamsoft Label Recognition Android API Reference -description: This is the main page of Dynamsoft Label Recognition for Android API Reference. -keywords: api reference, android -needAutoGenerateSidebar: false -permalink: /programming/android/api-reference/index-v1.2.1.html ---- - -# Dynamsoft Label Recognition - Android API Reference - -- [`LabelRecognition` Methods](#labelrecognition-methods) -- [Classes](#classes) -- [Enumerations](#enumerations) -- [Error Code](#error-code) - -## LabelRecognition Methods - -### General - - | Method | Description | - |----------------------|-------------| - | [`getVersion`](label-recognition/general.md#getversion) | Returns the version number string for the SDK. | - -  - -### Initialization - - | Method | Description | - |----------------------|-------------| - | [`LabelRecognition`](label-recognition/initialization.md#labelrecognition) | Initialization of `LabelRecognition` object.| - | [`destroy`](label-recognition/initialization.md#destroy) | Destroys an instance of `LabelRecognition` object.| - | [`initLicense`](label-recognition/initialization.md#initlicense) | Sets the license and activates the SDK. | - | [`initLicenseFromLTS`](label-recognition/initialization.md#initlicensefromlts) | Initializes the label recognition license and connects to the specified server for online verification. | - -  - -### Setting - - | Method | Description | - |----------------------|-------------| - | [`getRuntimeSettings`](label-recognition/settings.md#getruntimesettings) | Gets the current settings and saves it into a struct. | - | [`updateRuntimeSettings`](label-recognition/settings.md#updateruntimesettings) | Updates runtime settings with a given struct. | - | [`resetRuntimeSettings`](label-recognition/settings.md#resetruntimesettings) | Resets the runtime settings. | - | [`appendSettingsFromString`](label-recognition/settings.md#appendsettingsfromstring) | Appends LabelRecognitionParameter settings in a string to the SDK object. | - | [`appendSettingsFromFile`](label-recognition/settings.md#appendsettingsfromFile) | Appends LabelRecognitionParameter settings from a file to the SDK object. | - | [`outputSettingsToFile`](label-recognition/settings.md#outputsettingstofile) | Outputs LabelRecognitionParameter settings into a file (JSON file). | - | [`clearAppendedSettings`](label-recognition/settings.md#clearappendedsettings) | Clear all appended LabelRecognitionParameter settings in the SDK object. | - | [`updateReferenceRegionFromBarcodeResults`](label-recognition/settings.md#updatereferenceregionfrombarcoderesults) | Updates reference region which is defined with source type DLR_LST_BARCODE. | - | [`getModeArgument`](label-recognition/settings.md#getmodeargument) | Get argument value for the specified mode parameter. | - | [`setModeArgument`](label-recognition/settings.md#setmodeargument) | Set argument value for the specified mode parameter. | - | [`appendCharacterModelBuffer`](label-recognition/settings.md#appendcharactermodelbuffer) | Appends CharacterModel to the SDK object. | - | [`eraseAllCharacterModels`](label-recognition/settings.md#appendcharactermodelbuffer) | Erases all CharacterModels the SDK object currently loaded. | - | [`eraseCharacterModelByName`](label-recognition/settings.md#appendcharactermodelbuffer) | Erases a name specified CharacterModel from the SDK object. | - -  - -### Recognizing - - | Method | Description | - |----------------------|-------------| - | [`recognizeByBuffer`](label-recognition/recognizing.md#recognizebybuffer) | Recognizes text from memory buffer containing image pixels in defined format. | - | [`recognizeByFile`](label-recognition/recognizing.md#recognizebyfile) | Recognizes text from a specified image file. | - -  - -## Classes - -- [`DMLTSConnectionParameters`](dm-lts-connection-parameters.md) -- [`DLRCharacterResult`](class/dlr-character-result.md) -- [`DLRImageData`](class/dlr-image-data.md) -- [`DLRLineResult`](class/dlr-line-result.md) -- [`DLRPoint`](class/dlr-point.md) -- [`DLRQuadrilateral`](class/dlr-quadrilateral.md) -- [`DLRReferenceRegion`](class/dlr-reference-region.md) -- [`DLRResult`](class/dlr-result.md) -- [`DLRRuntimeSettings`](class/dlr-runtime-settings.md) -- [`LabelRecognitionException`](class/label-recognition-exception.md) - -  - -## Enumerations - -- [`EnumDLRBarcodeFormat`]({{ site.enumerations }}other-enums.html#dlrbarcodeformat) -- [`EnumDLRBarcodeFormat_2`]({{ site.enumerations }}other-enums.html#dlrbarcodeformat_2) -- [`EnumDLRBinarizationMode`]({{ site.enumerations }}parameter-mode-enums.html#dlrbinarizationmode) -- [`EnumDLRGrayscaleTransformationMode`]({{ site.enumerations }}parameter-mode-enums.html#dlrgrayscaletransformationmode) -- [`EnumDLRImagePixelFormat`]({{ site.enumerations }}other-enums.html#dlrimagepixelformat) -- [`EnumDLRLocalizationSourceType`]({{ site.enumerations }}other-enums.html#dlrlocalizationsourcetype) -- [`EnumDLRRegionPredetectionMode`]({{ site.enumerations }}parameter-mode-enums.html#dlrregionpredetectionmode) -- [`EnumDMChargeWay`]({{ site.enumerations }}other-enums.html#dm_chargeway) -- [`EnumDMLicenseModule`]({{ site.enumerations }}other-enums.html#dm_licensemodule) -- [`EnumDMUUIDGenerationMethod`]({{ site.enumerations }}other-enums.html#dm_uuidgenerationmethod) -- [`EnumProduct`]({{ site.enumerations }}other-enums.html#product) - -  - -## [Error Code]({{ site.enumerations }}error-code.html) diff --git a/programming-old/android/api-reference/index-v1.2.md b/programming-old/android/api-reference/index-v1.2.md deleted file mode 100644 index 9093834..0000000 --- a/programming-old/android/api-reference/index-v1.2.md +++ /dev/null @@ -1,97 +0,0 @@ ---- -layout: default-layout -title: Main Page - Dynamsoft Label Recognition Android API Reference -description: This is the main page of Dynamsoft Label Recognition for Android API Reference. -keywords: api reference, android -needAutoGenerateSidebar: false -permalink: /programming/android/api-reference/index-v1.2.html ---- - -# Dynamsoft Label Recognition - Android API Reference - -- [`LabelRecognition` Methods](#labelrecognition-methods) -- [Classes](#classes) -- [Enumerations](#enumerations) -- [Error Code](#error-code) - -## LabelRecognition Methods - -### General - - | Method | Description | - |----------------------|-------------| - | [`getVersion`](label-recognition/general.md#getversion) | Returns the version number string for the SDK. | - -  - -### Initialization - - | Method | Description | - |----------------------|-------------| - | [`LabelRecognition`](label-recognition/initialization.md#labelrecognition) | Initialization of `LabelRecognition` object.| - | [`destroy`](label-recognition/initialization.md#destroy) | Destroys an instance of `LabelRecognition` object.| - | [`initLicense`](label-recognition/initialization.md#initlicense) | Sets the license and activates the SDK. | - | [`initLicenseFromLTS`](label-recognition/initialization.md#initlicensefromlts) | Initializes the label recognition license and connects to the specified server for online verification. | - -  - -### Setting - - | Method | Description | - |----------------------|-------------| - | [`getRuntimeSettings`](label-recognition/settings.md#getruntimesettings) | Gets the current settings and saves it into a struct. | - | [`updateRuntimeSettings`](label-recognition/settings.md#updateruntimesettings) | Updates runtime settings with a given struct. | - | [`resetRuntimeSettings`](label-recognition/settings.md#resetruntimesettings) | Resets the runtime settings. | - | [`appendSettingsFromString`](label-recognition/settings.md#appendsettingsfromstring) | Appends LabelRecognitionParameter settings in a string to the SDK object. | - | [`appendSettingsFromFile`](label-recognition/settings.md#appendsettingsfromFile) | Appends LabelRecognitionParameter settings from a file to the SDK object. | - | [`outputSettingsToFile`](label-recognition/settings.md#outputsettingstofile) | Outputs LabelRecognitionParameter settings into a file (JSON file). | - | [`clearAppendedSettings`](label-recognition/settings.md#clearappendedsettings) | Clear all appended LabelRecognitionParameter settings in the SDK object. | - | [`updateReferenceRegionFromBarcodeResults`](label-recognition/settings.md#updatereferenceregionfrombarcoderesults) | Updates reference region which is defined with source type DLR_LST_BARCODE. | - | [`getModeArgument`](label-recognition/settings.md#getmodeargument) | Get argument value for the specified mode parameter. | - | [`setModeArgument`](label-recognition/settings.md#setmodeargument) | Set argument value for the specified mode parameter. | - | [`appendCharacterModelBuffer`](label-recognition/settings.md#appendcharactermodelbuffer) | Appends CharacterModel to the SDK object. | - | [`eraseAllCharacterModels`](label-recognition/settings.md#appendcharactermodelbuffer) | Erases all CharacterModels the SDK object currently loaded. | - | [`eraseCharacterModelByName`](label-recognition/settings.md#appendcharactermodelbuffer) | Erases a name specified CharacterModel from the SDK object. | - -  - -### Recognizing - - | Method | Description | - |----------------------|-------------| - | [`recognizeByBuffer`](label-recognition/recognizing.md#recognizebybuffer) | Recognizes text from memory buffer containing image pixels in defined format. | - | [`recognizeByFile`](label-recognition/recognizing.md#recognizebyfile) | Recognizes text from a specified image file. | - -  - -## Classes - -- [`DMLTSConnectionParameters`](dm-lts-connection-parameters.md) -- [`DLRCharacterResult`](class/dlr-character-result.md) -- [`DLRImageData`](class/dlr-image-data.md) -- [`DLRLineResult`](class/dlr-line-result.md) -- [`DLRPoint`](class/dlr-point.md) -- [`DLRQuadrilateral`](class/dlr-quadrilateral.md) -- [`DLRReferenceRegion`](class/dlr-reference-region.md) -- [`DLRResult`](class/dlr-result.md) -- [`DLRRuntimeSettings`](class/dlr-runtime-settings.md) -- [`LabelRecognitionException`](class/label-recognition-exception.md) - -  - -## Enumerations - -- [`EnumDLRBarcodeFormat`]({{ site.enumerations }}other-enums.html#dlrbarcodeformat) -- [`EnumDLRBarcodeFormat_2`]({{ site.enumerations }}other-enums.html#dlrbarcodeformat_2) -- [`EnumDLRBinarizationMode`]({{ site.enumerations }}parameter-mode-enums.html#dlrbinarizationmode) -- [`EnumDLRGrayscaleTransformationMode`]({{ site.enumerations }}parameter-mode-enums.html#dlrgrayscaletransformationmode) -- [`EnumDLRImagePixelFormat`]({{ site.enumerations }}other-enums.html#dlrimagepixelformat) -- [`EnumDLRLocalizationSourceType`]({{ site.enumerations }}other-enums.html#dlrlocalizationsourcetype) -- [`EnumDLRRegionPredetectionMode`]({{ site.enumerations }}parameter-mode-enums.html#dlrregionpredetectionmode) -- [`EnumDMChargeWay`]({{ site.enumerations }}other-enums.html#dm_chargeway) -- [`EnumDMLicenseModule`]({{ site.enumerations }}other-enums.html#dm_licensemodule) -- [`EnumDMUUIDGenerationMethod`]({{ site.enumerations }}other-enums.html#dm_uuidgenerationmethod) - -  - -## [Error Code]({{ site.enumerations }}error-code.html) diff --git a/programming-old/android/api-reference/index-v2.2.20.md b/programming-old/android/api-reference/index-v2.2.20.md deleted file mode 100644 index c42ae38..0000000 --- a/programming-old/android/api-reference/index-v2.2.20.md +++ /dev/null @@ -1,53 +0,0 @@ ---- -layout: default-layout -title: Dynamsoft Label Recognizer Android API Reference -description: This page shows Android API Reference of Dynamsoft Label Recognizer. -keywords: api reference, android -needAutoGenerateSidebar: true -needGenerateH3Content: true -permalink: /programming/android/api-reference/index-v2.2.20.html ---- - - -# API Reference - Android - -## Primary Classes - -- [LabelRecognizer](label-recognizer.md) - -## Auxiliary Classes - -- [Point](point.md) -- [Quadrilateral](quadrilateral.md) -- [ImageData](image-data.md) -- [BarcodeResult](barcode-result.md) -- [LabelRecognizerException](label-recognizer-exception.md) -- [DLRRuntimeSettings](dlr-runtime-settings.md) -- [DLRReferenceRegion](dlr-reference-region.md) -- [DLRResult](dlr-result.md) -- [DLRLineResult](dlr-line-result.md) -- [DLRCharacterResult](dlr-character-result.md) -- [DLRDictionaryCorrectionThreshold](dlr-dictionary-correction-threshold.md) -- [DLRFurtherModes](dlr-further-modes.md) -- [DLRLicenseVerificationListener](dlr-license-verification-listener.md) - -## Enumerations - -- [EnumRegionPredetectionMode]({{ site.enumerations }}region-predetection-mode.html) -- [EnumColourConversionMode]({{ site.enumerations }}colour-conversion-mode.html) -- [EnumGrayscaleTransformationMode]({{ site.enumerations }}grayscale-transformation-mode.html) -- [EnumGrayscaleEnhancementMode]({{ site.enumerations }}grayscale-enhancement-mode.html) -- [EnumBinarizationMode]({{ site.enumerations }}binarization-mode.html) -- [EnumTextureDetectionMode]({{ site.enumerations }}texture-detection-mode.html) -- [EnumBarcodeFormat]({{ site.enumerations }}barcode-format.html) -- [EnumBarcodeFormat_2]({{ site.enumerations }}barcode-format-2.html) -- [EnumImagePixelFormat]({{ site.enumerations }}image-pixel-format.html) -- [EnumDMChargeWay]({{ site.enumerations }}dm-charge-way.html) -- [EnumDMLicenseModule]({{ site.enumerations }}dm-license-module.html) -- [EnumDMUUIDGenerationMethod]({{ site.enumerations }}dm-uuid-generation-method.html) -- [EnumProduct]({{ site.enumerations }}product.html) -- [EnumLocalizationSourceType]({{ site.enumerations }}localization-source-type.html) - -## Error Code - -- [Error Code]({{ site.enumerations }}error-code.html) diff --git a/programming-old/android/api-reference/label-recognition/general.md b/programming-old/android/api-reference/label-recognition/general.md deleted file mode 100644 index 410f486..0000000 --- a/programming-old/android/api-reference/label-recognition/general.md +++ /dev/null @@ -1,37 +0,0 @@ ---- -layout: default-layout -title: General - Dynamsoft Label Recognition Android API Reference -description: This is the general functions of Dynamsoft Label Recognition for Android API Reference. -keywords: api reference, android -needAutoGenerateSidebar: true -permalink: /programming/android/api-reference/label-recognition/general.html ---- - -# Android API Reference - General - -> You are viewing a history document page of Dynamsoft Label Recognizer Android v1.x. - -| Method | Description | -|----------------------|-------------| -| [`getVersion`](#getversion) | Returns the version number string for the SDK. | - - -## getVersion - -Get version information of SDK. - -```java -String com.dynamsoft.dlr.LabelRecognition.getVersion() -``` - -**Return Value** - -The version information string. - -**Code Snippet** - -```java -LabelRecognition recognizer = new LabelRecognition(); -String versionInfo = recognizer.getVersion(); -recognizer.destroy(); -``` diff --git a/programming-old/android/api-reference/label-recognition/index-v1.0.md b/programming-old/android/api-reference/label-recognition/index-v1.0.md deleted file mode 100644 index abd119d..0000000 --- a/programming-old/android/api-reference/label-recognition/index-v1.0.md +++ /dev/null @@ -1,61 +0,0 @@ ---- -layout: default-layout -title: LabelRecognition Class - Dynamsoft Label Recognition Android API Reference -description: This page shows LabelRecognition methods of Dynamsoft Label Recognition for Android API Reference. -keywords: api reference, android -needAutoGenerateSidebar: false -permalink: /programming/android/api-reference/label-recognition/index-v1.0.html ---- - - -# Dynamsoft Label Recognition - CLabelRecognition Class - -> You are viewing a history document page of Dynamsoft Label Recognizer Android v1.x. - -## General - - | Method | Description | - |----------------------|-------------| - | [`getVersion`](general.md#getversion) | Returns the version number string for the SDK. | - -  - -## Initialization - - | Method | Description | - |----------------------|-------------| - | [`LabelRecognition`](initialization.md#labelrecognition) | Initialization of `LabelRecognition` object.| - | [`destroy`](initialization.md#destroy) | Destroys an instance of `LabelRecognition` object.| - | [`initLicense`](initialization.md#initlicense) | Sets the license and activates the SDK. | - | [`initLicenseFromLTS`](initialization.md#initlicensefromlts) | Initializes the label recognition license and connects to the specified server for online verification. | - -  - -## Setting - - | Method | Description | - |----------------------|-------------| - | [`getRuntimeSettings`](settings.md#getruntimesettings) | Gets the current settings and saves it into a struct. | - | [`updateRuntimeSettings`](settings.md#updateruntimesettings) | Updates runtime settings with a given struct. | - | [`resetRuntimeSettings`](settings.md#resetruntimesettings) | Resets the runtime settings. | - | [`appendSettingsFromString`](settings.md#appendsettingsfromstring) | Appends LabelRecognitionParameter settings in a string to the SDK object. | - | [`outputSettingsToFile`](settings.md#outputsettingstofile) | Outputs LabelRecognitionParameter settings into a file (JSON file). | - | [`clearAppendedSettings`](settings.md#clearappendedsettings) | Clear all appended LabelRecognitionParameter settings in the SDK object. | - | [`updateReferenceRegionFromBarcodeResults`](settings.md#updatereferenceregionfrombarcoderesults) | Updates reference region which is defined with source type DLR_LST_BARCODE. | - | [`getModeArgument`](settings.md#getmodeargument) | Get argument value for the specified mode parameter. | - | [`setModeArgument`](settings.md#setmodeargument) | Set argument value for the specified mode parameter. | - | [`appendCharacterModelBuffer`](settings.md#appendcharactermodelbuffer) | Appends CharacterModel to the SDK object. | - | [`eraseAllCharacterModels`](settings.md#appendcharactermodelbuffer) | Erases all CharacterModels the SDK object currently loaded. | - | [`eraseCharacterModelByName`](settings.md#appendcharactermodelbuffer) | Erases a name specified CharacterModel from the SDK object. | - -  - -## Recognizing - - | Method | Description | - |----------------------|-------------| - | [`recognizeByBuffer`](recognizing.md#recognizebybuffer) | Recognizes text from memory buffer containing image pixels in defined format. | - | [`recognizeByFile`](recognizing.md#recognizebyfile) | Recognizes text from a specified image file. | - -  - \ No newline at end of file diff --git a/programming-old/android/api-reference/label-recognition/index.md b/programming-old/android/api-reference/label-recognition/index.md deleted file mode 100644 index f0e8669..0000000 --- a/programming-old/android/api-reference/label-recognition/index.md +++ /dev/null @@ -1,62 +0,0 @@ ---- -layout: default-layout -title: LabelRecognition Class - Dynamsoft Label Recognition Android API Reference -description: This page shows LabelRecognition methods of Dynamsoft Label Recognition for Android API Reference. -keywords: api reference, android -needAutoGenerateSidebar: false -permalink: /programming/android/api-reference/label-recognition/index.html ---- - - -# Dynamsoft Label Recognition - CLabelRecognition Class - -> You are viewing a history document page of Dynamsoft Label Recognizer Android v1.x. - -## General - - | Method | Description | - |----------------------|-------------| - | [`getVersion`](general.md#getversion) | Returns the version number string for the SDK. | - -  - -## Initialization - - | Method | Description | - |----------------------|-------------| - | [`LabelRecognition`](initialization.md#labelrecognition) | Initialization of `LabelRecognition` object.| - | [`destroy`](initialization.md#destroy) | Destroys an instance of `LabelRecognition` object.| - | [`initLicense`](initialization.md#initlicense) | Sets the license and activates the SDK. | - | [`initLicenseFromLTS`](initialization.md#initlicensefromlts) | Initializes the label recognition license and connects to the specified server for online verification. | - -  - -## Setting - - | Method | Description | - |----------------------|-------------| - | [`getRuntimeSettings`](settings.md#getruntimesettings) | Gets the current settings and saves it into a struct. | - | [`updateRuntimeSettings`](settings.md#updateruntimesettings) | Updates runtime settings with a given struct. | - | [`resetRuntimeSettings`](settings.md#resetruntimesettings) | Resets the runtime settings. | - | [`appendSettingsFromString`](settings.md#appendsettingsfromstring) | Appends LabelRecognitionParameter settings in a string to the SDK object. | - | [`appendSettingsFromFile`](settings.md#appendsettingsfromFile) | Appends LabelRecognitionParameter settings from a file to the SDK object. | - | [`outputSettingsToFile`](settings.md#outputsettingstofile) | Outputs LabelRecognitionParameter settings into a file (JSON file). | - | [`clearAppendedSettings`](settings.md#clearappendedsettings) | Clear all appended LabelRecognitionParameter settings in the SDK object. | - | [`updateReferenceRegionFromBarcodeResults`](settings.md#updatereferenceregionfrombarcoderesults) | Updates reference region which is defined with source type DLR_LST_BARCODE. | - | [`getModeArgument`](settings.md#getmodeargument) | Get argument value for the specified mode parameter. | - | [`setModeArgument`](settings.md#setmodeargument) | Set argument value for the specified mode parameter. | - | [`appendCharacterModelBuffer`](settings.md#appendcharactermodelbuffer) | Appends CharacterModel to the SDK object. | - | [`eraseAllCharacterModels`](settings.md#appendcharactermodelbuffer) | Erases all CharacterModels the SDK object currently loaded. | - | [`eraseCharacterModelByName`](settings.md#appendcharactermodelbuffer) | Erases a name specified CharacterModel from the SDK object. | - -  - -## Recognizing - - | Method | Description | - |----------------------|-------------| - | [`recognizeByBuffer`](recognizing.md#recognizebybuffer) | Recognizes text from memory buffer containing image pixels in defined format. | - | [`recognizeByFile`](recognizing.md#recognizebyfile) | Recognizes text from a specified image file. | - -  - \ No newline at end of file diff --git a/programming-old/android/api-reference/label-recognition/initialization.md b/programming-old/android/api-reference/label-recognition/initialization.md deleted file mode 100644 index d27fdb5..0000000 --- a/programming-old/android/api-reference/label-recognition/initialization.md +++ /dev/null @@ -1,125 +0,0 @@ ---- -layout: default-layout -title: Initialization - Dynamsoft Label Recognition Android API Reference -description: This is the initialization functions of Dynamsoft Label Recognition for Android API Reference. -keywords: api reference, android -needAutoGenerateSidebar: true -permalink: /programming/android/api-reference/label-recognition/initialization.html ---- - -# Android API Reference - Initialization - -> You are viewing a history document page of Dynamsoft Label Recognizer Android v1.x. - -| Method | Description | -|----------------------|-------------| -| [`LabelRecognition`](#labelrecognition-initialization) | Initialization of `LabelRecognition` object.| -| [`destroy`](#destroy) | Destroys an instance of `LabelRecognition` object.| -| [`initLicense`](#initlicense) | Sets product key and activates the SDK. | -| [`initLicenseFromLTS`](#initlicensefromlts) | Initializes the label recognition license and connects to the specified server for online verification. | - - --- - -## LabelRecognition Initialization - -Initialization of `LabelRecognition` object without a license. - -```java -com.dynamsoft.dlr.LabelRecognition.LabelRecognition() throws LabelRecognitionException -``` - -Initialization of `LabelRecognition` with a license. - -```java -com.dynamsoft.dlr.LabelRecognition.LabelRecognition(String license) throws Exception -``` - -**Exceptions** - -[`LabelRecognitionException`](../class/label-recognition-exception.md) - - -**Remarks** - -If you initialize DynamsoftLabelRecognition without a license, the recognition results may be unreliable. - -**Code Snippet** - -```java -LabelRecognition recognizer = new LabelRecognition(); -``` - -```java -LabelRecognition recognizer = new LabelRecognition("t0260NwAAAHV***************"); -``` - -  - - -## Destroy - -```java -void com.dynamsoft.dlr.LabelRecognition.destroy() -``` - -**Code Snippet** - -```java -LabelRecognition recognizer = new LabelRecognition("t0260NwAAAHV***************"); -recognizer.destroy(); -``` - - -## initLicense -Sets product key and activate the SDK. - -```java -void com.dynamsoft.dlr.LabelRecognition.initLicense(String license) throws LabelRecognitionException -``` - -**Parameters** -`license`: The product keys. - -**Exceptions** - -[`LabelRecognitionException`](../class/label-recognition-exception.md) - -**Code Snippet** -```java -LabelRecognition recognizer = new LabelRecognition(); -recognizer.initLicense("t0260NwAAAHV***************"); -recognizer.destroy(); -``` - -  - - -## initLicenseFromLTS -Initializes the label recognition license and connects to the specified server for online verification. - -```java -void com.dynamsoft.dlr.LabelRecognition.initLicenseFromLTS(DMLTSConnectionParameters ltsInfo, DLRLTSLicenseVerificationListener listener) -``` - -**Parameters** -- `ltsInfo`: The struct DMLTSConnectionParameters with customized settings. -- `listener`: The delegate to handle callback when license server returns. - -**Code Snippet** -```java -LabelRecognition recognizer = new LabelRecognition(); -DMLTSConnectionParameters info = new DMLTSConnectionParameters(); -info.handShakeCode = "*****-hs-****"; -info.sessionPassword = "******"; -recognizer.initLicenseFromLTS(info, new DLRLTSLicenseVerificationListener() { - @Override - public void LTSLicenseVerificationCallback(boolean b, Exception e) { - if (!b && e != null) { - e.printStackTrace(); - } - } -} -``` - -  - diff --git a/programming-old/android/api-reference/label-recognition/recognizing-v1.0.md b/programming-old/android/api-reference/label-recognition/recognizing-v1.0.md deleted file mode 100644 index 011e834..0000000 --- a/programming-old/android/api-reference/label-recognition/recognizing-v1.0.md +++ /dev/null @@ -1,79 +0,0 @@ ---- -layout: default-layout -title: Recognizing - Dynamsoft Label Recognition Android API Reference -description: This is the recognizing functions of Dynamsoft Label Recognition for Android API Reference. -keywords: api reference, android -needAutoGenerateSidebar: true -permalink: /programming/android/api-reference/label-recognition/recognizing-v1.0.html ---- - -# Android API Reference - Recognizing - -> You are viewing a history document page of Dynamsoft Label Recognizer Android v1.x. - -| Method | Description | -|----------------------|-------------| - | [`recognizeByBuffer`](#recognizebybuffer) | Recognizes text from memory buffer containing image pixels in defined format. | - | [`recognizeByFile`](#recognizebyfile) | Recognizes text from a specified image file. | - ---- - -## recognizeByBuffer -Recognizes text from the memory buffer containing image pixels in defined format. - -```java -DLRResult[] com.dynamsoft.dlr.LabelRecognition.recognizeByBuffer(DLRImageData imageData, String templateName) throws LabelRecognitionException -``` - -**Parameters** -`[in] imageData` An object of DLRImageData that represents an image. -`[in] templateName` The template name. A template name is the value of key LabelRecognitionParameter.Name defined in JSON formatted settings. If no template name is specified, current runtime settings will be used. - -**Return Value** -All results recognized successfully. - -**Exceptions** - -[`LabelRecognitionException`](../class/label-recognition-exception.md) - -**Code Snippet** -```java -LabelRecognition recognizer = new LabelRecognition(); -recognizer.initLicense("t0260NwAAAHV***************"); -//Generate imageData from somewhere else -DLRResult[] result = recognizer.recognizeByBuffer(imageData, ""); -recognizer.destroy(); -``` - -  - - -## recognizeByFile -Recognizes text from a specified image file. - -```java -DLRResult[] com.dynamsoft.dlr.LabelRecognition.recognizeByFile (String fileName, String templateName) throws LabelRecognitionException -``` - -**Parameters** -`fileName` A string defining the file name. -`templateName` The template name. A template name is the value of key LabelRecognitionParameter.Name defined in JSON formatted settings. If no template name is specified, current runtime settings will be used. - -**Return Value** -All results recognized successfully. - -**Exceptions** - -[`LabelRecognitionException`](../class/label-recognition-exception.md) - -**Code Snippet** -```java -LabelRecognition recognizer = new LabelRecognition(); -recognizer.initLicense("t0260NwAAAHV***************"); -DLRResult[] result = recognizer.recognizeByFile("full file path", ""); -recognizer.destroy(); -``` - -  - - diff --git a/programming-old/android/api-reference/label-recognition/recognizing.md b/programming-old/android/api-reference/label-recognition/recognizing.md deleted file mode 100644 index 27c9e77..0000000 --- a/programming-old/android/api-reference/label-recognition/recognizing.md +++ /dev/null @@ -1,99 +0,0 @@ ---- -layout: default-layout -title: Recognizing - Dynamsoft Label Recognition Android API Reference -description: This is the recognizing functions of Dynamsoft Label Recognition for Android API Reference. -keywords: api reference, android -needAutoGenerateSidebar: true -permalink: /programming/android/api-reference/label-recognition/recognizing.html ---- - -# Android API Reference - Recognizing - -> You are viewing a history document page of Dynamsoft Label Recognizer Android v1.x. - -| Method | Description | -|----------------------|-------------| - | [`recognizeByBuffer`](#recognizebybuffer) | Recognizes text from memory buffer containing image pixels in defined format. | - | [`recognizeByFile`](#recognizebyfile) | Recognizes text from a specified image file. | - ---- - -## recognizeByBuffer -Recognizes text from the memory buffer containing image pixels in defined format. - -```java -DLRResult[] com.dynamsoft.dlr.LabelRecognition.recognizeByBuffer(DLRImageData imageData, String templateName) throws LabelRecognitionException -``` - -**Parameters** -`[in] imageData` An object of DLRImageData that represents an image. -`[in] templateName` The template name. A template name is the value of key LabelRecognitionParameter.Name defined in JSON formatted settings. If no template name is specified, current runtime settings will be used. - -**Return Value** -All results recognized successfully. - -**Exceptions** - -[`LabelRecognitionException`](../class/label-recognition-exception.md) - -**Code Snippet** -```java -LabelRecognition recognizer = new LabelRecognition(); -DMLTSConnectionParameters parameters = new DMLTSConnectionParameters(); -parameters.organizationID = "200001"; -recognizer.initLicenseFromLTS(parameters, new DLRLTSLicenseVerificationListener() { - @Override - public void LTSLicenseVerificationCallback(boolean isSuccess, Exception error) { - if (!isSuccess) { - error.printStackTrace(); - } - } - }); - -//Generate imageData from somewhere else -DLRResult[] result = recognizer.recognizeByBuffer(imageData, ""); -recognizer.destroy(); -``` - -  - - -## recognizeByFile -Recognizes text from a specified image file. - -```java -DLRResult[] com.dynamsoft.dlr.LabelRecognition.recognizeByFile (String fileName, String templateName) throws LabelRecognitionException -``` - -**Parameters** -`fileName` A string defining the file name. -`templateName` The template name. A template name is the value of key LabelRecognitionParameter.Name defined in JSON formatted settings. If no template name is specified, current runtime settings will be used. - -**Return Value** -All results recognized successfully. - -**Exceptions** - -[`LabelRecognitionException`](../class/label-recognition-exception.md) - -**Code Snippet** -```java -LabelRecognition recognizer = new LabelRecognition(); -DMLTSConnectionParameters parameters = new DMLTSConnectionParameters(); -parameters.organizationID = "200001"; -recognizer.initLicenseFromLTS(parameters, new DLRLTSLicenseVerificationListener() { - @Override - public void LTSLicenseVerificationCallback(boolean isSuccess, Exception error) { - if (!isSuccess) { - error.printStackTrace(); - } - } - }); - -DLRResult[] result = recognizer.recognizeByFile("full file path", ""); -recognizer.destroy(); -``` - -  - - diff --git a/programming-old/android/api-reference/label-recognition/settings-v1.0.md b/programming-old/android/api-reference/label-recognition/settings-v1.0.md deleted file mode 100644 index 47ba291..0000000 --- a/programming-old/android/api-reference/label-recognition/settings-v1.0.md +++ /dev/null @@ -1,358 +0,0 @@ ---- -layout: default-layout -title: Settings - Dynamsoft Label Recognition Android API Reference -description: This is the settings functions of Dynamsoft Label Recognition for Android API Reference. -keywords: api reference, android -needAutoGenerateSidebar: true -permalink: /programming/android/api-reference/label-recognition/settings-v1.0.html ---- - -# Android API Reference - Settings - -> You are viewing a history document page of Dynamsoft Label Recognizer Android v1.x. - -| Method | Description | -|----------------------|-------------| - | [`appendCharacterModelBuffer`](#appendcharactermodelbuffer) | Appends CharacterModel to the SDK object. | - | [`appendSettingsFromString`](#appendsettingsfromstring) | Appends LabelRecognitionParameter settings in a string to the SDK object. | - | [`clearAppendedSettings`](#clearappendedsettings) | Clears appended LabelRecognitionParameter settings. | - | [`eraseAllCharacterModels`](#appendcharactermodelbuffer) | Erases all CharacterModels the SDK object currently loaded. | - | [`eraseCharacterModelByName`](#appendcharactermodelbuffer) | Erases a name specified CharacterModel from the SDK object. | - | [`getModeArgument`](#getmodeargument) | Get argument value for the specified mode parameter. | - | [`getRuntimeSettings`](#getruntimesettings) | Gets the current settings and saves it into a class object. | - | [`outputSettingsToFile`](#outputsettingstofile) | Outputs LabelRecognitionParameter settings into a file (JSON file). | - | [`resetRuntimeSettings`](#resetruntimesettings) | Resets the runtime settings. | - | [`setModeArgument`](#setmodeargument) | Set argument value for the specified mode parameter. | - | [`updateReferenceRegionFromBarcodeResults`](#updatereferenceregionfrombarcoderesults) | Updates reference region which is defined with source type DLR_LST_BARCODE. | - | [`updateRuntimeSettings`](#updateruntimesettings) | Updates runtime settings with a given class object. | - ---- - -## appendCharacterModelBuffer -Appends CharacterModel to the SDK object. - -```java -void com.dynamsoft.dlr.LabelRecognition.appendCharacterModelBuffer (String name, byte[] prototxtBuffer, byte[] txtBuffer, byte[] characterModelBuffer) throws LabelRecognitionException -``` - -**Parameters** -`name` A unique name for the appended CharacterModel. -`prototxtBuffer` The .prototxt file data of the CharacterModel in a byte array. -`txtBuffer` The .txt file data of the CharacterModel in a byte array. -`characterModelBuffer` The .caffemodel file data of the CharacterModel in a byte array. - - -**Exceptions** -[`LabelRecognitionException`](../class/label-recognition-exception.md) - -**Code Snippet** -```java -LabelRecognition recognizer = new LabelRecognition(); -recognizer.initLicense("t0260NwAAAHV***************"); -AssetManager manager = getAssets(); -InputStream isPrototxt = manager.open("CharacterModel/NumberLetter.prototxt"); -byte[] prototxt = new byte[isPrototxt.available()]; -isPrototxt.read(prototxt); -isPrototxt.close(); -InputStream isCharacterModel = manager.open("CharacterModel/NumberLetter.caffemodel"); -byte[] characterModel = new byte[isCharacterModel.available()]; -isCharacterModel.read(characterModel); -isCharacterModel.close(); -InputStream isTxt = manager.open("CharacterModel/NumberLetter.txt"); -byte[] txt = new byte[isTxt.available()]; -isTxt.read(txt); -isTxt.close(); -recognizer.appendCharacterModelBuffer("NumberLetter", prototxt, txt, characterModel); -recognizer.destroy(); -``` - -  - - -## appendSettingsFromString -Append a new template string to the current label recognition instance. - -```java -void com.dynamsoft.dlr.LabelRecognition.appendSettingsFromString (String content) throws LabelRecognitionException -``` - -**Parameters** -`content` A JSON string that represents the content of the settings. - - -**Exceptions** - -[`LabelRecognitionException`](../class/label-recognition-exception.md) - -**Code Snippet** -```java -LabelRecognition recognizer = new LabelRecognition(); -recognizer.initLicense("t0260NwAAAHV***************"); -recognizer.appendSettingsFromString("{\"LabelRecognitionParameter\":{\"Name\":\"P1\", \"RegionPredetectionModes\":[{\"Mode\":\"DLR_RPM_GENERAL_HSV_CONTRAST\"}], \"ReferenceRegionNameArray\": [\"R1\"]},\"ReferenceRegion\":{\"Name\":\"R1\",\"Localization\":{\"SourceType\":\"DLR_LST_PREDETECTED_REGION\",\"RegionPredetectionModesIndex\":0},\"TextAreaNameArray\":[\"T1\"]},\"TextArea\":{\"Name\":\"T1\",\"CharacterModelName\":\"Number\"}}"); -recognizer.destroy(); -``` - -  - - -## clearAppendedSettings -Clear all appended parameter settings of the current label recognition instance. - -```java -void com.dynamsoft.dlr.LabelRecognition.clearAppendedSettings () throws LabelRecognitionException -``` - -**Code Snippet** -```java -LabelRecognition recognizer = new LabelRecognition(); -recognizer.initLicense("t0260NwAAAHV***************"); -recognizer.clearAppendedSettings(); -``` - -  - - -## eraseAllCharacterModels -Erases all CharacterModels the SDK object currently loaded. - -```java -void com.dynamsoft.dlr.LabelRecognition.eraseAllCharacterModels () throws LabelRecognitionException -``` - -**Code Snippet** -```java -LabelRecognition recognizer = new LabelRecognition(); -recognizer.initLicense("t0260NwAAAHV***************"); -recognizer.eraseAllCharacterModels(); -``` - -  - - -## eraseCharacterModelByName -Clear all appended parameter settings of the current label recognition instance. - -```java -void com.dynamsoft.dlr.LabelRecognition.eraseCharacterModelByName(String name) throws LabelRecognitionException -``` - -**Parameters** -`name` A unique name representing the CharacterModel to erase. - -**Code Snippet** -```java -LabelRecognition recognizer = new LabelRecognition(); -recognizer.initLicense("t0260NwAAAHV***************"); -recognizer.eraseCharacterModelByName("NumberLetter"); -``` - -  - - -## getModeArgument - -Get argument value for the specified mode parameter. - -```java -String com.dynamsoft.dlr.LabelRecognition.getModeArgument (String modesName, int index, String argumentName) throws LabelRecognitionException -``` - -**Parameters** -- `modesName`: The mode parameter name to get argument. -- `index`: The array index of mode parameter to indicate a specific mode. -- `argumentName`: The name of the argument to get. - -**Return Value** -the optional argument for a specified mode in Modes parameters. - -**Exceptions** -[`LabelRecognitionException`](../class/label-recognition-exception.md) - -#### Remark -Check follow link for available modes and arguments: -- [`RegionPredetectionModes`]({{ site.parameters-reference }}label-recognition-parameter/region-predetection-modes.html#regionpredetectionmodes) - -**Code Snippet** -```java -LabelRecognition recognizer = new LabelRecognition(); -recognizer.initLicense("t0260NwAAAHV***************"); -DLRRuntimeSettings settings = recognizer.getRuntimeSettings(); -settings.regionPredetectionModes[0] = EnumRegionPredetectionMode.DLR_RPM_GENERAL_RGB_CONTRAST; -recognizer.updateRuntimeSettings(settings); -recognizer.setModeArgument("RegionPredetectionModes", 0, "AspectRatioRange", "100"); -String argumentValue = recognizer.getModeArgument("RegionPredetectionModes", 0, "AspectRatioRange"); -recognizer.destroy(); -``` - -  - - -## getRuntimeSettings -Get current settings and save them into a [`DLRRuntimeSettings`](../class/dlr-runtime-settings.html) class object. - -```java -PublicRuntimeSettings com.dynamsoft.dlr.LabelRecognition.getRuntimeSettings () throws LabelRecognitionException -``` - -**Return Value** - -The class object of template settings. - -**Exceptions** - -[`LabelRecognitionException`](../class/label-recognition-exception.md) - -**Code Snippet** -```java -LabelRecognition recognizer = new LabelRecognition(); -recognizer.initLicense("t0260NwAAAHV***************"); -DLRRuntimeSettings settings = recognizer.getRuntimeSettings(); -recognizer.destroy(); -``` - -  - -## outputSettingsToFile -Outputs runtime settings and save them into a settings file (JSON file). - -```java -void com.dynamsoft.dlr.LabelRecognition.outputSettingsToFile (String filePath, String templateName) throws LabelRecognitionException -``` - -**Parameters** -`filePath` The path of the output file which stores current settings. -`templateName` A unique name for declaring current runtime settings. - - -**Exceptions** - -[`LabelRecognitionException`](../class/label-recognition-exception.md) - -**Code Snippet** -```java -LabelRecognition recognizer = new LabelRecognition(); -recognizer.initLicense("t0260NwAAAHV***************"); -recognizer.appendSettingsFromString("{\"LabelRecognitionParameter\":{\"Name\":\"P1\", \"RegionPredetectionModes\":[{\"Mode\":\"DLR_RPM_GENERAL_HSV_CONTRAST\"}], \"ReferenceRegionNameArray\": [\"R1\"]},\"ReferenceRegion\":{\"Name\":\"R1\",\"Localization\":{\"SourceType\":\"DLR_LST_PREDETECTED_REGION\",\"RegionPredetectionModesIndex\":0},\"TextAreaNameArray\":[\"T1\"]},\"TextArea\":{\"Name\":\"T1\",\"CharacterModelName\":\"Number\"}}"); -recognizer.outputSettingsToFile("your saving file path", "currentRuntimeSettings"); -recognizer.destroy(); -``` - -  - - -## resetRuntimeSettings -Reset all runtime settings to default values. - -```java -void com.dynamsoft.dlr.LabelRecognition.resetRuntimeSettings () throws LabelRecognitionException -``` - -**Exceptions** -[`LabelRecognitionException`](../class/label-recognition-exception.md) - -**Code Snippet** -```java -LabelRecognition recognizer = new LabelRecognition(); -recognizer.initLicense("t0260NwAAAHV***************"); -DLRRuntimeSettings settings = recognizer.getRuntimeSettings(); -settings.linesCount = 1; -recognizer.updateRuntimeSettings(settings); -recognizer.resetRuntimeSettings(); -recognizer.destroy(); -``` - - -  - - -## setModeArgument - -Set argument value for the specified mode parameter. - - -```java -void com.dynamsoft.dlr.LabelRecognition.setModeArgument (String modesName, int index, String argumentName, String argumentValue) throws LabelRecognitionException -``` -**Parameters** -- `modesName`: The mode parameter name to set argument. -- `index`: The array index of mode parameter to indicate a specific mode. -- `argumentName`: The name of the argument to set. -- `argumentValue`: The value of the argument to set. - -**Exceptions** -[`LabelRecognitionException`](../class/label-recognition-exception.md) - - -#### Remark -Check follow link for available modes and arguments: -- [`RegionPredetectionModes`]({{ site.parameters-reference }}label-recognition-parameter/region-predetection-modes.html#regionpredetectionmodes) - -**Code Snippet** -```java -LabelRecognition recognizer = new LabelRecognition(); -recognizer.initLicense("t0260NwAAAHV***************"); -DLRRuntimeSettings settings = recognizer.getRuntimeSettings(); -settings.regionPredetectionModes[0] = EnumRegionPredetectionMode.DLR_RPM_GENERAL_RGB_CONTRAST; -recognizer.updateRuntimeSettings(settings); -recognizer.setModeArgument("RegionPredetectionModes", 0, "AspectRatioRange", "100"); -recognizer.destroy(); -``` - -  - - -## updateReferenceRegionFromBarcodeResults -Updates reference region which is defined with source type DLR_LST_BARCODE. - -```java -void com.dynamsoft.dlr.LabelRecognition.updateReferenceRegionFromBarcodeResults (TextResult[] barcodeResults, String templateName) throws LabelRecognitionException -``` - -**Parameters** -`barcodeResults` The barcode results used to localize reference region. -`templateName` The template name. A template name is the value of key LabelRecognitionParameter.Name defined in JSON formatted settings. If no template name is specified, current runtime settings will be used. - - -**Exceptions** - -[`LabelRecognitionException`](../class/label-recognition-exception.md) - - -**Code Snippet** -```java -LabelRecognition recognizer = new LabelRecognition(); -recognizer.initLicense("t0260NwAAAHV***************"); -recognizer.appendSettingsFromString("{\"LabelRecognitionParameter\":{\"Name\":\"P1\", \"RegionPredetectionModes\":[{\"Mode\":\"DLR_RPM_GENERAL_HSV_CONTRAST\"}], \"ReferenceRegionNameArray\": [\"R1\"]},\"ReferenceRegion\":{\"Name\":\"R1\",\"Localization\":{\"SourceType\":\"DLR_LST_BARCODE\"},\"TextAreaNameArray\":[\"T1\"]},\"TextArea\":{\"Name\":\"T1\",\"CharacterModelName\":\"Number\"}}"); -//Get barcodeResults from Dynamsoft Barcode Reader SDK -recognizer.updateReferenceRegionFromBarcodeResults(barcodeResults, "P1"); -recognizer.destroy(); -``` - -  - -## updateRuntimeSettings -Update runtime settings with a given [`DLRRuntimeSettings`](../class/dlr-runtime-settings.html) class object. - -```java -void com.dynamsoft.dlr.LabelRecognition.updateRuntimeSettings (DLRRuntimeSettings settings) throws LabelRecognitionException -``` - -**Parameters** -`settings` The class object of template settings. - -**Exceptions** - -[`LabelRecognitionException`](../class/label-recognition-exception.md) - -**Code Snippet** -```java -LabelRecognition recognizer = new LabelRecognition(); -recognizer.initLicense("t0260NwAAAHV***************"); -DLRRuntimeSettings settings = recognizer.getRuntimeSettings(); -settings.linesCount = 1; -recognizer.updateRuntimeSettings(settings); -recognizer.destroy(); -``` - -  - diff --git a/programming-old/android/api-reference/label-recognition/settings.md b/programming-old/android/api-reference/label-recognition/settings.md deleted file mode 100644 index 26675ce..0000000 --- a/programming-old/android/api-reference/label-recognition/settings.md +++ /dev/null @@ -1,513 +0,0 @@ ---- -layout: default-layout -title: Settings - Dynamsoft Label Recognition Android API Reference -description: This is the settings functions of Dynamsoft Label Recognition for Android API Reference. -keywords: api reference, android -needAutoGenerateSidebar: true -permalink: /programming/android/api-reference/label-recognition/settings.html ---- - -# Android API Reference - Settings - -> You are viewing a history document page of Dynamsoft Label Recognizer Android v1.x. - -| Method | Description | -|----------------------|-------------| - | [`appendCharacterModelBuffer`](#appendcharactermodelbuffer) | Appends CharacterModel to the SDK object. | - | [`appendSettingsFromFile`](#appendsettingsfromfile) | Appends LabelRecognitionParameter settings in a file to the SDK object. | - | [`appendSettingsFromString`](#appendsettingsfromstring) | Appends LabelRecognitionParameter settings in a string to the SDK object. | - | [`clearAppendedSettings`](#clearappendedsettings) | Clears appended LabelRecognitionParameter settings. | - | [`eraseAllCharacterModels`](#eraseallcharactermodels) | Erases all CharacterModels the SDK object currently loaded. | - | [`eraseCharacterModelByName`](#erasecharactermodelbyname) | Erases a name specified CharacterModel from the SDK object. | - | [`getModeArgument`](#getmodeargument) | Get argument value for the specified mode parameter. | - | [`getRuntimeSettings`](#getruntimesettings) | Gets the current settings and saves it into a class object. | - | [`outputSettingsToFile`](#outputsettingstofile) | Outputs LabelRecognitionParameter settings into a file (JSON file). | - | [`resetRuntimeSettings`](#resetruntimesettings) | Resets the runtime settings. | - | [`setModeArgument`](#setmodeargument) | Set argument value for the specified mode parameter. | - | [`updateReferenceRegionFromBarcodeResults`](#updatereferenceregionfrombarcoderesults) | Updates reference region which is defined with source type DLR_LST_BARCODE. | - | [`updateRuntimeSettings`](#updateruntimesettings) | Updates runtime settings with a given class object. | - ---- - -## appendCharacterModelBuffer -Appends CharacterModel to the SDK object. - -```java -void com.dynamsoft.dlr.LabelRecognition.appendCharacterModelBuffer (String name, byte[] prototxtBuffer, byte[] txtBuffer, byte[] characterModelBuffer) throws LabelRecognitionException -``` - -**Parameters** -`name` A unique name for the appended CharacterModel. -`prototxtBuffer` The .prototxt file data of the CharacterModel in a byte array. -`txtBuffer` The .txt file data of the CharacterModel in a byte array. -`characterModelBuffer` The .caffemodel file data of the CharacterModel in a byte array. - - -**Exceptions** -[`LabelRecognitionException`](../class/label-recognition-exception.md) - -**Code Snippet** -```java -LabelRecognition recognizer = new LabelRecognition(); -DMLTSConnectionParameters parameters = new DMLTSConnectionParameters(); -parameters.organizationID = "200001"; -recognizer.initLicenseFromLTS(parameters, new DLRLTSLicenseVerificationListener() { - @Override - public void LTSLicenseVerificationCallback(boolean isSuccess, Exception error) { - if (!isSuccess) { - error.printStackTrace(); - } - } - }); - -AssetManager manager = getAssets(); -InputStream isPrototxt = manager.open("CharacterModel/NumberLetter.prototxt"); -byte[] prototxt = new byte[isPrototxt.available()]; -isPrototxt.read(prototxt); -isPrototxt.close(); -InputStream isCharacterModel = manager.open("CharacterModel/NumberLetter.caffemodel"); -byte[] characterModel = new byte[isCharacterModel.available()]; -isCharacterModel.read(characterModel); -isCharacterModel.close(); -InputStream isTxt = manager.open("CharacterModel/NumberLetter.txt"); -byte[] txt = new byte[isTxt.available()]; -isTxt.read(txt); -isTxt.close(); -recognizer.appendCharacterModelBuffer("NumberLetter", prototxt, txt, characterModel); -recognizer.destroy(); -``` - -  - - -## appendSettingsFromFile -Appends LabelRecognitionParameter settings in a file to the SDK object. - -```java -void com.dynamsoft.dlr.LabelRecognition.appendSettingsFromFile (String filePath) throws LabelRecognitionException -``` - -**Parameters** -`filePath` The settings file path. - - -**Exceptions** - -[`LabelRecognitionException`](../class/label-recognition-exception.md) - -**Code Snippet** -```java -LabelRecognition recognizer = new LabelRecognition(); -DMLTSConnectionParameters parameters = new DMLTSConnectionParameters(); -parameters.organizationID = "200001"; -recognizer.initLicenseFromLTS(parameters, new DLRLTSLicenseVerificationListener() { - @Override - public void LTSLicenseVerificationCallback(boolean isSuccess, Exception error) { - if (!isSuccess) { - error.printStackTrace(); - } - } - }); - -recognizer.appendSettingsFromFile("your file path"); -recognizer.destroy(); -``` - -  - - -## appendSettingsFromString -Append a new template string to the current label recognition instance. - -```java -void com.dynamsoft.dlr.LabelRecognition.appendSettingsFromString (String content) throws LabelRecognitionException -``` - -**Parameters** -`content` A JSON string that represents the content of the settings. - -**Exceptions** - -[`LabelRecognitionException`](../class/label-recognition-exception.md) - -**Code Snippet** -```java -LabelRecognition recognizer = new LabelRecognition(); -DMLTSConnectionParameters parameters = new DMLTSConnectionParameters(); -parameters.organizationID = "200001"; -recognizer.initLicenseFromLTS(parameters, new DLRLTSLicenseVerificationListener() { - @Override - public void LTSLicenseVerificationCallback(boolean isSuccess, Exception error) { - if (!isSuccess) { - error.printStackTrace(); - } - } - }); - -recognizer.appendSettingsFromString("{\"LabelRecognitionParameter\":{\"Name\":\"P1\", \"RegionPredetectionModes\":[{\"Mode\":\"DLR_RPM_GENERAL_HSV_CONTRAST\"}], \"ReferenceRegionNameArray\": [\"R1\"]},\"ReferenceRegion\":{\"Name\":\"R1\",\"Localization\":{\"SourceType\":\"DLR_LST_PREDETECTED_REGION\",\"RegionPredetectionModesIndex\":0},\"TextAreaNameArray\":[\"T1\"]},\"TextArea\":{\"Name\":\"T1\",\"CharacterModelName\":\"Number\"}}"); -recognizer.destroy(); -``` - -  - -## clearAppendedSettings -Clear all appended parameter settings of the current label recognition instance. - -```java -void com.dynamsoft.dlr.LabelRecognition.clearAppendedSettings () throws LabelRecognitionException -``` - -**Code Snippet** -```java -LabelRecognition recognizer = new LabelRecognition(); -DMLTSConnectionParameters parameters = new DMLTSConnectionParameters(); -parameters.organizationID = "200001"; -recognizer.initLicenseFromLTS(parameters, new DLRLTSLicenseVerificationListener() { - @Override - public void LTSLicenseVerificationCallback(boolean isSuccess, Exception error) { - if (!isSuccess) { - error.printStackTrace(); - } - } - }); - -recognizer.clearAppendedSettings(); -``` - -  - - -## eraseAllCharacterModels -Erases all CharacterModels the SDK object currently loaded. - -```java -void com.dynamsoft.dlr.LabelRecognition.eraseAllCharacterModels () throws LabelRecognitionException -``` - -**Code Snippet** -```java -LabelRecognition recognizer = new LabelRecognition(); -DMLTSConnectionParameters parameters = new DMLTSConnectionParameters(); -parameters.organizationID = "200001"; -recognizer.initLicenseFromLTS(parameters, new DLRLTSLicenseVerificationListener() { - @Override - public void LTSLicenseVerificationCallback(boolean isSuccess, Exception error) { - if (!isSuccess) { - error.printStackTrace(); - } - } - }); - -recognizer.eraseAllCharacterModels(); -``` - -  - - -## eraseCharacterModelByName -Erases a name specified CharacterModel from the SDK object. - -```java -void com.dynamsoft.dlr.LabelRecognition.eraseCharacterModelByName(String name) throws LabelRecognitionException -``` - -**Parameters** -`name` A unique name representing the CharacterModel to erase. - -**Code Snippet** -```java -LabelRecognition recognizer = new LabelRecognition(); -DMLTSConnectionParameters parameters = new DMLTSConnectionParameters(); -parameters.organizationID = "200001"; -recognizer.initLicenseFromLTS(parameters, new DLRLTSLicenseVerificationListener() { - @Override - public void LTSLicenseVerificationCallback(boolean isSuccess, Exception error) { - if (!isSuccess) { - error.printStackTrace(); - } - } - }); - -recognizer.eraseCharacterModelByName("NumberLetter"); -``` - -  - - -## getModeArgument - -Get argument value for the specified mode parameter. - -```java -String com.dynamsoft.dlr.LabelRecognition.getModeArgument (String modesName, int index, String argumentName) throws LabelRecognitionException -``` - -**Parameters** -- `modesName`: The mode parameter name to get argument. -- `index`: The array index of mode parameter to indicate a specific mode. -- `argumentName`: The name of the argument to get. - -**Return Value** -the optional argument for a specified mode in Modes parameters. - -**Exceptions** -[`LabelRecognitionException`](../class/label-recognition-exception.md) - -#### Remark -Check follow link for available modes and arguments: -- [`RegionPredetectionModes`]({{ site.parameters-reference }}label-recognition-parameter/region-predetection-modes.html#regionpredetectionmodes) - -**Code Snippet** -```java -LabelRecognition recognizer = new LabelRecognition(); -DMLTSConnectionParameters parameters = new DMLTSConnectionParameters(); -parameters.organizationID = "200001"; -recognizer.initLicenseFromLTS(parameters, new DLRLTSLicenseVerificationListener() { - @Override - public void LTSLicenseVerificationCallback(boolean isSuccess, Exception error) { - if (!isSuccess) { - error.printStackTrace(); - } - } - }); - -DLRRuntimeSettings settings = recognizer.getRuntimeSettings(); -settings.regionPredetectionModes[0] = EnumRegionPredetectionMode.DLR_RPM_GENERAL_RGB_CONTRAST; -recognizer.updateRuntimeSettings(settings); -recognizer.setModeArgument("RegionPredetectionModes", 0, "AspectRatioRange", "100"); -String argumentValue = recognizer.getModeArgument("RegionPredetectionModes", 0, "AspectRatioRange"); -recognizer.destroy(); -``` - -  - - -## getRuntimeSettings -Get current settings and save them into a [`DLRRuntimeSettings`](../class/dlr-runtime-settings.html) class object. - -```java -PublicRuntimeSettings com.dynamsoft.dlr.LabelRecognition.getRuntimeSettings () throws LabelRecognitionException -``` - -**Return Value** - -The class object of template settings. - -**Exceptions** - -[`LabelRecognitionException`](../class/label-recognition-exception.md) - -**Code Snippet** -```java -LabelRecognition recognizer = new LabelRecognition(); -DMLTSConnectionParameters parameters = new DMLTSConnectionParameters(); -parameters.organizationID = "200001"; -recognizer.initLicenseFromLTS(parameters, new DLRLTSLicenseVerificationListener() { - @Override - public void LTSLicenseVerificationCallback(boolean isSuccess, Exception error) { - if (!isSuccess) { - error.printStackTrace(); - } - } - }); - -DLRRuntimeSettings settings = recognizer.getRuntimeSettings(); -recognizer.destroy(); -``` - -  - -## outputSettingsToFile -Outputs runtime settings and save them into a settings file (JSON file). - -```java -void com.dynamsoft.dlr.LabelRecognition.outputSettingsToFile (String filePath, String templateName) throws LabelRecognitionException -``` - -**Parameters** -`filePath` The path of the output file which stores current settings. -`templateName` A unique name for declaring current runtime settings. - - -**Exceptions** - -[`LabelRecognitionException`](../class/label-recognition-exception.md) - -**Code Snippet** -```java -LabelRecognition recognizer = new LabelRecognition(); -DMLTSConnectionParameters parameters = new DMLTSConnectionParameters(); -parameters.organizationID = "200001"; -recognizer.initLicenseFromLTS(parameters, new DLRLTSLicenseVerificationListener() { - @Override - public void LTSLicenseVerificationCallback(boolean isSuccess, Exception error) { - if (!isSuccess) { - error.printStackTrace(); - } - } - }); - -recognizer.appendSettingsFromString("{\"LabelRecognitionParameter\":{\"Name\":\"P1\", \"RegionPredetectionModes\":[{\"Mode\":\"DLR_RPM_GENERAL_HSV_CONTRAST\"}], \"ReferenceRegionNameArray\": [\"R1\"]},\"ReferenceRegion\":{\"Name\":\"R1\",\"Localization\":{\"SourceType\":\"DLR_LST_PREDETECTED_REGION\",\"RegionPredetectionModesIndex\":0},\"TextAreaNameArray\":[\"T1\"]},\"TextArea\":{\"Name\":\"T1\",\"CharacterModelName\":\"Number\"}}"); -recognizer.outputSettingsToFile("your saving file path", "currentRuntimeSettings"); -recognizer.destroy(); -``` - -  - - -## resetRuntimeSettings -Reset all runtime settings to default values. - -```java -void com.dynamsoft.dlr.LabelRecognition.resetRuntimeSettings () throws LabelRecognitionException -``` - -**Exceptions** -[`LabelRecognitionException`](../class/label-recognition-exception.md) - -**Code Snippet** -```java -LabelRecognition recognizer = new LabelRecognition(); -DMLTSConnectionParameters parameters = new DMLTSConnectionParameters(); -parameters.organizationID = "200001"; -recognizer.initLicenseFromLTS(parameters, new DLRLTSLicenseVerificationListener() { - @Override - public void LTSLicenseVerificationCallback(boolean isSuccess, Exception error) { - if (!isSuccess) { - error.printStackTrace(); - } - } - }); - -DLRRuntimeSettings settings = recognizer.getRuntimeSettings(); -settings.linesCount = 1; -recognizer.updateRuntimeSettings(settings); -recognizer.resetRuntimeSettings(); -recognizer.destroy(); -``` - - -  - - -## setModeArgument - -Set argument value for the specified mode parameter. - - -```java -void com.dynamsoft.dlr.LabelRecognition.setModeArgument (String modesName, int index, String argumentName, String argumentValue) throws LabelRecognitionException -``` -**Parameters** -- `modesName`: The mode parameter name to set argument. -- `index`: The array index of mode parameter to indicate a specific mode. -- `argumentName`: The name of the argument to set. -- `argumentValue`: The value of the argument to set. - -**Exceptions** -[`LabelRecognitionException`](../class/label-recognition-exception.md) - - -#### Remark -Check follow link for available modes and arguments: -- [`RegionPredetectionModes`]({{ site.parameters-reference }}label-recognition-parameter/region-predetection-modes.html#regionpredetectionmodes) - -**Code Snippet** -```java -LabelRecognition recognizer = new LabelRecognition(); -DMLTSConnectionParameters parameters = new DMLTSConnectionParameters(); -parameters.organizationID = "200001"; -recognizer.initLicenseFromLTS(parameters, new DLRLTSLicenseVerificationListener() { - @Override - public void LTSLicenseVerificationCallback(boolean isSuccess, Exception error) { - if (!isSuccess) { - error.printStackTrace(); - } - } - }); - -DLRRuntimeSettings settings = recognizer.getRuntimeSettings(); -settings.regionPredetectionModes[0] = EnumRegionPredetectionMode.DLR_RPM_GENERAL_RGB_CONTRAST; -recognizer.updateRuntimeSettings(settings); -recognizer.setModeArgument("RegionPredetectionModes", 0, "AspectRatioRange", "100"); -recognizer.destroy(); -``` - -  - - -## updateReferenceRegionFromBarcodeResults -Updates reference region which is defined with source type DLR_LST_BARCODE. - -```java -void com.dynamsoft.dlr.LabelRecognition.updateReferenceRegionFromBarcodeResults (TextResult[] barcodeResults, String templateName) throws LabelRecognitionException -``` - -**Parameters** -`barcodeResults` The barcode results used to localize reference region. -`templateName` The template name. A template name is the value of key LabelRecognitionParameter.Name defined in JSON formatted settings. If no template name is specified, current runtime settings will be used. - - -**Exceptions** - -[`LabelRecognitionException`](../class/label-recognition-exception.md) - - -**Code Snippet** -```java -LabelRecognition recognizer = new LabelRecognition(); -DMLTSConnectionParameters parameters = new DMLTSConnectionParameters(); -parameters.organizationID = "200001"; -recognizer.initLicenseFromLTS(parameters, new DLRLTSLicenseVerificationListener() { - @Override - public void LTSLicenseVerificationCallback(boolean isSuccess, Exception error) { - if (!isSuccess) { - error.printStackTrace(); - } - } - }); - -recognizer.appendSettingsFromString("{\"LabelRecognitionParameter\":{\"Name\":\"P1\", \"RegionPredetectionModes\":[{\"Mode\":\"DLR_RPM_GENERAL_HSV_CONTRAST\"}], \"ReferenceRegionNameArray\": [\"R1\"]},\"ReferenceRegion\":{\"Name\":\"R1\",\"Localization\":{\"SourceType\":\"DLR_LST_BARCODE\"},\"TextAreaNameArray\":[\"T1\"]},\"TextArea\":{\"Name\":\"T1\",\"CharacterModelName\":\"Number\"}}"); -//Get barcodeResults from Dynamsoft Barcode Reader SDK -recognizer.updateReferenceRegionFromBarcodeResults(barcodeResults, "P1"); -recognizer.destroy(); -``` - -  - -## updateRuntimeSettings -Update runtime settings with a given [`DLRRuntimeSettings`](../class/dlr-runtime-settings.html) class object. - -```java -void com.dynamsoft.dlr.LabelRecognition.updateRuntimeSettings (DLRRuntimeSettings settings) throws LabelRecognitionException -``` - -**Parameters** -`settings` The class object of template settings. - -**Exceptions** - -[`LabelRecognitionException`](../class/label-recognition-exception.md) - -**Code Snippet** -```java -LabelRecognition recognizer = new LabelRecognition(); -DMLTSConnectionParameters parameters = new DMLTSConnectionParameters(); -parameters.organizationID = "200001"; -recognizer.initLicenseFromLTS(parameters, new DLRLTSLicenseVerificationListener() { - @Override - public void LTSLicenseVerificationCallback(boolean isSuccess, Exception error) { - if (!isSuccess) { - error.printStackTrace(); - } - } - }); - -DLRRuntimeSettings settings = recognizer.getRuntimeSettings(); -settings.linesCount = 1; -recognizer.updateRuntimeSettings(settings); -recognizer.destroy(); -``` - -  - diff --git a/programming-old/android/api-reference/label-recognizer-exception.md b/programming-old/android/api-reference/label-recognizer-exception.md deleted file mode 100644 index faafae4..0000000 --- a/programming-old/android/api-reference/label-recognizer-exception.md +++ /dev/null @@ -1,37 +0,0 @@ ---- -layout: default-layout -title: LabelRecognizerException Class - Dynamsoft Label Recognizer Android API Reference -description: This page shows the LabelRecognizerException Class of Dynamsoft Label Recognizer for Android SDK. -keywords: LabelRecognizerException, class, api reference, android -needAutoGenerateSidebar: true -needGenerateH3Content: true -noTitleIndex: true -permalink: /programming/android/api-reference/label-recognizer-exception.html ---- - - -# LabelRecognizerException - -> You are viewing a history document page of Dynamsoft Label Recognizer Android v2.2.20. - -Exception for signalling label recognition errors. - -```java -class com.dynamsoft.dlr.LabelRecognizerException -``` - -## Method - -| Method | Type | -|---------- | ----------- | -| [`getErrorCode`](#geterrorcode)| *int* | - -  - -### getErrorCode - -Gets the error code. - -```java -int getErrorCode() -``` diff --git a/programming-old/android/api-reference/label-recognizer-v2.0.md b/programming-old/android/api-reference/label-recognizer-v2.0.md deleted file mode 100644 index f439753..0000000 --- a/programming-old/android/api-reference/label-recognizer-v2.0.md +++ /dev/null @@ -1,600 +0,0 @@ ---- -layout: default-layout -title: LabelRecognizer Class - Dynamsoft Label Recognizer Android API Reference -description: This page shows LabelRecognizer methods of Dynamsoft Label Recognizer for Android API Reference. -keywords: api reference, android -needAutoGenerateSidebar: true -needGenerateH3Content: true -noTitleIndex: true -permalink: /programming/android/api-reference/label-recognizer-v2.0.html ---- - -# LabelRecognizer - -> You are viewing a history document page of Dynamsoft Label Recognizer Android v2.0.0. - -```java -class com.dynamsoft.dlr.LabelRecognizer -``` - -## Initialization - - | Method | Description | - |----------------------|-------------| - | [`LabelRecognizer`](#labelrecognizer) | Initialization of `LabelRecognizer` object.| - | [`destroy`](#destroy) | Destroys an instance of `LabelRecognizer` object.| - | [`initLicense`](#initlicense) | Sets the license and activates the SDK. | - -  - -### LabelRecognizer - -Initialization of `LabelRecognizer` object. - -```java -LabelRecognizer() throws LabelRecognizerException -``` - -**Exceptions** - -[`LabelRecognizerException`](label-recognizer-exception.md) - -**Code Snippet** - -```java -LabelRecognizer recognizer = new LabelRecognizer(); -``` - -  - -### destroy - -```java -void destroy() -``` - -**Code Snippet** - -```java -LabelRecognizer recognizer = new LabelRecognizer(); -recognizer.destroy(); -``` - -  - -### initLicense - -Sets product key and activate the SDK. - -```java -static void initLicense(String license, DLRLicenseVerificationListener listener) -``` - -**Parameters** - -`license`: The product keys. -`listener`: The delegate to handle callback when license server returns. - -**Code Snippet** - -```java -LabelRecognizer.initLicense("t0260NwAAAHV***************", new DLRLicenseVerificationListener() { - @Override - public void DLRLicenseVerificationCallback(boolean b, Exception e) { - if (!b && e != null) { - e.printStackTrace(); - } - } -} -``` - -## Settings - - | Method | Description | - |----------------------|-------------| - | [`getRuntimeSettings`](#getruntimesettings) | Gets the current settings and saves it into a struct. | - | [`updateRuntimeSettings`](#updateruntimesettings) | Updates runtime settings with a given struct. | - | [`resetRuntimeSettings`](#resetruntimesettings) | Resets the runtime settings. | - | [`appendSettingsFromString`](#appendsettingsfromstring) | Appends LabelRecognizerParameter settings in a string to the SDK object. | - | [`appendSettingsFromFile`](#appendsettingsfromfile) | Appends LabelRecognizerParameter settings from a file to the SDK object. | - | [`outputSettingsToFile`](#outputsettingstofile) | Outputs LabelRecognizerParameter settings into a file (JSON file). | - | [`clearAppendedSettings`](#clearappendedsettings) | Clear all appended LabelRecognizerParameter settings in the SDK object. | - | [`updateReferenceRegionFromBarcodeResults`](#updatereferenceregionfrombarcoderesults) | Updates reference region which is defined with source type LST_BARCODE. | - | [`getModeArgument`](#getmodeargument) | Get argument value for the specified mode parameter. | - | [`setModeArgument`](#setmodeargument) | Set argument value for the specified mode parameter. | - | [`appendCharacterModelBuffer`](#appendcharactermodelbuffer) | Appends CharacterModel to the SDK object. | - | [`eraseAllCharacterModels`](#appendcharactermodelbuffer) | Erases all CharacterModels the SDK object currently loaded. | - | [`eraseCharacterModelByName`](#appendcharactermodelbuffer) | Erases a name specified CharacterModel from the SDK object. | - -  - -### appendCharacterModelBuffer - -Appends CharacterModel to the SDK object. - -```java -static void appendCharacterModelBuffer (String name, byte[] prototxtBuffer, byte[] txtBuffer, byte[] characterModelBuffer) -``` - -**Parameters** - -`name` A unique name for the appended CharacterModel. -`prototxtBuffer` The .prototxt file data of the CharacterModel in a byte array. -`txtBuffer` The .txt file data of the CharacterModel in a byte array. -`characterModelBuffer` The .caffemodel file data of the CharacterModel in a byte array. - -**Code Snippet** - -```java -AssetManager manager = getAssets(); -InputStream isPrototxt = manager.open("CharacterModel/NumberLetter.prototxt"); -byte[] prototxt = new byte[isPrototxt.available()]; -isPrototxt.read(prototxt); -isPrototxt.close(); -InputStream isCharacterModel = manager.open("CharacterModel/NumberLetter.caffemodel"); -byte[] characterModel = new byte[isCharacterModel.available()]; -isCharacterModel.read(characterModel); -isCharacterModel.close(); -InputStream isTxt = manager.open("CharacterModel/NumberLetter.txt"); -byte[] txt = new byte[isTxt.available()]; -isTxt.read(txt); -isTxt.close(); - -LabelRecognizer.appendCharacterModelBuffer("NumberLetter", prototxt, txt, characterModel); -``` - -  - -### eraseAllCharacterModels -Erases all CharacterModels the SDK object currently loaded. - -```java -static void eraseAllCharacterModels () -``` - -**Code Snippet** - -```java -LabelRecognizer.eraseAllCharacterModels(); -``` - -  - -### eraseCharacterModelByName - -Erases a name specified CharacterModel from the SDK object. - -```java -static void eraseCharacterModelByName(String name) -``` - -**Parameters** - -`name` A unique name representing the CharacterModel to erase. - -**Code Snippet** - -```java -LabelRecognizer.eraseCharacterModelByName("NumberLetter"); -``` - -  - -### appendSettingsFromFile - -Appends LabelRecognizerParameter settings in a file to the SDK object. - -```java -void appendSettingsFromFile(String filePath) throws LabelRecognizerException -``` - -**Parameters** - -`filePath` The settings file path. - -**Exceptions** - -[`LabelRecognizerException`](label-recognizer-exception.md) - -**Code Snippet** - -```java -LabelRecognizer recognizer = new LabelRecognizer(); -recognizer.appendSettingsFromFile("your file path"); -recognizer.destroy(); -``` - -  - -### appendSettingsFromString - -Append a new template string to the current label Recognizer instance. - -```java -void appendSettingsFromString(String content) throws LabelRecognizerException -``` - -**Parameters** - -`content` A JSON string that represents the content of the settings. - -**Exceptions** - -[`LabelRecognizerException`](label-recognizer-exception.md) - -**Code Snippet** - -```java -LabelRecognizer recognizer = new LabelRecognizer(); -recognizer.appendSettingsFromString("{\"LabelRecognizerParameter\":{\"Name\":\"P1\", \"RegionPredetectionModes\":[{\"Mode\":\"RPM_GENERAL_HSV_CONTRAST\"}], \"ReferenceRegionNameArray\": [\"R1\"]},\"ReferenceRegion\":{\"Name\":\"R1\",\"Localization\":{\"SourceType\":\"LST_PREDETECTED_REGION\",\"RegionPredetectionModesIndex\":0},\"TextAreaNameArray\":[\"T1\"]},\"TextArea\":{\"Name\":\"T1\",\"CharacterModelName\":\"Number\"}}"); -recognizer.destroy(); -``` - -  - -### clearAppendedSettings - -Clear all appended parameter settings of the current label recognizer instance. - -```java -void clearAppendedSettings () throws LabelRecognizerException -``` - -**Code Snippet** - -```java -LabelRecognizer recognizer = new LabelRecognizer(); -recognizer.clearAppendedSettings(); -``` - -  - -### getModeArgument - -Get argument value for the specified mode parameter. - -```java -String getModeArgument(String modesName, int index, String argumentName) throws LabelRecognizerException -``` - -**Parameters** - -`modesName`: The mode parameter name to get argument. -`index`: The array index of mode parameter to indicate a specific mode. -`argumentName`: The name of the argument to get. - -**Return value** - -the optional argument for a specified mode in Modes parameters. - -**Exceptions** - -[`LabelRecognizerException`](label-recognizer-exception.md) - -**Remark** - -Check follow link for available modes and arguments: - -- [`RegionPredetectionModes`]({{ site.parameters-reference }}label-recognition-parameter/region-predetection-modes.html#regionpredetectionmodes) - -**Code Snippet** - -```java -LabelRecognizer recognizer = new LabelRecognizer(); - -DLRRuntimeSettings settings = recognizer.getRuntimeSettings(); -settings.furtherModes.regionPredetectionModes[0] = EnumRegionPredetectionMode.RPM_GENERAL_RGB_CONTRAST; -recognizer.updateRuntimeSettings(settings); -recognizer.setModeArgument("RegionPredetectionModes", 0, "AspectRatioRange", "100"); -String argumentValue = recognizer.getModeArgument("RegionPredetectionModes", 0, "AspectRatioRange"); -recognizer.destroy(); -``` - -  - -### getRuntimeSettings - -Get current settings and save them into a [`DLRRuntimeSettings`](dlr-runtime-settings.html) class object. - -```java -DLRRuntimeSettings getRuntimeSettings () throws LabelRecognizerException -``` - -**Return value** - -The class object of template settings. - -**Exceptions** - -[`LabelRecognizerException`](label-recognizer-exception.md) - -**Code Snippet** - -```java -LabelRecognizer recognizer = new LabelRecognizer(); - -DLRRuntimeSettings settings = recognizer.getRuntimeSettings(); -recognizer.destroy(); -``` - -  - -### outputSettingsToFile - -Outputs runtime settings and save them into a settings file (JSON file). - -```java -void outputSettingsToFile (String filePath, String templateName) throws LabelRecognizerException -``` - -**Parameters** - -`filePath` The path of the output file which stores current settings. -`templateName` A unique name for declaring current runtime settings. - -**Exceptions** - -[`LabelRecognizerException`](label-recognizer-exception.md) - -**Code Snippet** - -```java -LabelRecognizer recognizer = new LabelRecognizer(); - -recognizer.appendSettingsFromString("{\"LabelRecognizerParameter\":{\"Name\":\"P1\", \"RegionPredetectionModes\":[{\"Mode\":\"RPM_GENERAL_HSV_CONTRAST\"}], \"ReferenceRegionNameArray\": [\"R1\"]},\"ReferenceRegion\":{\"Name\":\"R1\",\"Localization\":{\"SourceType\":\"LST_PREDETECTED_REGION\",\"RegionPredetectionModesIndex\":0},\"TextAreaNameArray\":[\"T1\"]},\"TextArea\":{\"Name\":\"T1\",\"CharacterModelName\":\"Number\"}}"); -recognizer.outputSettingsToFile("your saving file path", "currentRuntimeSettings"); -recognizer.destroy(); -``` - -  - -### resetRuntimeSettings - -Reset all runtime settings to default values. - -```java -void resetRuntimeSettings () throws LabelRecognizerException -``` - -**Exceptions** - -[`LabelRecognizerException`](label-recognizer-exception.md) - -**Code Snippet** - -```java -LabelRecognizer recognizer = new LabelRecognizer(); - -DLRRuntimeSettings settings = recognizer.getRuntimeSettings(); -settings.maxThreadCount = 4; -recognizer.updateRuntimeSettings(settings); -recognizer.resetRuntimeSettings(); -recognizer.destroy(); -``` - -  - -### setModeArgument - -Set argument value for the specified mode parameter. - -```java -void setModeArgument(String modesName, int index, String argumentName, String argumentValue) throws LabelRecognizerException -``` - -**Parameters** - -`modesName`: The mode parameter name to set argument. -`index`: The array index of mode parameter to indicate a specific mode. -`argumentName`: The name of the argument to set. -`argumentValue`: The value of the argument to set. - -**Exceptions** - -[`LabelRecognizerException`](label-recognizer-exception.md) - -**Remark** - -Check follow link for available modes and arguments: -- [`RegionPredetectionModes`]({{ site.parameters-reference }}label-recognition-parameter/region-predetection-modes.html#regionpredetectionmodes) - -**Code Snippet** - -```java -LabelRecognizer recognizer = new LabelRecognizer(); - -DLRRuntimeSettings settings = recognizer.getRuntimeSettings(); -settings.furtherModes.regionPredetectionModes[0] = EnumRegionPredetectionMode.RPM_GENERAL_RGB_CONTRAST; -recognizer.updateRuntimeSettings(settings); -recognizer.setModeArgument("RegionPredetectionModes", 0, "AspectRatioRange", "100"); -recognizer.destroy(); -``` - -  - -### updateReferenceRegionFromBarcodeResults -Updates reference region which is defined with source type LST_BARCODE. - -```java -void updateReferenceRegionFromBarcodeResults (BarcodeResult[] barcodeResults, String templateName) throws LabelRecognizerException -``` - -**Parameters** - -`barcodeResults` The barcode results used to localize reference region. See also [`BarcodeResult`](barcode-result.md). -`templateName` The template name. A template name is the value of key LabelRecognizerParameter.Name defined in JSON formatted settings. If no template name is specified, current runtime settings will be used. - -**Exceptions** - -[`LabelRecognizerException`](label-recognizer-exception.md) - -**Code Snippet** - -```java -LabelRecognizer recognizer = new LabelRecognizer(); - -recognizer.appendSettingsFromString("{\"LabelRecognizerParameter\":{\"Name\":\"P1\", \"RegionPredetectionModes\":[{\"Mode\":\"RPM_GENERAL_HSV_CONTRAST\"}], \"ReferenceRegionNameArray\": [\"R1\"]},\"ReferenceRegion\":{\"Name\":\"R1\",\"Localization\":{\"SourceType\":\"LST_BARCODE\"},\"TextAreaNameArray\":[\"T1\"]},\"TextArea\":{\"Name\":\"T1\",\"CharacterModelName\":\"Number\"}}"); -//Get barcodeResults from Dynamsoft Barcode Reader SDK -recognizer.updateReferenceRegionFromBarcodeResults(barcodeResults, "P1"); -recognizer.destroy(); -``` - -  - -### updateRuntimeSettings - -Update runtime settings with a given [`DLRRuntimeSettings`](dlr-runtime-settings.html) class object. - -```java -void updateRuntimeSettings (DLRRuntimeSettings settings) throws LabelRecognizerException -``` - -**Parameters** - -`settings` The class object of template settings. See also [`DLRRuntimeSettings`](dlr-runtime-settings.html) - -**Exceptions** - -[`LabelRecognizerException`](label-recognizer-exception.md) - -**Code Snippet** - -```java -LabelRecognizer recognizer = new LabelRecognizer(); - -DLRRuntimeSettings settings = recognizer.getRuntimeSettings(); -settings.maxThreadCount = 1; -recognizer.updateRuntimeSettings(settings); -recognizer.destroy(); -``` - -## Recognizing - - | Method | Description | - |----------------------|-------------| - | [`recognizeByBuffer`](#recognizebybuffer) | Recognizes text from memory buffer containing image pixels in defined format. | - | [`recognizeByFile`](#recognizebyfile) | Recognizes text from a specified image file. | - | [`recognizeByImage`](#recognizebyimage) | Recognizes text from a bitmap. | - -  - -### recognizeByBuffer -Recognizes text from the memory buffer containing image pixels in defined format. - -```java -DLRResult[] recognizeByBuffer(ImageData imageData, String templateName) throws LabelRecognizerException -``` - -**Parameters** - -`[in] imageData` An object of [`ImageData`](image-data.md) that represents an image. -`[in] templateName` The template name. A template name is the value of key LabelRecognizerParameter.Name defined in JSON formatted settings. If no template name is specified, current runtime settings will be used. - -**Return value** - -All results recognized successfully. - -**Exceptions** - -[`LabelRecognizerException`](label-recognizer-exception.md) - -**Code Snippet** - -```java -LabelRecognizer recognizer = new LabelRecognizer(); - -//Generate imageData from somewhere else -DLRResult[] result = recognizer.recognizeByBuffer(imageData, ""); -recognizer.destroy(); -``` - -  - -### recognizeByFile -Recognizes text from a specified image file. - -```java -DLRResult[] recognizeByFile (String fileName, String templateName) throws LabelRecognizerException -``` - -**Parameters** - -`fileName` A string defining the file name. -`templateName` The template name. A template name is the value of key LabelRecognizerParameter.Name defined in JSON formatted settings. If no template name is specified, current runtime settings will be used. - -**Return value** - -All results recognized successfully. - -**Exceptions** - -[`LabelRecognizerException`](label-recognizer-exception.md) - -**Code Snippet** - -```java -LabelRecognizer recognizer = new LabelRecognizer(); - -DLRResult[] result = recognizer.recognizeByFile("full file path", ""); -recognizer.destroy(); -``` - -  - -### recognizeByImage -Recognizes text from a bitmap. - -```java -DLRResult[] recognizeByImage (Bitmap image, String templateName) throws LabelRecognizerException -``` - -**Parameters** - -`image` A bitmap image. -`templateName` The template name. A template name is the value of key LabelRecognizerParameter.Name defined in JSON formatted settings. If no template name is specified, current runtime settings will be used. - -**Return value** - -All results recognized successfully. - -**Exceptions** - -[`LabelRecognizerException`](label-recognizer-exception.md) - -**Code Snippet** - -```java -LabelRecognizer recognizer = new LabelRecognizer(); - -Bitmap img = BitmapFactory.decodeFile("full file path"); -DLRResult[] result = recognizer.recognizeByImage(img, ""); -recognizer.destroy(); -``` - -## General - - | Method | Description | - |----------------------|-------------| - | [`getVersion`](#getversion) | Returns the version number string for the SDK. | - -  - -### getVersion - -Get version information of SDK. - -```java -String getVersion() -``` - -**Return value** - -The version information string. - -**Code Snippet** - -```java -LabelRecognizer recognizer = new LabelRecognizer(); -String versionInfo = recognizer.getVersion(); -recognizer.destroy(); -``` diff --git a/programming-old/android/api-reference/label-recognizer.md b/programming-old/android/api-reference/label-recognizer.md deleted file mode 100644 index f466678..0000000 --- a/programming-old/android/api-reference/label-recognizer.md +++ /dev/null @@ -1,672 +0,0 @@ ---- -layout: default-layout -title: LabelRecognizer Class - Dynamsoft Label Recognizer Android API Reference -description: This page shows LabelRecognizer methods of Dynamsoft Label Recognizer for Android API Reference. -keywords: api reference, android -needAutoGenerateSidebar: true -needGenerateH3Content: true -noTitleIndex: true -permalink: /programming/android/api-reference/label-recognizer.html ---- - -# class LabelRecognizer - -> You are viewing a history document page of Dynamsoft Label Recognizer Android v2.2.20. - -```java -class com.dynamsoft.dlr.LabelRecognizer -``` - -## Initialization Methods Summary - - | Method | Description | - |----------------------|-------------| - | [`LabelRecognizer`](#labelrecognizer) | Initialization of `LabelRecognizer` object.| - -## Settings Methods Summary - - | Method | Description | - |----------------------|-------------| - | [`appendCharacterModelBuffer`](#appendcharactermodelbuffer) | Appends CharacterModel to the SDK object. | - | [`getRuntimeSettings`](#getruntimesettings) | Gets the current settings and saves it into a struct. | - | [`updateRuntimeSettings`](#updateruntimesettings) | Updates runtime settings with a given struct. | - | [`resetRuntimeSettings`](#resetruntimesettings) | Resets the runtime settings. | - | [`initRuntimeSettings`](#initruntimesettings) | Initializes a new setting to the current label recognizer instance via template string. | - | [`initRuntimeSettingsFromFile`](#initruntimesettingsfromfile) | Initializes a new setting to the current label recognizer instance via template file. | - | [`outputRuntimeSettings`](#outputruntimesettings) | Clear all appended LabelRecognizerParameter settings in the SDK object. | - | [`outputRuntimeSettingsToFile`](#outputruntimesettingstofile) | Outputs LabelRecognizerParameter settings into a file (JSON file). | - | [`updateReferenceRegionFromBarcodeResults`](#updatereferenceregionfrombarcoderesults) | Updates reference region which is defined with source type LST_BARCODE. | - | [`getModeArgument`](#getmodeargument) | Get argument value for the specified mode parameter. | - | [`setModeArgument`](#setmodeargument) | Set argument value for the specified mode parameter. | - -## Recognition Methods Summary - - | Method | Description | - |----------------------|-------------| - | [`recognizeBuffer`](#recognizebuffer) | Recognizes text from memory buffer containing image pixels in defined format. | - | [`recognizeFile`](#recognizefile) | Recognizes text from a specified image file. | - | [`recognizeImage`](#recognizeimage) | Recognizes text from a bitmap. | - | [`recognizeFileInMemory`](#recognizefileinmemory) | Recognizes text from an image file in memory. | - -## Video Recognizing Methods Summary - - | Method | Description | - |--------|-------------| - | [`setImageSource`](#setimagesource) | Bind an instance of ImageSource to the Label Recognizer. | - | [`startScanning`](#startscanning) | Start the label recognizing thread in the video streaming scenario. | - | [`stopScanning`](#stopscanning) | Stop the label recognizing thread in the video streaming scenario. | - | [`setLabelResultListener`](#setlabelresultlistener) | Set callback interface to process recognized label results generated during frame processing. | - -## General Methods Summary - - | Method | Description | - |----------------------|-------------| - | [`getVersion`](#getversion) | Returns the version number string for the SDK. | - -## Initialization Methods Details - -### LabelRecognizer - -Initialization of `LabelRecognizer` object. - -```java -LabelRecognizer() throws LabelRecognizerException -``` - -**Exceptions** - -[`LabelRecognizerException`](label-recognizer-exception.md) - -**Code Snippet** - -```java -LabelRecognizer recognizer = new LabelRecognizer(); -``` - -## Settings Methods Details - -### appendCharacterModelBuffer - -Appends CharacterModel into memory. - -```java -static void appendCharacterModelBuffer (String name, byte[] prototxtBuffer, byte[] txtBuffer, byte[] characterModelBuffer) -``` - -**Parameters** - -`[in] name` A unique name for the appended CharacterModel. -`[in] prototxtBuffer` The .prototxt file data of the CharacterModel in a byte array. -`[in] txtBuffer` The .txt file data of the CharacterModel in a byte array. -`[in] characterModelBuffer` The .caffemodel file data of the CharacterModel in a byte array. - -**Code Snippet** - -```java -AssetManager manager = getAssets(); -InputStream isPrototxt = manager.open("CharacterModel/NumberLetter.prototxt"); -byte[] prototxt = new byte[isPrototxt.available()]; -isPrototxt.read(prototxt); -isPrototxt.close(); -InputStream isCharacterModel = manager.open("CharacterModel/NumberLetter.caffemodel"); -byte[] characterModel = new byte[isCharacterModel.available()]; -isCharacterModel.read(characterModel); -isCharacterModel.close(); -InputStream isTxt = manager.open("CharacterModel/NumberLetter.txt"); -byte[] txt = new byte[isTxt.available()]; -isTxt.read(txt); -isTxt.close(); - -LabelRecognizer.appendCharacterModelBuffer("NumberLetter", prototxt, txt, characterModel); -``` - -  - -### getRuntimeSettings - -Get current runtime settings and save them into a [`DLRRuntimeSettings`](dlr-runtime-settings.html) object. - -```java -DLRRuntimeSettings getRuntimeSettings () throws LabelRecognizerException -``` - -**Return value** - -An object of [`DLRRuntimeSettings`](dlr-runtime-settings.html) stores the current runtime settings. - -**Exceptions** - -[`LabelRecognizerException`](label-recognizer-exception.md) - -**Code Snippet** - -```java -LabelRecognizer recognizer = new LabelRecognizer(); -DLRRuntimeSettings settings = recognizer.getRuntimeSettings(); -``` - -  - -### updateRuntimeSettings - -Update runtime settings with a given [`DLRRuntimeSettings`](dlr-runtime-settings.html) object. - -```java -void updateRuntimeSettings (DLRRuntimeSettings settings) throws LabelRecognizerException -``` - -**Parameters** - -`[in] settings` The class object of template settings. See also [`DLRRuntimeSettings`](dlr-runtime-settings.html) - -**Exceptions** - -[`LabelRecognizerException`](label-recognizer-exception.md) - -**Code Snippet** - -```java -LabelRecognizer recognizer = new LabelRecognizer(); - -DLRRuntimeSettings settings = recognizer.getRuntimeSettings(); -settings.maxThreadCount = 1; -recognizer.updateRuntimeSettings(settings); -``` - -  - -### resetRuntimeSettings - -Reset all runtime settings to default values. - -```java -void resetRuntimeSettings () throws LabelRecognizerException -``` - -**Exceptions** - -[`LabelRecognizerException`](label-recognizer-exception.md) - -**Code Snippet** - -```java -LabelRecognizer recognizer = new LabelRecognizer(); - -DLRRuntimeSettings settings = recognizer.getRuntimeSettings(); -settings.maxThreadCount = 4; -recognizer.updateRuntimeSettings(settings); -recognizer.resetRuntimeSettings(); -``` - -  - -### initRuntimeSettings - -Initializes a new setting to the current label recognizer instance via template file. - -```java -void initRuntimeSettings(String content) throws LabelRecognizerException -``` - -**Parameters** - -`[in] content` A JSON string that represents the content of the settings. - -**Exceptions** - -[`LabelRecognizerException`](label-recognizer-exception.md) - -**Code Snippet** - -```java -LabelRecognizer recognizer = new LabelRecognizer(); -recognizer.initRuntimeSettings("{\"LabelRecognizerParameter\":{\"Name\":\"P1\", \"RegionPredetectionModes\":[{\"Mode\":\"RPM_GENERAL_HSV_CONTRAST\"}], \"ReferenceRegionNameArray\": [\"R1\"]},\"ReferenceRegion\":{\"Name\":\"R1\",\"Localization\":{\"SourceType\":\"LST_PREDETECTED_REGION\",\"RegionPredetectionModesIndex\":0},\"TextAreaNameArray\":[\"T1\"]},\"TextArea\":{\"Name\":\"T1\",\"CharacterModelName\":\"Number\"}}"); -``` - -  - -### initRuntimeSettingsFromFile - -Initializes a new setting to the current label recognizer instance via template file. - -```java -void initRuntimeSettingsFromFile(String filePath) throws LabelRecognizerException -``` - -**Parameters** - -`[in] filePath` The settings file path. - -**Exceptions** - -[`LabelRecognizerException`](label-recognizer-exception.md) - -**Code Snippet** - -```java -LabelRecognizer recognizer = new LabelRecognizer(); -recognizer.initRuntimeSettingsFromFile("your file path"); -``` - -  - -### outputRuntimeSettingsToFile - -Outputs runtime settings and save them into a settings file (JSON file). - -```java -void outputRuntimeSettingsToFile (String filePath, String templateName) throws LabelRecognizerException -``` - -**Parameters** - -`[in] filePath` The path of the output file which stores current settings. -`[in] templateName` A unique name for declaring current runtime settings. - -**Exceptions** - -[`LabelRecognizerException`](label-recognizer-exception.md) - -**Code Snippet** - -```java -LabelRecognizer recognizer = new LabelRecognizer(); - -recognizer.initRuntimeSettings("{\"LabelRecognizerParameter\":{\"Name\":\"P1\", \"RegionPredetectionModes\":[{\"Mode\":\"RPM_GENERAL_HSV_CONTRAST\"}], \"ReferenceRegionNameArray\": [\"R1\"]},\"ReferenceRegion\":{\"Name\":\"R1\",\"Localization\":{\"SourceType\":\"LST_PREDETECTED_REGION\",\"RegionPredetectionModesIndex\":0},\"TextAreaNameArray\":[\"T1\"]},\"TextArea\":{\"Name\":\"T1\",\"CharacterModelName\":\"Number\"}}"); -recognizer.outputRuntimeSettingsToFile("your saving file path", "P1"); -``` - -  - -### outputRuntimeSettings - -Outputs runtime settings and save them into a string. - -```java -String outputRuntimeSettings (String templateName) throws LabelRecognizerException -``` - -**Parameters** - -`[in] templateName` A unique name for declaring current runtime settings. - -**Exceptions** - -[`LabelRecognizerException`](label-recognizer-exception.md) - -**Code Snippet** - -```java -LabelRecognizer recognizer = new LabelRecognizer(); - -recognizer.initRuntimeSettings("{\"LabelRecognizerParameter\":{\"Name\":\"P1\", \"RegionPredetectionModes\":[{\"Mode\":\"RPM_GENERAL_HSV_CONTRAST\"}], \"ReferenceRegionNameArray\": [\"R1\"]},\"ReferenceRegion\":{\"Name\":\"R1\",\"Localization\":{\"SourceType\":\"LST_PREDETECTED_REGION\",\"RegionPredetectionModesIndex\":0},\"TextAreaNameArray\":[\"T1\"]},\"TextArea\":{\"Name\":\"T1\",\"CharacterModelName\":\"Number\"}}"); -String settingsStr = recognizer.outputRuntimeSettings("P1"); -``` - -  - -### getModeArgument - -Get argument value for the specified mode parameter. - -```java -String getModeArgument(String modesName, int index, String argumentName) throws LabelRecognizerException -``` - -**Parameters** - -`[in] modesName` The mode parameter name to get argument. -`[in] index` The array index of mode parameter to indicate a specific mode. -`[in] argumentName` The name of the argument to get. - -**Return value** - -the optional argument for a specified mode in Modes parameters. - -**Exceptions** - -[`LabelRecognizerException`](label-recognizer-exception.md) - -**Remark** - -Check follow link for available modes and arguments: - -- [`RegionPredetectionModes`]({{ site.parameters-reference }}label-recognition-parameter/region-predetection-modes.html#regionpredetectionmodes) - -**Code Snippet** - -```java -LabelRecognizer recognizer = new LabelRecognizer(); - -DLRRuntimeSettings settings = recognizer.getRuntimeSettings(); -settings.furtherModes.regionPredetectionModes[0] = EnumRegionPredetectionMode.RPM_GENERAL_RGB_CONTRAST; -recognizer.updateRuntimeSettings(settings); -recognizer.setModeArgument("RegionPredetectionModes", 0, "AspectRatioRange", "100"); -String argumentValue = recognizer.getModeArgument("RegionPredetectionModes", 0, "AspectRatioRange"); -``` - -  - -### setModeArgument - -Set argument value for the specified mode parameter. - -```java -void setModeArgument(String modesName, int index, String argumentName, String argumentValue) throws LabelRecognizerException -``` - -**Parameters** - -`[in] modesName` The mode parameter name to set argument. -`[in] index` The array index of mode parameter to indicate a specific mode. -`[in] argumentName` The name of the argument to set. -`[in] argumentValue` The value of the argument to set. - -**Exceptions** - -[`LabelRecognizerException`](label-recognizer-exception.md) - -**Remark** - -Check follow link for available modes and arguments: - -- [`RegionPredetectionModes`]({{ site.parameters-reference }}label-recognition-parameter/region-predetection-modes.html#regionpredetectionmodes) - -**Code Snippet** - -```java -LabelRecognizer recognizer = new LabelRecognizer(); - -DLRRuntimeSettings settings = recognizer.getRuntimeSettings(); -settings.furtherModes.regionPredetectionModes[0] = EnumRegionPredetectionMode.RPM_GENERAL_RGB_CONTRAST; -recognizer.updateRuntimeSettings(settings); -recognizer.setModeArgument("RegionPredetectionModes", 0, "AspectRatioRange", "100"); -``` - -  - -### updateReferenceRegionFromBarcodeResults - -Updates reference region which is defined with source type LST_BARCODE. - -```java -void updateReferenceRegionFromBarcodeResults (BarcodeResult[] barcodeResults, String templateName) throws LabelRecognizerException -``` - -**Parameters** - -`[in] barcodeResults` The barcode results used to localize reference region. See also [`BarcodeResult`](barcode-result.md). -`[in] templateName` The template name. A template name is the value of key LabelRecognizerParameter.Name defined in JSON formatted settings. If no template name is specified, current runtime settings will be used. - -**Exceptions** - -[`LabelRecognizerException`](label-recognizer-exception.md) - -**Code Snippet** - -```java -LabelRecognizer recognizer = new LabelRecognizer(); - -recognizer.initRuntimeSettings("{\"LabelRecognizerParameter\":{\"Name\":\"P1\", \"RegionPredetectionModes\":[{\"Mode\":\"RPM_GENERAL_HSV_CONTRAST\"}], \"ReferenceRegionNameArray\": [\"R1\"]},\"ReferenceRegion\":{\"Name\":\"R1\",\"Localization\":{\"SourceType\":\"LST_BARCODE\"},\"TextAreaNameArray\":[\"T1\"]},\"TextArea\":{\"Name\":\"T1\",\"CharacterModelName\":\"Number\"}}"); -//Get barcodeResults from Dynamsoft Barcode Reader SDK -recognizer.updateReferenceRegionFromBarcodeResults(barcodeResults, "P1"); -``` - -  - -## Recognition Methods Details - -### recognizeBuffer - -Recognizes text from the memory buffer containing image pixels in defined format. - -```java -DLRResult[] recognizeBuffer(ImageData imageData) throws LabelRecognizerException -``` - -**Parameters** - -`[in] imageData` An object of [`ImageData`](image-data.md) that represents an image. - -**Return value** - -All results recognized successfully. - -**Exceptions** - -[`LabelRecognizerException`](label-recognizer-exception.md) - -**Code Snippet** - -```java -LabelRecognizer recognizer = new LabelRecognizer(); -//Generate imageData from somewhere else -DLRResult[] result = recognizer.recognizeBuffer(imageData); -``` - -  - -### recognizeFile - -Recognizes text from a specified image file. - -```java -DLRResult[] recognizeFile(String fileName) throws LabelRecognizerException -``` - -**Parameters** - -`[in] fileName` A string defining the file name. - -**Return value** - -All results recognized successfully. - -**Exceptions** - -[`LabelRecognizerException`](label-recognizer-exception.md) - -**Code Snippet** - -```java -LabelRecognizer recognizer = new LabelRecognizer(); -DLRResult[] result = recognizer.recognizeFile("full file path"); -``` - -  - -### recognizeImage - -Recognizes text from a bitmap. - -```java -DLRResult[] recognizeByImage (Bitmap image) throws LabelRecognizerException -``` - -**Parameters** - -`[in] image` A bitmap image. - -**Return value** - -All results recognized successfully. - -**Exceptions** - -[`LabelRecognizerException`](label-recognizer-exception.md) - -**Code Snippet** - -```java -LabelRecognizer recognizer = new LabelRecognizer(); -Bitmap img = BitmapFactory.decodeFile("full file path"); -DLRResult[] result = recognizer.recognizeImage(img); -``` - -### RecognizeFileInMemory - -Recognizes text from a specified image file in memory. - -```java -DLRResult[] RecognizeFileInMemory(byte[] fileBytes) throws LabelRecognizerException -``` - -**Parameters** - -`[in] fileBytes` The image file bytes in memory. - -**Return value** - -All results recognized successfully. - -**Exceptions** - -[`LabelRecognizerException`](label-recognizer-exception.md) - -**Code Snippet** - -```java -LabelRecognizer recognizer = new LabelRecognizer(); -// user code: read from an image into fileBytes -byte[] fileBytes = null; -DLRResult[] result = recognizer.recognizeFileInMemory(fileBytes); -``` - -## Video Recognizing Methods Details - -### setImageSource - -Sets an instance of ImageSource to get images. `CameraEnhancer` is a specific implementation of ImageSource, which can help the Label Recognizer to acquire video frames continuously for recognition. - -```java -void setImageSource(ImageSource source) -``` - -**Parameters** - -`[in] source`: An instance of ImageSource. If you are using `Dynamsoft Camera Enhancer`(DCE) to capture camera frames, pass an instance of `CameraEnhancer`. - -**Code Snippet** - -This code snippet displays a complete code on how to add CameraEnhancer to your project and start detecting and get detection results from the video streaming. - -```java -LabelRecognizer recognizer; -CameraEnhancer mCameraEnhancer; - -@Override -protected void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - setContentView(R.layout.activity_main); - - // Be sure that you have added a cameraView in the layout file. - DCECameraView cameraView = findViewById(R.id.cameraView); - - try { - // Create an instance of Dynamsoft Label recognizer. - recognizer = new LabelRecognizer(); - } catch (LabelRecognizerException e) { - e.printStackTrace(); - } - mCameraEnhancer = new CameraEnhancer(MainActivity.this); - mCameraEnhancer.setCameraView(cameraView); - - // Bind the Camera Enhancer instance to the Label recognizer instance. - recognizer.setImageSource(mCameraEnhancer); - - // Result callback configurations - LabelResultListener mLabelResultListener = new LabelResultListener() { - // Obtain the recognized label results and display. - @Override - public void labelResultCallback(int id, ImageData imageData, DLRResult[] labelResults) { - // Add your code to execute when label results are returned. - } - }; - - recognizer.setLabelResultListener(mLabelResultListener); -} - -@Override -public void onResume() { - // Open the camera and start video label recognition - try { - mCameraEnhancer.open(); - } catch (CameraEnhancerException e) { - e.printStackTrace(); - } - recognizer.startScanning(); - super.onResume(); -} - -@Override -public void onPause() { - // Stop video label recognition - try { - mCameraEnhancer.close(); - } catch (CameraEnhancerException e) { - e.printStackTrace(); - } - recognizer.stopScanning(); - super.onPause(); -} -``` - -## startScanning - -Start the label recognition thread in the video streaming scenario. Please be sure that you have bound an object of `ImageSource` before you trigger `startScanning`. - -```java -void startScanning() -``` - -**Code Snippet** - -You can view the complete code snippet in [`setImageSource`](#setimagesource). - -## stopScanning - -Stop the label recognition thread in the video streaming scenario. - -```java -void stopScanning() -``` - -**Code Snippet** - -You can view the complete code snippet in [`setImageSource`](#setimagesource). - -## setLabelResultListener - -Set the callback interface to process recongnized label results generated during frame processing. - -```java -void setLabelResultListener(LabelResultListener labelResultListener) -``` - -**Parameters** - -`[in] labelResultListener`: The Callback interface. - -**Code Snippet** - -You can view the complete code snippet in [`setImageSource`](#setimagesource). - -## General Methods Details - -### getVersion - -Get version information of SDK. - -```java -static String getVersion() -``` - -**Return value** - -The version information string. - -**Code Snippet** - -```java -String versionInfo = LabelRecognizer.getVersion(); -``` diff --git a/programming-old/android/api-reference/label-result-listener.md b/programming-old/android/api-reference/label-result-listener.md deleted file mode 100644 index 0d666b7..0000000 --- a/programming-old/android/api-reference/label-result-listener.md +++ /dev/null @@ -1,49 +0,0 @@ ---- -layout: default-layout -title: Interface LabelResultListener - Dynamsoft Label Recognizer Android API Reference -description: This the interface LabelResultListener page of Dynamsoft Label Recognizer for Android SDK. -keywords: LabelResultListener, interface, android -needAutoGenerateSidebar: true -needGenerateH3Content: false -noTitleIndex: true -permalink: /programming/android/api-reference/label-result-listener.html ---- - -# LabelResultListener - -> You are viewing a history document page of Dynamsoft Label Recognizer Android v2.2.20. - -`LabelResultListener` is the interface to handle callbacks when the detection results are returned. - -```java -interface com.dynamsoft.dlr.LabelResultListener -``` - -| Method | Description | -| ------ | ----------- | -| `labelResultCallback` | The callback method to handle the recognized label results returned by the library. | - -## labelResultCallback - -The callback method to handle the recognized label results returned by the library. - -```java -void labelResultCallback(int frameId, ImageData imageData, DLRResult[] labelResults); -``` - -**Parameters** - -`[in] frameId` The ID of the frame. -`[in] imgData` The image data of frame. -`[in] labelResults` Recognized label results of the frame. - -**Code Snippet** - -```java -LabelResultListener labelResultListener = new LabelResultListener() { - @Override - public void labelResultCallback(int frameId, ImageData imageData, DLRResult[] labelResults) { - // Add your code - } -}; -``` diff --git a/programming-old/android/api-reference/license-manager.md b/programming-old/android/api-reference/license-manager.md deleted file mode 100644 index 6f54fea..0000000 --- a/programming-old/android/api-reference/license-manager.md +++ /dev/null @@ -1,55 +0,0 @@ ---- -layout: default-layout -title: Dynamsoft Core Module Android API Reference - LicenseManager class -description: This page shows LicenseManager class of Dynamsoft Core Module for Android SDK. -keywords: initLicense, LicenseManager, api reference, android -needAutoGenerateSidebar: true -noTitleIndex: true -pageStartVer: 1.0 -permalink: /programming/android/api-reference/license-manager.html ---- - -# LicenseManager - -> You are viewing a history document page of Dynamsoft Label Recognizer Android v2.2.20. - -The LicenseManager class unlocks the Dynamsoft SDK with a purchased full license or a provided trial license to allow you to develop your application. - -```java -class com.dynamsoft.core.LicenseManager -``` - -## Methods - - | Method | Description | - |----------------------|-------------| - | [`initLicense`](#initlicense) | Read the license key and activate the SDK. | - - --- - -### initLicense - -Read the license key and activate the SDK. - -```java -static void initLicense(String license, android.content.Context context, LicenseVerificationListener listener) -``` - -**Parameters** - -`[in] license` The license key. -`[in] context` The interface to global information about an application environment. -`[in] listener` The listener that handles callback when the license server returns. - -**Code Snippet** - -```java -LicenseManager.initLicense("DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9", MainActivity.this, new LicenseVerificationListener() { - @Override - public void LicenseVerificationCallback(boolean isSuccess, Exception error) { - if(!isSuccess){ - error.printStackTrace(); - } - } -}); -``` diff --git a/programming-old/android/api-reference/license-verification-listener.md b/programming-old/android/api-reference/license-verification-listener.md deleted file mode 100644 index 70943de..0000000 --- a/programming-old/android/api-reference/license-verification-listener.md +++ /dev/null @@ -1,52 +0,0 @@ ---- -layout: default-layout -title: Interface LicenseVerificationListener - Dynamsoft Core Module Android API Reference -description: This page shows interface LicenseVerificationListener of Dynamsoft Core Module for Android SDK. -keywords: initLicense, LicenseVerificationListener, api reference, android -needAutoGenerateSidebar: true -noTitleIndex: true -pageStartVer: 1.0 -permalink: /programming/android/api-reference/license-verification-listener.html ---- - -# LicenseVerificationListener - -> You are viewing a history document page of Dynamsoft Label Recognizer Android v2.2.20. - -`LicenseVerificationListener` is the interface to handle callback when message is output by license server. - -```java -interface com.dynamsoft.core.LicenseVerificationListener -``` - -## Methods - -| Method | Description | -|----------------------|-------------| -| [`licenseVerificationCallback`](#licenseverificationcallback) | The callback of license server. It contains error message when license verification is failed. | - -### LicenseVerificationCallback - -The callback of license server. It contains error message when license verification is failed. - -```java -void licenseVerificationCallback(boolean isSuccess, CoreException error); -``` - -**Parameters** - -`[in] isSuccess`: Whether the license verification was successful. -`[in out] error`: The error message from license server. - -**Code Snippet** - -```java -LicenseManager.initLicense("DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9", MainActivity.this, new LicenseVerificationListener() { - @Override - public void licenseVerificationCallback(boolean isSuccess, CoreException error) { - if(!isSuccess){ - error.printStackTrace(); - } - } -}); -``` diff --git a/programming-old/android/api-reference/point.md b/programming-old/android/api-reference/point.md deleted file mode 100644 index 13d333e..0000000 --- a/programming-old/android/api-reference/point.md +++ /dev/null @@ -1,48 +0,0 @@ ---- -layout: default-layout -title: Dynamsoft Class Android Class - Point -description: This page shows the Point Class of Dynamsoft Class for Android Language. -keywords: Point, android -needAutoGenerateSidebar: true -needGenerateH3Content: true -noTitleIndex: true -permalink: /programming/android/api-reference/point.html ---- - - -# Point - -> You are viewing a history document page of Dynamsoft Label Recognizer Android v2.2.20. - -Stores an x- and y-coordinate pair in two-dimensional space. - -```java -class com.dynamsoft.core.Point -``` - -## Attributes - -| Attribute | Type | -|---------- | ---- | -| [`x`](#x) | *int* | -| [`y`](#y) | *int* | - -  - -### x - -The X coordinate of the point. - -```java -int x -``` - -  - -### y - -The Y coordinate of the point. - -```java -int y -``` diff --git a/programming-old/android/api-reference/quadrilateral-v2.0.md b/programming-old/android/api-reference/quadrilateral-v2.0.md deleted file mode 100644 index 36bb00a..0000000 --- a/programming-old/android/api-reference/quadrilateral-v2.0.md +++ /dev/null @@ -1,37 +0,0 @@ ---- -layout: default-layout -title: Dynamsoft Core Android Class - Quadrilateral -description: This page shows the Quadrilateral Class of Dynamsoft Core for Android Language. -keywords: Quadrilateral, android -needAutoGenerateSidebar: true -needGenerateH3Content: true -noTitleIndex: true -permalink: /programming/android/api-reference/quadrilateral-v2.0.html ---- - - -# Quadrilateral - -> You are viewing a history document page of Dynamsoft Label Recognizer Android v2.0.0. - -Stores the quadrilateral. - -```java -class com.dynamsoft.core.Quadrilateral -``` - -## Attributes - -| Attribute | Type | -|---------- | ---- | -| [`points`](#points) | [`Point[]`](point.md) | - -  - -### points - -Four vertexes in a clockwise direction of a quadrilateral. Index 0 represents the left-most vertex. - -```java -Point[] points -``` diff --git a/programming-old/android/api-reference/quadrilateral.md b/programming-old/android/api-reference/quadrilateral.md deleted file mode 100644 index 608a797..0000000 --- a/programming-old/android/api-reference/quadrilateral.md +++ /dev/null @@ -1,37 +0,0 @@ ---- -layout: default-layout -title: Dynamsoft Core Android Class - Quadrilateral -description: This page shows the Quadrilateral Class of Dynamsoft Core for Android Language. -keywords: Quadrilateral, android -needAutoGenerateSidebar: true -needGenerateH3Content: true -noTitleIndex: true -permalink: /programming/android/api-reference/quadrilateral.html ---- - - -# Quadrilateral - -> You are viewing a history document page of Dynamsoft Label Recognizer Android v2.2.20. - -Stores the quadrilateral. - -```java -class com.dynamsoft.core.Quadrilateral -``` - -## Attributes - -| Attribute | Type | -|---------- | ---- | -| [`points`](#points) | `android.graphics.Point[]`| - -  - -### points - -Four vertexes in a clockwise direction of a quadrilateral. Index 0 represents the left-most vertex. - -```java -android.graphics.Point[] points -``` diff --git a/programming-old/android/hello-world-sample-v2.2.20.md b/programming-old/android/hello-world-sample-v2.2.20.md deleted file mode 100644 index 5ed743e..0000000 --- a/programming-old/android/hello-world-sample-v2.2.20.md +++ /dev/null @@ -1,18 +0,0 @@ ---- -layout: default-layout -title: HelloWorld (Android) Dynamsoft Label Recognizer -description: This is the page of Dynamsoft Label Recognizer Android HelloWorld sample. -keywords: HelloWorld, Android -needAutoGenerateSidebar: true -permalink: /programming/android/hello-world-sample-v2.2.20.html ---- - -# HelloWorld Sample - -The Android Helloworld sample shows how to create the simplest video streaming text scanning app with Dynamsoft Label Recognizer Android SDK. - -View the sample: - -- HelloWorld (Android) - -For more details about how to get started with Dynamsoft Label Recognizer, please view the [user guide](user-guide.md). diff --git a/programming-old/android/index-v1.2.1.md b/programming-old/android/index-v1.2.1.md deleted file mode 100644 index 4ea9d01..0000000 --- a/programming-old/android/index-v1.2.1.md +++ /dev/null @@ -1,23 +0,0 @@ ---- -layout: default-layout -title: Main Page - Dynamsoft Label Recognition for Android -description: This is the main page of Dynamsoft Label Recognition for Android Language. -keywords: android -needAutoGenerateSidebar: true -needGenerateH3Content: true -permalink: /programming/android/index-v1.2.1.html ---- - -# Dynamsoft Label Recognition - for Android - -## Getting Started - -- [User Guide](user-guide.md) - -## API Reference - -- [API Reference](api-reference/index.md) - -## Release Notes - -- [Version 1.x](release-notes/android-1.md) diff --git a/programming-old/android/index-v2.2.20.md b/programming-old/android/index-v2.2.20.md deleted file mode 100644 index 3056f4f..0000000 --- a/programming-old/android/index-v2.2.20.md +++ /dev/null @@ -1,30 +0,0 @@ ---- -layout: default-layout -title: Android Main Page - Dynamsoft Label Recognizer -description: This is the main page of Dynamsoft Label Recognizer for Android Language. -keywords: android -needAutoGenerateSidebar: true -needGenerateH3Content: true -permalink: /programming/android/index-v2.2.20.html ---- - -# Android Documentation - -## Getting Started - -- [User Guide](user-guide.md) - -## Samples - -- [Samples](samples.md) - - [HelloWorld](hello-world-sample.md) - - [MRZScanner](mrz-sample.md) - -## API Reference - -- [API Reference](api-reference/index.md) - -## Release Notes - -- [Version 2.x](release-notes/android-2.md) -- [Version 1.x](release-notes/android-1.md) diff --git a/programming-old/android/mrz-sample-v2.2.20.md b/programming-old/android/mrz-sample-v2.2.20.md deleted file mode 100644 index cdf3451..0000000 --- a/programming-old/android/mrz-sample-v2.2.20.md +++ /dev/null @@ -1,99 +0,0 @@ ---- -layout: default-layout -title: MRZ Scanner (Android) Dynamsoft Label Recognizer -description: This is the page of Dynamsoft Label Recognizer Android MRZ Scanner sample. -keywords: MRZ Scanner, Android -needAutoGenerateSidebar: true -permalink: /programming/android/mrz-sample-v2.2.20.html ---- - -# MRZ Scanner Sample - -MRZScanner sample shows you how to develop with Dynamsoft Label Recognizer to create a simple app to scan machine-readable zome (MRZ). - -View the sample: - -- MRZScanner (Android) - -In the MRZScanner sample, we include an additional library **MRZLib**, which is developed from Dynamsoft Label Recognizer. MRZ models or parameters are preset in the library. As a result, you don't need to add additional settings. - -The following APIs are available in the MRZScanner sample - -- `MRZRecognizer`: The class extended from `DynamsoftLabelRecognizer`. -- `MRZResult`: The class that stores MRZ result information. When using **MRZLib**, you can obtain `MRZResult` as the output of the library instead of `DLRResult`. -- `MRZResultListener`: The listener to handle callbacks when MRZ results are returned. - -## How to use MRZLib - -### Setup Camera Module - -In this sample, we use Dynamsoft Camera Enhancer to set up the camera module and capture video frames. - -```java -public class ScanFragment extends Fragment { - private DCECameraView mCameraView; - private CameraEnhancer mCamera; - @Override - public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) { - mCameraView = view.findViewById(R.id.dce_camera_view); - mCamera = new CameraEnhancer(requireActivity()); - mCamera.setCameraView(mCameraView); - } -} -``` - -### Initialize MRZ Recognizer and Bind the Camera Module - -Create an instance of `MRZRecognizer`. Use the method `setImageSource` to bind the `MRZRecognizer` and the camera module you created. After that, the instance of `MRZRecognizer` will be able to obtain video frames from the camera continuously. - -```java -public class ScanFragment extends Fragment { - ... - private MRZRecognizer mMRZRecognizer; - @Override - public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) { - ... - try { - mMRZRecognizer = new MRZRecognizer(); - } catch (LabelRecognizerException e) { - e.printStackTrace(); - } - // Use setImageSource to bind MRZRecognizer with the camera enhancer. - // You can also implement the interface ImageSource by yourself. - mMRZRecognizer.setImageSource(mCamera); - } -} -``` - -### Obtain Results - -Use `setMRZResultListener` to Register a `MRZResultListener`. Trigger `startScanning`. So that you can obtain the MRZ results from `mrzResultCallback`. - -```java -public class ScanFragment extends Fragment { - ... - private MRZRecognizer mMRZRecognizer; - @Override - public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) { - mMRZRecognizer.setMRZResultListener(new MRZResultListener() { - @Override - public void mrzResultCallback(int i, ImageData imageData, MRZResult mrzResult) { - // Implement mrzResultCallback - } - }); - } - - @Override - public void onResume() { - super.onResume(); - if (!isShowing) { - mMRZRecognizer.startScanning(); - try { - mCamera.open(); - } catch (CameraEnhancerException e) { - e.printStackTrace(); - } - } - } -} -``` diff --git a/programming-old/android/mrz-sample.md b/programming-old/android/mrz-sample.md deleted file mode 100644 index 8075d59..0000000 --- a/programming-old/android/mrz-sample.md +++ /dev/null @@ -1,99 +0,0 @@ ---- -layout: default-layout -title: MRZ Scanner (Android) Dynamsoft Label Recognizer -description: This is the page of Dynamsoft Label Recognizer Android MRZ Scanner sample. -keywords: MRZ Scanner, Android -needAutoGenerateSidebar: true -permalink: /programming/android/mrz-sample.html ---- - -# MRZ Scanner Sample - -MRZScanner sample shows you how to develop with Dynamsoft Label Recognizer to create a simple app to scan machine-readable zome (MRZ). - -View the sample: - -- MRZScanner (Android) - -In the MRZScanner sample, we include an additional library **MRZLib**, which is developed from Dynamsoft Label Recognizer. MRZ models or parameters are preset in the library. As a result, you don't need to add additional settings. - -The following APIs are available in the MRZScanner sample - -- `MRZRecognizer`: The class extended from `DynamsoftLabelRecognizer`. -- `MRZResult`: The class that stores MRZ result information. When using **MRZLib**, you can obtain `MRZResult` as the output of the library instead of `DLRResult`. -- `MRZResultListener`: The listener to handle callbacks when MRZ results are returned. - -## How to use MRZLib - -### Setup Camera Module - -In this sample, we use Dynamsoft Camera Enhancer to set up the camera module and capture video frames. - -```java -public class ScanFragment extends Fragment { - private DCECameraView mCameraView; - private CameraEnhancer mCamera; - @Override - public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) { - mCameraView = view.findViewById(R.id.dce_camera_view); - mCamera = new CameraEnhancer(requireActivity()); - mCamera.setCameraView(mCameraView); - } -} -``` - -### Initialize MRZ Recognizer and Bind the Camera Module - -Create an instance of `MRZRecognizer`. Use the method `setImageSource` to bind the `MRZRecognizer` and the camera module you created. After that, the instance of `MRZRecognizer` will be able to obtain video frames from the camera continuously. - -```java -public class ScanFragment extends Fragment { - ... - private MRZRecognizer mMRZRecognizer; - @Override - public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) { - ... - try { - mMRZRecognizer = new MRZRecognizer(); - } catch (LabelRecognizerException e) { - e.printStackTrace(); - } - // Use setImageSource to bind MRZRecognizer with the camera enhancer. - // You can also implement the interface ImageSource by yourself. - mMRZRecognizer.setImageSource(mCamera); - } -} -``` - -### Obtain Results - -Use `setMRZResultListener` to Register a `MRZResultListener`. Trigger `startScanning`. So that you can obtain the MRZ results from `mrzResultCallback`. - -```java -public class ScanFragment extends Fragment { - ... - private MRZRecognizer mMRZRecognizer; - @Override - public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) { - mMRZRecognizer.setMRZResultListener(new MRZResultListener() { - @Override - public void mrzResultCallback(int i, ImageData imageData, MRZResult mrzResult) { - // Implement mrzResultCallback - } - }); - } - - @Override - public void onResume() { - super.onResume(); - if (!isShowing) { - mMRZRecognizer.startScanning(); - try { - mCamera.open(); - } catch (CameraEnhancerException e) { - e.printStackTrace(); - } - } - } -} -``` diff --git a/programming-old/android/release-notes/android-1-v1.2.1.md b/programming-old/android/release-notes/android-1-v1.2.1.md deleted file mode 100644 index 4c2eefc..0000000 --- a/programming-old/android/release-notes/android-1-v1.2.1.md +++ /dev/null @@ -1,70 +0,0 @@ ---- -layout: default-layout -title: Release Notes 1.x - Dynamsoft Label Recognition Android SDK -description: This is the release notes page of Dynamsoft Label Recognition for Android SDK version 1.x. -keywords: release notes, android -needAutoGenerateSidebar: false -permalink: /programming/android/release-notes/android-1-v1.2.1.html ---- - -# Release Notes for Android - 1.x - -## 1.2.1 (06/08/2021) - -### New - -- Added a new property [`products`]({{ site.dlr_android_api }}class/dm-lts-connection-parameters.html#products) to `DMLTSConnectionParameters`. -- Added a new enumeration [`EnumProduct`]({{ site.enumerations }}other-enums.html#product). - -### Fixed - -- Fixed a bug of license client. - -## 1.2 (05/18/2021) - -### New - -- Added a new parameter [`LabelRecognitionParameter.Timeout`]({{ site.parameters-reference }}label-recognition-parameter/parameter-control.html#timeout). Should the recognition time pass the value of this parameter, a new error code [`DLRERR_RECOGNITION_TIMEOUT`]({{ site.enumerations }}error-code.html) will be returned. - -- Added a new parameter [`LabelRecognitionParameter.Pages`]({{ site.parameters-reference }}label-recognition-parameter/parameter-control.html#page) that specifies a page or a subset of pages of a single file to run the recognition process on. - -- Added the following error codes: [`DLRERR_TIFF_READ_FAILED`]({{ site.enumerations }}error-code.html) , [`DLRERR_PDF_READ_FAILED`]({{ site.enumerations }}error-code.html) and [`DLRERR_PDF_DLL_MISSING`]({{ site.enumerations }}error-code.html). These error codes will be returned when the recognizer fails to read a TIFF file, a PDF file, or if the PDF DLL is missing, respectively. - -- Added a new property [`pageNumber`]({{ site.dlr_android-structs }}dlr-result.html#pagenumber) to `DLRResult` to identify the page on which the result is located. - -- Added parameters `TextStringLengthRange` and `LineStringLengthRange` that can be used to define the minimum and maximum string length when running the recognition process on a text area or a specific line, respectively. They are available as: - - [`LabelRecognitionParameter.TextStringLengthRange`]({{ site.parameters-reference }}label-recognition-parameter/parameter-control.html#textstringlengthrange) - - [`LabelRecognitionParameter.LineStringLengthRange`]({{ site.parameters-reference }}label-recognition-parameter/parameter-control.html#linestringlengthrange) - - [`TextArea.TextStringLengthRange`]({{ site.parameters-reference }}text-area/parameter-control.html#textstringlengthrange) - - [`TextArea.LineStringLengthRange`]({{ site.parameters-reference }}text-area/parameter-control.html#linestringlengthrange) - - [`LineSpecification.LineStringLengthRange`]({{ site.parameters-reference }}line-specification/parameter-control.html#linestringlengthrange) - -- Added a new parameter `MaxLineCharacterSpacing` to limit the spacing between characters treated as one line. They are available as: - - [`LabelRecognitionParameter.MaxLineCharacterSpacing`]({{ site.parameters-reference }}label-recognition-parameter/parameter-control.html#maxlinecharacterspacing) - - [`TextArea.MaxLineCharacterSpacing`]({{ site.parameters-reference }}text-area/parameter-control.html#maxlinecharacterspacing) - -- Added parameters [`LineSpecification.FirstPoint`]({{ site.parameters-reference }}line-specification/parameter-control.html#firstpoint), [`LineSpecification.SecondPoint`]({{ site.parameters-reference }}line-specification/parameter-control.html#secondpoint), [`LineSpecification.ThirdPoint`]({{ site.parameters-reference }}line-specification/parameter-control.html#thirdpoint), and [`LineSpecification.FourthPoint`]({{ site.parameters-reference }}line-specification/parameter-control.html#fourthpoint) to specify the coordinates of a line. - -- Added a new API [`appendSettingsFromFile`]({{ site.dlr_android_api }}label-recognition/settings.html#appendsettingsfromfile) to allow appending settings directly from a JSON file. - -### Improved - -- Improved the recognition performance. - -- Improved the regular expression parameter by supporting more [RegEx pattern syntaxes]({{ site.parameters-reference }}label-recognition-parameter/parameter-control.html#textregexpattern). - -- Improved the recognition accuracy when dealing with skewed and italics characters. - -- Improved the recognition accuracy for serif fonts. - - - -## 1.0 (02/24/2021) - -- Supports recognition of `A-Z`, `a-z`, `0-9`, `.`, `-`, `_`, `(blank space)`, `/` and `:` characters. -- Supports text recognition from BMP, JPEG, PNG and single-page TIFF files. -- Supports zonal OCR and provides three ways to localize text areas: - - Pre-define an area manually in pixel or percentage. - - Specify an area relative to the barcode zone, which allows you to recognize accompanying texts near the barcode. - - Specify an area relative to blocks which share the same colour or uses the same font colour. A common example would be a price tag, where the text of interest is always on a yellow square background, the yellow square can serve as the reference region. -- Supports specifying a regular expression to improve recognition accuracy and robustness. diff --git a/programming-old/android/release-notes/android-1.md b/programming-old/android/release-notes/android-1.md deleted file mode 100644 index e3d213f..0000000 --- a/programming-old/android/release-notes/android-1.md +++ /dev/null @@ -1,70 +0,0 @@ ---- -layout: default-layout -title: Android SDK Release Notes 1.x - Dynamsoft Label Recognizer -description: This is the release notes page of Dynamsoft Label Recognizer for Android SDK version 1.x. -keywords: release notes, android -needAutoGenerateSidebar: false -permalink: /programming/android/release-notes/android-1.html ---- - -# Release Notes - Android 1.x - -## 1.2.1 (06/08/2021) - -### New - -- Added a new property [`products`]({{ site.dlr_android_api }}class/dm-lts-connection-parameters.html#products) to `DMLTSConnectionParameters`. -- Added a new enumeration [`EnumProduct`]({{ site.enumerations }}other-enums.html#product). - -### Fixed - -- Fixed a bug of license client. - -## 1.2 (05/18/2021) - -### New - -- Added a new parameter [`LabelRecognitionParameter.Timeout`]({{ site.parameters-reference }}label-recognition-parameter/parameter-control.html#timeout). Should the recognition time pass the value of this parameter, a new error code [`DLRERR_RECOGNITION_TIMEOUT`]({{ site.enumerations }}error-code.html) will be returned. - -- Added a new parameter [`LabelRecognitionParameter.Pages`]({{ site.parameters-reference }}label-recognition-parameter/parameter-control.html#page) that specifies a page or a subset of pages of a single file to run the recognition process on. - -- Added the following error codes: [`DLRERR_TIFF_READ_FAILED`]({{ site.enumerations }}error-code.html) , [`DLRERR_PDF_READ_FAILED`]({{ site.enumerations }}error-code.html) and [`DLRERR_PDF_DLL_MISSING`]({{ site.enumerations }}error-code.html). These error codes will be returned when the recognizer fails to read a TIFF file, a PDF file, or if the PDF DLL is missing, respectively. - -- Added a new property [`pageNumber`]({{ site.dlr_android_api }}dlr-result.html#pagenumber) to `DLRResult` to identify the page on which the result is located. - -- Added parameters `TextStringLengthRange` and `LineStringLengthRange` that can be used to define the minimum and maximum string length when running the recognition process on a text area or a specific line, respectively. They are available as: - - [`LabelRecognitionParameter.TextStringLengthRange`]({{ site.parameters-reference }}label-recognition-parameter/parameter-control.html#textstringlengthrange) - - [`LabelRecognitionParameter.LineStringLengthRange`]({{ site.parameters-reference }}label-recognition-parameter/parameter-control.html#linestringlengthrange) - - [`TextArea.TextStringLengthRange`]({{ site.parameters-reference }}text-area/parameter-control.html#textstringlengthrange) - - [`TextArea.LineStringLengthRange`]({{ site.parameters-reference }}text-area/parameter-control.html#linestringlengthrange) - - [`LineSpecification.LineStringLengthRange`]({{ site.parameters-reference }}line-specification/parameter-control.html#linestringlengthrange) - -- Added a new parameter `MaxLineCharacterSpacing` to limit the spacing between characters treated as one line. They are available as: - - [`LabelRecognitionParameter.MaxLineCharacterSpacing`]({{ site.parameters-reference }}label-recognition-parameter/parameter-control.html#maxlinecharacterspacing) - - [`TextArea.MaxLineCharacterSpacing`]({{ site.parameters-reference }}text-area/parameter-control.html#maxlinecharacterspacing) - -- Added parameters [`LineSpecification.FirstPoint`]({{ site.parameters-reference }}line-specification/parameter-control.html#firstpoint), [`LineSpecification.SecondPoint`]({{ site.parameters-reference }}line-specification/parameter-control.html#secondpoint), [`LineSpecification.ThirdPoint`]({{ site.parameters-reference }}line-specification/parameter-control.html#thirdpoint), and [`LineSpecification.FourthPoint`]({{ site.parameters-reference }}line-specification/parameter-control.html#fourthpoint) to specify the coordinates of a line. - -- Added a new API [`appendSettingsFromFile`]({{ site.dlr_android_api }}label-recognition/settings.html#appendsettingsfromfile) to allow appending settings directly from a JSON file. - -### Improved - -- Improved the recognition performance. - -- Improved the regular expression parameter by supporting more [RegEx pattern syntaxes]({{ site.parameters-reference }}label-recognition-parameter/parameter-control.html#textregexpattern). - -- Improved the recognition accuracy when dealing with skewed and italics characters. - -- Improved the recognition accuracy for serif fonts. - - - -## 1.0 (02/24/2021) - -- Supports recognition of `A-Z`, `a-z`, `0-9`, `.`, `-`, `_`, `(blank space)`, `/` and `:` characters. -- Supports text recognition from BMP, JPEG, PNG and single-page TIFF files. -- Supports zonal OCR and provides three ways to localize text areas: - - Pre-define an area manually in pixel or percentage. - - Specify an area relative to the barcode zone, which allows you to recognize accompanying texts near the barcode. - - Specify an area relative to blocks which share the same colour or uses the same font colour. A common example would be a price tag, where the text of interest is always on a yellow square background, the yellow square can serve as the reference region. -- Supports specifying a regular expression to improve recognition accuracy and robustness. diff --git a/programming-old/android/release-notes/android-2.md b/programming-old/android/release-notes/android-2.md deleted file mode 100644 index 796b4e9..0000000 --- a/programming-old/android/release-notes/android-2.md +++ /dev/null @@ -1,106 +0,0 @@ ---- -layout: default-layout -title: Android SDK Release Notes 2.x - Dynamsoft Label Recognizer -description: This is the release notes page of Dynamsoft Label Recognizer for Android SDK version 2.x. -keywords: release notes, android -needAutoGenerateSidebar: false -permalink: /programming/android/release-notes/android-2.html ---- - -# Release Notes - Android 2.x - -## 2.2.20 (09/29/2022) - -
    - -### Version Highlights - -
    - -{%- include release-notes/product-highlight-2.2.md -%} - -
    - -### Changelog - -#### New - -- Added methods in `LabelRecognizer` class to support video streaming recognition. - - [`setImageSource`](../api-reference/label-recognizer.md#setimagesource): Set the source of image/video. - - [`setLabelResultListener`](../api-reference/label-recognizer.md#setlabelresultlistener): Register a listener to receive label recognizing results. - - [`startScanning`](../api-reference/label-recognizer.md#startscanning): Start the label recognizing processes. - - [`stopScanning`](../api-reference/label-recognizer.md#stopscanning): Stop the label recognizing processes. -- Added methods in `LabelRecognizer` class to configure settings. - - [`initRuntimeSettings`](../api-reference/label-recognizer.md#initruntimesettings) - - [`initRuntimeSettingsFromFile`](../api-reference/label-recognizer.md#initruntimesettingsfromfile) - - [`outputRuntimeSettings`](../api-reference/label-recognizer.md#outputruntimesettings) - - [`outputRuntimeSettingsFromFile`](../api-reference/label-recognizer.md#outputruntimesettingstofile) -- Added a new recognition method [`recognizeFileInMemory`](../api-reference/label-recognizer.md#recognizefileinmemory) in `LabelRecognizer` class. -- Added a protocol [`LabelResultListener`](../api-reference/label-result-listener.md) to obtain video label recognition results. -- Added a new parameter [`timeout`](../api-reference/dlr-runtime-settings.md#timeout) to `DLRRuntimeSettings` class. - -#### Rename - -- The following methods of `LabelRecognizer` class are renamed - - Renamed `recognizeByFile` to [`recognizeFile`](../api-reference/label-recognizer.md#recognizefile). - - Renamed `recognizeByBuffer` to [`recognizeBuffer`](../api-reference/label-recognizer.md#recognizebuffer). - - Renamed `recognizeByImage` to [`recognizeImage`](../api-reference/label-recognizer.md#recognizeimage). - - Renamed `outputSettingsToFile` to [`outputRuntimeSettingsToFile`](../api-reference/label-recognizer.md#outputruntimesettingstofile). - -#### Removed - -- The following methods of `LabelRecognizer` class are removed - - `initLicense`. The method is replaced by `LicenseManager.initLicense` under `DynamsoftCore`. - - `appendSettingsFromString` - - `appendSettingsFromFile` - - `clearAppendedSettings` - - `destory` - -## 2.0 (08/26/2021) - -
    - -### Version Highlights - -
    - -{%- include release-notes/product-highlight-2.0.md -%} - -
    - -### Changelog - -#### New - -- Added auto-deskew algorithm to improve the performance on recognizing the skewed characters. -- Added package `DynamsoftCoreAndroid.aar`. Migrated the Dynamsoft core classes/enums from package `DynamsoftLabelRecognizerAndroid.aar` to `DynamsoftCoreAndroid.aar`. -- Added class [`BarcodeResult`](../api-reference/barcode-result.md) for users to interact with Dynamsoft Barcode Reader SDK. -- Added [`DLRRuntimeSettings`](../api-reference/dlr-runtime-settings.md) property [`dictionaryPath`](../api-reference/dlr-runtime-settings.md#dictionarypath) and [`dictionaryCorrectionThreshold`](../api-reference/dlr-runtime-settings.md#dictionarycorrectionthreshold) for users to further improve the recognizing accuracy by referencing dictionary files. -- Added class [`DLRDictionaryCorrectionThreshold`](../api-reference/dlr-dictionary-correction-threshold.md). -- Added class [`DLRFurtherModes`](../api-reference/dlr-further-modes.md) and property [`DLRRuntimeSettings.furtherModes`](../api-reference/dlr-runtime-settings.md#furthermodes) for users to config more processing modes. -- Added enumeration [`TextureDetectionMode`]({{ site.enumerations }}texture-detection-mode.html) and property [`DLRFurtherModes.textureDetectionModes`](../api-reference/dlr-further-modes.md#texturedetectionmodes) for users to detect and remove the texture background. -- Added enumeration [`ColourConversionMode`]({{ site.enumerations }}colour-conversion-mode.html) and property [`DLRFurtherModes.colourConversionModes`](../api-reference/dlr-further-modes.md#colourconversionmodes) for users to convert color images to grayscale images in differenct ways. -- Added enumeration [`BinarizationMode`]({{ site.enumerations }}binarization-mode.html) and property [`DLRRuntimeSettings.binarizationModes`](../api-reference/dlr-runtime-settings.md#binarizationmodes) for users to convert grayscale images to binary images in different ways. -- Added enumeration [`GrayscaleEnhancementMode`]({{ site.enumerations }}grayscale-enhancement-mode.html) and property [`DLRFurtherModes.grayscaleEnhancementModes`](../api-reference/dlr-further-modes.md#grayscaleenhancementmodes) for users to enable grayscale images preprocessing. -- Added [`characterHConfidence`](../api-reference/dlr-character-result.md#characterhconfidence), [`characterMConfidence`](../api-reference/dlr-character-result.md#charactermconfidence) and [`characterLConfidence`](../api-reference/dlr-character-result.md#characterlconfidence) properties in [`DLRCharacterResult`](../api-reference/dlr-character-result.md) class so that more alternative results will be available for users. -- Added API [`recognizeByImage`](../api-reference/label-recognizer.md#recognizebyimage). - -#### Improved - -- Improved the neural network performance by replacing Caffe engine with OpenCV DNN engine. - -#### Fixed - -- Fixed a bug that might cause wrong line number matching when using [`LineSpecification.LineNumber`]({{ site.parameters-reference }}line-specification/parameter-control.html#linenumber). - -#### API Changes - -- Modified the method initLicense(String) to static [`initLicense(String, DLRLicenseVerificationListener)`](../api-reference/label-recognizer.md#initlicense). -- Modified the parameter type of the method [`updateReferenceRegionFromBarcodeResults`](../api-reference/label-recognizer.md#updatereferenceregionfrombarcoderesults) from `TextResult[]` to `BarcodeResult[]`. -- Modified the parameters [`LabelRecognizerParameter.LetterHeightRange`]({{ site.parameters-reference }}label-recognition-parameter/parameter-control.html#letterheightrange) and [`TextArea.LetterHeightRange`]({{ site.parameters-reference }}text-area/parameter-control.html#letterheightrange). The value unit of the parameters are modified from percentage to thousandth. The available range of the value and the default value are updated as well. -- Renamed class `LabelRecognition` to [`LableRecognizer`](../api-reference/label-recognizer.md). -- Renamed interface `DLRLTSLicenseVerificationListener` to `DLRLicenseVerificationListener`. -- Renamed interface method `LTSLicenseVerificationCallback` to `DLRLicenseVerificationCallback`. -- Removed method `initLicenseFromLTS`. -- Removed method `LabelRecognizer(string license)`. -- Removed class `DMLTSConnectionParameters`. diff --git a/programming-old/android/release-notes/index-v1.2.1.md b/programming-old/android/release-notes/index-v1.2.1.md deleted file mode 100644 index 7c5d1c2..0000000 --- a/programming-old/android/release-notes/index-v1.2.1.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -layout: default-layout -title: Release Notes - Dynamsoft Label Recognition Android SDK -description: This is the release notes page of Dynamsoft Label Recognition for Android SDK. -keywords: release notes, android -needAutoGenerateSidebar: false -permalink: /programming/android/release-notes/index-v1.2.1.html ---- - -# Dynamsoft Label Recognition Android SDK - Release Notes - -- [1.2.1 (06/08/2021)](android-1.md#121-06082021) -- [1.2 (05/18/2021)](android-1.md#12-05182021) -- [1.0 (02/24/2021)](android-1.md#10-02242021) diff --git a/programming-old/android/samples-v2.2.20.md b/programming-old/android/samples-v2.2.20.md deleted file mode 100644 index 6005a33..0000000 --- a/programming-old/android/samples-v2.2.20.md +++ /dev/null @@ -1,33 +0,0 @@ ---- -layout: default-layout -title: Android Samples - Dynamsoft Label Recognizer -description: This is the android samples page of Dynamsoft Label Recognizer. -keywords: samples, android -needAutoGenerateSidebar: true -permalink: /programming/android/samples-v2.2.20.html ---- - -# Demo and Samples - -## Samples - -| Name | Description | -| ---- | ----------- | -| [HelloWorld](hello-world-sample.md) | The simplest video streaming label text scanner. | -| [MRZScanner](mrz-sample.md) | An example shows how to use Dynamsoft Label Recognizer on scanning MRZ. | - -Before you start viewing the samples, the following concepts may help you understand how to get started with Dynamsoft Label Recognizer. - -### License - -A network connection is required to verify the trial license in the samples. You can request a 30-day trial license via the [Request a Trial License](https://www.dynamsoft.com/customer/license/trialLicense?product=dlr&utm_source=docs&package=android){:target="_blank"} link. If you download the [Installation Package](https://www.dynamsoft.com/label-recognition/downloads/?product=dlr&utm_source=docs&package=android), it comes with a 30-day trial license by default. - -### Video Text Line Recognizing - -Most of the Dynamsoft Label Recognizer mobile samples are designed for video label text recognizing. Dynamsoft Camera Enhancer (DCE) is applied to the video streaming scanning samples. The following features in the samples are powered by DCE: - -- Capture video frames for label text recognition. -- Specify a scan region. -- Highlighting the recognized label text areas. - -View the [API reference](api-reference/camera-enhancer/index.md) for more details diff --git a/programming-old/android/user-guide-mrz-v2.2.20.md b/programming-old/android/user-guide-mrz-v2.2.20.md deleted file mode 100644 index e1992be..0000000 --- a/programming-old/android/user-guide-mrz-v2.2.20.md +++ /dev/null @@ -1,364 +0,0 @@ ---- -layout: default-layout -title: Android User Guide - Dynamsoft MRZ Recognizer -description: This is the user guide page of Dynamsoft MRZ Recognizer for Android Language. -keywords: a, user guide -needAutoGenerateSidebar: true -needGenerateH3Content: true -permalink: /programming/android/user-guide-mrz-v2.2.20.html ---- - -# MRZ Scanner Solution for Android - User Guide - -- [MRZ Scanner Solution for Android - User Guide](#mrz-scanner-solution-for-android---user-guide) - - [Requirements](#requirements) - - [Add the Libraries](#add-the-libraries) - - [Add the Libraries Manually](#add-the-libraries-manually) - - [Add the Libraries via Maven](#add-the-libraries-via-maven) - - [Build Your First Application](#build-your-first-application) - - [Create a New Project](#create-a-new-project) - - [Include the Libraries](#include-the-libraries) - - [Initialize the License](#initialize-the-license) - - [Initialize Camera Module](#initialize-camera-module) - - [Initialize MRZ Recognizer](#initialize-mrz-recognizer) - - [Start Recognition Process](#start-recognition-process) - - [Obtain and Display Recognized MRZ Result](#obtain-and-display-recognized-mrz-result) - - [Build and Run the Project](#build-and-run-the-project) - -## Requirements - -- Supported OS: Android 5.0 (API Level 21) or higher. -- Supported ABI: **armeabi-v7a**, **arm64-v8a**, **x86** and **x86_64**. -- Development Environment: Android Studio 3.4+ (Android Studio 4.2+ recommended). - -## Add the Libraries - -The MRZ SCanner Solution Android Package comes with four libraries: - -- **DynamsoftLabelRecognizer.aar**: Dynamsoft Label Recognizer (DLR) is a library that offers APIs for text recognition from image files and camera video. **A license is required for its use.** -- **DynamsoftCore.aar**: The core library includes common basic structure and license related APIs. -- **DynamsoftCameraEnhancer.aar** (Optional): Dynamsoft Camera Enhancer (DCE) is a library of getting video frames from mobile cameras. Provides APIs for camera control, camera preview, and other advanced features. **A license is required for its advanced features such as `frame filter`, `sensor control`, `autozoom`, `enhanced focus` and `smart torch`**. -- **MRZScanner.aar**: MRZScanner is a library wrapped around the Dynamsoft Label Recognizer SDK. It is not a part of the Dynamsoft standard SDK but is completely open source. You can download it and freely modify it. - -There are two ways to add the libraries into your project - **Manually** and **Maven**. - -### Add the Libraries Manually - -1. Download the solution package from the Dynamsoft Website. After unzipping, four **aar** files can be found in the **MRZScanner\Libs** directory: - - - **MRZScanner.aar** - - **DynamsoftLabelRecognizer.aar** - - **DynamsoftCore.aar** - - **DynamsoftCameraEnhancer.aar** (Optional) - >Note: - > - >If you want to use Android Camera SDK or your own sdk to control camera, please ignore **DynamsoftCameraEnhancer.aar** in the following steps. - -2. Copy the above two **aar** files to the target directory such as `[App Project Root Path]\app\libs` - -3. Open the file `[App Project Root Path]\app\build.gradle` and add reference in the dependencies: - - ```groovy - dependencies { - implementation fileTree(dir: 'libs', include: ['*.aar']) - - def camerax_version = '1.1.0' - implementation "androidx.camera:camera-core:$camerax_version" - implementation "androidx.camera:camera-camera2:$camerax_version" - implementation "androidx.camera:camera-lifecycle:$camerax_version" - implementation "androidx.camera:camera-view:$camerax_version" - } - ``` - - > Note: - > - > DCE 3.x is based on Android CameraX, so you need to add the CameraX dependency manually. - -4. Click **Sync Now**. After the synchronization completes, the SDK is added to the project. - -### Add the Libraries via Maven - -1. Open the file `[App Project Root Path]\app\build.gradle` and add the maven repository: - - ```groovy - repositories { - maven { - url "https://download2.dynamsoft.com/maven/aar" - } - } - ``` - -2. Add reference in the dependencies: - - ```groovy - dependencies { - implementation 'com.dynamsoft:mrzscanner:2.2.20' - // Remove the following line if you want to use Android Camera sdk or your own sdk to control camera. - implementation 'com.dynamsoft:dynamsoftcameraenhancer:3.0.1' - } - ``` - -3. Click **Sync Now**. After the synchronization completes, the SDK is added to the project. - -## Build Your First Application - -The following sample will demonstrate how to create a `HelloWorld` app for recognizing MRZ from camera video input. After you complete all steps, the final application looks like this example. - -[Download the sample source code](todo) - ->Note: -> ->- The following steps are completed in Android Studio 4.2. - -### Create a New Project - -1. Open Android Studio and select `New Project…` in the `File > New > New Project…` menu to create a new project. - -2. Choose the correct template for your project. In this sample, we'll use `Empty Activity`. - -3. When prompted, choose your app name (`HelloWorld`) and set the Save location, Language, and Minimum SDK (21) - >Note: With minSdkVersion set to 21, your app is available on more than 94.1% of devices on the Google Play Store (last update: March 2021). - -### Include the Libraries - -Add the SDK to your new project. Please read [Add the Libraries](#add-the-libraries) section for more details. - -### Initialize the License - -1. Import the `LicenseManager` class and initialize the license in the file `MainActivity.java`. - - ```java - import com.dynamsoft.core.LicenseManager; - import com.dynamsoft.core.LicenseVerificationListener; - import com.dynamsoft.core.CoreException; - - public class MainActivity extends AppCompatActivity { - - @Override - protected void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - setContentView(R.layout.activity_main); - - LicenseManager.initLicense("DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9", MainActivity.this, new LicenseVerificationListener() { - @Override - public void licenseVerificationCallback(boolean isSuccess, CoreException error) { - if(!isSuccess){ - error.printStackTrace(); - } - } - }); - } - } - ``` - - >Note: - > - >- Network connection is required for the license to work. - >- The license string here will grant you a time-limited trial license. - >- You can request a 30-day trial license via the [Request a Trial License](https://www.dynamsoft.com/customer/license/trialLicense?product=dlr&utm_source=guide&package=android){:target="_blank"} link - -### Initialize Camera Module - -1. In the Project window, open **app > res > layout > `activity_main.xml`** and create a DCE camera view section under the root node. - - ```xml - - - ``` - -2. Import the dynamsoft camera module, initialize a `DCECameraView` and bind to the created `CameraEnhancer` instance in the file `MainActivity.java`. - - ```java - ... - - import com.dynamsoft.dce.DCECameraView; - import com.dynamsoft.dce.CameraEnhancer; - import com.dynamsoft.dce.CameraEnhancerException; - - public class MainActivity extends AppCompatActivity { - private CameraEnhancer mCamera; - - @Override - protected void onCreate(Bundle savedInstanceState) { - - ... - - DCECameraView cameraView = findViewById(R.id.camera_view); - - mCamera = new CameraEnhancer(MainActivity.this); - mCamera.setCameraView(cameraView); - } - } - ``` - -3. Define a scan region for MRZ recognition. - - ```java - ... - - import com.dynamsoft.core.RegionDefiniton; - - public class MainActivity extends AppCompatActivity { - - @Override - protected void onCreate(Bundle savedInstanceState) { - - ... - - RegionDefinition region = new RegionDefinition(10, 40, 90, 60, 1); - try { - mCamera.setScanRegion(region); - } catch (CameraEnhancerException e) { - e.printStackTrace(); - } - } - } - ``` - -### Initialize MRZ Recognizer - -1. Import and initialize an instance of `MRZRecognizer`, bind to the created `CameraEnhancer` instance. - - ```java - ... - - import com.dynamsoft.dlr.MRZRecognizer; - import com.dynamsoft.dlr.LabelRecognizerException; - - public class MainActivity extends AppCompatActivity { - - ... - - private MRZRecognizer mRecognizer; - - @Override - protected void onCreate(Bundle savedInstanceState) { - - ... - - try { - mRecognizer = new MRZRecognizer(); - } catch (LabelRecognizerException e) { - e.printStackTrace(); - } - - mRecognizer.setImageSource(mCamera); - } - } - ``` - -### Start Recognition Process - -1. Override the `MainActivity.onResume` and `MainActivity.onPause` functions to start/stop video MRZ recognition. After recognition starts, the `MRZRecognizer` will automatically process the video frames from the `CameraEnhancer`, then send the recognized `MRZResult` to the callback function. - - ```java - public class MainActivity extends AppCompatActivity { - - ... - - @Override - protected void onResume() { - mRecognizer.startScanning(); - try { - mCamera.open(); - } catch (CameraEnhancerException e) { - e.printStackTrace(); - } - super.onResume(); - } - - - @Override - protected void onPause() { - mRecognizer.stopScanning(); - try { - mCamera.close(); - } catch (CameraEnhancerException e) { - e.printStackTrace(); - } - super.onPause(); - } - } - ``` - -### Obtain and Display Recognized MRZ Result - -1. Create a `MRZResultListener` and register with the `MRZRecognizer` instance to get recognized MRZ result. - - ```java - ... - import androidx.appcompat.app.AlertDialog; - import android.content.DialogInterface; - - import com.dynamsoft.core.ImageData; - import com.dynamsoft.dce.DCEFeedback; - import com.dynamsoft.dlr.MRZResult; - import com.dynamsoft.dlr.MRZResultListener; - - public class MainActivity extends AppCompatActivity { - - ... - - @Override - protected void onCreate(Bundle savedInstanceState) { - - ... - - mMRZRecognizer.setMRZResultListener(new MRZResultListener() { - @Override - public void mrzResultCallback(int i, ImageData imageData, MRZResult mrzResult) { - if (mrzResult != null && mrzResult.isParsed) { - DCEFeedback.vibrate(MainActivity.this); - mMRZRecognizer.stopScanning(); - - runOnUiThread(() -> showResult(mrzResult)); - } - } - }); - } - - private void showResult(MRZResult mrzResult) { - StringBuilder resultBuilder = new StringBuilder(); - - resultBuilder.append("Document Type : " + mrzResult.docType + "\n"); - resultBuilder.append("Issuing State : " + mrzResult.issuer + "\n"); - resultBuilder.append("Surname : " + mrzResult.surname + "\n"); - resultBuilder.append("Given Name : " + mrzResult.givenName + "\n"); - resultBuilder.append("Passport Number : " + mrzResult.docId + "\n"); - resultBuilder.append("Nationality : " + mrzResult.nationality + "\n"); - resultBuilder.append("Date of Birth(YY-MM-DD) : " + mrzResult.dateOfBirth + "\n"); - resultBuilder.append("Gender : " + mrzResult.gender + "\n"); - resultBuilder.append("Date of Expiry(YY-MM-DD) : " + mrzResult.dateOfExpiration + "\n"); - resultBuilder.append("Is Parsed : " + mrzResult.isParsed + "\n"); - resultBuilder.append("Is Verified : " + mrzResult.isVerified + "\n"); - resultBuilder.append("MRZ Text : " + mrzResult.mrzText + "\n"); - - showDialog("Result", resultBuilder.toString(), new DialogInterface.OnClickListener() { - @Override - public void onClick(DialogInterface dialog, int which) { - mMRZRecognizer.startScanning(); - } - }); - } - - private void showDialog(String title, String message, DialogInterface.OnClickListener listener) { - new AlertDialog.Builder(this).setTitle(title) - .setPositiveButton("OK", listener) - .setMessage(message) - .setCancelable(false) - .show(); - } - } - ``` - -### Build and Run the Project - -1. Select the device that you want to run your app on from the target device drop-down menu in the toolbar. -2. Click `Run app` button, then Android Studio installs your app on your connected device and starts it. diff --git a/programming-old/android/user-guide-mrz.md b/programming-old/android/user-guide-mrz.md deleted file mode 100644 index d5006b4..0000000 --- a/programming-old/android/user-guide-mrz.md +++ /dev/null @@ -1,364 +0,0 @@ ---- -layout: default-layout -title: Android User Guide - Dynamsoft MRZ Recognizer -description: This is the user guide page of Dynamsoft MRZ Recognizer for Android Language. -keywords: a, user guide -needAutoGenerateSidebar: true -needGenerateH3Content: true -permalink: /programming/android/user-guide-mrz.html ---- - -# MRZ Scanner Solution for Android - User Guide - -- [MRZ Scanner Solution for Android - User Guide](#mrz-scanner-solution-for-android---user-guide) - - [Requirements](#requirements) - - [Add the Libraries](#add-the-libraries) - - [Add the Libraries Manually](#add-the-libraries-manually) - - [Add the Libraries via Maven](#add-the-libraries-via-maven) - - [Build Your First Application](#build-your-first-application) - - [Create a New Project](#create-a-new-project) - - [Include the Libraries](#include-the-libraries) - - [Initialize the License](#initialize-the-license) - - [Initialize Camera Module](#initialize-camera-module) - - [Initialize MRZ Recognizer](#initialize-mrz-recognizer) - - [Start Recognition Process](#start-recognition-process) - - [Obtain and Display Recognized MRZ Result](#obtain-and-display-recognized-mrz-result) - - [Build and Run the Project](#build-and-run-the-project) - -## Requirements - -- Supported OS: Android 5.0 (API Level 21) or higher. -- Supported ABI: **armeabi-v7a**, **arm64-v8a**, **x86** and **x86_64**. -- Development Environment: Android Studio 3.4+ (Android Studio 4.2+ recommended). - -## Add the Libraries - -The MRZ SCanner Solution Android Package comes with four libraries: - -- **DynamsoftLabelRecognizer.aar**: Dynamsoft Label Recognizer (DLR) is a library that offers APIs for text recognition from image files and camera video. **A license is required for its use.** -- **DynamsoftCore.aar**: The core library includes common basic structure and license related APIs. -- **DynamsoftCameraEnhancer.aar** (Optional): Dynamsoft Camera Enhancer (DCE) is a library of getting video frames from mobile cameras. Provides APIs for camera control, camera preview, and other advanced features. **A license is required for its advanced features such as `frame filter`, `sensor control`, `autozoom`, `enhanced focus` and `smart torch`**. -- **MRZScanner.aar**: MRZScanner is a library wrapped around the Dynamsoft Label Recognizer SDK. It is not a part of the Dynamsoft standard SDK but is completely open source. You can download it and freely modify it. - -There are two ways to add the libraries into your project - **Manually** and **Maven**. - -### Add the Libraries Manually - -1. Download the solution package from the Dynamsoft Website. After unzipping, four **aar** files can be found in the **MRZScanner\Libs** directory: - - - **MRZScanner.aar** - - **DynamsoftLabelRecognizer.aar** - - **DynamsoftCore.aar** - - **DynamsoftCameraEnhancer.aar** (Optional) - >Note: - > - >If you want to use Android Camera SDK or your own sdk to control camera, please ignore **DynamsoftCameraEnhancer.aar** in the following steps. - -2. Copy the above two **aar** files to the target directory such as `[App Project Root Path]\app\libs` - -3. Open the file `[App Project Root Path]\app\build.gradle` and add reference in the dependencies: - - ```groovy - dependencies { - implementation fileTree(dir: 'libs', include: ['*.aar']) - - def camerax_version = '1.1.0' - implementation "androidx.camera:camera-core:$camerax_version" - implementation "androidx.camera:camera-camera2:$camerax_version" - implementation "androidx.camera:camera-lifecycle:$camerax_version" - implementation "androidx.camera:camera-view:$camerax_version" - } - ``` - - > Note: - > - > DCE 3.x is based on Android CameraX, so you need to add the CameraX dependency manually. - -4. Click **Sync Now**. After the synchronization completes, the SDK is added to the project. - -### Add the Libraries via Maven - -1. Open the file `[App Project Root Path]\app\build.gradle` and add the maven repository: - - ```groovy - repositories { - maven { - url "https://download2.dynamsoft.com/maven/aar" - } - } - ``` - -2. Add reference in the dependencies: - - ```groovy - dependencies { - implementation 'com.dynamsoft:mrzscanner:2.2.20' - // Remove the following line if you want to use Android Camera sdk or your own sdk to control camera. - implementation 'com.dynamsoft:dynamsoftcameraenhancer:3.0.1' - } - ``` - -3. Click **Sync Now**. After the synchronization completes, the SDK is added to the project. - -## Build Your First Application - -The following sample will demonstrate how to create a `HelloWorld` app for recognizing MRZ from camera video input. After you complete all steps, the final application looks like this example. - -[Download the sample source code](todo) - ->Note: -> ->- The following steps are completed in Android Studio 4.2. - -### Create a New Project - -1. Open Android Studio and select `New Project…` in the `File > New > New Project…` menu to create a new project. - -2. Choose the correct template for your project. In this sample, we'll use `Empty Activity`. - -3. When prompted, choose your app name (`HelloWorld`) and set the Save location, Language, and Minimum SDK (21) - >Note: With minSdkVersion set to 21, your app is available on more than 94.1% of devices on the Google Play Store (last update: March 2021). - -### Include the Libraries - -Add the SDK to your new project. Please read [Add the Libraries](#add-the-libraries) section for more details. - -### Initialize the License - -1. Import the `LicenseManager` class and initialize the license in the file `MainActivity.java`. - - ```java - import com.dynamsoft.core.LicenseManager; - import com.dynamsoft.core.LicenseVerificationListener; - import com.dynamsoft.core.CoreException; - - public class MainActivity extends AppCompatActivity { - - @Override - protected void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - setContentView(R.layout.activity_main); - - LicenseManager.initLicense("DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9", MainActivity.this, new LicenseVerificationListener() { - @Override - public void licenseVerificationCallback(boolean isSuccess, CoreException error) { - if(!isSuccess){ - error.printStackTrace(); - } - } - }); - } - } - ``` - - >Note: - > - >- Network connection is required for the license to work. - >- The license string here will grant you a time-limited trial license. - >- You can request a 30-day trial license via the [Request a Trial License](https://www.dynamsoft.com/customer/license/trialLicense?product=dlr&utm_source=guide&package=android){:target="_blank"} link - -### Initialize Camera Module - -1. In the Project window, open **app > res > layout > `activity_main.xml`** and create a DCE camera view section under the root node. - - ```xml - - - ``` - -2. Import the dynamsoft camera module, initialize a `DCECameraView` and bind to the created `CameraEnhancer` instance in the file `MainActivity.java`. - - ```java - ... - - import com.dynamsoft.dce.DCECameraView; - import com.dynamsoft.dce.CameraEnhancer; - import com.dynamsoft.dce.CameraEnhancerException; - - public class MainActivity extends AppCompatActivity { - private CameraEnhancer mCamera; - - @Override - protected void onCreate(Bundle savedInstanceState) { - - ... - - DCECameraView cameraView = findViewById(R.id.camera_view); - - mCamera = new CameraEnhancer(MainActivity.this); - mCamera.setCameraView(cameraView); - } - } - ``` - -3. Define a scan region for MRZ recognition. - - ```java - ... - - import com.dynamsoft.core.RegionDefiniton; - - public class MainActivity extends AppCompatActivity { - - @Override - protected void onCreate(Bundle savedInstanceState) { - - ... - - RegionDefinition region = new RegionDefinition(10, 40, 90, 60, 1); - try { - mCamera.setScanRegion(region); - } catch (CameraEnhancerException e) { - e.printStackTrace(); - } - } - } - ``` - -### Initialize MRZ Recognizer - -1. Import and initialize an instance of `MRZRecognizer`, bind to the created `CameraEnhancer` instance. - - ```java - ... - - import com.dynamsoft.dlr.MRZRecognizer; - import com.dynamsoft.dlr.LabelRecognizerException; - - public class MainActivity extends AppCompatActivity { - - ... - - private MRZRecognizer mRecognizer; - - @Override - protected void onCreate(Bundle savedInstanceState) { - - ... - - try { - mRecognizer = new MRZRecognizer(); - } catch (LabelRecognizerException e) { - e.printStackTrace(); - } - - mRecognizer.setImageSource(mCamera); - } - } - ``` - -### Start Recognition Process - -1. Override the `MainActivity.onResume` and `MainActivity.onPause` functions to start/stop video MRZ recognition. After recognition starts, the `MRZRecognizer` will automatically process the video frames from the `CameraEnhancer`, then send the recognized `MRZResult` to the callback function. - - ```java - public class MainActivity extends AppCompatActivity { - - ... - - @Override - protected void onResume() { - mRecognizer.startScanning(); - try { - mCamera.open(); - } catch (CameraEnhancerException e) { - e.printStackTrace(); - } - super.onResume(); - } - - - @Override - protected void onPause() { - mRecognizer.stopScanning(); - try { - mCamera.close(); - } catch (CameraEnhancerException e) { - e.printStackTrace(); - } - super.onPause(); - } - } - ``` - -### Obtain and Display Recognized MRZ Result - -1. Create a `MRZResultListener` and register with the `MRZRecognizer` instance to get recognized MRZ result. - - ```java - ... - import androidx.appcompat.app.AlertDialog; - import android.content.DialogInterface; - - import com.dynamsoft.core.ImageData; - import com.dynamsoft.dce.DCEFeedback; - import com.dynamsoft.dlr.MRZResult; - import com.dynamsoft.dlr.MRZResultListener; - - public class MainActivity extends AppCompatActivity { - - ... - - @Override - protected void onCreate(Bundle savedInstanceState) { - - ... - - mMRZRecognizer.setMRZResultListener(new MRZResultListener() { - @Override - public void mrzResultCallback(int i, ImageData imageData, MRZResult mrzResult) { - if (mrzResult != null && mrzResult.isParsed) { - DCEFeedback.vibrate(MainActivity.this); - mMRZRecognizer.stopScanning(); - - runOnUiThread(() -> showResult(mrzResult)); - } - } - }); - } - - private void showResult(MRZResult mrzResult) { - StringBuilder resultBuilder = new StringBuilder(); - - resultBuilder.append("Document Type : " + mrzResult.docType + "\n"); - resultBuilder.append("Issuing State : " + mrzResult.issuer + "\n"); - resultBuilder.append("Surname : " + mrzResult.surname + "\n"); - resultBuilder.append("Given Name : " + mrzResult.givenName + "\n"); - resultBuilder.append("Passport Number : " + mrzResult.docId + "\n"); - resultBuilder.append("Nationality : " + mrzResult.nationality + "\n"); - resultBuilder.append("Date of Birth(YY-MM-DD) : " + mrzResult.dateOfBirth + "\n"); - resultBuilder.append("Gender : " + mrzResult.gender + "\n"); - resultBuilder.append("Date of Expiry(YY-MM-DD) : " + mrzResult.dateOfExpiration + "\n"); - resultBuilder.append("Is Parsed : " + mrzResult.isParsed + "\n"); - resultBuilder.append("Is Verified : " + mrzResult.isVerified + "\n"); - resultBuilder.append("MRZ Text : " + mrzResult.mrzText + "\n"); - - showDialog("Result", resultBuilder.toString(), new DialogInterface.OnClickListener() { - @Override - public void onClick(DialogInterface dialog, int which) { - mMRZRecognizer.startScanning(); - } - }); - } - - private void showDialog(String title, String message, DialogInterface.OnClickListener listener) { - new AlertDialog.Builder(this).setTitle(title) - .setPositiveButton("OK", listener) - .setMessage(message) - .setCancelable(false) - .show(); - } - } - ``` - -### Build and Run the Project - -1. Select the device that you want to run your app on from the target device drop-down menu in the toolbar. -2. Click `Run app` button, then Android Studio installs your app on your connected device and starts it. diff --git a/programming-old/android/user-guide-v1.2.1.md b/programming-old/android/user-guide-v1.2.1.md deleted file mode 100644 index 8a4ec40..0000000 --- a/programming-old/android/user-guide-v1.2.1.md +++ /dev/null @@ -1,87 +0,0 @@ ---- -layout: default-layout -title: Android User Guide - Dynamsoft Label Recognition -description: This is the user guide page of Dynamsoft Label Recognition for Android Language. -keywords: a, user guide -needAutoGenerateSidebar: true -permalink: /programming/android/user-guide-v1.2.1.html ---- - -# Dynamsoft Label Recognition - Android User Guide - -## System Requirements - -- Operating systems: - - Supported OS: Android 5 or higher (Android 7 or higher recommended) - - Supported ABI: armeabi-v7a, arm64-v8a, x86, x86_64 - -## Installation - -Download the Dynamsoft Label Recognition SDK from the [Dynamsoft website](https://www.dynamsoft.com/label-recognition/downloads) and unzip the package. The package includes a free trial license valid for 30 days. - -## Getting Started: Hello World - -1. Create a new Android project in Android Studio. - -2. Import the `DynamsoftLabelRecognitionAndroid.aar` package into the new project. To manually import the `.aar`: - - i. Locate `DynamsoftLabelRecognitionAndroid.aar` in the downloaded android zip. - ii. Put the .aar file under the `libs` directory in the project. - iii. In the project, open build.gradle(Module: app) and add the following code: - - ```groovy - repositories { - flatDir { - dirs 'libs' - } - } - ``` - - iv. Add `.aar` reference in the dependencies: - - ```groovy - implementation(name: 'DynamsoftLabelRecognitionAndroid', ext: 'aar') - ``` - - v. Click **Sync Now**. After the synchronization completes, `DynamsoftLabelRecognitionAndroid.aar` is added to the project. - -3. Add the following code to initiate and use the Dynamsoft Label Recognition SDK. - - ```java - import com.dynamsoft.dlr.*; - public class MainActivity extends AppCompatActivity { - private LabelRecognition mRecognition; - @Override - protected void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - setContentView(R.layout.activity_main); - try { - mRecognition = new LabelRecognition(""); - DLRResult[] results = mRecognition.recognizeByFile("", ""); - - if (results != null && results.length > 0) { - String strCurResult = ""; - for (int i = 0; i < results.length; i++) { - strCurResult += "["+i+"] :\n"; - for (int j = 0; j < results[i].lineResults.length; j++) { - strCurResult += results[i].lineResults[j].text + "\n"; - } - } - Log.i("DLR", strCurResult); - } - else { - Log.i("DLR", "No results returned."); - } - } - catch (Exception ex) { - ex.printStackTrace(); - } - } - } - ``` - - Please replace `` with your DLR license key. You can request a 30-day trial license via the [Request a Trial License](https://www.dynamsoft.com/customer/license/trialLicense?product=dlr&utm_source=guide&package=android){:target="_blank"} link - - In the snippet above, `` should also be replaced with the full path to the image you'd like to recognize. - -4. Run the project. diff --git a/programming-old/android/user-guide-v2.0.0.md b/programming-old/android/user-guide-v2.0.0.md deleted file mode 100644 index 13c7df2..0000000 --- a/programming-old/android/user-guide-v2.0.0.md +++ /dev/null @@ -1,336 +0,0 @@ ---- -layout: default-layout -title: Android User Guide - Dynamsoft Label Recognizer -description: This is the user guide page of Dynamsoft Label Recognizer for Android Language. -keywords: a, user guide -needAutoGenerateSidebar: true -needGenerateH3Content: true -permalink: /programming/android/user-guide-v2.0.0.html ---- - -# Dynamsoft Label Recognizer - Android User Guide - -* [Requirements](#requirements) -* [Installation](#installation) -* [Build Your First Application](#build-your-first-application) - * [Create a New Project](#create-a-new-project) - * [Include the Label Recognizer Library](#include-the-label-recognizer-library) - * [Initialize the Label Recognizer](#initialize-the-label-recognizer) - * [Recognition Process and How to Use the Results](#recognition-process-and-how-to-use-the-results) - * [Additional Auxiliary Steps](#additional-auxiliary-steps) - * [Build and Run the Project](#build-and-run-the-project) - -## Requirements - -- Operating systems: - - Supported OS: Android 5 or higher (Android 7 or higher recommended) - - Supported ABI: armeabi-v7a, arm64-v8a, x86, x86_64 - -- Environment: Android Studio 3.4+. - -## Installation - -If you don't have SDK yet, please go to Dynamsoft website to get it. After the sdk is decompressed, the root directory of the DLR installation package is `DynamsoftLabelRecognizer`, which is represented by `[INSTALLATION FOLDER]`. - -## Build Your First Application - -The following sample will demonstrate how to take a picture and recognize it. ->Note: ->- The following steps are completed in Android Studio 4.2. ->- You can download the similar complete source code from [Here](https://github.com/Dynamsoft/label-recognizer-mobile-samples/tree/master/android/HelloWorld). - -### Create a New Project - -1. Open Android Studio and select New Project… in the File > New > New Project… menu to create a new project. - -2. Choose the correct template for your project. In this sample, we'll use `Empty Activity`. - -3. When prompted, choose your app name (`DLRAndroidSample`) and set the Save location, Language, and Minimum SDK (21) - >Note: With minSdkVersion set to 21, your app is available on more than 94.1% of devices on the Google Play Store (last update: March 2021). - - -### Include the Label Recognizer Library - -There are two ways to include the Dynamsoft Label Recognizer SDK into your project: - -#### Local Binary Dependency - -1. Copy the file `[INSTALLATION FOLDER]\DynamsoftLabelRecognizerAndroid.aar` and `[INSTALLATION FOLDER]\DynamsoftCoreAndroid.aar` to the target directory `DLRAndroidSample\app\libs` - -2. Open the file `DLRAndroidSample\app\build.gradle`, and add reference in the dependencies: - ``` - dependencies { - implementation fileTree(dir: 'libs', include: ['*.aar']) - } - ``` - -3. Click `Sync Now`. After the synchronization completes, the SDK is added to the project. - -4. import the package int the file `MainActivity.java` - ```java - import com.dynamsoft.dlr.*; - ``` - -#### Remote Binary Dependency - -1. Open the file `DLRAndroidSample\app\build.gradle`, and add the remote repository: - ``` - repositories { - maven { - url "https://download2.dynamsoft.com/maven/dc/aar" - } - maven { - url "https://download2.dynamsoft.com/maven/dlr/aar" - } - } - ``` - -2. Add reference in the dependencies: - ``` - dependencies { - implementation 'com.dynamsoft:dynamsoftcore:{version-number}@aar' - implementation 'com.dynamsoft:dynamsoftlabelrecognizer:{version-number}@aar' - } - ``` ->Note:Please replace {version-number} with the correct version number. - -3. Click `Sync Now`. After the synchronization completes, the SDK is added to the project. - -4. import the package in the file `MainActivity.java` - ```java - import com.dynamsoft.dlr.*; - ``` - -### Initialize the Label Recognizer - - -1. Initialize the license - - ```java - LabelRecognizer.initLicense("DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSIsInByb2R1Y3RzIjoyfQ==", new DLRLicenseVerificationListener() { - @Override - public void DLRLicenseVerificationCallback(boolean isSuccess, Exception error) { - if(!isSuccess){ - error.printStackTrace(); - } - } - }); - ``` - - >Note: - >- Network connection is required for the license to work. - >- "DLS2***" is a default free public trial license used in the sample. - >- You can request a 30-day trial license via the [Request a Trial License](https://www.dynamsoft.com/customer/license/trialLicense?product=dlr&utm_source=guide&package=android){:target="_blank"} link - -2. Create an instance of Dynamsoft Label Recognizer - - ```java - LabelRecognizer dlr = new LabelRecognizer(); - ``` - -### Recognition Process and How to Use the Results - -1. Recognizing text - - ```java - DLRResult[] results = dlr.recognizeByFile(imgPath, ""); - ``` - - >The variable `imgPath` represents the temporary storage location of the photos taken, which will be explained later. - -2. Get and output the recognition results - - ```java - if (results != null && results.length > 0) { - String strCurResult = ""; - for (int i = 0; i < results.length; i++) { - - // Get result of each text area (also called label). - DLRResult result = results[i]; - strCurResult += "Result " + i + ":\n"; - for (int j = 0; j < result.lineResults.length; j++) { - - // Get the result of each text line in the label. - DLRLineResult lineResult = result.lineResults[j]; - strCurResult += ">>Line Result " + j + ": " + lineResult.text + "\n"; - } - } - } - ``` - - The recognition results of SDK are organized into a four-tier structure: - - `DLRResult[]` corresponds to the results of an `image` - - `DLRResult` corresponds to the result of a `TextArea` (also called Label) - - `DLRLineResult` corresponds to the result of each `TextLine` in the Label - - `DLRCharacterResult` corresponds to the result of each `Character` in the `TextLine` - - The structure is shown in the figure below: - -
    - DLR Result Structure -

    Figure 1 – DLR Result Structure

    -
    - -### Additional Auxiliary Steps - -1. In the Project window, open app > res > layout > activity_main.xml, and add four controls (one `ImageView`, one `TextView` and two `Buttons`). The following code shows the addition code of `activity_main.xml`. - ```xml - - - - - - - - -