From 8c56d9806614cec2f028d70fa4a08a436efb30b9 Mon Sep 17 00:00:00 2001 From: DMGithubPublisher Date: Mon, 15 Sep 2025 13:26:17 +0800 Subject: [PATCH] update to internal commit 51fb7e50 --- .../detected-quad-result-item-v2.4.2000.md | 63 -- .../normalized-image-result-item-v2.4.2000.md | 63 -- ...-document-normalizer-settings-v2.2.3000.md | 132 ---- programming/android/user-guide-v2.2.3000.md | 368 ----------- programming/android/user-guide-v2.4.2000.md | 368 ----------- programming/android/user-guide-v2.6.1000.md | 403 ------------ programming/android/user-guide-v2.6.1001.md | 403 ------------ programming/android/user-guide-v2.6.1002.md | 403 ------------ programming/android/user-guide-v2.6.1003.md | 403 ------------ .../detected-quad-result-item-v2.4.2000.md | 81 --- .../normalized-image-result-item-v2.4.2000.md | 80 --- ...-document-normalizer-settings-v2.2.3000.md | 179 ------ programming/ios/user-guide-v2.2.3000.md | 568 ---------------- programming/ios/user-guide-v2.4.2000.md | 568 ---------------- programming/ios/user-guide-v2.6.1000.md | 605 ------------------ programming/ios/user-guide-v2.6.1001.md | 605 ------------------ programming/ios/user-guide-v2.6.1002.md | 605 ------------------ programming/ios/user-guide-v2.6.1003.md | 605 ------------------ programming/ios/user-guide-v2.6.1004.md | 605 ------------------ programming/maui/user-guide-v2.4.2000.md | 391 ----------- programming/maui/user-guide-v2.6.1000.md | 391 ----------- programming/maui/user-guide-v2.6.1001.md | 391 ----------- 22 files changed, 8280 deletions(-) delete mode 100644 programming/android/api-reference/detected-quad-result-item-v2.4.2000.md delete mode 100644 programming/android/api-reference/normalized-image-result-item-v2.4.2000.md delete mode 100644 programming/android/api-reference/simplified-document-normalizer-settings-v2.2.3000.md delete mode 100644 programming/android/user-guide-v2.2.3000.md delete mode 100644 programming/android/user-guide-v2.4.2000.md delete mode 100644 programming/android/user-guide-v2.6.1000.md delete mode 100644 programming/android/user-guide-v2.6.1001.md delete mode 100644 programming/android/user-guide-v2.6.1002.md delete mode 100644 programming/android/user-guide-v2.6.1003.md delete mode 100644 programming/ios/api-reference/detected-quad-result-item-v2.4.2000.md delete mode 100644 programming/ios/api-reference/normalized-image-result-item-v2.4.2000.md delete mode 100644 programming/ios/api-reference/simplified-document-normalizer-settings-v2.2.3000.md delete mode 100644 programming/ios/user-guide-v2.2.3000.md delete mode 100644 programming/ios/user-guide-v2.4.2000.md delete mode 100644 programming/ios/user-guide-v2.6.1000.md delete mode 100644 programming/ios/user-guide-v2.6.1001.md delete mode 100644 programming/ios/user-guide-v2.6.1002.md delete mode 100644 programming/ios/user-guide-v2.6.1003.md delete mode 100644 programming/ios/user-guide-v2.6.1004.md delete mode 100644 programming/maui/user-guide-v2.4.2000.md delete mode 100644 programming/maui/user-guide-v2.6.1000.md delete mode 100644 programming/maui/user-guide-v2.6.1001.md diff --git a/programming/android/api-reference/detected-quad-result-item-v2.4.2000.md b/programming/android/api-reference/detected-quad-result-item-v2.4.2000.md deleted file mode 100644 index 6a7e4ee..0000000 --- a/programming/android/api-reference/detected-quad-result-item-v2.4.2000.md +++ /dev/null @@ -1,63 +0,0 @@ ---- -layout: default-layout -title: DetectedQuadResultItem - Dynamsoft Document Normalizer Android SDK API Reference -description: The class DetectedQuadResultItem represents a captured result item whose type is detected quads, which contains the location and confidence as a document boundary. -keywords: detected quads, java, kotlin -needGenerateH3Content: true -needAutoGenerateSidebar: true -noTitleIndex: true ---- - -# DetectedQuadResultItem - -The `DetectedQuadResultItem` class is an extension of the [`CapturedResultItem`]({{ site.dcv_android_api }}core/basic-structures/captured-result-item.html) that represents a detected quadrilateral. This is the most basic unit of a detected quadrilateral, one of the captured result types that the Capture Vision Router can output. - -## Definition - -*Namespace:* com.dynamsoft.ddn - -*Assembly:* DynamsoftDocumentNormalizer.aar - -```java -class DetectedQuadResultItem extends CapturedResultItem -``` - -## Methods - -| Methods | Description | -| ------- | ----------- | -| [`getLocation`](#getlocation) | Get a Quadrilateral object as the location of current object. | -| [`getConfidenceAsDocumentBoundary`](#getconfidenceasdocumentboundary) | Returns the confidence score of the detected quadrilateral's boundary, measuring the certainty that the detected quadrilateral represents the boundary of a document. | - -The following methods are inherited from [`CapturedResultItem`]({{ site.dcv_android_api }}core/basic-structures/captured-result-item.html). - -| Method | Description | -| ------ | ----------- | -| [`getType`]({{ site.dcv_android_api }}core/basic-structures/captured-result-item.html#gettype) | Get the type of the captured result item, indicating what kind of data it represents. | -| [`getReferencedItem`]({{ site.dcv_android_api }}core/basic-structures/captured-result-item.html#getreferenceditem) | Get a property of type `CapturedResultItem` that represents a reference to another captured result item. | -| [`getTargetROIDefName`]({{ site.dcv_android_api }}core/basic-structures/captured-result-item.html#gettargetroidefname) | Gets the name of the [`TargetROIDef`]({{ site.dcv_parameters_reference }}target-roi-def/){:target="_blank"} object which includes a task that generated the result. | -| [`getTaskName`]({{ site.dcv_android_api }}core/basic-structures/captured-result-item.html#gettaskname) | The name of the task that generated the result. | - -### getLocation - -Returns a [Quadrilateral]({{ site.dcv_android_api }}core/basic-structures/quadrilateral.html) object that represents the location of the detected quadrilateral within the image or frame. - -```java -Quadrilateral getLocation(); -``` - -**Return Value** - -The location of current object. - -### getConfidenceAsDocumentBoundary - -Returns the confidence score of the detected quadrilateral's boundary, measuring the certainty that the detected quadrilateral represents the boundary of a document. - -```java -int getConfidenceAsDocumentBoundary(); -``` - -**Return Value** - -The confidence as document boundary of current object. diff --git a/programming/android/api-reference/normalized-image-result-item-v2.4.2000.md b/programming/android/api-reference/normalized-image-result-item-v2.4.2000.md deleted file mode 100644 index 8d8098c..0000000 --- a/programming/android/api-reference/normalized-image-result-item-v2.4.2000.md +++ /dev/null @@ -1,63 +0,0 @@ ---- -layout: default-layout -title: NormalizedImageResultItem - Dynamsoft Document Normalizer Android SDK API Reference -description: The class NormalizedImageResultItem represents a captured result item whose type is a normalized image. It stores the normalized image information. -keywords: normalized image result item, java, kotlin -needGenerateH3Content: true -needAutoGenerateSidebar: true -noTitleIndex: true ---- - -# NormalizedImageResultItem - -The `NormalizedImageResultItem` class is an extension of [`CapturedResultItem`]({{ site.dcv_android_api }}core/basic-structures/captured-result-item.html) that represents a normalized image. This is the most basic unit of the normalized image result, one of the captured result types that the Capture Vision Router can output. - -## Definition - -*Namespace:* com.dynamsoft.ddn - -*Assembly:* DynamsoftDocumentNormalizer.aar - -```java -class NormalizedImageResultItem extends CapturedResultItem -``` - -## Methods - -| Methods | Description | -| ---------- | ----------- | -| [`getImageData`](#getimagedata) | Gets an `ImageData` object as the normalized image. | -| [`getLocation`](#getlocation) | The quadrilateral from which you get the normalized image result item. | - -The following methods are inherited from [`CapturedResultItem`]({{ site.dcv_android_api }}core/basic-structures/captured-result-item.html). - -| Method | Description | -| ------ | ----------- | -| [`getType`]({{ site.dcv_android_api }}core/basic-structures/captured-result-item.html#gettype) | Get the type of the captured result item, indicating what kind of data it represents. | -| [`getReferencedItem`]({{ site.dcv_android_api }}core/basic-structures/captured-result-item.html#getreferenceditem) | Get a property of type `CapturedResultItem` that represents a reference to another captured result item. | -| [`getTargetROIDefName`]({{ site.dcv_android_api }}core/basic-structures/captured-result-item.html#gettargetroidefname) | Gets the name of the [`TargetROIDef`]({{ site.dcv_parameters_reference }}target-roi-def/) object which includes a task that generated the result. | -| [`getTaskName`]({{ site.dcv_android_api }}core/basic-structures/captured-result-item.html#gettaskname) | The name of the task that generated the result. | - -### getImageData - -Returns an [`ImageData`]({{ site.dcv_android_api }}core/basic-structures/image-data.html) object for the normalized image. - -```java -ImageData getImageData(); -``` - -**Return Value** - -The `ImageData` object as the normalized image. - -### getLocation - -Returns the [Quadrilateral]({{ site.dcv_android_api }}core/basic-structures/quadrilateral.html) that represents the location of the normalized image within the original image or frame. - -```java -Quadrilateral getLocation(); -``` - -**Return Value** - -The quadrilateral from which you get the normalized image result item. diff --git a/programming/android/api-reference/simplified-document-normalizer-settings-v2.2.3000.md b/programming/android/api-reference/simplified-document-normalizer-settings-v2.2.3000.md deleted file mode 100644 index 0e73c87..0000000 --- a/programming/android/api-reference/simplified-document-normalizer-settings-v2.2.3000.md +++ /dev/null @@ -1,132 +0,0 @@ ---- -layout: default-layout -title: SimplifiedDocumentNormalizerSettings - Dynamsoft Document Normalizer module Android Edition API Reference -description: The class SimplifiedDocumentNormalizerSettings of Dynamsoft Document Normalizer module Android edition represents the simplified document normalizer settings. -keywords: document normalizer settings, Android, java -needGenerateH3Content: true -needAutoGenerateSidebar: true -noTitleIndex: true ---- - -# SimplifiedDocumentNormalizerSettings - -The `SimplifiedDocumentNormalizerSettings` class represents a series of simple settings related to the Document Normalizer. Please note that this is not the full list of settings that can be utilized by the Document Normalizer, which you can find on the [Dynamsoft Document Normalizer Parameters]({{ site.parameters }}reference/index.html){:target="_blank"} page. - -## Definition - -*Namespace:* com.dynamsoft.ddn - -*Assembly:* DynamsoftDocumentNormalizer.aar - -```java -class SimplifiedDocumentNormalizerSettings -``` - -## Methods & Attributes - -| Attributes | Type | Description | -| ---------- | ---- | ----------- | -| [`grayscaleTransformationModes`](#grayscaletransformationmodes) | *EnumGrayscaleTransformationMode[]* | An array of GrayscaleTransformationMode. It controls whether to detect the inverted document boundary. | -| [`grayscaleEnhancementModes`](#grayscaleenhancementmodes) | *EnumGrayscaleEnhancementModes[]* | An array of GrayscaleEnhancementModes. | -| [`colourMode`](#colourmode) | *EnumImageColourMode* | The grayscale transformation mode. It controls whether to decode the inverted text. | -| [`pageSize`](#pagesize) | *int[]* | The page size. | -| [`brightness`](#brightness) | *int* | The brightness. | -| [`contrast`](#contrast) | *int* | The contrast. | -| [`maxThreadsInOneTask`](#maxthreadsinonetask) | *int* | The maximum number of threads in one task. | -| [`scaleDownThreshold`](#scaledownthreshold) | *int* | The scale down threshold. | - -| Methods | Description | -| [`toJson`](#tojson) | Generate a JSON string from this `SimplifiedDocumentNormalizerSettings` object. | -| [`fromJson`](#fromjson) | Create a `SimplifiedDocumentNormalizerSettings` object from a JSON string. | - -### grayscaleTransformationModes - -Defines the grayscale transformation modes with an array of [`EnumGrayscaleTransformationMode`]({{ site.dcv_enumerations }}core/grayscale-transformation-mode.html?lang=android) items. This parameter is important when working with inverted documents, and must be used in order to locate the inverted document boundary. - -```java -EnumGrayscaleTransformationMode[] grayscaleTransformationModes; -``` - -### grayscaleEnhancementModes - -Defines the grayscale enhancement modes with an array of [`EnumGrayscaleEnhancementModes`]({{ site.dcv_enumerations }}core/grayscale-enhancement-modes.html?lang=android) items. This parameter can be quite powerful in increasing the border detection rate of your application should you experience any trouble in that area. To learn more about the `grayscaleEnhancementModes` and how they can be used, please visit the main [GrayscaleEnhancementModes]({{ site.dcv_parameters }}reference/image-parameter/grayscale-enhancement-modes.html) parameter page. - -```java -EnumGrayscaleEnhancementMode[] grayscaleEnhancementModes; -``` - -### colourMode - -Defines the colour mode of the normalized image with an [`EnumImageColourMode`]({{ site.dcv_enumerations }}document-normalizer/image-colour-mode.html?lang=android) member. By default, the normalized image will output in colour. In order to make the result image grayscale or binary, setting the `colourMode` to the corresponding pixel type will do the trick. - -```java -EnumImageColourMode colourMode; -``` - -### pageSize - -Defines the page size of the normalized image through an integer array. - -```java -int[] pageSize; -``` - -### brightness - -Defines the brightness of the normalized image result with an integer. - -```java -int brightness; -``` - -### contrast - -Defines the contrast of the normalized image result with an integer. - -```java -int contrast; -``` - -### maxThreadsInOneTask - -Defines the maximum number of threads dedicated to a single task. - -```java -int maxThreadsInOneTask; -``` - -### scaleDownThreshold - -If the original image size is quite large, then the `scaledownThreshold` can be used to shrink the image and speed up the processing. If the shorter edge size is larger than the defined scale down threshold, the library will calculate the required width and height of the image and shrink it to that size before moving forward in the process. - -```java -int scaleDownThreshold; -``` - -### toJson - -Generate a JSON string from this `SimplifiedDocumentNormalizerSettings` object. - -```java -String toJson() -``` - -**Return Value** - -A JSON string that contains all the information of this object. - -### fromJson - -Create a `SimplifiedDocumentNormalizerSettings` object from a JSON string. - -```java -static SimplifiedDocumentNormalizerSettings fromJson(String json); -``` - -**Parameters** - -* `json`: A JSON string that contains all `SimplifiedDocumentNormalizerSettings` required information. - -**Return Value** - -A `SimplifiedDocumentNormalizerSettings` object. diff --git a/programming/android/user-guide-v2.2.3000.md b/programming/android/user-guide-v2.2.3000.md deleted file mode 100644 index 9bb968f..0000000 --- a/programming/android/user-guide-v2.2.3000.md +++ /dev/null @@ -1,368 +0,0 @@ ---- -layout: default-layout -title: Detect and Normalize Document - Android User Guide -description: This page introduce how to detect and normalize document with Dynamsoft Capture Vision Android SDK. -keywords: user guide, android, document scanner -needAutoGenerateSidebar: true -needGenerateH4Content: true -noTitleIndex: true -permalink: /programming/android/user-guide-v2.2.3000.html ---- - -# Android User Guide for Document Scanner Integration - -In this guide, you will learn step by step on how to build a document scanner application with Dynamsoft Capture Vision Android SDK. - -- [Android User Guide for Document Scanner Integration](#android-user-guide-for-document-scanner-integration) - - [Requirements](#requirements) - - [Add the SDK](#add-the-sdk) - - [Build Your First Application](#build-your-first-application) - - [Create a New Project](#create-a-new-project) - - [Include the Library](#include-the-library) - - [Initialize License](#initialize-license) - - [MainActivity for Realtime Document Normalization](#mainactivity-for-realtime-document-normalization) - - [Initialize Camera Module](#initialize-camera-module) - - [Initialize Capture Vision Router](#initialize-capture-vision-router) - - [Add a Captured Result Receiver and Filter](#add-a-captured-result-receiver-and-filter) - - [Start and Stop Video Document Normalization](#start-and-stop-video-document-normalization) - - [Additional Steps in MainActivity](#additional-steps-in-mainactivity) - - [ResultActivity for Displaying the Normalized Image](#resultactivity-for-displaying-the-normalized-image) - - [Display the Normalized Image](#display-the-normalized-image) - - [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 2022.2.1 or higher. - -## Add the SDK - -1. Open the file `[App Project Root Path]\app\build.gradle` and add the Maven repository: - - ```groovy - allprojects { - repositories { - maven { - url "https://download2.dynamsoft.com/maven/aar" - } - } - } - ``` - -2. Add the references in the dependencies: - - ```groovy - dependencies { - implementation 'com.dynamsoft:dynamsoftcapturevisionbundle:2.2.3000' - } - ``` - - > Read more about the modules of [dynamsoftcapturevisionbundle]({{site.dcv_android_api}}index.html) - -## Build Your First Application - -In this section, let's see how to create a HelloWorld app for detecting and normalizing documents from camera video input. - ->Note: -> -> - Android Studio 2022.2.1 is used here in this guide. -> - You can get the source code of the HelloWorld app from the following link -> - [DocumentScanner Android Sample](https://github.com/Dynamsoft/capture-vision-mobile-samples/tree/dcv_v2.6.1003/Android/DocumentScanner){:target="_blank"}. - -### Create a New Project - -1. Open Android Studio, select **File > New > New Project**. - -2. Choose the correct template for your project. In this sample, we use **Empty Activity**. - -3. When prompted, choose your app name 'HelloWorld' and set the **Save** location, **Language**, and **Minimum SDK** (we use 21 here). - > Note: - > - > - With **minSdkVersion** set to 21, your app is compatible with more than 94.1% of devices on the Google Play Store (last update: March 2021). - -### Include the Library - -Add the SDK to your new project. Please read [Add the SDK](#add-the-sdk) section for more details. - -### Initialize License - -1. Import the `LicenseManager` class and initialize the license in the file `MyApplication.java`. - - ```java - import com.dynamsoft.license.LicenseManager; - - public class MyApplication extends Application { - private static final String TAG = "MyApplication"; - private static final String LICENSE = "DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9"; - - @Override - public void onCreate() { - super.onCreate(); - LicenseManager.initLicense(LICENSE, this, (isSuccess, error) -> { - if (!isSuccess) { - Log.e(TAG, "InitLicense Error: " + error); - } - }); - } - } - ``` - - >Note: - > - >- The license string here grants a time-limited free trial which requires network connection to work. - >- You can request a 30-day trial license via the [Request a Trial License](https://www.dynamsoft.com/customer/license/trialLicense?product=ddn&utm_source=guide&package=android){:target="_blank"} link - -### MainActivity for Realtime Document Normalization - -#### 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 camera module, initialize the camera view and bind to the created Camera Enhancer instance in the file `MainActivity.java`. - - ```java - ... - - import com.dynamsoft.dce.CameraView; - import com.dynamsoft.dce.CameraEnhancer; - import com.dynamsoft.dce.CameraEnhancerException; - import com.dynamsoft.dce.utils.PermissionUtil; - - public class MainActivity extends AppCompatActivity { - private CameraEnhancer mCamera; - - @Override - protected void onCreate(Bundle savedInstanceState) { - - ... - - CameraView cameraView = findViewById(R.id.camera_view); - mCamera = new CameraEnhancer(cameraView, MainActivity.this); - - PermissionUtil.requestCameraPermission(MainActivity.this); - } - } - ``` - -#### Initialize Capture Vision Router - -1. Import and initialize the capture vision router, and set the created Camera Enhancer instance as the input image source. - - ```java - ... - - import com.dynamsoft.cvr.CaptureVisionRouter; - import com.dynamsoft.cvr.CaptureVisionException; - - public class MainActivity extends AppCompatActivity { - - ... - - private CaptureVisionRouter mRouter; - - @Override - protected void onCreate(Bundle savedInstanceState) { - - ... - - mRouter = new CaptureVisionRouter(MainActivity.this); - try { - mRouter.setInput(mCamera); - } catch (CaptureVisionRouterException e) { - e.printStackTrace(); - } - } - } - ``` - -#### Add a Captured Result Receiver and Filter - -1. Add a result receiver to get the normalized image results. - - ```java - ... - - import com.dynamsoft.core.basic_structures.CapturedResultReceiver; - import com.dynamsoft.core.basic_structures.ImageData; - import com.dynamsoft.cvr.EnumPresetTemplate; - import com.dynamsoft.ddn.NormalizedImagesResult; - - public class MainActivity extends AppCompatActivity { - - ... - - public static ImageData mNormalizedImageData; - private boolean mJumpToOtherActivity = false; - - @Override - protected void onCreate(Bundle savedInstanceState) { - - ... - - mRouter.addResultReceiver(new CapturedResultReceiver() { - @Override - public void onNormalizedImagesReceived(NormalizedImagesResult result) { - if (mJumpToOtherActivity && result.getItems().length > 0) { - mJumpToOtherActivity = false; - - mNormalizedImageData = result.getItems()[0].getImageData(); - - Intent intent = new Intent(MainActivity.this, ResultActivity.class); - startActivity(intent); - } - } - }); - } - } - ``` - -2. Add a result cross filter to validate the normalized image result across multiple frames. - - ```java - ... - - import com.dynamsoft.utility.MultiFrameResultCrossFilter; - - public class MainActivity extends AppCompatActivity { - - ... - - @Override - protected void onCreate(Bundle savedInstanceState) { - - ... - MultiFrameResultCrossFilter filter = new MultiFrameResultCrossFilter(); - filter.enableResultCrossVerification(CRIT_NORMALIZED_IMAGE, true); - mRouter.addResultFilter(filter); - } - } - ``` - -#### Start and Stop Video Document Normalization - -1. Override the `MainActivity.onResume` function to open camera and start video document normalization, override the `MainActivity.onPause` function to close camera and stop video document normalization. - - ```java - public class MainActivity extends AppCompatActivity { - - ... - - @Override - public void onResume() { - super.onResume(); - try { - mCamera.open(); - mRouter.startCapturing(EnumPresetTemplate.PT_DETECT_AND_NORMALIZE_DOCUMENT, null); - } catch (CameraEnhancerException | CaptureVisionRouterException e) { - e.printStackTrace(); - } - } - - @Override - public void onPause() { - super.onPause(); - try { - mCamera.close(); - } catch (CameraEnhancerException e) { - e.printStackTrace(); - } - - mRouter.stopCapturing(); - } - } - ``` - -2. Add `onCaptureBtnClick` function to start the video document normalization. After start capturing, the SDK will process the video frames from the Camera Enhancer, then send the normalized image results to the registered result receiver. - - ```java - public class MainActivity extends AppCompatActivity { - - ... - - public void onCaptureBtnClick(View v) { - mJumpToOtherActivity = true; - } - } - ``` - -#### Additional Steps in MainActivity - -1. In the Project window, open **app > res > layout > `activity_main.xml`**, create a button under the root node to capture the quads detected on the image. - - ```xml - ... - -