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
- ...
-
-
- ```
-
-### ResultActivity for Displaying the Normalized Image
-
-#### Display the Normalized Image
-
-1. Create a new empty activity named `ResultActivity`.
-
-2. In the Project window, open **app > res > layout > `activity_result.xml`**, create a image view under the root node to display the result image.
-
- ```xml
-
- ```
-
-3. Display the normalized image.
-
- ```java
- import com.dynamsoft.core.basic_structures.CoreException;
-
- public class ResultActivity extends AppCompatActivity {
-
- @Override
- protected void onCreate(@Nullable Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- setContentView(R.layout.activity_result);
-
- ImageView ivNormalize = findViewById(R.id.iv_normalize);
-
- try {
- ivNormalize.setImageBitmap(MainActivity.mNormalizedImageData.toBitmap());
- } catch (CoreException e) {
- e.printStackTrace();
- }
- }
- }
- ```
-
-### 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 the **Run app** button, then Android Studio installs your app on your connected device and starts it.
-
-You can download the similar source code here:
-
-- [Java](https://github.com/Dynamsoft/capture-vision-mobile-samples/tree/main/android/DocumentScanner/AutoNormalize){:target="_blank"}.
-- [Kotlin](https://github.com/Dynamsoft/capture-vision-mobile-samples/tree/main/android/DocumentScanner/AutoNormalizeKt){:target="_blank"}.
diff --git a/programming/android/user-guide-v2.4.2000.md b/programming/android/user-guide-v2.4.2000.md
deleted file mode 100644
index 4269d3c..0000000
--- a/programming/android/user-guide-v2.4.2000.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.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.4.2000'
- }
- ```
-
- > 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 similar 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
- ...
-
-
- ```
-
-### ResultActivity for Displaying the Normalized Image
-
-#### Display the Normalized Image
-
-1. Create a new empty activity named `ResultActivity`.
-
-2. In the Project window, open **app > res > layout > `activity_result.xml`**, create a image view under the root node to display the result image.
-
- ```xml
-
- ```
-
-3. Display the normalized image.
-
- ```java
- import com.dynamsoft.core.basic_structures.CoreException;
-
- public class ResultActivity extends AppCompatActivity {
-
- @Override
- protected void onCreate(@Nullable Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- setContentView(R.layout.activity_result);
-
- ImageView ivNormalize = findViewById(R.id.iv_normalize);
-
- try {
- ivNormalize.setImageBitmap(MainActivity.mNormalizedImageData.toBitmap());
- } catch (CoreException e) {
- e.printStackTrace();
- }
- }
- }
- ```
-
-### 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 the **Run app** button, then Android Studio installs your app on your connected device and starts it.
-
-You can download the similar source code here:
-
-- [Java](https://github.com/Dynamsoft/capture-vision-mobile-samples/tree/main/android/DocumentScanner/AutoNormalize){:target="_blank"}.
-- [Kotlin](https://github.com/Dynamsoft/capture-vision-mobile-samples/tree/main/android/DocumentScanner/AutoNormalizeKt){:target="_blank"}.
diff --git a/programming/android/user-guide-v2.6.1000.md b/programming/android/user-guide-v2.6.1000.md
deleted file mode 100644
index f3e1aae..0000000
--- a/programming/android/user-guide-v2.6.1000.md
+++ /dev/null
@@ -1,403 +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.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.6.1000'
- }
- ```
-
- > 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 similar 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 {
- super.onCreate(savedInstanceState);
- setContentView(R.layout.activity_main);
- LicenseManager.initLicense("DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9", this, (isSuccess, error) -> {
- if (!isSuccess) {
- Log.e("License", "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.CaptureVisionRouterException;
-
- 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 (result.getItems().length > 0) {
- NormalizedImageResultItem normalizedImageResultItem = result.getItems()[0];
- if (normalizedImageResultItem.getCrossVerificationStatus() == EnumCrossVerificationStatus.CVS_PASSED || mJumpToOtherActivity)
- {
- 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.core.basic_structures.EnumCapturedResultItemType;
- import com.dynamsoft.utility.MultiFrameResultCrossFilter;
-
- public class MainActivity extends AppCompatActivity {
-
- ...
-
- @Override
- protected void onCreate(Bundle savedInstanceState) {
-
- ...
- MultiFrameResultCrossFilter filter = new MultiFrameResultCrossFilter();
- filter.enableResultCrossVerification(EnumCapturedResultItemType.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, new CompletionListener() {
- @Override
- public void onSuccess() {
-
- }
- @Override
- public void onFailure(int i, String s) {
- Log.e(TAG, "onFailure: "+s);
- }
- });
- } catch (CameraEnhancerException 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
- ...
-
-
- ```
-
-### ResultActivity for Displaying the Normalized Image
-
-#### Display the Normalized Image
-
-1. Create a new empty activity named `ResultActivity`.
-
-2. In the AndroidManifest.xml file, declare the `ResultActivity`.
-
- ```xml
-
- ...
-
-
-
-
-
-
-
-
-
-
-
- ...
-
- ```
-
-3. In the Project window, open **app > res > layout > `activity_result.xml`**, create a image view under the root node to display the result image.
-
- ```xml
-
- ```
-
-4. Display the normalized image.
-
- ```java
- import android.os.Bundle;
- import android.widget.ImageView;
-
- import androidx.annotation.Nullable;
- import androidx.appcompat.app.AppCompatActivity;
- import com.dynamsoft.core.basic_structures.CoreException;
-
- public class ResultActivity extends AppCompatActivity {
-
- @Override
- protected void onCreate(@Nullable Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- setContentView(R.layout.activity_result);
-
- ImageView ivNormalize = findViewById(R.id.iv_normalize);
-
- try {
- ivNormalize.setImageBitmap(MainActivity.mNormalizedImageData.toBitmap());
- } catch (CoreException e) {
- e.printStackTrace();
- }
- }
- }
- ```
-
-### 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 the **Run app** button, then Android Studio installs your app on your connected device and starts it.
-
-You can download the similar source code here:
-
-- [Java](https://github.com/Dynamsoft/capture-vision-mobile-samples/tree/main/android/DocumentScanner/AutoNormalize){:target="_blank"}.
-- [Kotlin](https://github.com/Dynamsoft/capture-vision-mobile-samples/tree/main/android/DocumentScanner/AutoNormalizeKt){:target="_blank"}.
diff --git a/programming/android/user-guide-v2.6.1001.md b/programming/android/user-guide-v2.6.1001.md
deleted file mode 100644
index c542b97..0000000
--- a/programming/android/user-guide-v2.6.1001.md
+++ /dev/null
@@ -1,403 +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.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.6.1001'
- }
- ```
-
- > 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 similar 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 {
- super.onCreate(savedInstanceState);
- setContentView(R.layout.activity_main);
- LicenseManager.initLicense("DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9", this, (isSuccess, error) -> {
- if (!isSuccess) {
- Log.e("License", "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.CaptureVisionRouterException;
-
- 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 (result.getItems().length > 0) {
- NormalizedImageResultItem normalizedImageResultItem = result.getItems()[0];
- if (normalizedImageResultItem.getCrossVerificationStatus() == EnumCrossVerificationStatus.CVS_PASSED || mJumpToOtherActivity)
- {
- 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.core.basic_structures.EnumCapturedResultItemType;
- import com.dynamsoft.utility.MultiFrameResultCrossFilter;
-
- public class MainActivity extends AppCompatActivity {
-
- ...
-
- @Override
- protected void onCreate(Bundle savedInstanceState) {
-
- ...
- MultiFrameResultCrossFilter filter = new MultiFrameResultCrossFilter();
- filter.enableResultCrossVerification(EnumCapturedResultItemType.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, new CompletionListener() {
- @Override
- public void onSuccess() {
-
- }
- @Override
- public void onFailure(int i, String s) {
- Log.e(TAG, "onFailure: "+s);
- }
- });
- } catch (CameraEnhancerException 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
- ...
-
-
- ```
-
-### ResultActivity for Displaying the Normalized Image
-
-#### Display the Normalized Image
-
-1. Create a new empty activity named `ResultActivity`.
-
-2. In the AndroidManifest.xml file, declare the `ResultActivity`.
-
- ```xml
-
- ...
-
-
-
-
-
-
-
-
-
-
-
- ...
-
- ```
-
-3. In the Project window, open **app > res > layout > `activity_result.xml`**, create a image view under the root node to display the result image.
-
- ```xml
-
- ```
-
-4. Display the normalized image.
-
- ```java
- import android.os.Bundle;
- import android.widget.ImageView;
-
- import androidx.annotation.Nullable;
- import androidx.appcompat.app.AppCompatActivity;
- import com.dynamsoft.core.basic_structures.CoreException;
-
- public class ResultActivity extends AppCompatActivity {
-
- @Override
- protected void onCreate(@Nullable Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- setContentView(R.layout.activity_result);
-
- ImageView ivNormalize = findViewById(R.id.iv_normalize);
-
- try {
- ivNormalize.setImageBitmap(MainActivity.mNormalizedImageData.toBitmap());
- } catch (CoreException e) {
- e.printStackTrace();
- }
- }
- }
- ```
-
-### 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 the **Run app** button, then Android Studio installs your app on your connected device and starts it.
-
-You can download the similar source code here:
-
-- [Java](https://github.com/Dynamsoft/capture-vision-mobile-samples/tree/main/android/DocumentScanner/AutoNormalize){:target="_blank"}.
-- [Kotlin](https://github.com/Dynamsoft/capture-vision-mobile-samples/tree/main/android/DocumentScanner/AutoNormalizeKt){:target="_blank"}.
diff --git a/programming/android/user-guide-v2.6.1002.md b/programming/android/user-guide-v2.6.1002.md
deleted file mode 100644
index 7cd555c..0000000
--- a/programming/android/user-guide-v2.6.1002.md
+++ /dev/null
@@ -1,403 +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.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.6.1002'
- }
- ```
-
- > 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 similar 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 {
- super.onCreate(savedInstanceState);
- setContentView(R.layout.activity_main);
- LicenseManager.initLicense("DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9", this, (isSuccess, error) -> {
- if (!isSuccess) {
- Log.e("License", "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.CaptureVisionRouterException;
-
- 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 (result.getItems().length > 0) {
- NormalizedImageResultItem normalizedImageResultItem = result.getItems()[0];
- if (normalizedImageResultItem.getCrossVerificationStatus() == EnumCrossVerificationStatus.CVS_PASSED || mJumpToOtherActivity)
- {
- 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.core.basic_structures.EnumCapturedResultItemType;
- import com.dynamsoft.utility.MultiFrameResultCrossFilter;
-
- public class MainActivity extends AppCompatActivity {
-
- ...
-
- @Override
- protected void onCreate(Bundle savedInstanceState) {
-
- ...
- MultiFrameResultCrossFilter filter = new MultiFrameResultCrossFilter();
- filter.enableResultCrossVerification(EnumCapturedResultItemType.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, new CompletionListener() {
- @Override
- public void onSuccess() {
-
- }
- @Override
- public void onFailure(int i, String s) {
- Log.e(TAG, "onFailure: "+s);
- }
- });
- } catch (CameraEnhancerException 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
- ...
-
-
- ```
-
-### ResultActivity for Displaying the Normalized Image
-
-#### Display the Normalized Image
-
-1. Create a new empty activity named `ResultActivity`.
-
-2. In the AndroidManifest.xml file, declare the `ResultActivity`.
-
- ```xml
-
- ...
-
-
-
-
-
-
-
-
-
-
-
- ...
-
- ```
-
-3. In the Project window, open **app > res > layout > `activity_result.xml`**, create a image view under the root node to display the result image.
-
- ```xml
-
- ```
-
-4. Display the normalized image.
-
- ```java
- import android.os.Bundle;
- import android.widget.ImageView;
-
- import androidx.annotation.Nullable;
- import androidx.appcompat.app.AppCompatActivity;
- import com.dynamsoft.core.basic_structures.CoreException;
-
- public class ResultActivity extends AppCompatActivity {
-
- @Override
- protected void onCreate(@Nullable Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- setContentView(R.layout.activity_result);
-
- ImageView ivNormalize = findViewById(R.id.iv_normalize);
-
- try {
- ivNormalize.setImageBitmap(MainActivity.mNormalizedImageData.toBitmap());
- } catch (CoreException e) {
- e.printStackTrace();
- }
- }
- }
- ```
-
-### 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 the **Run app** button, then Android Studio installs your app on your connected device and starts it.
-
-You can download the similar source code here:
-
-- [Java](https://github.com/Dynamsoft/capture-vision-mobile-samples/tree/main/android/DocumentScanner/AutoNormalize){:target="_blank"}.
-- [Kotlin](https://github.com/Dynamsoft/capture-vision-mobile-samples/tree/main/android/DocumentScanner/AutoNormalizeKt){:target="_blank"}.
diff --git a/programming/android/user-guide-v2.6.1003.md b/programming/android/user-guide-v2.6.1003.md
deleted file mode 100644
index 93cd08b..0000000
--- a/programming/android/user-guide-v2.6.1003.md
+++ /dev/null
@@ -1,403 +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.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.6.1003'
- }
- ```
-
- > 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 similar source code of the HelloWorld app from the following link
-> - [DocumentScanner Android Sample](https://github.com/Dynamsoft/capture-vision-mobile-samples/tree/main/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 {
- super.onCreate(savedInstanceState);
- setContentView(R.layout.activity_main);
- LicenseManager.initLicense("DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9", this, (isSuccess, error) -> {
- if (!isSuccess) {
- Log.e("License", "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.CaptureVisionRouterException;
-
- 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 (result.getItems().length > 0) {
- NormalizedImageResultItem normalizedImageResultItem = result.getItems()[0];
- if (normalizedImageResultItem.getCrossVerificationStatus() == EnumCrossVerificationStatus.CVS_PASSED || mJumpToOtherActivity)
- {
- 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.core.basic_structures.EnumCapturedResultItemType;
- import com.dynamsoft.utility.MultiFrameResultCrossFilter;
-
- public class MainActivity extends AppCompatActivity {
-
- ...
-
- @Override
- protected void onCreate(Bundle savedInstanceState) {
-
- ...
- MultiFrameResultCrossFilter filter = new MultiFrameResultCrossFilter();
- filter.enableResultCrossVerification(EnumCapturedResultItemType.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, new CompletionListener() {
- @Override
- public void onSuccess() {
-
- }
- @Override
- public void onFailure(int i, String s) {
- Log.e(TAG, "onFailure: "+s);
- }
- });
- } catch (CameraEnhancerException 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
- ...
-
-
- ```
-
-### ResultActivity for Displaying the Normalized Image
-
-#### Display the Normalized Image
-
-1. Create a new empty activity named `ResultActivity`.
-
-2. In the AndroidManifest.xml file, declare the `ResultActivity`.
-
- ```xml
-
- ...
-
-
-
-
-
-
-
-
-
-
-
- ...
-
- ```
-
-3. In the Project window, open **app > res > layout > `activity_result.xml`**, create a image view under the root node to display the result image.
-
- ```xml
-
- ```
-
-4. Display the normalized image.
-
- ```java
- import android.os.Bundle;
- import android.widget.ImageView;
-
- import androidx.annotation.Nullable;
- import androidx.appcompat.app.AppCompatActivity;
- import com.dynamsoft.core.basic_structures.CoreException;
-
- public class ResultActivity extends AppCompatActivity {
-
- @Override
- protected void onCreate(@Nullable Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- setContentView(R.layout.activity_result);
-
- ImageView ivNormalize = findViewById(R.id.iv_normalize);
-
- try {
- ivNormalize.setImageBitmap(MainActivity.mNormalizedImageData.toBitmap());
- } catch (CoreException e) {
- e.printStackTrace();
- }
- }
- }
- ```
-
-### 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 the **Run app** button, then Android Studio installs your app on your connected device and starts it.
-
-You can download the similar source code here:
-
-- [Java](https://github.com/Dynamsoft/capture-vision-mobile-samples/tree/main/android/DocumentScanner/AutoNormalize){:target="_blank"}.
-- [Kotlin](https://github.com/Dynamsoft/capture-vision-mobile-samples/tree/main/android/DocumentScanner/AutoNormalizeKt){:target="_blank"}.
diff --git a/programming/ios/api-reference/detected-quad-result-item-v2.4.2000.md b/programming/ios/api-reference/detected-quad-result-item-v2.4.2000.md
deleted file mode 100644
index 2dcda57..0000000
--- a/programming/ios/api-reference/detected-quad-result-item-v2.4.2000.md
+++ /dev/null
@@ -1,81 +0,0 @@
----
-layout: default-layout
-title: DSDetectedQuadResultItem - Dynamsoft Document Normalizer module iOS Edition API Reference
-description: The class DSDetectedQuadResultItem of Dynamsoft Document Normalizer module represents a captured result whose type is detected quads, which contains the location and confidence as a document boundary.
-keywords: detected quads, objective-c, swift
-needGenerateH3Content: true
-needAutoGenerateSidebar: true
-noTitleIndex: true
----
-
-# DSDetectedQuadResultItem
-
-The `DetectedQuadResultItem` class is an extension of the [`DSCapturedResultItem`]({{ site.dcv_ios_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
-
-*Assembly:* DynamsoftDocumentNormalizer.xcframework
-
-
->- Objective-C
->- Swift
->
->1.
-```objc
-NS_SWIFT_NAME(DetectedQuadResultItem)
-@interface DSDetectedQuadResultItem: DSCapturedResultItem
-```
-2.
-```swift
-class DetectedQuadResultItem: CapturedResultItem
-```
-
-## Attributes
-
-| Attributes | Type | Description |
-| ---------- | ---- | ----------- |
-| [`location`](#location) | *DSQuadrilateral* | A DSQuadrilateral object as the location of current object. |
-| [`confidenceAsDocumentBoundary`](#confidenceasdocumentboundary) | *NSInteger* | TThe confidence score of the detected quadrilateral's boundary, measuring the certainty that the detected quadrilateral represents the boundary of a document. |
-
-The following attributes are inherited from [`DSCapturedResultItem`]({{ site.dcv_ios_api }}core/basic-structures/captured-result-item.html).
-
-| Attributes | Type | Description |
-| ---------- | ---- | ----------- |
-| [`type`]({{ site.dcv_ios_api }}core/basic-structures/captured-result-item.html#type) | *DSCapturedResultItemType* | The type of the captured result item. |
-| [`referencedItem`]({{ site.dcv_ios_api }}core/basic-structures/captured-result-item.html#referenceditem) | *DSCapturedResultItem \** | The referenced captured result item. The reference dependencies is defined in the Capture Vision settings. |
-| [`targetROIDefName`]({{ site.dcv_ios_api }}core/basic-structures/captured-result-item.html#targetroidefname) | *NSString* | The name of the [`TargetROIDef`]({{ site.dcv_parameters_reference }}target-roi-def/){:target="_blank"} object which includes a task that generated the result. |
-| [`taskName`]({{ site.dcv_ios_api }}core/basic-structures/captured-result-item.html#taskname) | *NSString* | The name of the task that generated the result. |
-
-### location
-
-A [DSQuadrilateral]({{ site.dcv_ios_api }}core/basic-structures/quadrilateral.html) object that represents the location of the detected quadrilateral within the image or frame.
-
-
->- Objective-C
->- Swift
->
->1.
-```objc
-@property(nonatomic, nullable, readonly) DSQuadrilateral *location;
-```
-2.
-```swift
-var location: DSQuadrilateral? { get }
-```
-
-### confidenceAsDocumentBoundary
-
-The confidence score of the detected quadrilateral's boundary, measuring the certainty that the detected quadrilateral represents the boundary of a document.
-
-
->- Objective-C
->- Swift
->
->1.
-```objc
-@property(nonatomic, assign, readonly) NSInteger confidenceAsDocumentBoundary;
-```
-2.
-```swift
-var confidenceAsDocumentBoundary: Int { get }
-```
diff --git a/programming/ios/api-reference/normalized-image-result-item-v2.4.2000.md b/programming/ios/api-reference/normalized-image-result-item-v2.4.2000.md
deleted file mode 100644
index c2d8630..0000000
--- a/programming/ios/api-reference/normalized-image-result-item-v2.4.2000.md
+++ /dev/null
@@ -1,80 +0,0 @@
----
-layout: default-layout
-title: DSNormalizedImageResultItem - Dynamsoft Document Normalizer module iOS Edition API Reference
-description: The class DSNormalizedImageResultItem of Dynamsoft Document Normalizer module represents a captured result item whose type is a normalized image. It stores the normalized image information.
-keywords: normalized image result item, objective-c, swift
-needGenerateH3Content: true
-needAutoGenerateSidebar: true
-noTitleIndex: true
----
-
-# DSNormalizedImageResultItem
-
-The `DSNormalizedImageResultItem` class is an extension of [`DSCapturedResultItem`]({{ site.dcv_ios_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
-
-*Assembly:* DynamsoftDocumentNormalizer.xcframework
-
-
->- Objective-C
->- Swift
->
->1.
-```objc
-@interface DSNormalizedImageResultItem: DSCapturedResultItem
-```
-2.
-```swift
-class NormalizedImageResultItem : CapturedResultItem
-```
-
-## Attributes
-
-| Attributes | Type | Description |
-| ---------- | ---- | ----------- |
-| [`imageData`](#imagedata) | *DSImageData \** | A `DSImageData` object as the image data of a normalized image. |
-| [`location`](#location) | *DSQuadrilateral \** | The quadrilateral from which you get the normalized image result item. |
-
-The following attributes are inherited from [`DSCapturedResultItem`]({{ site.dcv_ios_api }}core/basic-structures/captured-result-item.html).
-
-| Attributes | Type | Description |
-| ---------- | ---- | ----------- |
-| [`type`]({{ site.dcv_ios_api }}core/basic-structures/captured-result-item.html#type) | *DSCapturedResultItemType* | The type of the captured result item. |
-| [`referencedItem`]({{ site.dcv_ios_api }}core/basic-structures/captured-result-item.html#referenceditem) | *DSCapturedResultItem \** | The referenced captured result item. The reference dependencies is defined in the Capture Vision settings. |
-| [`targetROIDefName`]({{ site.dcv_ios_api }}core/basic-structures/captured-result-item.html#targetroidefname) | *NSString* | The name of the [`TargetROIDef`]({{ site.dcv_parameters_reference }}target-roi-def/) object which includes a task that generated the result. |
-| [`taskName`]({{ site.dcv_ios_api }}core/basic-structures/captured-result-item.html#taskname) | *NSString* | The name of the task that generated the result. |
-
-### imageData
-
-A [`DSImageData`]({{ site.dcv_ios_api }}core/basic-structures/image-data.html) object for the normalized image.
-
-
->- Objective-C
->- Swift
->
->1.
-```objc
-@property (nonatomic, nullable, readonly) DSImageData *imageData
-```
-2.
-```swift
-var imageData: ImageData? { get }
-```
-
-### location
-
-The [DSQuadrilateral]({{ site.dcv_ios_api }}core/basic-structures/quadrilateral.html) that represents the location of the normalized image within the original image or frame.
-
-
->- Objective-C
->- Swift
->
->1.
-```objc
-@property (nonatomic, nullable, readonly) DSQuadrilateral *location
-```
-2.
-```swift
-var location: Quadrilateral? { get }
-```
diff --git a/programming/ios/api-reference/simplified-document-normalizer-settings-v2.2.3000.md b/programming/ios/api-reference/simplified-document-normalizer-settings-v2.2.3000.md
deleted file mode 100644
index ebcca70..0000000
--- a/programming/ios/api-reference/simplified-document-normalizer-settings-v2.2.3000.md
+++ /dev/null
@@ -1,179 +0,0 @@
----
-layout: default-layout
-title: DSSimplifiedDocumentNormalizerSettings - Dynamsoft Document Normalizer module iOS Edition API Reference
-description: The class DSSimplifiedDocumentNormalizerSettings of Dynamsoft Document Normalizer module represents the simplified document normalizer settings.
-keywords: document normalizer settings, objective-c, swift
-needGenerateH3Content: true
-needAutoGenerateSidebar: true
-noTitleIndex: true
----
-
-# DSSimplifiedDocumentNormalizerSettings
-
-The `DSSimplifiedDocumentNormalizerSettings` 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
-
-*Assembly:* DynamsoftCaptureVisionBundle.xcframework
-
-
->- Objective-C
->- Swift
->
->1.
-```objc
-@interface DSSimplifiedDocumentNormalizerSettings: NSObject
-```
-2.
-```swift
-class SimplifiedDocumentNormalizerSettings: NSObject
-```
-
-## Attributes
-
-| Attributes | Type | Description |
-| ---------- | ---- | ----------- |
-| [`grayscaleTransformationModes`](#grayscaletransformationmodes) | *NSArray* \* | An array of DSGrayscaleTransformationMode. It controls whether to detect the inverted document boundary. |
-| [`grayscaleEnhancementModes`](#grayscaleenhancementmodes) | *NSArray* \* | An array of DSGrayscaleEnhancementModes. |
-| [`colourMode`](#colourmode) | *DSImageColourMode \* | The grayscale transformation mode. It controls whether to decode the inverted text. |
-| [`pageSize`](#pagesize) | *CGSize \* | The page size. |
-| [`brightness`](#brightness) | *NSInteger \* | The brightness. |
-| [`contrast`](#contrast) | *NSInteger \* | The contrast. |
-| [`maxThreadsInOneTask`](#maxthreadsinonetask) | *NSInteger \* | The maximum number of threads in one task. |
-| [`scaleDownThreshold`](#scaledownthreshold) | *NSInteger \* | The scale down threshold. |
-
-### grayscaleTransformationModes
-
-Defines the grayscale transformation modes with an array of [`DSGrayscaleTransformationMode`]({{ site.dcv_enumerations }}core/grayscale-transformation-mode.html?lang=objc,swift) items. This parameter is important when working with inverted documents, and must be used in order to locate the inverted document boundary.
-
-
->- Objective-C
->- Swift
->
->1.
-```objc
-@property (nonatomic, nullable, copy) NSArray* grayscaleTransformationModes;
-```
-2.
-```swift
-var grayscaleTransformationModes: [NSNumber]? { get set }
-```
-
-### grayscaleEnhancementModes
-
-Defines the grayscale enhancement modes with an array of [`DSGrayscaleEnhancementModes`]({{ site.dcv_enumerations }}core/grayscale-enhancement-modes.html?lang=objc,swift) 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.
-
-
->- Objective-C
->- Swift
->
->1.
-```objc
-@property (nonatomic, nullable, copy) NSArray* grayscaleEnhancementModes;
-```
-2.
-```swift
-var grayscaleEnhancementModes: [NSNumber]? { get set }
-```
-
-### colourMode
-
-Defines the colour mode (pixel type) of the normalized image with a [`DSImageColourMode`]({{ site.dcv_enumerations }}document-normalizer/image-colour-mode.html?lang=objc,swift) 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.
-
-
->- Objective-C
->- Swift
->
->1.
-```objc
-@property (nonatomic, assign) DSImageColourMode colourMode;
-```
-2.
-```swift
-var colourMode: ImageColourMode { get set }
-```
-
-### pageSize
-
-Defines the page size of the normalized image with a [`CGSize`](https://developer.apple.com/documentation/corefoundation/cgsize){:target="_blank"} object.
-
-
->- Objective-C
->- Swift
->
->1.
-```objc
-@property (nonatomic, assign) CGSize pageSize;
-```
-2.
-```swift
-var pageSize: CGSize { get set }
-```
-
-### brightness
-
-Defines the brightness of the normalized image result with an integer.
-
-
->- Objective-C
->- Swift
->
->1.
-```objc
-@property (nonatomic, assign) NSInteger brightness;
-```
-2.
-```swift
-var brightness: Int { get set }
-```
-
-### contrast
-
-Defines the contrast of the normalized image result with an integer.
-
-
->- Objective-C
->- Swift
->
->1.
-```objc
-@property (nonatomic, assign) NSInteger contrast;
-```
-2.
-```swift
-var contrast: Int { get set }
-```
-
-### maxThreadsInOneTask
-
-Defines the maximum number of threads dedicated to a single task.
-
-
->- Objective-C
->- Swift
->
->1.
-```objc
-@property (nonatomic, assign) NSInteger maxThreadsInOneTask;
-```
-2.
-```swift
-var maxThreadsInOneTask: Int { get set }
-```
-
-### 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.
-
-
->- Objective-C
->- Swift
->
->1.
-```objc
-@property (nonatomic, assign) NSInteger scaleDownThreshold;
-```
-2.
-```swift
-var scaleDownThreshold: Int { get set }
-```
diff --git a/programming/ios/user-guide-v2.2.3000.md b/programming/ios/user-guide-v2.2.3000.md
deleted file mode 100644
index f8d74a6..0000000
--- a/programming/ios/user-guide-v2.2.3000.md
+++ /dev/null
@@ -1,568 +0,0 @@
----
-layout: default-layout
-title: Detect and Normalize Document - iOS User Guide
-description: This page introduce how to detect and normalize document with Dynamsoft Capture Vision iOS SDK.
-keywords: user guide, iOS, document scanner
-needAutoGenerateSidebar: true
-needGenerateH4Content: true
-noTitleIndex: true
-multiProgrammingLanguage: true
-enableLanguageSelection: true
----
-
-# iOS User Guide for Document Scanner Integration
-
-- [iOS User Guide for Document Scanner Integration](#ios-user-guide-for-document-scanner-integration)
- - [System Requirements](#system-requirements)
- - [Add the SDK](#add-the-sdk)
- - [Add the xcframeworks via CocoaPods](#add-the-xcframeworks-via-cocoapods)
- - [Add the xcframeworks via Swift Package Manager](#add-the-xcframeworks-via-swift-package-manager)
- - [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)
- - [Main ViewController for Realtime Detection of Quads](#main-viewcontroller-for-realtime-detection-of-quads)
- - [Get Prepared with the Camera Module](#get-prepared-with-the-camera-module)
- - [Initialize Capture Vision Router](#initialize-capture-vision-router)
- - [Set up Result Receiver](#set-up-result-receiver)
- - [Configure the methods viewDidLoad, viewWillAppear, and viewWillDisappear](#configure-the-methods-viewdidload-viewwillappear-and-viewwilldisappear)
- - [Display the Normalized Image](#display-the-normalized-image)
- - [Configure Camera Permissions](#configure-camera-permissions)
- - [Additional Steps for iOS 12.x or Lower Versions](#additional-steps-for-ios-12x-or-lower-versions)
- - [Build and Run the Project](#build-and-run-the-project)
-
-## System Requirements
-
-- Supported OS: iOS 11 or higher (iOS 13 and higher recommended).
-- Supported ABI: arm64 and x86_64.
-- Development Environment: Xcode 13 and above (Xcode 14.1+ recommended).
-
-## Add the SDK
-
-There are two ways to add the SDK into your project - **CocoaPods**, or via **Swift Package Manager**.
-
-### Add the xcframeworks via CocoaPods
-
-1. Add the frameworks in your **Podfile**.
-
- ```sh
- target 'HelloWorld' do
- use_frameworks!
-
- pod 'DynamsoftCaptureVisionBundle','2.2.3000'
-
- end
- ```
-
-2. Execute the pod command to install the frameworks and generate workspace(**HelloWorld.xcworkspace**):
-
- ```sh
- pod install
- ```
-
-### Add the xcframeworks via Swift Package Manager
-
-1. In your Xcode project, go to **File --> AddPackages**.
-
-2. In the top-right section of the window, search "https://github.com/Dynamsoft/capture-vision-spm"
-
-3. Select `capture-vision-spm`, choose `Exact version`, enter **2.2.3000**, then click **Add Package**.
-
-4. Check all the frameworks and add.
-
-
-
-## Build Your First Application
-
-This guide will walk you through the process of creating a HelloWorld app for detecting and normalizing documents via a camera video input.
-
->Note:
->
-> - Xcode 14.0 is used in this guide.
-> - You can get the source code of the HelloWorld app from the following link
-> - [DocumentScanner iOS Sample](https://github.com/Dynamsoft/capture-vision-mobile-samples/tree/dcv_v2.6.1003/ios/DocumentScanner/){:target="_blank"}.
-
-### Create a New Project
-
-1. Open Xcode and select create a new project.
-
-2. Select **iOS -> App** for your application.
-
-3. Input your product name (HelloWorld), interface (StoryBoard) and language (Objective-C/Swift).
-
-4. Click on the **Next** button and select the location to save the project.
-
-5. Click on the **Create** button to finish.
-
-### Include the Library
-
-Add the SDK to your new project. Please read [Add the SDK](#add-the-sdk) section for more details.
-
-### Initialize License
-
-Initialize the license first. It is suggested to initialize the license in `AppDelegate` file.
-
-
->- Objective-C
->- Swift
->
->1.
-```objc
-// Import the DynamsoftLicense module to init license
-#import
-// Add LicenseVerificationListener to the interface
-@interface AppDelegate ()
-@end
-@implementation AppDelegate
-- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
- // Override point for customization after application launch.
- [DSLicenseManager initLicense:@"Put your license key here." verificationDelegate:self];
- return YES;
-}
--(void)onLicenseVerified:(BOOL)isSuccess error:(NSError *)error
-{
- // Add your code to do when license server returns.
-}
-...
-@end
-```
-2.
-```swift
-// Import the DynamsoftLicense module to init license
-import DynamsoftLicense
-// Add LicenseVerificationListener to the interface
-class AppDelegate: UIResponder, UIApplicationDelegate, LicenseVerificationListener {
- var window: UIWindow?
- func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
- // Override point for customization after application launch.
- LicenseManager.initLicense("Put your license key here.", verificationDelegate: self)
- return true
- }
- // Implement the callback method of LicenseVerificationListener.
- func onLicenseVerified(_ isSuccess: Bool, error: Error?) {
- // Add your code to do when license server returns.
- }
- ...
-}
-```
-
->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=ddn&utm_source=guide&package=ios){:target="_blank"} link
-
-
-
-### Main ViewController for Realtime Detection of Quads
-
-In the main view controller, your app will scan documents via video streaming and display the detect quadrilateral area on the screen. First of all, import the headers in the ViewController file.
-
-
- >- Objective-C
- >- Swift
- >
- >1.
- ```objc
- #import
- #import
- #import
- #import
- #import
- ```
- 2.
- ```swift
- import DynamsoftCore
- import DynamsoftCaptureVisionRouter
- import DynamsoftDocumentNormalizer
- import DynamsoftUtility
- import DynamsoftCameraEnhancer
- ```
-
-#### Get Prepared with the Camera Module
-
-Create the instances of `CameraEnhancer` and `CameraView`.
-
-
->- Objective-C
->- Swift
->
->1.
-```objc
-@property (nonatomic, strong) DSCameraEnhancer *dce;
-@property (nonatomic, strong) DSCameraView *cameraView;
-...
-- (void)setUpCamera
-{
- _cameraView = [[DSCameraView alloc] initWithFrame:self.view.bounds];
- [_cameraView setAutoresizingMask:UIViewAutoresizingFlexibleWidth];
- [self.view addSubview:_cameraView];
- [_cameraView addSubview:_captureButton];
- _dce = [[DSCameraEnhancer alloc] init];
- [_dce setCameraView:_cameraView];
- DSDrawingLayer * layer = [_cameraView getDrawingLayer:DSDrawingLayerIdDDN];
- [layer setVisible:true];
- // You can enable the frame filter feature of Dynamsoft Camera Enhancer.
- //[_dce enableEnhancedFeatures:DSEnhancerFeatureFrameFilter];
-}
-```
-2.
-```swift
-var cameraView:CameraView!
-let dce:CameraEnhancer!
-...
-func setUpCamera() {
- // Create a camera view and add it as a sub view of the current view.
- cameraView = .init(frame: view.bounds)
- cameraView.autoresizingMask = [.flexibleWidth, .flexibleHeight]
- view.insertSubview(cameraView, at: 0)
- // Bind the camera enhancer with the camera view.
- dce = CameraEnhancer()
- dce.cameraView = cameraView
- // Additional step: Highlight the detected document boundary.
- let layer = cameraView.getDrawingLayer(DrawingLayerId.DDN.rawValue)
- layer?.visible = true
- // You can enable the frame filter feature of Dynamsoft Camera Enhancer.
- // dce.enableEnhancedFeatures(.frameFilter)
-}
-```
-
-#### Initialize Capture Vision Router
-
-Once the camera component is set up, declare and create an instance of `CaptureVisionRouter` and set its input to the Camera Enhancer object you created in the last step.
-
-
->- Objective-C
->- Swift
->
->1.
-```objc
-@property (nonatomic, strong) DSCaptureVisionRouter *cvr;
-...
-- (void)setUpCvr
-{
- _cvr = [[DSCaptureVisionRouter alloc] init];
-}
-```
-2.
-```swift
-let cvr:CaptureVisionRouter!
-func setUpDCV() {
- cvr = CaptureVisionRouter()
-}
-```
-
-Bind your `CaptureVisionRouter` instance with the created `CameraEnhancer` instance.
-
-
->- Objective-C
->- Swift
->
->1.
-```objc
-- (void)setUpCvr
-{
- ...
- NSError *cvrError;
- [_cvr setInput:_dce error:&cvrError];
-}
-```
-2.
-```swift
-func setUpCvr() {
- try? cvr.setInput(dce)
-}
-```
-
-#### Set up Result Receiver
-
-1. Add `CapturedResultReceiver` to your ViewController.
-
-
- >- Objective-C
- >- Swift
- >
- >1.
- ```objc
- @interface ViewController ()
- ```
- 2.
- ```swift
- class ViewController: UIViewController, CapturedResultReceiver {
- ...
- }
- ```
-
-2. Implement `onNormalizedImagesReceived` method to receive the normalized images as the captured results.
-
-
- >- Objective-C
- >- Swift
- >
- >1.
- ```objc
- -(void)onNormalizedImagesReceived:(DSNormalizedImagesResult *)result
- {
- if (_implementCapture && result!=nil && result.items[0].imageData!=nil)
- {
- _implementCapture = false;
- ImageViewController *imageViewController = [[ImageViewController alloc] init];
- NSError * error;
- imageViewController.resultUIImage = [result.items[0].imageData toUIImage:&error];
- dispatch_async(dispatch_get_main_queue(), ^{ [self.navigationController pushViewController:imageViewController animated:YES];
- });
- }
- }
- ```
- 2.
- ```swift
- func onNormalizedImagesReceived(_ result: NormalizedImagesResult) {
- print("Normalized image received")
- if let items = result.items, items.count > 0 {
- guard let data = items[0].imageData else {
- return
- }
- let resultView = ImageViewController()
- resultView.data = data
- if implementCapture
- {
- DispatchQueue.main.async {
- self.present(resultView, animated: true)
- }
- }
- }
- }
- ```
-
-3. Add the result receiver to the `CaptureVisionRouter`.
-
-
- >- Objective-C
- >- Swift
- >
- >1.
- ```objc
- - (void)setUpCvr
- {
- ...
- NSError *cvrError;
- [_cvr addResultReceiver:self error:&cvrError];
- DSMultiFrameResultCrossFilter *filter = [[DSMultiFrameResultCrossFilter alloc] init];
- [filter enableResultCrossVerification:DSCapturedResultItemTypeNormalizedImage isEnabled:true];
- [_cvr addResultFilter:filter error:&cvrError];
- }
- ```
- 2.
- ```swift
- func setUpCvr() {
- try? cvr.addResultReceiver(self)
- let filter = MultiFrameResultCrossFilter.init()
- filter.enableResultCrossVerification(.normalizedImage, isEnabled: true)
- try? cvr.addResultFilter(filter)
- }
- ```
-
-4. Add a `confirmCapture` button to confirm the result.
-
-
- >- Objective-C
- >- Swift
- >
- >1.
- ```objc
- @property (nonatomic, strong) UIButton *captureButton;
- ...
- - (void)addCaptureButton {
- [self.view addSubview:self.captureButton];
- }
- - (UIButton *)captureButton {
- NSLog(@"Start adding button");
- CGFloat screenWidth = [UIScreen mainScreen].bounds.size.width;
- CGFloat screenHeight = [UIScreen mainScreen].bounds.size.height;
- if (!_captureButton) {
- _captureButton = [UIButton buttonWithType:UIButtonTypeCustom];
- _captureButton.frame = CGRectMake((screenWidth - 150) / 2.0, screenHeight - 100, 150, 50);
- _captureButton.backgroundColor = [UIColor grayColor];
- _captureButton.layer.cornerRadius = 10;
- _captureButton.layer.borderColor = [UIColor darkGrayColor].CGColor;
- [_captureButton setTitle:@"Capture" forState:UIControlStateNormal];
- [_captureButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
- [_captureButton addTarget:self action:@selector(setCapture) forControlEvents:UIControlEventTouchUpInside];
- }
- return _captureButton;
- }
- ```
- 2.
- ```swift
- var captureButton:UIButton!
- var implementCapture:Bool = false
- ...
- func addCaptureButton()
- {
- let w = UIScreen.main.bounds.size.width
- let h = UIScreen.main.bounds.size.height
- let SafeAreaBottomHeight: CGFloat = UIApplication.shared.statusBarFrame.size.height > 20 ? 34 : 0
- let photoButton = UIButton(frame: CGRect(x: w / 2 - 60, y: h - 100 - SafeAreaBottomHeight, width: 120, height: 60))
- photoButton.setTitle("Capture", for: .normal)
- photoButton.backgroundColor = UIColor.green
- photoButton.addTarget(self, action: #selector(confirmCapture), for: .touchUpInside)
- DispatchQueue.main.async(execute: { [self] in
- view.addSubview(photoButton)
- })
- }
- @objc func confirmCapture()
- {
- implementCapture = true
- }
- ```
-
-#### Configure the methods viewDidLoad, viewWillAppear, and viewWillDisappear
-
-
->- Objective-C
->- Swift
->
->1.
-```objc
-- (void)viewDidLoad {
- [super viewDidLoad];
- [self setUpCamera];
- [self setUpCvr];
- [self addCaptureButton];
-}
-- (void)viewWillAppear:(BOOL)animated
-{
- [super viewWillAppear:animated];
- [_dce open];
- NSError *cvrError;
- [_cvr startCapturing:DSPresetTemplateDetectAndNormalizeDocument error:&cvrError];
-}
-- (void)viewWillDisappear:(BOOL)animated
-{
- [super viewWillAppear:animated];
- [_dce close];
-}
-```
-2.
-```swift
-override func viewDidLoad() {
- super.viewDidLoad()
- setUpCamera()
- setUpCvr()
- addCaptureButton()
-}
-override func viewWillAppear(_ animated: Bool) {
- super.viewWillAppear(animated)
- dce.open()
- try? cvr.startCapturing(PresetTemplate.detectAndNormalizeDocument.rawValue)
-}
-override func viewWillDisappear(_ animated: Bool) {
- super.viewWillDisappear(animated)
- dce.close()
-}
-```
-
-#### Display the Normalized Image
-
-1. Create a new `UIViewController` class `ImageViewController`.
-
-2. Add a property `normalizedImage` to the header file of `ImageViewController` (Objective-C only).
-
- ```objc
- @property (nonatomic, strong) UIImage * normalizedImage;
- ```
-
-2. Configure the `ImageViewController` to display the normalized image..
-
-
- >- Objective-C
- >- Swift
- >
- >1.
- ```objc
- #import "ImageViewController.h"
- #import
- @interface ImageViewController()
- @property (nonatomic, strong) UIImageView *imageView;
- @end
- @implementation ImageViewController
- -(void)viewDidLoad
- {
- NSLog(@"ImageViewController loaded");
- [super viewDidLoad];
- [self setUpView];
- }
- - (void)setUpView
- {
- _imageView = [[UIImageView alloc] initWithFrame:self.view.bounds];
- [self.view addSubview:_imageView];
- NSError *coreError;
- [_imageView setContentMode:UIViewContentModeScaleAspectFit];
- [_imageView setImage:self.normalizedImage];
- }
- @end
- ```
- 2.
- ```swift
- class ImageViewController: UIViewController{
- var normalizedImage:UIImage!
- var imageView:UIImageView!
- override func viewDidLoad() {
- super.viewDidLoad()
- setUpView()
- }
- func setUpView() {
- imageView = UIImageView.init(frame: view.bounds)
- imageView.contentMode = .scaleAspectFit
- view.addSubview(imageView)
- DispatchQueue.main.async { [self] in
- imageView.image = normalizedImage
- }
- }
- }
- ```
-
-
-
-### Configure Camera Permissions
-
-Add **Privacy - Camera Usage Description** to the `info.plist` of your project to request camera permission. An easy way to do this is to access your project settings, go to *Info* and then add this Privacy property to the iOS target properties list.
-
-### Additional Steps for iOS 12.x or Lower Versions
-
-If your iOS version is 12.x or lower, please add the following additional steps:
-
-1. Remove the methods `application:didDiscardSceneSessions:` and `application:configurationForConnectingSceneSession:options:` from your `AppDelegate` file.
-2. Remove the `SceneDelegate.Swift` file (`SceneDelegate.h` & `SceneDelegate.m` for Objective-C).
-3. Remove the `Application Scene Manifest` from your info.plist file.
-4. Declaire the window in your `AppDelegate.Swift` file (`AppDelegate.h` for Objective-C).
-
-
- >- Objective-C
- >- Swift
- >
- >1.
- ```objc
- @interface AppDelegate : UIResponder
- @property (strong, nonatomic) UIWindow *window;
- @end
- ```
- 2.
- ```swift
- import UIKit
- @main
- class AppDelegate: UIResponder, UIApplicationDelegate {
- var window: UIWindow?
- }
- ```
-
-### Build and Run the Project
-
-1. Select the device that you want to run your app on.
-2. Run the project, then your app will be installed on your device.
-
-> Note:
->
-> - You can get the source code of the HelloWorld app from the following link
-> - [Objective-C](https://github.com/Dynamsoft/capture-vision-mobile-samples/tree/main/ios/DocumentScanner/AutoNormalizeObjc){:target="_blank"}.
-> - [Swift](https://github.com/Dynamsoft/capture-vision-mobile-samples/tree/main/ios/DocumentScanner/AutoNormalize){:target="_blank"}.
diff --git a/programming/ios/user-guide-v2.4.2000.md b/programming/ios/user-guide-v2.4.2000.md
deleted file mode 100644
index d1d6c4e..0000000
--- a/programming/ios/user-guide-v2.4.2000.md
+++ /dev/null
@@ -1,568 +0,0 @@
----
-layout: default-layout
-title: Detect and Normalize Document - iOS User Guide
-description: This page introduce how to detect and normalize document with Dynamsoft Capture Vision iOS SDK.
-keywords: user guide, iOS, document scanner
-needAutoGenerateSidebar: true
-needGenerateH4Content: true
-noTitleIndex: true
-multiProgrammingLanguage: true
-enableLanguageSelection: true
----
-
-# iOS User Guide for Document Scanner Integration
-
-- [iOS User Guide for Document Scanner Integration](#ios-user-guide-for-document-scanner-integration)
- - [System Requirements](#system-requirements)
- - [Add the SDK](#add-the-sdk)
- - [Add the xcframeworks via CocoaPods](#add-the-xcframeworks-via-cocoapods)
- - [Add the xcframeworks via Swift Package Manager](#add-the-xcframeworks-via-swift-package-manager)
- - [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)
- - [Main ViewController for Realtime Detection of Quads](#main-viewcontroller-for-realtime-detection-of-quads)
- - [Get Prepared with the Camera Module](#get-prepared-with-the-camera-module)
- - [Initialize Capture Vision Router](#initialize-capture-vision-router)
- - [Set up Result Receiver](#set-up-result-receiver)
- - [Configure the methods viewDidLoad, viewWillAppear, and viewWillDisappear](#configure-the-methods-viewdidload-viewwillappear-and-viewwilldisappear)
- - [Display the Normalized Image](#display-the-normalized-image)
- - [Configure Camera Permissions](#configure-camera-permissions)
- - [Additional Steps for iOS 12.x or Lower Versions](#additional-steps-for-ios-12x-or-lower-versions)
- - [Build and Run the Project](#build-and-run-the-project)
-
-## System Requirements
-
-- Supported OS: iOS 11 or higher (iOS 13 and higher recommended).
-- Supported ABI: arm64 and x86_64.
-- Development Environment: Xcode 13 and above (Xcode 14.1+ recommended).
-
-## Add the SDK
-
-There are two ways to add the SDK into your project - **CocoaPods**, or via **Swift Package Manager**.
-
-### Add the xcframeworks via CocoaPods
-
-1. Add the frameworks in your **Podfile**.
-
- ```sh
- target 'HelloWorld' do
- use_frameworks!
-
- pod 'DynamsoftCaptureVisionBundle','2.4.2000'
-
- end
- ```
-
-2. Execute the pod command to install the frameworks and generate workspace(**HelloWorld.xcworkspace**):
-
- ```sh
- pod install
- ```
-
-### Add the xcframeworks via Swift Package Manager
-
-1. In your Xcode project, go to **File --> AddPackages**.
-
-2. In the top-right section of the window, search "https://github.com/Dynamsoft/capture-vision-spm"
-
-3. Select `capture-vision-spm`, choose `Exact version`, enter **2.4.2000**, then click **Add Package**.
-
-4. Check all the frameworks and add.
-
-
-
-## Build Your First Application
-
-This guide will walk you through the process of creating a HelloWorld app for detecting and normalizing documents via a camera video input.
-
->Note:
->
-> - Xcode 14.0 is used in this guide.
-> - You can get the source code of the HelloWorld app from the following link
-> - [DocumentScanner iOS Sample](https://github.com/Dynamsoft/capture-vision-mobile-samples/tree/dcv_v2.6.1003/ios/DocumentScanner/){:target="_blank"}.
-
-### Create a New Project
-
-1. Open Xcode and select create a new project.
-
-2. Select **iOS -> App** for your application.
-
-3. Input your product name (HelloWorld), interface (StoryBoard) and language (Objective-C/Swift).
-
-4. Click on the **Next** button and select the location to save the project.
-
-5. Click on the **Create** button to finish.
-
-### Include the Library
-
-Add the SDK to your new project. Please read [Add the SDK](#add-the-sdk) section for more details.
-
-### Initialize License
-
-Initialize the license first. It is suggested to initialize the license in `AppDelegate` file.
-
-
->- Objective-C
->- Swift
->
->1.
-```objc
-// Import the DynamsoftLicense module to init license
-#import
-// Add LicenseVerificationListener to the interface
-@interface AppDelegate ()
-@end
-@implementation AppDelegate
-- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
- // Override point for customization after application launch.
- [DSLicenseManager initLicense:@"Put your license key here." verificationDelegate:self];
- return YES;
-}
--(void)onLicenseVerified:(BOOL)isSuccess error:(NSError *)error
-{
- // Add your code to do when license server returns.
-}
-...
-@end
-```
-2.
-```swift
-// Import the DynamsoftLicense module to init license
-import DynamsoftLicense
-// Add LicenseVerificationListener to the interface
-class AppDelegate: UIResponder, UIApplicationDelegate, LicenseVerificationListener {
- var window: UIWindow?
- func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
- // Override point for customization after application launch.
- LicenseManager.initLicense("Put your license key here.", verificationDelegate: self)
- return true
- }
- // Implement the callback method of LicenseVerificationListener.
- func onLicenseVerified(_ isSuccess: Bool, error: Error?) {
- // Add your code to do when license server returns.
- }
- ...
-}
-```
-
->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=ddn&utm_source=guide&package=ios){:target="_blank"} link
-
-
-
-### Main ViewController for Realtime Detection of Quads
-
-In the main view controller, your app will scan documents via video streaming and display the detect quadrilateral area on the screen. First of all, import the headers in the ViewController file.
-
-
- >- Objective-C
- >- Swift
- >
- >1.
- ```objc
- #import
- #import
- #import
- #import
- #import
- ```
- 2.
- ```swift
- import DynamsoftCore
- import DynamsoftCaptureVisionRouter
- import DynamsoftDocumentNormalizer
- import DynamsoftUtility
- import DynamsoftCameraEnhancer
- ```
-
-#### Get Prepared with the Camera Module
-
-Create the instances of `CameraEnhancer` and `CameraView`.
-
-
->- Objective-C
->- Swift
->
->1.
-```objc
-@property (nonatomic, strong) DSCameraEnhancer *dce;
-@property (nonatomic, strong) DSCameraView *cameraView;
-...
-- (void)setUpCamera
-{
- _cameraView = [[DSCameraView alloc] initWithFrame:self.view.bounds];
- [_cameraView setAutoresizingMask:UIViewAutoresizingFlexibleWidth];
- [self.view addSubview:_cameraView];
- [_cameraView addSubview:_captureButton];
- _dce = [[DSCameraEnhancer alloc] init];
- [_dce setCameraView:_cameraView];
- DSDrawingLayer * layer = [_cameraView getDrawingLayer:DSDrawingLayerIdDDN];
- [layer setVisible:true];
- // You can enable the frame filter feature of Dynamsoft Camera Enhancer.
- //[_dce enableEnhancedFeatures:DSEnhancerFeatureFrameFilter];
-}
-```
-2.
-```swift
-var cameraView:CameraView!
-let dce:CameraEnhancer!
-...
-func setUpCamera() {
- // Create a camera view and add it as a sub view of the current view.
- cameraView = .init(frame: view.bounds)
- cameraView.autoresizingMask = [.flexibleWidth, .flexibleHeight]
- view.insertSubview(cameraView, at: 0)
- // Bind the camera enhancer with the camera view.
- dce = CameraEnhancer()
- dce.cameraView = cameraView
- // Additional step: Highlight the detected document boundary.
- let layer = cameraView.getDrawingLayer(DrawingLayerId.DDN.rawValue)
- layer?.visible = true
- // You can enable the frame filter feature of Dynamsoft Camera Enhancer.
- // dce.enableEnhancedFeatures(.frameFilter)
-}
-```
-
-#### Initialize Capture Vision Router
-
-Once the camera component is set up, declare and create an instance of `CaptureVisionRouter` and set its input to the Camera Enhancer object you created in the last step.
-
-
->- Objective-C
->- Swift
->
->1.
-```objc
-@property (nonatomic, strong) DSCaptureVisionRouter *cvr;
-...
-- (void)setUpCvr
-{
- _cvr = [[DSCaptureVisionRouter alloc] init];
-}
-```
-2.
-```swift
-let cvr:CaptureVisionRouter!
-func setUpDCV() {
- cvr = CaptureVisionRouter()
-}
-```
-
-Bind your `CaptureVisionRouter` instance with the created `CameraEnhancer` instance.
-
-
->- Objective-C
->- Swift
->
->1.
-```objc
-- (void)setUpCvr
-{
- ...
- NSError *cvrError;
- [_cvr setInput:_dce error:&cvrError];
-}
-```
-2.
-```swift
-func setUpCvr() {
- try? cvr.setInput(dce)
-}
-```
-
-#### Set up Result Receiver
-
-1. Add `CapturedResultReceiver` to your ViewController.
-
-
- >- Objective-C
- >- Swift
- >
- >1.
- ```objc
- @interface ViewController ()
- ```
- 2.
- ```swift
- class ViewController: UIViewController, CapturedResultReceiver {
- ...
- }
- ```
-
-2. Implement `onNormalizedImagesReceived` method to receive the normalized images as the captured results.
-
-
- >- Objective-C
- >- Swift
- >
- >1.
- ```objc
- -(void)onNormalizedImagesReceived:(DSNormalizedImagesResult *)result
- {
- if (_implementCapture && result!=nil && result.items[0].imageData!=nil)
- {
- _implementCapture = false;
- ImageViewController *imageViewController = [[ImageViewController alloc] init];
- NSError * error;
- imageViewController.resultUIImage = [result.items[0].imageData toUIImage:&error];
- dispatch_async(dispatch_get_main_queue(), ^{ [self.navigationController pushViewController:imageViewController animated:YES];
- });
- }
- }
- ```
- 2.
- ```swift
- func onNormalizedImagesReceived(_ result: NormalizedImagesResult) {
- print("Normalized image received")
- if let items = result.items, items.count > 0 {
- guard let data = items[0].imageData else {
- return
- }
- let resultView = ImageViewController()
- resultView.data = data
- if implementCapture
- {
- DispatchQueue.main.async {
- self.present(resultView, animated: true)
- }
- }
- }
- }
- ```
-
-3. Add the result receiver to the `CaptureVisionRouter`.
-
-
- >- Objective-C
- >- Swift
- >
- >1.
- ```objc
- - (void)setUpCvr
- {
- ...
- NSError *cvrError;
- [_cvr addResultReceiver:self error:&cvrError];
- DSMultiFrameResultCrossFilter *filter = [[DSMultiFrameResultCrossFilter alloc] init];
- [filter enableResultCrossVerification:DSCapturedResultItemTypeNormalizedImage isEnabled:true];
- [_cvr addResultFilter:filter error:&cvrError];
- }
- ```
- 2.
- ```swift
- func setUpCvr() {
- try? cvr.addResultReceiver(self)
- let filter = MultiFrameResultCrossFilter.init()
- filter.enableResultCrossVerification(.normalizedImage, isEnabled: true)
- try? cvr.addResultFilter(filter)
- }
- ```
-
-4. Add a `confirmCapture` button to confirm the result.
-
-
- >- Objective-C
- >- Swift
- >
- >1.
- ```objc
- @property (nonatomic, strong) UIButton *captureButton;
- ...
- - (void)addCaptureButton {
- [self.view addSubview:self.captureButton];
- }
- - (UIButton *)captureButton {
- NSLog(@"Start adding button");
- CGFloat screenWidth = [UIScreen mainScreen].bounds.size.width;
- CGFloat screenHeight = [UIScreen mainScreen].bounds.size.height;
- if (!_captureButton) {
- _captureButton = [UIButton buttonWithType:UIButtonTypeCustom];
- _captureButton.frame = CGRectMake((screenWidth - 150) / 2.0, screenHeight - 100, 150, 50);
- _captureButton.backgroundColor = [UIColor grayColor];
- _captureButton.layer.cornerRadius = 10;
- _captureButton.layer.borderColor = [UIColor darkGrayColor].CGColor;
- [_captureButton setTitle:@"Capture" forState:UIControlStateNormal];
- [_captureButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
- [_captureButton addTarget:self action:@selector(setCapture) forControlEvents:UIControlEventTouchUpInside];
- }
- return _captureButton;
- }
- ```
- 2.
- ```swift
- var captureButton:UIButton!
- var implementCapture:Bool = false
- ...
- func addCaptureButton()
- {
- let w = UIScreen.main.bounds.size.width
- let h = UIScreen.main.bounds.size.height
- let SafeAreaBottomHeight: CGFloat = UIApplication.shared.statusBarFrame.size.height > 20 ? 34 : 0
- let photoButton = UIButton(frame: CGRect(x: w / 2 - 60, y: h - 100 - SafeAreaBottomHeight, width: 120, height: 60))
- photoButton.setTitle("Capture", for: .normal)
- photoButton.backgroundColor = UIColor.green
- photoButton.addTarget(self, action: #selector(confirmCapture), for: .touchUpInside)
- DispatchQueue.main.async(execute: { [self] in
- view.addSubview(photoButton)
- })
- }
- @objc func confirmCapture()
- {
- implementCapture = true
- }
- ```
-
-#### Configure the methods viewDidLoad, viewWillAppear, and viewWillDisappear
-
-
->- Objective-C
->- Swift
->
->1.
-```objc
-- (void)viewDidLoad {
- [super viewDidLoad];
- [self setUpCamera];
- [self setUpCvr];
- [self addCaptureButton];
-}
-- (void)viewWillAppear:(BOOL)animated
-{
- [super viewWillAppear:animated];
- [_dce open];
- NSError *cvrError;
- [_cvr startCapturing:DSPresetTemplateDetectAndNormalizeDocument error:&cvrError];
-}
-- (void)viewWillDisappear:(BOOL)animated
-{
- [super viewWillAppear:animated];
- [_dce close];
-}
-```
-2.
-```swift
-override func viewDidLoad() {
- super.viewDidLoad()
- setUpCamera()
- setUpCvr()
- addCaptureButton()
-}
-override func viewWillAppear(_ animated: Bool) {
- super.viewWillAppear(animated)
- dce.open()
- try? cvr.startCapturing(PresetTemplate.detectAndNormalizeDocument.rawValue)
-}
-override func viewWillDisappear(_ animated: Bool) {
- super.viewWillDisappear(animated)
- dce.close()
-}
-```
-
-#### Display the Normalized Image
-
-1. Create a new `UIViewController` class `ImageViewController`.
-
-2. Add a property `normalizedImage` to the header file of `ImageViewController` (Objective-C only).
-
- ```objc
- @property (nonatomic, strong) UIImage * normalizedImage;
- ```
-
-2. Configure the `ImageViewController` to display the normalized image..
-
-
- >- Objective-C
- >- Swift
- >
- >1.
- ```objc
- #import "ImageViewController.h"
- #import
- @interface ImageViewController()
- @property (nonatomic, strong) UIImageView *imageView;
- @end
- @implementation ImageViewController
- -(void)viewDidLoad
- {
- NSLog(@"ImageViewController loaded");
- [super viewDidLoad];
- [self setUpView];
- }
- - (void)setUpView
- {
- _imageView = [[UIImageView alloc] initWithFrame:self.view.bounds];
- [self.view addSubview:_imageView];
- NSError *coreError;
- [_imageView setContentMode:UIViewContentModeScaleAspectFit];
- [_imageView setImage:self.normalizedImage];
- }
- @end
- ```
- 2.
- ```swift
- class ImageViewController: UIViewController{
- var normalizedImage:UIImage!
- var imageView:UIImageView!
- override func viewDidLoad() {
- super.viewDidLoad()
- setUpView()
- }
- func setUpView() {
- imageView = UIImageView.init(frame: view.bounds)
- imageView.contentMode = .scaleAspectFit
- view.addSubview(imageView)
- DispatchQueue.main.async { [self] in
- imageView.image = normalizedImage
- }
- }
- }
- ```
-
-
-
-### Configure Camera Permissions
-
-Add **Privacy - Camera Usage Description** to the `info.plist` of your project to request camera permission. An easy way to do this is to access your project settings, go to *Info* and then add this Privacy property to the iOS target properties list.
-
-### Additional Steps for iOS 12.x or Lower Versions
-
-If your iOS version is 12.x or lower, please add the following additional steps:
-
-1. Remove the methods `application:didDiscardSceneSessions:` and `application:configurationForConnectingSceneSession:options:` from your `AppDelegate` file.
-2. Remove the `SceneDelegate.Swift` file (`SceneDelegate.h` & `SceneDelegate.m` for Objective-C).
-3. Remove the `Application Scene Manifest` from your info.plist file.
-4. Declaire the window in your `AppDelegate.Swift` file (`AppDelegate.h` for Objective-C).
-
-
- >- Objective-C
- >- Swift
- >
- >1.
- ```objc
- @interface AppDelegate : UIResponder
- @property (strong, nonatomic) UIWindow *window;
- @end
- ```
- 2.
- ```swift
- import UIKit
- @main
- class AppDelegate: UIResponder, UIApplicationDelegate {
- var window: UIWindow?
- }
- ```
-
-### Build and Run the Project
-
-1. Select the device that you want to run your app on.
-2. Run the project, then your app will be installed on your device.
-
-> Note:
->
-> - You can get the source code of the HelloWorld app from the following link
-> - [Objective-C](https://github.com/Dynamsoft/capture-vision-mobile-samples/tree/main/ios/DocumentScanner/AutoNormalizeObjc){:target="_blank"}.
-> - [Swift](https://github.com/Dynamsoft/capture-vision-mobile-samples/tree/main/ios/DocumentScanner/AutoNormalize){:target="_blank"}.
diff --git a/programming/ios/user-guide-v2.6.1000.md b/programming/ios/user-guide-v2.6.1000.md
deleted file mode 100644
index da0cb22..0000000
--- a/programming/ios/user-guide-v2.6.1000.md
+++ /dev/null
@@ -1,605 +0,0 @@
----
-layout: default-layout
-title: Detect and Normalize Document - iOS User Guide
-description: This page introduce how to detect and normalize document with Dynamsoft Capture Vision iOS SDK.
-keywords: user guide, iOS, document scanner
-needAutoGenerateSidebar: true
-needGenerateH4Content: true
-noTitleIndex: true
-multiProgrammingLanguage: true
-enableLanguageSelection: true
----
-
-# iOS User Guide for Document Scanner Integration
-
-- [iOS User Guide for Document Scanner Integration](#ios-user-guide-for-document-scanner-integration)
- - [System Requirements](#system-requirements)
- - [Add the SDK](#add-the-sdk)
- - [Add the xcframeworks via CocoaPods](#add-the-xcframeworks-via-cocoapods)
- - [Add the xcframeworks via Swift Package Manager](#add-the-xcframeworks-via-swift-package-manager)
- - [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)
- - [Main ViewController for Realtime Detection of Quads](#main-viewcontroller-for-realtime-detection-of-quads)
- - [Get Prepared with the Camera Module](#get-prepared-with-the-camera-module)
- - [Initialize Capture Vision Router](#initialize-capture-vision-router)
- - [Set up Result Receiver](#set-up-result-receiver)
- - [Configure the methods viewDidLoad, viewWillAppear, and viewWillDisappear](#configure-the-methods-viewdidload-viewwillappear-and-viewwilldisappear)
- - [Display the Normalized Image](#display-the-normalized-image)
- - [Configure Camera Permissions](#configure-camera-permissions)
- - [Additional Steps for iOS 12.x or Lower Versions](#additional-steps-for-ios-12x-or-lower-versions)
- - [Build and Run the Project](#build-and-run-the-project)
-
-## System Requirements
-
-- Supported OS: iOS 11 or higher (iOS 13 and higher recommended).
-- Supported ABI: arm64 and x86_64.
-- Development Environment: Xcode 13 and above (Xcode 14.1+ recommended).
-
-## Add the SDK
-
-There are two ways to add the SDK into your project - **CocoaPods**, or via **Swift Package Manager**.
-
-### Add the xcframeworks via CocoaPods
-
-1. Add the frameworks in your **Podfile**.
-
- ```sh
- target 'HelloWorld' do
- use_frameworks!
-
- pod 'DynamsoftCaptureVisionBundle','2.6.1000'
-
- end
- ```
-
-2. Execute the pod command to install the frameworks and generate workspace(**HelloWorld.xcworkspace**):
-
- ```sh
- pod install
- ```
-
-### Add the xcframeworks via Swift Package Manager
-
-1. In your Xcode project, go to **File --> AddPackages**.
-
-2. In the top-right section of the window, search "https://github.com/Dynamsoft/capture-vision-spm"
-
-3. Select `capture-vision-spm`, choose `Exact version`, enter **2.6.1000**, then click **Add Package**.
-
-4. Check all the frameworks and add.
-
-
-
-## Build Your First Application
-
-This guide will walk you through the process of creating a HelloWorld app for detecting and normalizing documents via a camera video input.
-
->Note:
->
-> - Xcode 14.0 is used in this guide.
-> - You can get the source code of the HelloWorld app from the following link
-> - [DocumentScanner iOS Sample](https://github.com/Dynamsoft/capture-vision-mobile-samples/tree/dcv_v2.6.1003/ios/DocumentScanner/){:target="_blank"}.
-
-### Create a New Project
-
-1. Open Xcode and select create a new project.
-
-2. Select **iOS -> App** for your application.
-
-3. Input your product name (HelloWorld), interface (StoryBoard) and language (Objective-C/Swift).
-
-4. Click on the **Next** button and select the location to save the project.
-
-5. Click on the **Create** button to finish.
-
-### Include the Library
-
-Add the SDK to your new project. Please read [Add the SDK](#add-the-sdk) section for more details.
-
-### Initialize License
-
-Initialize the license first. In your **ViewController** file, add the following code to initialize the license.
-
-
->- Objective-C
->- Swift
->
->1.
-```objc
-// Import the DynamsoftLicense module to init license
-#import
-// Add LicenseVerificationListener to the interface
-@interface ViewController ()
-- (void)setLicense{
- [DSLicenseManager initLicense:@"DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9" verificationDelegate:self];
-}
--(void)onLicenseVerified:(BOOL)isSuccess error:(NSError *)error
-{
- NSLog(@"On License Verified");
- if (!isSuccess)
- {
- NSLog(error.localizedDescription);
- }else
- {
- NSLog(@"License approved");
- }
-}
-...
-@end
-```
-2.
-```swift
-// Import the DynamsoftLicense module to init license
-import DynamsoftLicense
-// Add LicenseVerificationListener to the interface
-class ViewController: UIViewController, LicenseVerificationListener {
- func setLicense(){
- LicenseManager.initLicense("DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9", verificationDelegate: self)
- }
- func onLicenseVerified(_ isSuccess: Bool, error: Error?) {
- // Add your code to do when license server returns.
- if let error = error, !isSuccess{
- print(error.localizedDescription)
- }
- }
- ...
-}
-```
-
->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=ddn&utm_source=guide&package=ios){:target="_blank"} link
-
-
-
-### Main ViewController for Realtime Detection of Quads
-
-In the main view controller, your app will scan documents via video streaming and display the detect quadrilateral area on the screen. First of all, import the headers in the ViewController file.
-
-
- >- Objective-C
- >- Swift
- >
- >1.
- ```objc
- #import
- #import
- #import
- #import
- #import
- ```
- 2.
- ```swift
- import DynamsoftCore
- import DynamsoftCaptureVisionRouter
- import DynamsoftDocumentNormalizer
- import DynamsoftUtility
- import DynamsoftCameraEnhancer
- ```
-
-#### Get Prepared with the Camera Module
-
-Create the instances of `CameraEnhancer` and `CameraView`.
-
-
->- Objective-C
->- Swift
->
->1.
-```objc
-@property (nonatomic, strong) DSCameraEnhancer *dce;
-@property (nonatomic, strong) DSCameraView *cameraView;
-...
-- (void)setUpCamera
-{
- _cameraView = [[DSCameraView alloc] initWithFrame:self.view.bounds];
- [_cameraView setAutoresizingMask:UIViewAutoresizingFlexibleWidth];
- [self.view addSubview:_cameraView];
- [_cameraView addSubview:_captureButton];
- _dce = [[DSCameraEnhancer alloc] init];
- [_dce setCameraView:_cameraView];
- DSDrawingLayer * layer = [_cameraView getDrawingLayer:DSDrawingLayerIdDDN];
- [layer setVisible:true];
- // You can enable the frame filter feature of Dynamsoft Camera Enhancer.
- //[_dce enableEnhancedFeatures:DSEnhancerFeatureFrameFilter];
-}
-```
-2.
-```swift
-var cameraView:CameraView!
-var dce:CameraEnhancer!
-...
-func setUpCamera() {
- // Create a camera view and add it as a sub view of the current view.
- cameraView = .init(frame: view.bounds)
- cameraView.autoresizingMask = [.flexibleWidth, .flexibleHeight]
- view.insertSubview(cameraView, at: 0)
- // Bind the camera enhancer with the camera view.
- dce = CameraEnhancer()
- dce.cameraView = cameraView
- // Additional step: Highlight the detected document boundary.
- let layer = cameraView.getDrawingLayer(DrawingLayerId.DDN.rawValue)
- layer?.visible = true
- // You can enable the frame filter feature of Dynamsoft Camera Enhancer.
- // dce.enableEnhancedFeatures(.frameFilter)
-}
-```
-
-#### Initialize Capture Vision Router
-
-Once the camera component is set up, declare and create an instance of `CaptureVisionRouter` and set its input to the Camera Enhancer object you created in the last step.
-
-
->- Objective-C
->- Swift
->
->1.
-```objc
-@property (nonatomic, strong) DSCaptureVisionRouter *cvr;
-...
-- (void)setUpCvr
-{
- _cvr = [[DSCaptureVisionRouter alloc] init];
-}
-```
-2.
-```swift
-var cvr:CaptureVisionRouter!
-func setUpCvr() {
- cvr = CaptureVisionRouter()
-}
-```
-
-Bind your `CaptureVisionRouter` instance with the created `CameraEnhancer` instance.
-
-
->- Objective-C
->- Swift
->
->1.
-```objc
-- (void)setUpCvr
-{
- ...
- NSError *cvrError;
- [_cvr setInput:_dce error:&cvrError];
-}
-```
-2.
-```swift
-func setUpCvr() {
- try? cvr.setInput(dce)
-}
-```
-
-#### Set up Result Receiver
-
-1. Add `CapturedResultReceiver` to your ViewController.
-
-
- >- Objective-C
- >- Swift
- >
- >1.
- ```objc
- @interface ViewController ()
- ```
- 2.
- ```swift
- class ViewController: UIViewController, LicenseVerificationListener, CapturedResultReceiver {
- ...
- }
- ```
-
-2. Implement `onNormalizedImagesReceived` method to receive the normalized images as the captured results.
-
-
- >- Objective-C
- >- Swift
- >
- >1.
- ```objc
- // import ImageViewController.h. It will be implemented later.
- #import "ImageViewController.h"
- -(void)onNormalizedImagesReceived:(DSNormalizedImagesResult *)result
- {
- if (result!=nil && result.items[0].imageData!=nil && (_implementCapture || result.items[0].crossVerificationStatus == DSCrossVerificationStatusPassed))
- {
- NSLog(@"Capture confirmed");
- _implementCapture = false;
- dispatch_async(dispatch_get_main_queue(), ^{
- [self.cvr stopCapturing];
- ImageViewController *imageViewController = [[ImageViewController alloc] init];
- NSError * error;
- imageViewController.normalizedImage = [result.items[0].imageData toUIImage:&error];
- NSLog(@"UIImage set");
- [self.navigationController pushViewController:imageViewController animated:YES];
- });
- }
- }
- ```
- 2.
- ```swift
- func onNormalizedImagesReceived(_ result: NormalizedImagesResult) {
- if let item = result.items?.first {
- if item.crossVerificationStatus == .passed || implementCapture {
- guard let data = item.imageData else { return }
- implementCapture = false
- cvr.stopCapturing()
- DispatchQueue.main.async {
- let resultView = ImageViewController()
- resultView.normalizedImage = try? data.toUIImage()
- self.navigationController?.pushViewController(resultView, animated: true)
- }
- }
- }
- }
- ```
-
-3. Add the result receiver to the `CaptureVisionRouter`.
-
-
- >- Objective-C
- >- Swift
- >
- >1.
- ```objc
- - (void)setUpCvr
- {
- ...
- [_cvr addResultReceiver:self];
- DSMultiFrameResultCrossFilter *filter = [[DSMultiFrameResultCrossFilter alloc] init];
- [filter enableResultCrossVerification:DSCapturedResultItemTypeNormalizedImage isEnabled:true];
- [_cvr addResultFilter:filter];
- }
- ```
- 2.
- ```swift
- func setUpCvr() {
- ...
- cvr.addResultReceiver(self)
- let filter = MultiFrameResultCrossFilter.init()
- filter.enableResultCrossVerification(.normalizedImage, isEnabled: true)
- cvr.addResultFilter(filter)
- }
- ```
-
-4. Add a `confirmCapture` button to confirm the result.
-
-
- >- Objective-C
- >- Swift
- >
- >1.
- ```objc
- @property (nonatomic, strong) UIButton *captureButton;
- @property (nonatomic) BOOL implementCapture;
- ...
- - (void)addCaptureButton {
- [self.view addSubview:self.captureButton];
- }
- - (UIButton *)captureButton {
- NSLog(@"Start adding button");
- CGFloat screenWidth = [UIScreen mainScreen].bounds.size.width;
- CGFloat screenHeight = [UIScreen mainScreen].bounds.size.height;
- if (!_captureButton) {
- _captureButton = [UIButton buttonWithType:UIButtonTypeCustom];
- _captureButton.frame = CGRectMake((screenWidth - 150) / 2.0, screenHeight - 100, 150, 50);
- _captureButton.backgroundColor = [UIColor grayColor];
- _captureButton.layer.cornerRadius = 10;
- _captureButton.layer.borderColor = [UIColor darkGrayColor].CGColor;
- [_captureButton setTitle:@"Capture" forState:UIControlStateNormal];
- [_captureButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
- [_captureButton addTarget:self action:@selector(setCapture) forControlEvents:UIControlEventTouchUpInside];
- }
- return _captureButton;
- }
- - (void)setCapture
- {
- _implementCapture = true;
- }
- ```
- 2.
- ```swift
- var captureButton:UIButton!
- var implementCapture:Bool = false
- ...
- func addCaptureButton()
- {
- let w = UIScreen.main.bounds.size.width
- let h = UIScreen.main.bounds.size.height
- let SafeAreaBottomHeight: CGFloat = UIApplication.shared.statusBarFrame.size.height > 20 ? 34 : 0
- let photoButton = UIButton(frame: CGRect(x: w / 2 - 60, y: h - 100 - SafeAreaBottomHeight, width: 120, height: 60))
- photoButton.setTitle("Capture", for: .normal)
- photoButton.backgroundColor = UIColor.green
- photoButton.addTarget(self, action: #selector(confirmCapture), for: .touchUpInside)
- DispatchQueue.main.async(execute: { [self] in
- view.addSubview(photoButton)
- })
- }
- @objc func confirmCapture()
- {
- implementCapture = true
- }
- ```
-
-#### Configure the methods viewDidLoad, viewWillAppear, and viewWillDisappear
-
-
->- Objective-C
->- Swift
->
->1.
-```objc
-- (void)viewDidLoad {
- [super viewDidLoad];
- [self setLicense];
- [self setUpCamera];
- [self setUpCvr];
- [self addCaptureButton];
-}
-- (void)viewWillAppear:(BOOL)animated
-{
- [super viewWillAppear:animated];
- [_dce open];
- [_cvr startCapturing:DSPresetTemplateDetectAndNormalizeDocument completionHandler:^(BOOL isSuccess, NSError * _Nullable error) {
- if (!isSuccess && error != nil) {
- NSLog(@"%@", error.localizedDescription);
- }
- }];
-}
-- (void)viewWillDisappear:(BOOL)animated
-{
- [super viewWillAppear:animated];
- [_dce close];
-}
-```
-2.
-```swift
-override func viewDidLoad() {
- super.viewDidLoad()
- setLicense()
- setUpCamera()
- setUpCvr()
- addCaptureButton()
-}
-override func viewWillAppear(_ animated: Bool) {
- super.viewWillAppear(animated)
- dce.open()
- cvr.startCapturing(PresetTemplate.detectAndNormalizeDocument.rawValue){ isSuccess, error in
- if let error = error, !isSuccess {
- print("Capture start failed")
- print(error.localizedDescription)
- }
- }
-}
-override func viewWillDisappear(_ animated: Bool) {
- super.viewWillDisappear(animated)
- dce.close()
-}
-```
-
-#### Display the Normalized Image
-
-1. Create a new `UIViewController` class `ImageViewController`.
-
-2. Add a property `normalizedImage` to the header file of `ImageViewController` (Objective-C only).
-
- ```objc
- #import
-
- NS_ASSUME_NONNULL_BEGIN
-
- @interface ImageViewController : UIViewController
-
- @property (nonatomic, strong) UIImage *normalizedImage;
-
- @end
-
- NS_ASSUME_NONNULL_END
- ```
-
-3. Configure the `ImageViewController` to display the normalized image..
-
-
- >- Objective-C
- >- Swift
- >
- >1.
- ```objc
- #import "ImageViewController.h"
- @interface ImageViewController()
- @property (nonatomic, strong) UIImageView *imageView;
- @end
- @implementation ImageViewController
- -(void)viewDidLoad
- {
- NSLog(@"ImageViewController loaded");
- [super viewDidLoad];
- [self setUpView];
- }
- - (void)setUpView
- {
- _imageView = [[UIImageView alloc] initWithFrame:self.view.bounds];
- [self.view addSubview:_imageView];
- [_imageView setContentMode:UIViewContentModeScaleAspectFit];
- dispatch_async(dispatch_get_main_queue(), ^{
- [self.imageView setImage:self.normalizedImage];
- });
- }
- @end
- ```
- 2.
- ```swift
- import UIKit
- import DynamsoftCore
- import DynamsoftCaptureVisionRouter
- import DynamsoftDocumentNormalizer
- class ImageViewController: UIViewController {
- var normalizedImage:UIImage!
- var imageView:UIImageView!
- override func viewDidLoad() {
- super.viewDidLoad()
- setUpView()
- }
- func setUpView() {
- imageView = UIImageView.init(frame: view.bounds)
- imageView.contentMode = .scaleAspectFit
- view.addSubview(imageView)
- DispatchQueue.main.async { [self] in
- imageView.image = normalizedImage
- }
- }
- }
- ```
-
-4. Go to your **Main.storyboard** and add **Navigation Controller**.
-
-
-
-### Configure Camera Permissions
-
-Add **Privacy - Camera Usage Description** to the `info.plist` of your project to request camera permission. An easy way to do this is to access your project settings, go to *Info* and then add this Privacy property to the iOS target properties list.
-
-### Additional Steps for iOS 12.x or Lower Versions
-
-If your iOS version is 12.x or lower, please add the following additional steps:
-
-1. Remove the methods `application:didDiscardSceneSessions:` and `application:configurationForConnectingSceneSession:options:` from your `AppDelegate` file.
-2. Remove the `SceneDelegate.Swift` file (`SceneDelegate.h` & `SceneDelegate.m` for Objective-C).
-3. Remove the `Application Scene Manifest` from your info.plist file.
-4. Declaire the window in your `AppDelegate.Swift` file (`AppDelegate.h` for Objective-C).
-
-
- >- Objective-C
- >- Swift
- >
- >1.
- ```objc
- @interface AppDelegate : UIResponder
- @property (strong, nonatomic) UIWindow *window;
- @end
- ```
- 2.
- ```swift
- import UIKit
- @main
- class AppDelegate: UIResponder, UIApplicationDelegate {
- var window: UIWindow?
- }
- ```
-
-### Build and Run the Project
-
-1. Select the device that you want to run your app on.
-2. Run the project, then your app will be installed on your device.
-
-> Note:
->
-> - You can get the source code of the HelloWorld app from the following link
-> - [Objective-C](https://github.com/Dynamsoft/capture-vision-mobile-samples/tree/main/ios/DocumentScanner/AutoNormalizeObjc){:target="_blank"}.
-> - [Swift](https://github.com/Dynamsoft/capture-vision-mobile-samples/tree/main/ios/DocumentScanner/AutoNormalize){:target="_blank"}.
diff --git a/programming/ios/user-guide-v2.6.1001.md b/programming/ios/user-guide-v2.6.1001.md
deleted file mode 100644
index f3d3338..0000000
--- a/programming/ios/user-guide-v2.6.1001.md
+++ /dev/null
@@ -1,605 +0,0 @@
----
-layout: default-layout
-title: Detect and Normalize Document - iOS User Guide
-description: This page introduce how to detect and normalize document with Dynamsoft Capture Vision iOS SDK.
-keywords: user guide, iOS, document scanner
-needAutoGenerateSidebar: true
-needGenerateH4Content: true
-noTitleIndex: true
-multiProgrammingLanguage: true
-enableLanguageSelection: true
----
-
-# iOS User Guide for Document Scanner Integration
-
-- [iOS User Guide for Document Scanner Integration](#ios-user-guide-for-document-scanner-integration)
- - [System Requirements](#system-requirements)
- - [Add the SDK](#add-the-sdk)
- - [Add the xcframeworks via CocoaPods](#add-the-xcframeworks-via-cocoapods)
- - [Add the xcframeworks via Swift Package Manager](#add-the-xcframeworks-via-swift-package-manager)
- - [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)
- - [Main ViewController for Realtime Detection of Quads](#main-viewcontroller-for-realtime-detection-of-quads)
- - [Get Prepared with the Camera Module](#get-prepared-with-the-camera-module)
- - [Initialize Capture Vision Router](#initialize-capture-vision-router)
- - [Set up Result Receiver](#set-up-result-receiver)
- - [Configure the methods viewDidLoad, viewWillAppear, and viewWillDisappear](#configure-the-methods-viewdidload-viewwillappear-and-viewwilldisappear)
- - [Display the Normalized Image](#display-the-normalized-image)
- - [Configure Camera Permissions](#configure-camera-permissions)
- - [Additional Steps for iOS 12.x or Lower Versions](#additional-steps-for-ios-12x-or-lower-versions)
- - [Build and Run the Project](#build-and-run-the-project)
-
-## System Requirements
-
-- Supported OS: iOS 11 or higher (iOS 13 and higher recommended).
-- Supported ABI: arm64 and x86_64.
-- Development Environment: Xcode 13 and above (Xcode 14.1+ recommended).
-
-## Add the SDK
-
-There are two ways to add the SDK into your project - **CocoaPods**, or via **Swift Package Manager**.
-
-### Add the xcframeworks via CocoaPods
-
-1. Add the frameworks in your **Podfile**.
-
- ```sh
- target 'HelloWorld' do
- use_frameworks!
-
- pod 'DynamsoftCaptureVisionBundle','2.6.1001'
-
- end
- ```
-
-2. Execute the pod command to install the frameworks and generate workspace(**HelloWorld.xcworkspace**):
-
- ```sh
- pod install
- ```
-
-### Add the xcframeworks via Swift Package Manager
-
-1. In your Xcode project, go to **File --> AddPackages**.
-
-2. In the top-right section of the window, search "https://github.com/Dynamsoft/capture-vision-spm"
-
-3. Select `capture-vision-spm`, choose `Exact version`, enter **2.6.1001**, then click **Add Package**.
-
-4. Check all the frameworks and add.
-
-
-
-## Build Your First Application
-
-This guide will walk you through the process of creating a HelloWorld app for detecting and normalizing documents via a camera video input.
-
->Note:
->
-> - Xcode 14.0 is used in this guide.
-> - You can get the source code of the HelloWorld app from the following link
-> - [DocumentScanner iOS Sample](https://github.com/Dynamsoft/capture-vision-mobile-samples/tree/dcv_v2.6.1003/ios/DocumentScanner/){:target="_blank"}.
-
-### Create a New Project
-
-1. Open Xcode and select create a new project.
-
-2. Select **iOS -> App** for your application.
-
-3. Input your product name (HelloWorld), interface (StoryBoard) and language (Objective-C/Swift).
-
-4. Click on the **Next** button and select the location to save the project.
-
-5. Click on the **Create** button to finish.
-
-### Include the Library
-
-Add the SDK to your new project. Please read [Add the SDK](#add-the-sdk) section for more details.
-
-### Initialize License
-
-Initialize the license first. In your **ViewController** file, add the following code to initialize the license.
-
-
->- Objective-C
->- Swift
->
->1.
-```objc
-// Import the DynamsoftLicense module to init license
-#import
-// Add LicenseVerificationListener to the interface
-@interface ViewController ()
-- (void)setLicense{
- [DSLicenseManager initLicense:@"DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9" verificationDelegate:self];
-}
--(void)onLicenseVerified:(BOOL)isSuccess error:(NSError *)error
-{
- NSLog(@"On License Verified");
- if (!isSuccess)
- {
- NSLog(error.localizedDescription);
- }else
- {
- NSLog(@"License approved");
- }
-}
-...
-@end
-```
-2.
-```swift
-// Import the DynamsoftLicense module to init license
-import DynamsoftLicense
-// Add LicenseVerificationListener to the interface
-class ViewController: UIViewController, LicenseVerificationListener {
- func setLicense(){
- LicenseManager.initLicense("DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9", verificationDelegate: self)
- }
- func onLicenseVerified(_ isSuccess: Bool, error: Error?) {
- // Add your code to do when license server returns.
- if let error = error, !isSuccess{
- print(error.localizedDescription)
- }
- }
- ...
-}
-```
-
->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=ddn&utm_source=guide&package=ios){:target="_blank"} link
-
-
-
-### Main ViewController for Realtime Detection of Quads
-
-In the main view controller, your app will scan documents via video streaming and display the detect quadrilateral area on the screen. First of all, import the headers in the ViewController file.
-
-
- >- Objective-C
- >- Swift
- >
- >1.
- ```objc
- #import
- #import
- #import
- #import
- #import
- ```
- 2.
- ```swift
- import DynamsoftCore
- import DynamsoftCaptureVisionRouter
- import DynamsoftDocumentNormalizer
- import DynamsoftUtility
- import DynamsoftCameraEnhancer
- ```
-
-#### Get Prepared with the Camera Module
-
-Create the instances of `CameraEnhancer` and `CameraView`.
-
-
->- Objective-C
->- Swift
->
->1.
-```objc
-@property (nonatomic, strong) DSCameraEnhancer *dce;
-@property (nonatomic, strong) DSCameraView *cameraView;
-...
-- (void)setUpCamera
-{
- _cameraView = [[DSCameraView alloc] initWithFrame:self.view.bounds];
- [_cameraView setAutoresizingMask:UIViewAutoresizingFlexibleWidth];
- [self.view addSubview:_cameraView];
- [_cameraView addSubview:_captureButton];
- _dce = [[DSCameraEnhancer alloc] init];
- [_dce setCameraView:_cameraView];
- DSDrawingLayer * layer = [_cameraView getDrawingLayer:DSDrawingLayerIdDDN];
- [layer setVisible:true];
- // You can enable the frame filter feature of Dynamsoft Camera Enhancer.
- //[_dce enableEnhancedFeatures:DSEnhancerFeatureFrameFilter];
-}
-```
-2.
-```swift
-var cameraView:CameraView!
-var dce:CameraEnhancer!
-...
-func setUpCamera() {
- // Create a camera view and add it as a sub view of the current view.
- cameraView = .init(frame: view.bounds)
- cameraView.autoresizingMask = [.flexibleWidth, .flexibleHeight]
- view.insertSubview(cameraView, at: 0)
- // Bind the camera enhancer with the camera view.
- dce = CameraEnhancer()
- dce.cameraView = cameraView
- // Additional step: Highlight the detected document boundary.
- let layer = cameraView.getDrawingLayer(DrawingLayerId.DDN.rawValue)
- layer?.visible = true
- // You can enable the frame filter feature of Dynamsoft Camera Enhancer.
- // dce.enableEnhancedFeatures(.frameFilter)
-}
-```
-
-#### Initialize Capture Vision Router
-
-Once the camera component is set up, declare and create an instance of `CaptureVisionRouter` and set its input to the Camera Enhancer object you created in the last step.
-
-
->- Objective-C
->- Swift
->
->1.
-```objc
-@property (nonatomic, strong) DSCaptureVisionRouter *cvr;
-...
-- (void)setUpCvr
-{
- _cvr = [[DSCaptureVisionRouter alloc] init];
-}
-```
-2.
-```swift
-var cvr:CaptureVisionRouter!
-func setUpCvr() {
- cvr = CaptureVisionRouter()
-}
-```
-
-Bind your `CaptureVisionRouter` instance with the created `CameraEnhancer` instance.
-
-
->- Objective-C
->- Swift
->
->1.
-```objc
-- (void)setUpCvr
-{
- ...
- NSError *cvrError;
- [_cvr setInput:_dce error:&cvrError];
-}
-```
-2.
-```swift
-func setUpCvr() {
- try? cvr.setInput(dce)
-}
-```
-
-#### Set up Result Receiver
-
-1. Add `CapturedResultReceiver` to your ViewController.
-
-
- >- Objective-C
- >- Swift
- >
- >1.
- ```objc
- @interface ViewController ()
- ```
- 2.
- ```swift
- class ViewController: UIViewController, LicenseVerificationListener, CapturedResultReceiver {
- ...
- }
- ```
-
-2. Implement `onNormalizedImagesReceived` method to receive the normalized images as the captured results.
-
-
- >- Objective-C
- >- Swift
- >
- >1.
- ```objc
- // import ImageViewController.h. It will be implemented later.
- #import "ImageViewController.h"
- -(void)onNormalizedImagesReceived:(DSNormalizedImagesResult *)result
- {
- if (result!=nil && result.items[0].imageData!=nil && (_implementCapture || result.items[0].crossVerificationStatus == DSCrossVerificationStatusPassed))
- {
- NSLog(@"Capture confirmed");
- _implementCapture = false;
- dispatch_async(dispatch_get_main_queue(), ^{
- [self.cvr stopCapturing];
- ImageViewController *imageViewController = [[ImageViewController alloc] init];
- NSError * error;
- imageViewController.normalizedImage = [result.items[0].imageData toUIImage:&error];
- NSLog(@"UIImage set");
- [self.navigationController pushViewController:imageViewController animated:YES];
- });
- }
- }
- ```
- 2.
- ```swift
- func onNormalizedImagesReceived(_ result: NormalizedImagesResult) {
- if let item = result.items?.first {
- if item.crossVerificationStatus == .passed || implementCapture {
- guard let data = item.imageData else { return }
- implementCapture = false
- cvr.stopCapturing()
- DispatchQueue.main.async {
- let resultView = ImageViewController()
- resultView.normalizedImage = try? data.toUIImage()
- self.navigationController?.pushViewController(resultView, animated: true)
- }
- }
- }
- }
- ```
-
-3. Add the result receiver to the `CaptureVisionRouter`.
-
-
- >- Objective-C
- >- Swift
- >
- >1.
- ```objc
- - (void)setUpCvr
- {
- ...
- [_cvr addResultReceiver:self];
- DSMultiFrameResultCrossFilter *filter = [[DSMultiFrameResultCrossFilter alloc] init];
- [filter enableResultCrossVerification:DSCapturedResultItemTypeNormalizedImage isEnabled:true];
- [_cvr addResultFilter:filter];
- }
- ```
- 2.
- ```swift
- func setUpCvr() {
- ...
- cvr.addResultReceiver(self)
- let filter = MultiFrameResultCrossFilter.init()
- filter.enableResultCrossVerification(.normalizedImage, isEnabled: true)
- cvr.addResultFilter(filter)
- }
- ```
-
-4. Add a `confirmCapture` button to confirm the result.
-
-
- >- Objective-C
- >- Swift
- >
- >1.
- ```objc
- @property (nonatomic, strong) UIButton *captureButton;
- @property (nonatomic) BOOL implementCapture;
- ...
- - (void)addCaptureButton {
- [self.view addSubview:self.captureButton];
- }
- - (UIButton *)captureButton {
- NSLog(@"Start adding button");
- CGFloat screenWidth = [UIScreen mainScreen].bounds.size.width;
- CGFloat screenHeight = [UIScreen mainScreen].bounds.size.height;
- if (!_captureButton) {
- _captureButton = [UIButton buttonWithType:UIButtonTypeCustom];
- _captureButton.frame = CGRectMake((screenWidth - 150) / 2.0, screenHeight - 100, 150, 50);
- _captureButton.backgroundColor = [UIColor grayColor];
- _captureButton.layer.cornerRadius = 10;
- _captureButton.layer.borderColor = [UIColor darkGrayColor].CGColor;
- [_captureButton setTitle:@"Capture" forState:UIControlStateNormal];
- [_captureButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
- [_captureButton addTarget:self action:@selector(setCapture) forControlEvents:UIControlEventTouchUpInside];
- }
- return _captureButton;
- }
- - (void)setCapture
- {
- _implementCapture = true;
- }
- ```
- 2.
- ```swift
- var captureButton:UIButton!
- var implementCapture:Bool = false
- ...
- func addCaptureButton()
- {
- let w = UIScreen.main.bounds.size.width
- let h = UIScreen.main.bounds.size.height
- let SafeAreaBottomHeight: CGFloat = UIApplication.shared.statusBarFrame.size.height > 20 ? 34 : 0
- let photoButton = UIButton(frame: CGRect(x: w / 2 - 60, y: h - 100 - SafeAreaBottomHeight, width: 120, height: 60))
- photoButton.setTitle("Capture", for: .normal)
- photoButton.backgroundColor = UIColor.green
- photoButton.addTarget(self, action: #selector(confirmCapture), for: .touchUpInside)
- DispatchQueue.main.async(execute: { [self] in
- view.addSubview(photoButton)
- })
- }
- @objc func confirmCapture()
- {
- implementCapture = true
- }
- ```
-
-#### Configure the methods viewDidLoad, viewWillAppear, and viewWillDisappear
-
-
->- Objective-C
->- Swift
->
->1.
-```objc
-- (void)viewDidLoad {
- [super viewDidLoad];
- [self setLicense];
- [self setUpCamera];
- [self setUpCvr];
- [self addCaptureButton];
-}
-- (void)viewWillAppear:(BOOL)animated
-{
- [super viewWillAppear:animated];
- [_dce open];
- [_cvr startCapturing:DSPresetTemplateDetectAndNormalizeDocument completionHandler:^(BOOL isSuccess, NSError * _Nullable error) {
- if (!isSuccess && error != nil) {
- NSLog(@"%@", error.localizedDescription);
- }
- }];
-}
-- (void)viewWillDisappear:(BOOL)animated
-{
- [super viewWillAppear:animated];
- [_dce close];
-}
-```
-2.
-```swift
-override func viewDidLoad() {
- super.viewDidLoad()
- setLicense()
- setUpCamera()
- setUpCvr()
- addCaptureButton()
-}
-override func viewWillAppear(_ animated: Bool) {
- super.viewWillAppear(animated)
- dce.open()
- cvr.startCapturing(PresetTemplate.detectAndNormalizeDocument.rawValue){ isSuccess, error in
- if let error = error, !isSuccess {
- print("Capture start failed")
- print(error.localizedDescription)
- }
- }
-}
-override func viewWillDisappear(_ animated: Bool) {
- super.viewWillDisappear(animated)
- dce.close()
-}
-```
-
-#### Display the Normalized Image
-
-1. Create a new `UIViewController` class `ImageViewController`.
-
-2. Add a property `normalizedImage` to the header file of `ImageViewController` (Objective-C only).
-
- ```objc
- #import
-
- NS_ASSUME_NONNULL_BEGIN
-
- @interface ImageViewController : UIViewController
-
- @property (nonatomic, strong) UIImage *normalizedImage;
-
- @end
-
- NS_ASSUME_NONNULL_END
- ```
-
-3. Configure the `ImageViewController` to display the normalized image..
-
-
- >- Objective-C
- >- Swift
- >
- >1.
- ```objc
- #import "ImageViewController.h"
- @interface ImageViewController()
- @property (nonatomic, strong) UIImageView *imageView;
- @end
- @implementation ImageViewController
- -(void)viewDidLoad
- {
- NSLog(@"ImageViewController loaded");
- [super viewDidLoad];
- [self setUpView];
- }
- - (void)setUpView
- {
- _imageView = [[UIImageView alloc] initWithFrame:self.view.bounds];
- [self.view addSubview:_imageView];
- [_imageView setContentMode:UIViewContentModeScaleAspectFit];
- dispatch_async(dispatch_get_main_queue(), ^{
- [self.imageView setImage:self.normalizedImage];
- });
- }
- @end
- ```
- 2.
- ```swift
- import UIKit
- import DynamsoftCore
- import DynamsoftCaptureVisionRouter
- import DynamsoftDocumentNormalizer
- class ImageViewController: UIViewController {
- var normalizedImage:UIImage!
- var imageView:UIImageView!
- override func viewDidLoad() {
- super.viewDidLoad()
- setUpView()
- }
- func setUpView() {
- imageView = UIImageView.init(frame: view.bounds)
- imageView.contentMode = .scaleAspectFit
- view.addSubview(imageView)
- DispatchQueue.main.async { [self] in
- imageView.image = normalizedImage
- }
- }
- }
- ```
-
-4. Go to your **Main.storyboard** and add **Navigation Controller**.
-
-
-
-### Configure Camera Permissions
-
-Add **Privacy - Camera Usage Description** to the `info.plist` of your project to request camera permission. An easy way to do this is to access your project settings, go to *Info* and then add this Privacy property to the iOS target properties list.
-
-### Additional Steps for iOS 12.x or Lower Versions
-
-If your iOS version is 12.x or lower, please add the following additional steps:
-
-1. Remove the methods `application:didDiscardSceneSessions:` and `application:configurationForConnectingSceneSession:options:` from your `AppDelegate` file.
-2. Remove the `SceneDelegate.Swift` file (`SceneDelegate.h` & `SceneDelegate.m` for Objective-C).
-3. Remove the `Application Scene Manifest` from your info.plist file.
-4. Declaire the window in your `AppDelegate.Swift` file (`AppDelegate.h` for Objective-C).
-
-
- >- Objective-C
- >- Swift
- >
- >1.
- ```objc
- @interface AppDelegate : UIResponder
- @property (strong, nonatomic) UIWindow *window;
- @end
- ```
- 2.
- ```swift
- import UIKit
- @main
- class AppDelegate: UIResponder, UIApplicationDelegate {
- var window: UIWindow?
- }
- ```
-
-### Build and Run the Project
-
-1. Select the device that you want to run your app on.
-2. Run the project, then your app will be installed on your device.
-
-> Note:
->
-> - You can get the source code of the HelloWorld app from the following link
-> - [Objective-C](https://github.com/Dynamsoft/capture-vision-mobile-samples/tree/main/ios/DocumentScanner/AutoNormalizeObjc){:target="_blank"}.
-> - [Swift](https://github.com/Dynamsoft/capture-vision-mobile-samples/tree/main/ios/DocumentScanner/AutoNormalize){:target="_blank"}.
diff --git a/programming/ios/user-guide-v2.6.1002.md b/programming/ios/user-guide-v2.6.1002.md
deleted file mode 100644
index d379581..0000000
--- a/programming/ios/user-guide-v2.6.1002.md
+++ /dev/null
@@ -1,605 +0,0 @@
----
-layout: default-layout
-title: Detect and Normalize Document - iOS User Guide
-description: This page introduce how to detect and normalize document with Dynamsoft Capture Vision iOS SDK.
-keywords: user guide, iOS, document scanner
-needAutoGenerateSidebar: true
-needGenerateH4Content: true
-noTitleIndex: true
-multiProgrammingLanguage: true
-enableLanguageSelection: true
----
-
-# iOS User Guide for Document Scanner Integration
-
-- [iOS User Guide for Document Scanner Integration](#ios-user-guide-for-document-scanner-integration)
- - [System Requirements](#system-requirements)
- - [Add the SDK](#add-the-sdk)
- - [Add the xcframeworks via CocoaPods](#add-the-xcframeworks-via-cocoapods)
- - [Add the xcframeworks via Swift Package Manager](#add-the-xcframeworks-via-swift-package-manager)
- - [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)
- - [Main ViewController for Realtime Detection of Quads](#main-viewcontroller-for-realtime-detection-of-quads)
- - [Get Prepared with the Camera Module](#get-prepared-with-the-camera-module)
- - [Initialize Capture Vision Router](#initialize-capture-vision-router)
- - [Set up Result Receiver](#set-up-result-receiver)
- - [Configure the methods viewDidLoad, viewWillAppear, and viewWillDisappear](#configure-the-methods-viewdidload-viewwillappear-and-viewwilldisappear)
- - [Display the Normalized Image](#display-the-normalized-image)
- - [Configure Camera Permissions](#configure-camera-permissions)
- - [Additional Steps for iOS 12.x or Lower Versions](#additional-steps-for-ios-12x-or-lower-versions)
- - [Build and Run the Project](#build-and-run-the-project)
-
-## System Requirements
-
-- Supported OS: iOS 11 or higher (iOS 13 and higher recommended).
-- Supported ABI: arm64 and x86_64.
-- Development Environment: Xcode 13 and above (Xcode 14.1+ recommended).
-
-## Add the SDK
-
-There are two ways to add the SDK into your project - **CocoaPods**, or via **Swift Package Manager**.
-
-### Add the xcframeworks via CocoaPods
-
-1. Add the frameworks in your **Podfile**.
-
- ```sh
- target 'HelloWorld' do
- use_frameworks!
-
- pod 'DynamsoftCaptureVisionBundle','2.6.1002'
-
- end
- ```
-
-2. Execute the pod command to install the frameworks and generate workspace(**HelloWorld.xcworkspace**):
-
- ```sh
- pod install
- ```
-
-### Add the xcframeworks via Swift Package Manager
-
-1. In your Xcode project, go to **File --> AddPackages**.
-
-2. In the top-right section of the window, search "https://github.com/Dynamsoft/capture-vision-spm"
-
-3. Select `capture-vision-spm`, choose `Exact version`, enter **2.6.1002**, then click **Add Package**.
-
-4. Check all the frameworks and add.
-
-
-
-## Build Your First Application
-
-This guide will walk you through the process of creating a HelloWorld app for detecting and normalizing documents via a camera video input.
-
->Note:
->
-> - Xcode 14.0 is used in this guide.
-> - You can get the source code of the HelloWorld app from the following link
-> - [DocumentScanner iOS Sample](https://github.com/Dynamsoft/capture-vision-mobile-samples/tree/dcv_v2.6.1003/ios/DocumentScanner/){:target="_blank"}.
-
-### Create a New Project
-
-1. Open Xcode and select create a new project.
-
-2. Select **iOS -> App** for your application.
-
-3. Input your product name (HelloWorld), interface (StoryBoard) and language (Objective-C/Swift).
-
-4. Click on the **Next** button and select the location to save the project.
-
-5. Click on the **Create** button to finish.
-
-### Include the Library
-
-Add the SDK to your new project. Please read [Add the SDK](#add-the-sdk) section for more details.
-
-### Initialize License
-
-Initialize the license first. In your **ViewController** file, add the following code to initialize the license.
-
-
->- Objective-C
->- Swift
->
->1.
-```objc
-// Import the DynamsoftLicense module to init license
-#import
-// Add LicenseVerificationListener to the interface
-@interface ViewController ()
-- (void)setLicense{
- [DSLicenseManager initLicense:@"DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9" verificationDelegate:self];
-}
--(void)onLicenseVerified:(BOOL)isSuccess error:(NSError *)error
-{
- NSLog(@"On License Verified");
- if (!isSuccess)
- {
- NSLog(error.localizedDescription);
- }else
- {
- NSLog(@"License approved");
- }
-}
-...
-@end
-```
-2.
-```swift
-// Import the DynamsoftLicense module to init license
-import DynamsoftLicense
-// Add LicenseVerificationListener to the interface
-class ViewController: UIViewController, LicenseVerificationListener {
- func setLicense(){
- LicenseManager.initLicense("DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9", verificationDelegate: self)
- }
- func onLicenseVerified(_ isSuccess: Bool, error: Error?) {
- // Add your code to do when license server returns.
- if let error = error, !isSuccess{
- print(error.localizedDescription)
- }
- }
- ...
-}
-```
-
->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=ddn&utm_source=guide&package=ios){:target="_blank"} link
-
-
-
-### Main ViewController for Realtime Detection of Quads
-
-In the main view controller, your app will scan documents via video streaming and display the detect quadrilateral area on the screen. First of all, import the headers in the ViewController file.
-
-
- >- Objective-C
- >- Swift
- >
- >1.
- ```objc
- #import
- #import
- #import
- #import
- #import
- ```
- 2.
- ```swift
- import DynamsoftCore
- import DynamsoftCaptureVisionRouter
- import DynamsoftDocumentNormalizer
- import DynamsoftUtility
- import DynamsoftCameraEnhancer
- ```
-
-#### Get Prepared with the Camera Module
-
-Create the instances of `CameraEnhancer` and `CameraView`.
-
-
->- Objective-C
->- Swift
->
->1.
-```objc
-@property (nonatomic, strong) DSCameraEnhancer *dce;
-@property (nonatomic, strong) DSCameraView *cameraView;
-...
-- (void)setUpCamera
-{
- _cameraView = [[DSCameraView alloc] initWithFrame:self.view.bounds];
- [_cameraView setAutoresizingMask:UIViewAutoresizingFlexibleWidth];
- [self.view addSubview:_cameraView];
- [_cameraView addSubview:_captureButton];
- _dce = [[DSCameraEnhancer alloc] init];
- [_dce setCameraView:_cameraView];
- DSDrawingLayer * layer = [_cameraView getDrawingLayer:DSDrawingLayerIdDDN];
- [layer setVisible:true];
- // You can enable the frame filter feature of Dynamsoft Camera Enhancer.
- //[_dce enableEnhancedFeatures:DSEnhancerFeatureFrameFilter];
-}
-```
-2.
-```swift
-var cameraView:CameraView!
-var dce:CameraEnhancer!
-...
-func setUpCamera() {
- // Create a camera view and add it as a sub view of the current view.
- cameraView = .init(frame: view.bounds)
- cameraView.autoresizingMask = [.flexibleWidth, .flexibleHeight]
- view.insertSubview(cameraView, at: 0)
- // Bind the camera enhancer with the camera view.
- dce = CameraEnhancer()
- dce.cameraView = cameraView
- // Additional step: Highlight the detected document boundary.
- let layer = cameraView.getDrawingLayer(DrawingLayerId.DDN.rawValue)
- layer?.visible = true
- // You can enable the frame filter feature of Dynamsoft Camera Enhancer.
- // dce.enableEnhancedFeatures(.frameFilter)
-}
-```
-
-#### Initialize Capture Vision Router
-
-Once the camera component is set up, declare and create an instance of `CaptureVisionRouter` and set its input to the Camera Enhancer object you created in the last step.
-
-
->- Objective-C
->- Swift
->
->1.
-```objc
-@property (nonatomic, strong) DSCaptureVisionRouter *cvr;
-...
-- (void)setUpCvr
-{
- _cvr = [[DSCaptureVisionRouter alloc] init];
-}
-```
-2.
-```swift
-var cvr:CaptureVisionRouter!
-func setUpCvr() {
- cvr = CaptureVisionRouter()
-}
-```
-
-Bind your `CaptureVisionRouter` instance with the created `CameraEnhancer` instance.
-
-
->- Objective-C
->- Swift
->
->1.
-```objc
-- (void)setUpCvr
-{
- ...
- NSError *cvrError;
- [_cvr setInput:_dce error:&cvrError];
-}
-```
-2.
-```swift
-func setUpCvr() {
- try? cvr.setInput(dce)
-}
-```
-
-#### Set up Result Receiver
-
-1. Add `CapturedResultReceiver` to your ViewController.
-
-
- >- Objective-C
- >- Swift
- >
- >1.
- ```objc
- @interface ViewController ()
- ```
- 2.
- ```swift
- class ViewController: UIViewController, LicenseVerificationListener, CapturedResultReceiver {
- ...
- }
- ```
-
-2. Implement `onNormalizedImagesReceived` method to receive the normalized images as the captured results.
-
-
- >- Objective-C
- >- Swift
- >
- >1.
- ```objc
- // import ImageViewController.h. It will be implemented later.
- #import "ImageViewController.h"
- -(void)onNormalizedImagesReceived:(DSNormalizedImagesResult *)result
- {
- if (result!=nil && result.items[0].imageData!=nil && (_implementCapture || result.items[0].crossVerificationStatus == DSCrossVerificationStatusPassed))
- {
- NSLog(@"Capture confirmed");
- _implementCapture = false;
- dispatch_async(dispatch_get_main_queue(), ^{
- [self.cvr stopCapturing];
- ImageViewController *imageViewController = [[ImageViewController alloc] init];
- NSError * error;
- imageViewController.normalizedImage = [result.items[0].imageData toUIImage:&error];
- NSLog(@"UIImage set");
- [self.navigationController pushViewController:imageViewController animated:YES];
- });
- }
- }
- ```
- 2.
- ```swift
- func onNormalizedImagesReceived(_ result: NormalizedImagesResult) {
- if let item = result.items?.first {
- if item.crossVerificationStatus == .passed || implementCapture {
- guard let data = item.imageData else { return }
- implementCapture = false
- cvr.stopCapturing()
- DispatchQueue.main.async {
- let resultView = ImageViewController()
- resultView.normalizedImage = try? data.toUIImage()
- self.navigationController?.pushViewController(resultView, animated: true)
- }
- }
- }
- }
- ```
-
-3. Add the result receiver to the `CaptureVisionRouter`.
-
-
- >- Objective-C
- >- Swift
- >
- >1.
- ```objc
- - (void)setUpCvr
- {
- ...
- [_cvr addResultReceiver:self];
- DSMultiFrameResultCrossFilter *filter = [[DSMultiFrameResultCrossFilter alloc] init];
- [filter enableResultCrossVerification:DSCapturedResultItemTypeNormalizedImage isEnabled:true];
- [_cvr addResultFilter:filter];
- }
- ```
- 2.
- ```swift
- func setUpCvr() {
- ...
- cvr.addResultReceiver(self)
- let filter = MultiFrameResultCrossFilter.init()
- filter.enableResultCrossVerification(.normalizedImage, isEnabled: true)
- cvr.addResultFilter(filter)
- }
- ```
-
-4. Add a `confirmCapture` button to confirm the result.
-
-
- >- Objective-C
- >- Swift
- >
- >1.
- ```objc
- @property (nonatomic, strong) UIButton *captureButton;
- @property (nonatomic) BOOL implementCapture;
- ...
- - (void)addCaptureButton {
- [self.view addSubview:self.captureButton];
- }
- - (UIButton *)captureButton {
- NSLog(@"Start adding button");
- CGFloat screenWidth = [UIScreen mainScreen].bounds.size.width;
- CGFloat screenHeight = [UIScreen mainScreen].bounds.size.height;
- if (!_captureButton) {
- _captureButton = [UIButton buttonWithType:UIButtonTypeCustom];
- _captureButton.frame = CGRectMake((screenWidth - 150) / 2.0, screenHeight - 100, 150, 50);
- _captureButton.backgroundColor = [UIColor grayColor];
- _captureButton.layer.cornerRadius = 10;
- _captureButton.layer.borderColor = [UIColor darkGrayColor].CGColor;
- [_captureButton setTitle:@"Capture" forState:UIControlStateNormal];
- [_captureButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
- [_captureButton addTarget:self action:@selector(setCapture) forControlEvents:UIControlEventTouchUpInside];
- }
- return _captureButton;
- }
- - (void)setCapture
- {
- _implementCapture = true;
- }
- ```
- 2.
- ```swift
- var captureButton:UIButton!
- var implementCapture:Bool = false
- ...
- func addCaptureButton()
- {
- let w = UIScreen.main.bounds.size.width
- let h = UIScreen.main.bounds.size.height
- let SafeAreaBottomHeight: CGFloat = UIApplication.shared.statusBarFrame.size.height > 20 ? 34 : 0
- let photoButton = UIButton(frame: CGRect(x: w / 2 - 60, y: h - 100 - SafeAreaBottomHeight, width: 120, height: 60))
- photoButton.setTitle("Capture", for: .normal)
- photoButton.backgroundColor = UIColor.green
- photoButton.addTarget(self, action: #selector(confirmCapture), for: .touchUpInside)
- DispatchQueue.main.async(execute: { [self] in
- view.addSubview(photoButton)
- })
- }
- @objc func confirmCapture()
- {
- implementCapture = true
- }
- ```
-
-#### Configure the methods viewDidLoad, viewWillAppear, and viewWillDisappear
-
-
->- Objective-C
->- Swift
->
->1.
-```objc
-- (void)viewDidLoad {
- [super viewDidLoad];
- [self setLicense];
- [self setUpCamera];
- [self setUpCvr];
- [self addCaptureButton];
-}
-- (void)viewWillAppear:(BOOL)animated
-{
- [super viewWillAppear:animated];
- [_dce open];
- [_cvr startCapturing:DSPresetTemplateDetectAndNormalizeDocument completionHandler:^(BOOL isSuccess, NSError * _Nullable error) {
- if (!isSuccess && error != nil) {
- NSLog(@"%@", error.localizedDescription);
- }
- }];
-}
-- (void)viewWillDisappear:(BOOL)animated
-{
- [super viewWillAppear:animated];
- [_dce close];
-}
-```
-2.
-```swift
-override func viewDidLoad() {
- super.viewDidLoad()
- setLicense()
- setUpCamera()
- setUpCvr()
- addCaptureButton()
-}
-override func viewWillAppear(_ animated: Bool) {
- super.viewWillAppear(animated)
- dce.open()
- cvr.startCapturing(PresetTemplate.detectAndNormalizeDocument.rawValue){ isSuccess, error in
- if let error = error, !isSuccess {
- print("Capture start failed")
- print(error.localizedDescription)
- }
- }
-}
-override func viewWillDisappear(_ animated: Bool) {
- super.viewWillDisappear(animated)
- dce.close()
-}
-```
-
-#### Display the Normalized Image
-
-1. Create a new `UIViewController` class `ImageViewController`.
-
-2. Add a property `normalizedImage` to the header file of `ImageViewController` (Objective-C only).
-
- ```objc
- #import
-
- NS_ASSUME_NONNULL_BEGIN
-
- @interface ImageViewController : UIViewController
-
- @property (nonatomic, strong) UIImage *normalizedImage;
-
- @end
-
- NS_ASSUME_NONNULL_END
- ```
-
-3. Configure the `ImageViewController` to display the normalized image..
-
-
- >- Objective-C
- >- Swift
- >
- >1.
- ```objc
- #import "ImageViewController.h"
- @interface ImageViewController()
- @property (nonatomic, strong) UIImageView *imageView;
- @end
- @implementation ImageViewController
- -(void)viewDidLoad
- {
- NSLog(@"ImageViewController loaded");
- [super viewDidLoad];
- [self setUpView];
- }
- - (void)setUpView
- {
- _imageView = [[UIImageView alloc] initWithFrame:self.view.bounds];
- [self.view addSubview:_imageView];
- [_imageView setContentMode:UIViewContentModeScaleAspectFit];
- dispatch_async(dispatch_get_main_queue(), ^{
- [self.imageView setImage:self.normalizedImage];
- });
- }
- @end
- ```
- 2.
- ```swift
- import UIKit
- import DynamsoftCore
- import DynamsoftCaptureVisionRouter
- import DynamsoftDocumentNormalizer
- class ImageViewController: UIViewController {
- var normalizedImage:UIImage!
- var imageView:UIImageView!
- override func viewDidLoad() {
- super.viewDidLoad()
- setUpView()
- }
- func setUpView() {
- imageView = UIImageView.init(frame: view.bounds)
- imageView.contentMode = .scaleAspectFit
- view.addSubview(imageView)
- DispatchQueue.main.async { [self] in
- imageView.image = normalizedImage
- }
- }
- }
- ```
-
-4. Go to your **Main.storyboard** and add **Navigation Controller**.
-
-
-
-### Configure Camera Permissions
-
-Add **Privacy - Camera Usage Description** to the `info.plist` of your project to request camera permission. An easy way to do this is to access your project settings, go to *Info* and then add this Privacy property to the iOS target properties list.
-
-### Additional Steps for iOS 12.x or Lower Versions
-
-If your iOS version is 12.x or lower, please add the following additional steps:
-
-1. Remove the methods `application:didDiscardSceneSessions:` and `application:configurationForConnectingSceneSession:options:` from your `AppDelegate` file.
-2. Remove the `SceneDelegate.Swift` file (`SceneDelegate.h` & `SceneDelegate.m` for Objective-C).
-3. Remove the `Application Scene Manifest` from your info.plist file.
-4. Declaire the window in your `AppDelegate.Swift` file (`AppDelegate.h` for Objective-C).
-
-
- >- Objective-C
- >- Swift
- >
- >1.
- ```objc
- @interface AppDelegate : UIResponder
- @property (strong, nonatomic) UIWindow *window;
- @end
- ```
- 2.
- ```swift
- import UIKit
- @main
- class AppDelegate: UIResponder, UIApplicationDelegate {
- var window: UIWindow?
- }
- ```
-
-### Build and Run the Project
-
-1. Select the device that you want to run your app on.
-2. Run the project, then your app will be installed on your device.
-
-> Note:
->
-> - You can get the source code of the HelloWorld app from the following link
-> - [Objective-C](https://github.com/Dynamsoft/capture-vision-mobile-samples/tree/main/ios/DocumentScanner/AutoNormalizeObjc){:target="_blank"}.
-> - [Swift](https://github.com/Dynamsoft/capture-vision-mobile-samples/tree/main/ios/DocumentScanner/AutoNormalize){:target="_blank"}.
diff --git a/programming/ios/user-guide-v2.6.1003.md b/programming/ios/user-guide-v2.6.1003.md
deleted file mode 100644
index 9cdc2c8..0000000
--- a/programming/ios/user-guide-v2.6.1003.md
+++ /dev/null
@@ -1,605 +0,0 @@
----
-layout: default-layout
-title: Detect and Normalize Document - iOS User Guide
-description: This page introduce how to detect and normalize document with Dynamsoft Capture Vision iOS SDK.
-keywords: user guide, iOS, document scanner
-needAutoGenerateSidebar: true
-needGenerateH4Content: true
-noTitleIndex: true
-multiProgrammingLanguage: true
-enableLanguageSelection: true
----
-
-# iOS User Guide for Document Scanner Integration
-
-- [iOS User Guide for Document Scanner Integration](#ios-user-guide-for-document-scanner-integration)
- - [System Requirements](#system-requirements)
- - [Add the SDK](#add-the-sdk)
- - [Add the xcframeworks via CocoaPods](#add-the-xcframeworks-via-cocoapods)
- - [Add the xcframeworks via Swift Package Manager](#add-the-xcframeworks-via-swift-package-manager)
- - [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)
- - [Main ViewController for Realtime Detection of Quads](#main-viewcontroller-for-realtime-detection-of-quads)
- - [Get Prepared with the Camera Module](#get-prepared-with-the-camera-module)
- - [Initialize Capture Vision Router](#initialize-capture-vision-router)
- - [Set up Result Receiver](#set-up-result-receiver)
- - [Configure the methods viewDidLoad, viewWillAppear, and viewWillDisappear](#configure-the-methods-viewdidload-viewwillappear-and-viewwilldisappear)
- - [Display the Normalized Image](#display-the-normalized-image)
- - [Configure Camera Permissions](#configure-camera-permissions)
- - [Additional Steps for iOS 12.x or Lower Versions](#additional-steps-for-ios-12x-or-lower-versions)
- - [Build and Run the Project](#build-and-run-the-project)
-
-## System Requirements
-
-- Supported OS: iOS 11 or higher (iOS 13 and higher recommended).
-- Supported ABI: arm64 and x86_64.
-- Development Environment: Xcode 13 and above (Xcode 14.1+ recommended).
-
-## Add the SDK
-
-There are two ways to add the SDK into your project - **CocoaPods**, or via **Swift Package Manager**.
-
-### Add the xcframeworks via CocoaPods
-
-1. Add the frameworks in your **Podfile**.
-
- ```sh
- target 'HelloWorld' do
- use_frameworks!
-
- pod 'DynamsoftCaptureVisionBundle','2.6.1003'
-
- end
- ```
-
-2. Execute the pod command to install the frameworks and generate workspace(**HelloWorld.xcworkspace**):
-
- ```sh
- pod install
- ```
-
-### Add the xcframeworks via Swift Package Manager
-
-1. In your Xcode project, go to **File --> AddPackages**.
-
-2. In the top-right section of the window, search "https://github.com/Dynamsoft/capture-vision-spm"
-
-3. Select `capture-vision-spm`, choose `Exact version`, enter **2.6.1003**, then click **Add Package**.
-
-4. Check all the frameworks and add.
-
-
-
-## Build Your First Application
-
-This guide will walk you through the process of creating a HelloWorld app for detecting and normalizing documents via a camera video input.
-
->Note:
->
-> - Xcode 14.0 is used in this guide.
-> - You can get the source code of the HelloWorld app from the following link
-> - [DocumentScanner iOS Sample](https://github.com/Dynamsoft/capture-vision-mobile-samples/tree/dcv_v2.6.1003/ios/DocumentScanner/){:target="_blank"}.
-
-### Create a New Project
-
-1. Open Xcode and select create a new project.
-
-2. Select **iOS -> App** for your application.
-
-3. Input your product name (HelloWorld), interface (StoryBoard) and language (Objective-C/Swift).
-
-4. Click on the **Next** button and select the location to save the project.
-
-5. Click on the **Create** button to finish.
-
-### Include the Library
-
-Add the SDK to your new project. Please read [Add the SDK](#add-the-sdk) section for more details.
-
-### Initialize License
-
-Initialize the license first. In your **ViewController** file, add the following code to initialize the license.
-
-
->- Objective-C
->- Swift
->
->1.
-```objc
-// Import the DynamsoftLicense module to init license
-#import
-// Add LicenseVerificationListener to the interface
-@interface ViewController ()
-- (void)setLicense{
- [DSLicenseManager initLicense:@"DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9" verificationDelegate:self];
-}
--(void)onLicenseVerified:(BOOL)isSuccess error:(NSError *)error
-{
- NSLog(@"On License Verified");
- if (!isSuccess)
- {
- NSLog(error.localizedDescription);
- }else
- {
- NSLog(@"License approved");
- }
-}
-...
-@end
-```
-2.
-```swift
-// Import the DynamsoftLicense module to init license
-import DynamsoftLicense
-// Add LicenseVerificationListener to the interface
-class ViewController: UIViewController, LicenseVerificationListener {
- func setLicense(){
- LicenseManager.initLicense("DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9", verificationDelegate: self)
- }
- func onLicenseVerified(_ isSuccess: Bool, error: Error?) {
- // Add your code to do when license server returns.
- if let error = error, !isSuccess{
- print(error.localizedDescription)
- }
- }
- ...
-}
-```
-
->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=ddn&utm_source=guide&package=ios){:target="_blank"} link
-
-
-
-### Main ViewController for Realtime Detection of Quads
-
-In the main view controller, your app will scan documents via video streaming and display the detect quadrilateral area on the screen. First of all, import the headers in the ViewController file.
-
-
- >- Objective-C
- >- Swift
- >
- >1.
- ```objc
- #import
- #import
- #import
- #import
- #import
- ```
- 2.
- ```swift
- import DynamsoftCore
- import DynamsoftCaptureVisionRouter
- import DynamsoftDocumentNormalizer
- import DynamsoftUtility
- import DynamsoftCameraEnhancer
- ```
-
-#### Get Prepared with the Camera Module
-
-Create the instances of `CameraEnhancer` and `CameraView`.
-
-
->- Objective-C
->- Swift
->
->1.
-```objc
-@property (nonatomic, strong) DSCameraEnhancer *dce;
-@property (nonatomic, strong) DSCameraView *cameraView;
-...
-- (void)setUpCamera
-{
- _cameraView = [[DSCameraView alloc] initWithFrame:self.view.bounds];
- [_cameraView setAutoresizingMask:UIViewAutoresizingFlexibleWidth];
- [self.view addSubview:_cameraView];
- [_cameraView addSubview:_captureButton];
- _dce = [[DSCameraEnhancer alloc] init];
- [_dce setCameraView:_cameraView];
- DSDrawingLayer * layer = [_cameraView getDrawingLayer:DSDrawingLayerIdDDN];
- [layer setVisible:true];
- // You can enable the frame filter feature of Dynamsoft Camera Enhancer.
- //[_dce enableEnhancedFeatures:DSEnhancerFeatureFrameFilter];
-}
-```
-2.
-```swift
-var cameraView:CameraView!
-var dce:CameraEnhancer!
-...
-func setUpCamera() {
- // Create a camera view and add it as a sub view of the current view.
- cameraView = .init(frame: view.bounds)
- cameraView.autoresizingMask = [.flexibleWidth, .flexibleHeight]
- view.insertSubview(cameraView, at: 0)
- // Bind the camera enhancer with the camera view.
- dce = CameraEnhancer()
- dce.cameraView = cameraView
- // Additional step: Highlight the detected document boundary.
- let layer = cameraView.getDrawingLayer(DrawingLayerId.DDN.rawValue)
- layer?.visible = true
- // You can enable the frame filter feature of Dynamsoft Camera Enhancer.
- // dce.enableEnhancedFeatures(.frameFilter)
-}
-```
-
-#### Initialize Capture Vision Router
-
-Once the camera component is set up, declare and create an instance of `CaptureVisionRouter` and set its input to the Camera Enhancer object you created in the last step.
-
-
->- Objective-C
->- Swift
->
->1.
-```objc
-@property (nonatomic, strong) DSCaptureVisionRouter *cvr;
-...
-- (void)setUpCvr
-{
- _cvr = [[DSCaptureVisionRouter alloc] init];
-}
-```
-2.
-```swift
-var cvr:CaptureVisionRouter!
-func setUpCvr() {
- cvr = CaptureVisionRouter()
-}
-```
-
-Bind your `CaptureVisionRouter` instance with the created `CameraEnhancer` instance.
-
-
->- Objective-C
->- Swift
->
->1.
-```objc
-- (void)setUpCvr
-{
- ...
- NSError *cvrError;
- [_cvr setInput:_dce error:&cvrError];
-}
-```
-2.
-```swift
-func setUpCvr() {
- try? cvr.setInput(dce)
-}
-```
-
-#### Set up Result Receiver
-
-1. Add `CapturedResultReceiver` to your ViewController.
-
-
- >- Objective-C
- >- Swift
- >
- >1.
- ```objc
- @interface ViewController ()
- ```
- 2.
- ```swift
- class ViewController: UIViewController, LicenseVerificationListener, CapturedResultReceiver {
- ...
- }
- ```
-
-2. Implement `onNormalizedImagesReceived` method to receive the normalized images as the captured results.
-
-
- >- Objective-C
- >- Swift
- >
- >1.
- ```objc
- // import ImageViewController.h. It will be implemented later.
- #import "ImageViewController.h"
- -(void)onNormalizedImagesReceived:(DSNormalizedImagesResult *)result
- {
- if (result!=nil && result.items[0].imageData!=nil && (_implementCapture || result.items[0].crossVerificationStatus == DSCrossVerificationStatusPassed))
- {
- NSLog(@"Capture confirmed");
- _implementCapture = false;
- dispatch_async(dispatch_get_main_queue(), ^{
- [self.cvr stopCapturing];
- ImageViewController *imageViewController = [[ImageViewController alloc] init];
- NSError * error;
- imageViewController.normalizedImage = [result.items[0].imageData toUIImage:&error];
- NSLog(@"UIImage set");
- [self.navigationController pushViewController:imageViewController animated:YES];
- });
- }
- }
- ```
- 2.
- ```swift
- func onNormalizedImagesReceived(_ result: NormalizedImagesResult) {
- if let item = result.items?.first {
- if item.crossVerificationStatus == .passed || implementCapture {
- guard let data = item.imageData else { return }
- implementCapture = false
- cvr.stopCapturing()
- DispatchQueue.main.async {
- let resultView = ImageViewController()
- resultView.normalizedImage = try? data.toUIImage()
- self.navigationController?.pushViewController(resultView, animated: true)
- }
- }
- }
- }
- ```
-
-3. Add the result receiver to the `CaptureVisionRouter`.
-
-
- >- Objective-C
- >- Swift
- >
- >1.
- ```objc
- - (void)setUpCvr
- {
- ...
- [_cvr addResultReceiver:self];
- DSMultiFrameResultCrossFilter *filter = [[DSMultiFrameResultCrossFilter alloc] init];
- [filter enableResultCrossVerification:DSCapturedResultItemTypeNormalizedImage isEnabled:true];
- [_cvr addResultFilter:filter];
- }
- ```
- 2.
- ```swift
- func setUpCvr() {
- ...
- cvr.addResultReceiver(self)
- let filter = MultiFrameResultCrossFilter.init()
- filter.enableResultCrossVerification(.normalizedImage, isEnabled: true)
- cvr.addResultFilter(filter)
- }
- ```
-
-4. Add a `confirmCapture` button to confirm the result.
-
-
- >- Objective-C
- >- Swift
- >
- >1.
- ```objc
- @property (nonatomic, strong) UIButton *captureButton;
- @property (nonatomic) BOOL implementCapture;
- ...
- - (void)addCaptureButton {
- [self.view addSubview:self.captureButton];
- }
- - (UIButton *)captureButton {
- NSLog(@"Start adding button");
- CGFloat screenWidth = [UIScreen mainScreen].bounds.size.width;
- CGFloat screenHeight = [UIScreen mainScreen].bounds.size.height;
- if (!_captureButton) {
- _captureButton = [UIButton buttonWithType:UIButtonTypeCustom];
- _captureButton.frame = CGRectMake((screenWidth - 150) / 2.0, screenHeight - 100, 150, 50);
- _captureButton.backgroundColor = [UIColor grayColor];
- _captureButton.layer.cornerRadius = 10;
- _captureButton.layer.borderColor = [UIColor darkGrayColor].CGColor;
- [_captureButton setTitle:@"Capture" forState:UIControlStateNormal];
- [_captureButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
- [_captureButton addTarget:self action:@selector(setCapture) forControlEvents:UIControlEventTouchUpInside];
- }
- return _captureButton;
- }
- - (void)setCapture
- {
- _implementCapture = true;
- }
- ```
- 2.
- ```swift
- var captureButton:UIButton!
- var implementCapture:Bool = false
- ...
- func addCaptureButton()
- {
- let w = UIScreen.main.bounds.size.width
- let h = UIScreen.main.bounds.size.height
- let SafeAreaBottomHeight: CGFloat = UIApplication.shared.statusBarFrame.size.height > 20 ? 34 : 0
- let photoButton = UIButton(frame: CGRect(x: w / 2 - 60, y: h - 100 - SafeAreaBottomHeight, width: 120, height: 60))
- photoButton.setTitle("Capture", for: .normal)
- photoButton.backgroundColor = UIColor.green
- photoButton.addTarget(self, action: #selector(confirmCapture), for: .touchUpInside)
- DispatchQueue.main.async(execute: { [self] in
- view.addSubview(photoButton)
- })
- }
- @objc func confirmCapture()
- {
- implementCapture = true
- }
- ```
-
-#### Configure the methods viewDidLoad, viewWillAppear, and viewWillDisappear
-
-
->- Objective-C
->- Swift
->
->1.
-```objc
-- (void)viewDidLoad {
- [super viewDidLoad];
- [self setLicense];
- [self setUpCamera];
- [self setUpCvr];
- [self addCaptureButton];
-}
-- (void)viewWillAppear:(BOOL)animated
-{
- [super viewWillAppear:animated];
- [_dce open];
- [_cvr startCapturing:DSPresetTemplateDetectAndNormalizeDocument completionHandler:^(BOOL isSuccess, NSError * _Nullable error) {
- if (!isSuccess && error != nil) {
- NSLog(@"%@", error.localizedDescription);
- }
- }];
-}
-- (void)viewWillDisappear:(BOOL)animated
-{
- [super viewWillAppear:animated];
- [_dce close];
-}
-```
-2.
-```swift
-override func viewDidLoad() {
- super.viewDidLoad()
- setLicense()
- setUpCamera()
- setUpCvr()
- addCaptureButton()
-}
-override func viewWillAppear(_ animated: Bool) {
- super.viewWillAppear(animated)
- dce.open()
- cvr.startCapturing(PresetTemplate.detectAndNormalizeDocument.rawValue){ isSuccess, error in
- if let error = error, !isSuccess {
- print("Capture start failed")
- print(error.localizedDescription)
- }
- }
-}
-override func viewWillDisappear(_ animated: Bool) {
- super.viewWillDisappear(animated)
- dce.close()
-}
-```
-
-#### Display the Normalized Image
-
-1. Create a new `UIViewController` class `ImageViewController`.
-
-2. Add a property `normalizedImage` to the header file of `ImageViewController` (Objective-C only).
-
- ```objc
- #import
-
- NS_ASSUME_NONNULL_BEGIN
-
- @interface ImageViewController : UIViewController
-
- @property (nonatomic, strong) UIImage *normalizedImage;
-
- @end
-
- NS_ASSUME_NONNULL_END
- ```
-
-3. Configure the `ImageViewController` to display the normalized image..
-
-
- >- Objective-C
- >- Swift
- >
- >1.
- ```objc
- #import "ImageViewController.h"
- @interface ImageViewController()
- @property (nonatomic, strong) UIImageView *imageView;
- @end
- @implementation ImageViewController
- -(void)viewDidLoad
- {
- NSLog(@"ImageViewController loaded");
- [super viewDidLoad];
- [self setUpView];
- }
- - (void)setUpView
- {
- _imageView = [[UIImageView alloc] initWithFrame:self.view.bounds];
- [self.view addSubview:_imageView];
- [_imageView setContentMode:UIViewContentModeScaleAspectFit];
- dispatch_async(dispatch_get_main_queue(), ^{
- [self.imageView setImage:self.normalizedImage];
- });
- }
- @end
- ```
- 2.
- ```swift
- import UIKit
- import DynamsoftCore
- import DynamsoftCaptureVisionRouter
- import DynamsoftDocumentNormalizer
- class ImageViewController: UIViewController {
- var normalizedImage:UIImage!
- var imageView:UIImageView!
- override func viewDidLoad() {
- super.viewDidLoad()
- setUpView()
- }
- func setUpView() {
- imageView = UIImageView.init(frame: view.bounds)
- imageView.contentMode = .scaleAspectFit
- view.addSubview(imageView)
- DispatchQueue.main.async { [self] in
- imageView.image = normalizedImage
- }
- }
- }
- ```
-
-4. Go to your **Main.storyboard** and add **Navigation Controller**.
-
-
-
-### Configure Camera Permissions
-
-Add **Privacy - Camera Usage Description** to the `info.plist` of your project to request camera permission. An easy way to do this is to access your project settings, go to *Info* and then add this Privacy property to the iOS target properties list.
-
-### Additional Steps for iOS 12.x or Lower Versions
-
-If your iOS version is 12.x or lower, please add the following additional steps:
-
-1. Remove the methods `application:didDiscardSceneSessions:` and `application:configurationForConnectingSceneSession:options:` from your `AppDelegate` file.
-2. Remove the `SceneDelegate.Swift` file (`SceneDelegate.h` & `SceneDelegate.m` for Objective-C).
-3. Remove the `Application Scene Manifest` from your info.plist file.
-4. Declaire the window in your `AppDelegate.Swift` file (`AppDelegate.h` for Objective-C).
-
-
- >- Objective-C
- >- Swift
- >
- >1.
- ```objc
- @interface AppDelegate : UIResponder
- @property (strong, nonatomic) UIWindow *window;
- @end
- ```
- 2.
- ```swift
- import UIKit
- @main
- class AppDelegate: UIResponder, UIApplicationDelegate {
- var window: UIWindow?
- }
- ```
-
-### Build and Run the Project
-
-1. Select the device that you want to run your app on.
-2. Run the project, then your app will be installed on your device.
-
-> Note:
->
-> - You can get the source code of the HelloWorld app from the following link
-> - [Objective-C](https://github.com/Dynamsoft/capture-vision-mobile-samples/tree/main/ios/DocumentScanner/AutoNormalizeObjc){:target="_blank"}.
-> - [Swift](https://github.com/Dynamsoft/capture-vision-mobile-samples/tree/main/ios/DocumentScanner/AutoNormalize){:target="_blank"}.
diff --git a/programming/ios/user-guide-v2.6.1004.md b/programming/ios/user-guide-v2.6.1004.md
deleted file mode 100644
index 5c9ef8f..0000000
--- a/programming/ios/user-guide-v2.6.1004.md
+++ /dev/null
@@ -1,605 +0,0 @@
----
-layout: default-layout
-title: Detect and Normalize Document - iOS User Guide
-description: This page introduce how to detect and normalize document with Dynamsoft Capture Vision iOS SDK.
-keywords: user guide, iOS, document scanner
-needAutoGenerateSidebar: true
-needGenerateH4Content: true
-noTitleIndex: true
-multiProgrammingLanguage: true
-enableLanguageSelection: true
----
-
-# iOS User Guide for Document Scanner Integration
-
-- [iOS User Guide for Document Scanner Integration](#ios-user-guide-for-document-scanner-integration)
- - [System Requirements](#system-requirements)
- - [Add the SDK](#add-the-sdk)
- - [Add the xcframeworks via CocoaPods](#add-the-xcframeworks-via-cocoapods)
- - [Add the xcframeworks via Swift Package Manager](#add-the-xcframeworks-via-swift-package-manager)
- - [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)
- - [Main ViewController for Realtime Detection of Quads](#main-viewcontroller-for-realtime-detection-of-quads)
- - [Get Prepared with the Camera Module](#get-prepared-with-the-camera-module)
- - [Initialize Capture Vision Router](#initialize-capture-vision-router)
- - [Set up Result Receiver](#set-up-result-receiver)
- - [Configure the methods viewDidLoad, viewWillAppear, and viewWillDisappear](#configure-the-methods-viewdidload-viewwillappear-and-viewwilldisappear)
- - [Display the Normalized Image](#display-the-normalized-image)
- - [Configure Camera Permissions](#configure-camera-permissions)
- - [Additional Steps for iOS 12.x or Lower Versions](#additional-steps-for-ios-12x-or-lower-versions)
- - [Build and Run the Project](#build-and-run-the-project)
-
-## System Requirements
-
-- Supported OS: iOS 11 or higher (iOS 13 and higher recommended).
-- Supported ABI: arm64 and x86_64.
-- Development Environment: Xcode 13 and above (Xcode 14.1+ recommended).
-
-## Add the SDK
-
-There are two ways to add the SDK into your project - **CocoaPods**, or via **Swift Package Manager**.
-
-### Add the xcframeworks via CocoaPods
-
-1. Add the frameworks in your **Podfile**.
-
- ```sh
- target 'HelloWorld' do
- use_frameworks!
-
- pod 'DynamsoftCaptureVisionBundle','2.6.1004'
-
- end
- ```
-
-2. Execute the pod command to install the frameworks and generate workspace(**HelloWorld.xcworkspace**):
-
- ```sh
- pod install
- ```
-
-### Add the xcframeworks via Swift Package Manager
-
-1. In your Xcode project, go to **File --> AddPackages**.
-
-2. In the top-right section of the window, search "https://github.com/Dynamsoft/capture-vision-spm"
-
-3. Select `capture-vision-spm`, choose `Exact version`, enter **2.6.1004**, then click **Add Package**.
-
-4. Check all the frameworks and add.
-
-
-
-## Build Your First Application
-
-This guide will walk you through the process of creating a HelloWorld app for detecting and normalizing documents via a camera video input.
-
->Note:
->
-> - Xcode 14.0 is used in this guide.
-> - You can get the source code of the HelloWorld app from the following link
-> - [DocumentScanner iOS Sample](https://github.com/Dynamsoft/capture-vision-mobile-samples/tree/main/ios/DocumentScanner){:target="_blank"}.
-
-### Create a New Project
-
-1. Open Xcode and select create a new project.
-
-2. Select **iOS -> App** for your application.
-
-3. Input your product name (HelloWorld), interface (StoryBoard) and language (Objective-C/Swift).
-
-4. Click on the **Next** button and select the location to save the project.
-
-5. Click on the **Create** button to finish.
-
-### Include the Library
-
-Add the SDK to your new project. Please read [Add the SDK](#add-the-sdk) section for more details.
-
-### Initialize License
-
-Initialize the license first. In your **ViewController** file, add the following code to initialize the license.
-
-
->- Objective-C
->- Swift
->
->1.
-```objc
-// Import the DynamsoftLicense module to init license
-#import
-// Add LicenseVerificationListener to the interface
-@interface ViewController ()
-- (void)setLicense{
- [DSLicenseManager initLicense:@"DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9" verificationDelegate:self];
-}
--(void)onLicenseVerified:(BOOL)isSuccess error:(NSError *)error
-{
- NSLog(@"On License Verified");
- if (!isSuccess)
- {
- NSLog(error.localizedDescription);
- }else
- {
- NSLog(@"License approved");
- }
-}
-...
-@end
-```
-2.
-```swift
-// Import the DynamsoftLicense module to init license
-import DynamsoftLicense
-// Add LicenseVerificationListener to the interface
-class ViewController: UIViewController, LicenseVerificationListener {
- func setLicense(){
- LicenseManager.initLicense("DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9", verificationDelegate: self)
- }
- func onLicenseVerified(_ isSuccess: Bool, error: Error?) {
- // Add your code to do when license server returns.
- if let error = error, !isSuccess{
- print(error.localizedDescription)
- }
- }
- ...
-}
-```
-
->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=ddn&utm_source=guide&package=ios){:target="_blank"} link
-
-
-
-### Main ViewController for Realtime Detection of Quads
-
-In the main view controller, your app will scan documents via video streaming and display the detect quadrilateral area on the screen. First of all, import the headers in the ViewController file.
-
-
- >- Objective-C
- >- Swift
- >
- >1.
- ```objc
- #import
- #import
- #import
- #import
- #import
- ```
- 2.
- ```swift
- import DynamsoftCore
- import DynamsoftCaptureVisionRouter
- import DynamsoftDocumentNormalizer
- import DynamsoftUtility
- import DynamsoftCameraEnhancer
- ```
-
-#### Get Prepared with the Camera Module
-
-Create the instances of `CameraEnhancer` and `CameraView`.
-
-
->- Objective-C
->- Swift
->
->1.
-```objc
-@property (nonatomic, strong) DSCameraEnhancer *dce;
-@property (nonatomic, strong) DSCameraView *cameraView;
-...
-- (void)setUpCamera
-{
- _cameraView = [[DSCameraView alloc] initWithFrame:self.view.bounds];
- [_cameraView setAutoresizingMask:UIViewAutoresizingFlexibleWidth];
- [self.view addSubview:_cameraView];
- [_cameraView addSubview:_captureButton];
- _dce = [[DSCameraEnhancer alloc] init];
- [_dce setCameraView:_cameraView];
- DSDrawingLayer * layer = [_cameraView getDrawingLayer:DSDrawingLayerIdDDN];
- [layer setVisible:true];
- // You can enable the frame filter feature of Dynamsoft Camera Enhancer.
- //[_dce enableEnhancedFeatures:DSEnhancerFeatureFrameFilter];
-}
-```
-2.
-```swift
-var cameraView:CameraView!
-var dce:CameraEnhancer!
-...
-func setUpCamera() {
- // Create a camera view and add it as a sub view of the current view.
- cameraView = .init(frame: view.bounds)
- cameraView.autoresizingMask = [.flexibleWidth, .flexibleHeight]
- view.insertSubview(cameraView, at: 0)
- // Bind the camera enhancer with the camera view.
- dce = CameraEnhancer()
- dce.cameraView = cameraView
- // Additional step: Highlight the detected document boundary.
- let layer = cameraView.getDrawingLayer(DrawingLayerId.DDN.rawValue)
- layer?.visible = true
- // You can enable the frame filter feature of Dynamsoft Camera Enhancer.
- // dce.enableEnhancedFeatures(.frameFilter)
-}
-```
-
-#### Initialize Capture Vision Router
-
-Once the camera component is set up, declare and create an instance of `CaptureVisionRouter` and set its input to the Camera Enhancer object you created in the last step.
-
-
->- Objective-C
->- Swift
->
->1.
-```objc
-@property (nonatomic, strong) DSCaptureVisionRouter *cvr;
-...
-- (void)setUpCvr
-{
- _cvr = [[DSCaptureVisionRouter alloc] init];
-}
-```
-2.
-```swift
-var cvr:CaptureVisionRouter!
-func setUpCvr() {
- cvr = CaptureVisionRouter()
-}
-```
-
-Bind your `CaptureVisionRouter` instance with the created `CameraEnhancer` instance.
-
-
->- Objective-C
->- Swift
->
->1.
-```objc
-- (void)setUpCvr
-{
- ...
- NSError *cvrError;
- [_cvr setInput:_dce error:&cvrError];
-}
-```
-2.
-```swift
-func setUpCvr() {
- try? cvr.setInput(dce)
-}
-```
-
-#### Set up Result Receiver
-
-1. Add `CapturedResultReceiver` to your ViewController.
-
-
- >- Objective-C
- >- Swift
- >
- >1.
- ```objc
- @interface ViewController ()
- ```
- 2.
- ```swift
- class ViewController: UIViewController, LicenseVerificationListener, CapturedResultReceiver {
- ...
- }
- ```
-
-2. Implement `onNormalizedImagesReceived` method to receive the normalized images as the captured results.
-
-
- >- Objective-C
- >- Swift
- >
- >1.
- ```objc
- // import ImageViewController.h. It will be implemented later.
- #import "ImageViewController.h"
- -(void)onNormalizedImagesReceived:(DSNormalizedImagesResult *)result
- {
- if (result!=nil && result.items[0].imageData!=nil && (_implementCapture || result.items[0].crossVerificationStatus == DSCrossVerificationStatusPassed))
- {
- NSLog(@"Capture confirmed");
- _implementCapture = false;
- dispatch_async(dispatch_get_main_queue(), ^{
- [self.cvr stopCapturing];
- ImageViewController *imageViewController = [[ImageViewController alloc] init];
- NSError * error;
- imageViewController.normalizedImage = [result.items[0].imageData toUIImage:&error];
- NSLog(@"UIImage set");
- [self.navigationController pushViewController:imageViewController animated:YES];
- });
- }
- }
- ```
- 2.
- ```swift
- func onNormalizedImagesReceived(_ result: NormalizedImagesResult) {
- if let item = result.items?.first {
- if item.crossVerificationStatus == .passed || implementCapture {
- guard let data = item.imageData else { return }
- implementCapture = false
- cvr.stopCapturing()
- DispatchQueue.main.async {
- let resultView = ImageViewController()
- resultView.normalizedImage = try? data.toUIImage()
- self.navigationController?.pushViewController(resultView, animated: true)
- }
- }
- }
- }
- ```
-
-3. Add the result receiver to the `CaptureVisionRouter`.
-
-
- >- Objective-C
- >- Swift
- >
- >1.
- ```objc
- - (void)setUpCvr
- {
- ...
- [_cvr addResultReceiver:self];
- DSMultiFrameResultCrossFilter *filter = [[DSMultiFrameResultCrossFilter alloc] init];
- [filter enableResultCrossVerification:DSCapturedResultItemTypeNormalizedImage isEnabled:true];
- [_cvr addResultFilter:filter];
- }
- ```
- 2.
- ```swift
- func setUpCvr() {
- ...
- cvr.addResultReceiver(self)
- let filter = MultiFrameResultCrossFilter.init()
- filter.enableResultCrossVerification(.normalizedImage, isEnabled: true)
- cvr.addResultFilter(filter)
- }
- ```
-
-4. Add a `confirmCapture` button to confirm the result.
-
-
- >- Objective-C
- >- Swift
- >
- >1.
- ```objc
- @property (nonatomic, strong) UIButton *captureButton;
- @property (nonatomic) BOOL implementCapture;
- ...
- - (void)addCaptureButton {
- [self.view addSubview:self.captureButton];
- }
- - (UIButton *)captureButton {
- NSLog(@"Start adding button");
- CGFloat screenWidth = [UIScreen mainScreen].bounds.size.width;
- CGFloat screenHeight = [UIScreen mainScreen].bounds.size.height;
- if (!_captureButton) {
- _captureButton = [UIButton buttonWithType:UIButtonTypeCustom];
- _captureButton.frame = CGRectMake((screenWidth - 150) / 2.0, screenHeight - 100, 150, 50);
- _captureButton.backgroundColor = [UIColor grayColor];
- _captureButton.layer.cornerRadius = 10;
- _captureButton.layer.borderColor = [UIColor darkGrayColor].CGColor;
- [_captureButton setTitle:@"Capture" forState:UIControlStateNormal];
- [_captureButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
- [_captureButton addTarget:self action:@selector(setCapture) forControlEvents:UIControlEventTouchUpInside];
- }
- return _captureButton;
- }
- - (void)setCapture
- {
- _implementCapture = true;
- }
- ```
- 2.
- ```swift
- var captureButton:UIButton!
- var implementCapture:Bool = false
- ...
- func addCaptureButton()
- {
- let w = UIScreen.main.bounds.size.width
- let h = UIScreen.main.bounds.size.height
- let SafeAreaBottomHeight: CGFloat = UIApplication.shared.statusBarFrame.size.height > 20 ? 34 : 0
- let photoButton = UIButton(frame: CGRect(x: w / 2 - 60, y: h - 100 - SafeAreaBottomHeight, width: 120, height: 60))
- photoButton.setTitle("Capture", for: .normal)
- photoButton.backgroundColor = UIColor.green
- photoButton.addTarget(self, action: #selector(confirmCapture), for: .touchUpInside)
- DispatchQueue.main.async(execute: { [self] in
- view.addSubview(photoButton)
- })
- }
- @objc func confirmCapture()
- {
- implementCapture = true
- }
- ```
-
-#### Configure the methods viewDidLoad, viewWillAppear, and viewWillDisappear
-
-
->- Objective-C
->- Swift
->
->1.
-```objc
-- (void)viewDidLoad {
- [super viewDidLoad];
- [self setLicense];
- [self setUpCamera];
- [self setUpCvr];
- [self addCaptureButton];
-}
-- (void)viewWillAppear:(BOOL)animated
-{
- [super viewWillAppear:animated];
- [_dce open];
- [_cvr startCapturing:DSPresetTemplateDetectAndNormalizeDocument completionHandler:^(BOOL isSuccess, NSError * _Nullable error) {
- if (!isSuccess && error != nil) {
- NSLog(@"%@", error.localizedDescription);
- }
- }];
-}
-- (void)viewWillDisappear:(BOOL)animated
-{
- [super viewWillAppear:animated];
- [_dce close];
-}
-```
-2.
-```swift
-override func viewDidLoad() {
- super.viewDidLoad()
- setLicense()
- setUpCamera()
- setUpCvr()
- addCaptureButton()
-}
-override func viewWillAppear(_ animated: Bool) {
- super.viewWillAppear(animated)
- dce.open()
- cvr.startCapturing(PresetTemplate.detectAndNormalizeDocument.rawValue){ isSuccess, error in
- if let error = error, !isSuccess {
- print("Capture start failed")
- print(error.localizedDescription)
- }
- }
-}
-override func viewWillDisappear(_ animated: Bool) {
- super.viewWillDisappear(animated)
- dce.close()
-}
-```
-
-#### Display the Normalized Image
-
-1. Create a new `UIViewController` class `ImageViewController`.
-
-2. Add a property `normalizedImage` to the header file of `ImageViewController` (Objective-C only).
-
- ```objc
- #import
-
- NS_ASSUME_NONNULL_BEGIN
-
- @interface ImageViewController : UIViewController
-
- @property (nonatomic, strong) UIImage *normalizedImage;
-
- @end
-
- NS_ASSUME_NONNULL_END
- ```
-
-3. Configure the `ImageViewController` to display the normalized image..
-
-
- >- Objective-C
- >- Swift
- >
- >1.
- ```objc
- #import "ImageViewController.h"
- @interface ImageViewController()
- @property (nonatomic, strong) UIImageView *imageView;
- @end
- @implementation ImageViewController
- -(void)viewDidLoad
- {
- NSLog(@"ImageViewController loaded");
- [super viewDidLoad];
- [self setUpView];
- }
- - (void)setUpView
- {
- _imageView = [[UIImageView alloc] initWithFrame:self.view.bounds];
- [self.view addSubview:_imageView];
- [_imageView setContentMode:UIViewContentModeScaleAspectFit];
- dispatch_async(dispatch_get_main_queue(), ^{
- [self.imageView setImage:self.normalizedImage];
- });
- }
- @end
- ```
- 2.
- ```swift
- import UIKit
- import DynamsoftCore
- import DynamsoftCaptureVisionRouter
- import DynamsoftDocumentNormalizer
- class ImageViewController: UIViewController {
- var normalizedImage:UIImage!
- var imageView:UIImageView!
- override func viewDidLoad() {
- super.viewDidLoad()
- setUpView()
- }
- func setUpView() {
- imageView = UIImageView.init(frame: view.bounds)
- imageView.contentMode = .scaleAspectFit
- view.addSubview(imageView)
- DispatchQueue.main.async { [self] in
- imageView.image = normalizedImage
- }
- }
- }
- ```
-
-4. Go to your **Main.storyboard** and add **Navigation Controller**.
-
-
-
-### Configure Camera Permissions
-
-Add **Privacy - Camera Usage Description** to the `info.plist` of your project to request camera permission. An easy way to do this is to access your project settings, go to *Info* and then add this Privacy property to the iOS target properties list.
-
-### Additional Steps for iOS 12.x or Lower Versions
-
-If your iOS version is 12.x or lower, please add the following additional steps:
-
-1. Remove the methods `application:didDiscardSceneSessions:` and `application:configurationForConnectingSceneSession:options:` from your `AppDelegate` file.
-2. Remove the `SceneDelegate.Swift` file (`SceneDelegate.h` & `SceneDelegate.m` for Objective-C).
-3. Remove the `Application Scene Manifest` from your info.plist file.
-4. Declaire the window in your `AppDelegate.Swift` file (`AppDelegate.h` for Objective-C).
-
-
- >- Objective-C
- >- Swift
- >
- >1.
- ```objc
- @interface AppDelegate : UIResponder
- @property (strong, nonatomic) UIWindow *window;
- @end
- ```
- 2.
- ```swift
- import UIKit
- @main
- class AppDelegate: UIResponder, UIApplicationDelegate {
- var window: UIWindow?
- }
- ```
-
-### Build and Run the Project
-
-1. Select the device that you want to run your app on.
-2. Run the project, then your app will be installed on your device.
-
-> Note:
->
-> - You can get the source code of the HelloWorld app from the following link
-> - [Objective-C](https://github.com/Dynamsoft/capture-vision-mobile-samples/tree/main/ios/DocumentScanner/AutoNormalizeObjc){:target="_blank"}.
-> - [Swift](https://github.com/Dynamsoft/capture-vision-mobile-samples/tree/main/ios/DocumentScanner/AutoNormalize){:target="_blank"}.
diff --git a/programming/maui/user-guide-v2.4.2000.md b/programming/maui/user-guide-v2.4.2000.md
deleted file mode 100644
index ce4801c..0000000
--- a/programming/maui/user-guide-v2.4.2000.md
+++ /dev/null
@@ -1,391 +0,0 @@
----
-layout: default-layout
-title: Detect and Normalize Document - MAUI User Guide
-description: This page introduce how to detect and normalize document with Dynamsoft Capture Vision MAUI SDK.
-keywords: user guide, maui
-needAutoGenerateSidebar: true
-needGenerateH3Content: true
-noTitleIndex: true
----
-
-# MAUI User Guide for Document Scanner Integration
-
-## Table of Contents
-
-- [MAUI User Guide for Document Scanner Integration](#maui-user-guide-for-document-scanner-integration)
- - [Table of Contents](#table-of-contents)
- - [System Requirements](#system-requirements)
- - [.Net](#net)
- - [Android](#android)
- - [iOS](#ios)
- - [Installation](#installation)
- - [Visual Studio for Mac](#visual-studio-for-mac)
- - [Visual Studio for Windows](#visual-studio-for-windows)
- - [Build Your Document Scanner App](#build-your-document-scanner-app)
- - [Set up Development Environment](#set-up-development-environment)
- - [Initialize the Project](#initialize-the-project)
- - [Visual Studio](#visual-studio)
- - [Visual Studio for Mac](#visual-studio-for-mac-1)
- - [Include the Library](#include-the-library)
- - [Initialize MauiProgram](#initialize-mauiprogram)
- - [License Activation](#license-activation)
- - [Initialize the Capture Vision SDK](#initialize-the-capture-vision-sdk)
- - [Add the CameraView control in the Main Page](#add-the-cameraview-control-in-the-main-page)
- - [Open the Camera and Start Document Detection and Normalization](#open-the-camera-and-start-document-detection-and-normalization)
- - [Obtaining Normalized Document Image](#obtaining-normalized-document-image)
- - [Add the Image control in the Image Page](#add-the-image-control-in-the-image-page)
- - [Display the Normalized Document Image](#display-the-normalized-document-image)
- - [Run the Project](#run-the-project)
- - [Licensing](#licensing)
-
-## System Requirements
-
-### .Net
-
-- .NET 7.0 and .NET 8.0.
-
-### Android
-
-- Supported OS: **Android 5.0** (API Level 21) or higher.
-- Supported ABI: **armeabi-v7a**, **arm64-v8a**, **x86** and **x86_64**.
-- Development Environment: Visual Studio 2022 recommended.
-- JDK: 1.8+
-
-### iOS
-
-- Supported OS: **iOS 11.0** or higher.
-- Supported ABI: **arm64** and **x86_64**.
-- Development Environment: Visual Studio 2022 for Mac and Xcode 14.3+ recommended.
-
-## Installation
-
-### Visual Studio for Mac
-
-In the **NuGet Package Manager>Manage Packages for Solution** of your project, search for **Dynamsoft.CaptureVisionBundle.Maui**. Select it and click **install**.
-
-### Visual Studio for Windows
-
-You have to Add the library via the project file and do some additional steps to complete the installation.
-
-1. Add the library in the project file:
-
- ```xml
-
- ...
-
- ...
-
-
-
- ```
-
-2. Open the **Package Manager Console** and run the following commands:
-
- ```bash
- dotnet build
- ```
-
-> Note:
->
-> - Windows system have a limitation of 260 characters in the path. If you don't use console to install the package, you will receive error "Could not find a part of the path 'C:\Users\admin\.nuget\packages\dynamsoft.imageprocessing.ios\2.2.300\lib\net7.0-ios16.1\Dynamsoft.ImageProcessing.iOS.resources\DynamsoftImageProcessing.xcframework\ios-arm64\dSYMs\DynamsoftImageProcessing.framework.dSYM\Contents\Resources\DWARF\DynamsoftImageProcessing'"
-> - The library only support Android & iOS platform. Be sure that you remove the other platforms like Windows, maccatalyst, etc.
-
-## Build Your Document Scanner App
-
-Now you will learn how to create a SimpleDocumentScanner using Dynamsoft Capture Vision MAUI SDK.
-
->Note:
->
-> - You can get the similar source code of the SimpleDocumentScanner app from the following link
-> - [C#](https://github.com/Dynamsoft/capture-vision-maui-samples/tree/main/DocumentScanner/AutoNormalize){:target="_blank"}.
-
-### Set up Development Environment
-
-If you are a beginner with MAUI, please follow the guide on the .Net MAUI official website to set up the development environment.
-
-### Initialize the Project
-
-#### Visual Studio
-
-1. Open the Visual Studio and select **Create a new project**.
-2. Select **.Net MAUI App** and click **Next**.
-3. Name the project **SimpleDocumentScanner**. Select a location for the project and click **Next**.
-4. Select **.Net 7.0** and click **Create**.
-
-#### Visual Studio for Mac
-
-1. Open Visual Studio and select **New**.
-2. Select **Multiplatform > App > .Net MAUI App > C#** and click **Continue**.
-3. Select **.Net 7.0** and click **Continue**.
-4. Name the project **SimpleDocumentScanner** and select a location, click **Create**.
-
-### Include the Library
-
-Add NuGet package **Dynamsoft.CaptureVisionBundle.Maui** to your project. You can view the [installation section](#installation) on how to add the library.
-
-### Initialize MauiProgram
-
-In **MauiProgram.cs**, add a custom handler for the `CameraView` control. Specifically, it maps the `CameraView` type to the `CameraViewHandler` type.
-
-```c#
-namespace SimpleDocumentScanner;
-using Microsoft.Extensions.Logging;
-using Dynamsoft.CameraEnhancer.Maui;
-using Dynamsoft.CameraEnhancer.Maui.Handlers;
-
-public static class MauiProgram
-{
- public static MauiApp CreateMauiApp()
- {
- var builder = MauiApp.CreateBuilder();
- builder
- .UseMauiApp()
- .ConfigureFonts(fonts =>
- {
- fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular");
- fonts.AddFont("OpenSans-Semibold.ttf", "OpenSansSemibold");
- })
- .ConfigureMauiHandlers(handlers =>
- {
- handlers.AddHandler(typeof(CameraView), typeof(CameraViewHandler));
- });
-
-#if DEBUG
- builder.Logging.AddDebug();
-#endif
-
- return builder.Build();
- }
-}
-```
-
-### License Activation
-
-The Dynamsoft Capture Vision SDK needs a valid license to work. Please refer to the [Licensing](#licensing) section for more info on how to obtain a license.
-
-Go to **MainPage.xaml.cs**. Add the following code to activate the license:
-
-```c#
-namespace SimpleDocumentScanner;
-using Dynamsoft.License.Maui;
-using System.Diagnostics;
-
-public partial class MainPage : ContentPage, ILicenseVerificationListener
-{
- public MainPage()
- {
- InitializeComponent();
- LicenseManager.InitLicense("DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9", this);
- }
- public void OnLicenseVerified(bool isSuccess, string message)
- {
- if (!isSuccess)
- {
- Debug.WriteLine(message);
- }
- }
-}
-```
-
-### Initialize the Capture Vision SDK
-
-In the **MainPage.xaml.cs**, add the following code to initialize the Capture Vision SDK:
-
-```c#
-......
-using Dynamsoft.CaptureVisionRouter.Maui;
-using Dynamsoft.CameraEnhancer.Maui;
-using Dynamsoft.Core.Maui;
-using Dynamsoft.Utility.Maui;
-
-public partial class MainPage : ContentPage, ILicenseVerificationListener, ICapturedResultReceiver
-{
- CameraEnhancer enhancer;
- CaptureVisionRouter router;
-
- public MainPage()
- {
- ......
-
- // Create an instance of CameraEnhancer
- enhancer = new CameraEnhancer();
- // Create an instance of CaptureVisionRouter
- router = new CaptureVisionRouter();
- // Bind the router with the created CameraEnhancer
- router.SetInput(enhancer);
- // Add the result receiver to receive the document normalized image
- router.AddResultReceiver(this);
- // Add the result filter to verify the result across multiple frames
- var filter = new MultiFrameResultCrossFilter();
- filter.EnableResultCrossVerification(EnumCapturedResultItemType.CRIT_NORMALIZED_IMAGE, true);
- router.AddResultFilter(filter);
- }
-}
-```
-
-### Add the CameraView control in the Main Page
-
-In the **MainPage.xaml**, add a `CameraView` control:
-
-```xml
-
-
-
-
-
-
-```
-
-### Open the Camera and Start Document Detection and Normalization
-
-In this section, we are going to add code to start document detection and normalization in the **MainPage.xaml.cs**.
-
-```c#
-......
-
-public partial class MainPage : ContentPage, ILicenseVerificationListener, ICapturedResultReceiver, ICompletionListener
-{
- ......
- protected override void OnHandlerChanged()
- {
- base.OnHandlerChanged();
-
- if (this.Handler != null)
- {
- enhancer.SetCameraView(cameraView);
- }
- }
-
- protected override async void OnAppearing()
- {
- base.OnAppearing();
- // Request camera permission
- await Permissions.RequestAsync();
- // Open camera
- enhancer?.Open();
- // Start document detection and normalization
- router?.StartCapturing(EnumPresetTemplate.PT_DETECT_AND_NORMALIZE_DOCUMENT, this);
- }
-
- protected override void OnDisappearing()
- {
- base.OnDisappearing();
- // Close camera
- enhancer?.Close();
- // Stop document detection and normalization
- router?.StopCapturing();
- }
-
- // It is called when StartCapturing is successful
- public void OnSuccess()
- {
- Debug.WriteLine("Success");
- }
-
- // It is called when StartCapturing is failed
- public void OnFailure(int errorCode, string errorMessage)
- {
- Debug.WriteLine(errorMessage);
- }
-}
-```
-
-Open the **Info.plist** file under the **Platforms/iOS/** folder (Open with XML Text Editor). Add the following lines to request camera permission on iOS platform:
-
-```xml
-NSCameraUsageDescription
-The sample needs to access your camera.
-```
-
-### Obtaining Normalized Document Image
-
-In **MainPage.xaml.cs**, implement `ICapturedResultReceiver` to receive normalized images result in `OnNormalizedImagesReceived` callback function.
-
-```c#
-......
-using Dynamsoft.DocumentNormalizer.Maui;
-
-public partial class MainPage : ContentPage, ILicenseVerificationListener, ICapturedResultReceiver, ICompletionListener
-{
- ......
- public void OnNormalizedImagesReceived(NormalizedImagesResult result)
- {
- if (result?.Items?.Count > 0)
- {
- router?.StopCapturing();
- enhancer?.ClearBuffer();
- var data = result.Items[0].ImageData;
- MainThread.BeginInvokeOnMainThread(async () =>
- {
- await Navigation.PushAsync(new ImagePage(data));
- });
- }
- }
-}
-```
-
-### Add the Image control in the Image Page
-
-In the **ImagePage.xaml**, add a `Image` control and three buttons:
-
-```xml
-
-
-
-
-
-
-```
-
-### Display the Normalized Document Image
-
-```c#
-namespace SimpleDocumentScanner;
-using Dynamsoft.Core.Maui;
-
-public partial class ImagePage : ContentPage
-{
- ImageData data;
-
- public ImagePage(ImageData data)
- {
- InitializeComponent();
- this.data = data;
- }
-
- protected override void OnHandlerChanged()
- {
- base.OnHandlerChanged();
- image.Source = data.ToImageSource();
- }
-}
-```
-
-### Run the Project
-
-Select your device and run the project.
-
-You can get the similar source code of the SimpleDocumentScanner app from the following link:
-
-- [C#](https://github.com/Dynamsoft/capture-vision-maui-samples/tree/main/DocumentScanner/AutoNormalize){:target="_blank"}.
-
-> Note: If you are running Android only on Visual Studio Windows, please manually exclude iOS and Windows platforms. Otherwise, the Visual Studio will report type or namespace not found errors.
-
-
-
-## Licensing
-
-- A one-day trial license is available by default for every new device to try Dynamsoft Capture Vision SDK.
-- You can request a 30-day trial license via the [Request a Trial License](https://www.dynamsoft.com/customer/license/trialLicense?product=dcv&package=mobile&utm_source=docs){:target="_blank"} link.
-- [Contact us](https://www.dynamsoft.com/company/contact/){:target="_blank"} to purchase a full license.
diff --git a/programming/maui/user-guide-v2.6.1000.md b/programming/maui/user-guide-v2.6.1000.md
deleted file mode 100644
index 0442647..0000000
--- a/programming/maui/user-guide-v2.6.1000.md
+++ /dev/null
@@ -1,391 +0,0 @@
----
-layout: default-layout
-title: Detect and Normalize Document - MAUI User Guide
-description: This page introduce how to detect and normalize document with Dynamsoft Capture Vision MAUI SDK.
-keywords: user guide, maui
-needAutoGenerateSidebar: true
-needGenerateH3Content: true
-noTitleIndex: true
----
-
-# MAUI User Guide for Document Scanner Integration
-
-## Table of Contents
-
-- [MAUI User Guide for Document Scanner Integration](#maui-user-guide-for-document-scanner-integration)
- - [Table of Contents](#table-of-contents)
- - [System Requirements](#system-requirements)
- - [.Net](#net)
- - [Android](#android)
- - [iOS](#ios)
- - [Installation](#installation)
- - [Visual Studio for Mac](#visual-studio-for-mac)
- - [Visual Studio for Windows](#visual-studio-for-windows)
- - [Build Your Document Scanner App](#build-your-document-scanner-app)
- - [Set up Development Environment](#set-up-development-environment)
- - [Initialize the Project](#initialize-the-project)
- - [Visual Studio](#visual-studio)
- - [Visual Studio for Mac](#visual-studio-for-mac-1)
- - [Include the Library](#include-the-library)
- - [Initialize MauiProgram](#initialize-mauiprogram)
- - [License Activation](#license-activation)
- - [Initialize the Capture Vision SDK](#initialize-the-capture-vision-sdk)
- - [Add the CameraView control in the Main Page](#add-the-cameraview-control-in-the-main-page)
- - [Open the Camera and Start Document Detection and Normalization](#open-the-camera-and-start-document-detection-and-normalization)
- - [Obtaining Normalized Document Image](#obtaining-normalized-document-image)
- - [Add the Image control in the Image Page](#add-the-image-control-in-the-image-page)
- - [Display the Normalized Document Image](#display-the-normalized-document-image)
- - [Run the Project](#run-the-project)
- - [Licensing](#licensing)
-
-## System Requirements
-
-### .Net
-
-- .NET 7.0, 8.0 and 9.0.
-
-### Android
-
-- Supported OS: **Android 5.0** (API Level 21) or higher.
-- Supported ABI: **armeabi-v7a**, **arm64-v8a**, **x86** and **x86_64**.
-- Development Environment: Visual Studio 2022 recommended.
-- JDK: 1.8+
-
-### iOS
-
-- Supported OS: **iOS 11.0** or higher.
-- Supported ABI: **arm64** and **x86_64**.
-- Development Environment: Visual Studio 2022 for Mac and Xcode 14.3+ recommended.
-
-## Installation
-
-### Visual Studio for Mac
-
-In the **NuGet Package Manager>Manage Packages for Solution** of your project, search for **Dynamsoft.CaptureVisionBundle.Maui**. Select it and click **install**.
-
-### Visual Studio for Windows
-
-You need to add the library via the project file and complete additional steps for the installation.
-
-1. Add the library in the project file:
-
- ```xml
-
- ...
-
- ...
-
-
-
- ```
-
-2. Open the **Package Manager Console** and run the following commands:
-
- ```bash
- dotnet build
- ```
-
-> Note:
->
-> - Windows system have a limitation of 260 characters in the path. If you don't use console to install the package, you will receive error "Could not find a part of the path 'C:\Users\admin\.nuget\packages\dynamsoft.imageprocessing.ios\2.2.300\lib\net7.0-ios16.1\Dynamsoft.ImageProcessing.iOS.resources\DynamsoftImageProcessing.xcframework\ios-arm64\dSYMs\DynamsoftImageProcessing.framework.dSYM\Contents\Resources\DWARF\DynamsoftImageProcessing'"
-> - The library only support Android & iOS platform. Be sure that you remove the other platforms like Windows, maccatalyst, etc.
-
-## Build Your Document Scanner App
-
-Now you will learn how to create a SimpleDocumentScanner using Dynamsoft Capture Vision MAUI SDK.
-
->Note:
->
-> - You can get the similar source code of the SimpleDocumentScanner app from the following link
-> - [C#](https://github.com/Dynamsoft/capture-vision-maui-samples/tree/main/DocumentScanner/AutoNormalize){:target="_blank"}.
-
-### Set up Development Environment
-
-If you are a beginner with MAUI, please follow the guide on the .Net MAUI official website to set up the development environment.
-
-### Initialize the Project
-
-#### Visual Studio
-
-1. Open the Visual Studio and select **Create a new project**.
-2. Select **.Net MAUI App** and click **Next**.
-3. Name the project **SimpleDocumentScanner**. Select a location for the project and click **Next**.
-4. Select **.Net 7.0** and click **Create**.
-
-#### Visual Studio for Mac
-
-1. Open Visual Studio and select **New**.
-2. Select **Multiplatform > App > .Net MAUI App > C#** and click **Continue**.
-3. Select **.Net 7.0** and click **Continue**.
-4. Name the project **SimpleDocumentScanner** and select a location, click **Create**.
-
-### Include the Library
-
-Add NuGet package **Dynamsoft.CaptureVisionBundle.Maui** to your project. You can view the [installation section](#installation) on how to add the library.
-
-### Initialize MauiProgram
-
-In **MauiProgram.cs**, add a custom handler for the [`CameraView`]({{ site.dce_maui_api }}camera-view.html) control. Specifically, it maps the [`CameraView`]({{ site.dce_maui_api }}camera-view.html) type to the `CameraViewHandler` type.
-
-```c#
-namespace SimpleDocumentScanner;
-using Microsoft.Extensions.Logging;
-using Dynamsoft.CameraEnhancer.Maui;
-using Dynamsoft.CameraEnhancer.Maui.Handlers;
-
-public static class MauiProgram
-{
- public static MauiApp CreateMauiApp()
- {
- var builder = MauiApp.CreateBuilder();
- builder
- .UseMauiApp()
- .ConfigureFonts(fonts =>
- {
- fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular");
- fonts.AddFont("OpenSans-Semibold.ttf", "OpenSansSemibold");
- })
- .ConfigureMauiHandlers(handlers =>
- {
- handlers.AddHandler(typeof(CameraView), typeof(CameraViewHandler));
- });
-
-#if DEBUG
- builder.Logging.AddDebug();
-#endif
-
- return builder.Build();
- }
-}
-```
-
-### License Activation
-
-The Dynamsoft Capture Vision SDK needs a valid license to work. Please refer to the [Licensing](#licensing) section for more info on how to obtain a license.
-
-Go to **MainPage.xaml.cs**. Add the following code to activate the license:
-
-```c#
-namespace SimpleDocumentScanner;
-using Dynamsoft.License.Maui;
-using System.Diagnostics;
-
-public partial class MainPage : ContentPage, ILicenseVerificationListener
-{
- public MainPage()
- {
- InitializeComponent();
- LicenseManager.InitLicense("DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9", this);
- }
- public void OnLicenseVerified(bool isSuccess, string message)
- {
- if (!isSuccess)
- {
- Debug.WriteLine(message);
- }
- }
-}
-```
-
-### Initialize the Capture Vision SDK
-
-In the **MainPage.xaml.cs**, add the following code to initialize the Capture Vision SDK:
-
-```c#
-......
-using Dynamsoft.CaptureVisionRouter.Maui;
-using Dynamsoft.CameraEnhancer.Maui;
-using Dynamsoft.Core.Maui;
-using Dynamsoft.Utility.Maui;
-
-public partial class MainPage : ContentPage, ILicenseVerificationListener, ICapturedResultReceiver
-{
- CameraEnhancer enhancer;
- CaptureVisionRouter router;
-
- public MainPage()
- {
- ......
-
- // Create an instance of CameraEnhancer
- enhancer = new CameraEnhancer();
- // Create an instance of CaptureVisionRouter
- router = new CaptureVisionRouter();
- // Bind the router with the created CameraEnhancer
- router.SetInput(enhancer);
- // Add the result receiver to receive the document normalized image
- router.AddResultReceiver(this);
- // Add the result filter to verify the result across multiple frames
- var filter = new MultiFrameResultCrossFilter();
- filter.EnableResultCrossVerification(EnumCapturedResultItemType.CRIT_NORMALIZED_IMAGE, true);
- router.AddResultFilter(filter);
- }
-}
-```
-
-### Add the CameraView control in the Main Page
-
-In the **MainPage.xaml**, add a [`CameraView`]({{ site.dce_maui_api }}camera-view.html) control:
-
-```xml
-
-
-
-
-
-
-```
-
-### Open the Camera and Start Document Detection and Normalization
-
-In this section, we are going to add code to start document detection and normalization in the **MainPage.xaml.cs**.
-
-```c#
-......
-
-public partial class MainPage : ContentPage, ILicenseVerificationListener, ICapturedResultReceiver, ICompletionListener
-{
- ......
- protected override void OnHandlerChanged()
- {
- base.OnHandlerChanged();
-
- if (this.Handler != null)
- {
- enhancer.SetCameraView(cameraView);
- }
- }
-
- protected override async void OnAppearing()
- {
- base.OnAppearing();
- // Request camera permission
- await Permissions.RequestAsync();
- // Open camera
- enhancer?.Open();
- // Start document detection and normalization
- router?.StartCapturing(EnumPresetTemplate.PT_DETECT_AND_NORMALIZE_DOCUMENT, this);
- }
-
- protected override void OnDisappearing()
- {
- base.OnDisappearing();
- // Close camera
- enhancer?.Close();
- // Stop document detection and normalization
- router?.StopCapturing();
- }
-
- // It is called when StartCapturing is successful
- public void OnSuccess()
- {
- Debug.WriteLine("Success");
- }
-
- // It is called when StartCapturing is failed
- public void OnFailure(int errorCode, string errorMessage)
- {
- Debug.WriteLine(errorMessage);
- }
-}
-```
-
-Open the **Info.plist** file under the **Platforms/iOS/** folder (Open with XML Text Editor). Add the following lines to request camera permission on iOS platform:
-
-```xml
-NSCameraUsageDescription
-The sample needs to access your camera.
-```
-
-### Obtaining Normalized Document Image
-
-In **MainPage.xaml.cs**, implement [`ICapturedResultReceiver`]({{ site.dcv_maui_api }}capture-vision-router/auxiliary-classes/captured-result-receiver.html) to receive normalized images result in [`OnNormalizedImagesReceived`]({{ site.dcv_maui_api }}capture-vision-router/auxiliary-classes/captured-result-receiver.html#onnormalizedimagesreceived) callback function.
-
-```c#
-......
-using Dynamsoft.DocumentNormalizer.Maui;
-
-public partial class MainPage : ContentPage, ILicenseVerificationListener, ICapturedResultReceiver, ICompletionListener
-{
- ......
- public void OnNormalizedImagesReceived(NormalizedImagesResult result)
- {
- if (result?.Items?.Count > 0)
- {
- router?.StopCapturing();
- enhancer?.ClearBuffer();
- var data = result.Items[0].ImageData;
- MainThread.BeginInvokeOnMainThread(async () =>
- {
- await Navigation.PushAsync(new ImagePage(data));
- });
- }
- }
-}
-```
-
-### Add the Image control in the Image Page
-
-In the **ImagePage.xaml**, add a `Image` control and three buttons:
-
-```xml
-
-
-
-
-
-
-```
-
-### Display the Normalized Document Image
-
-```c#
-namespace SimpleDocumentScanner;
-using Dynamsoft.Core.Maui;
-
-public partial class ImagePage : ContentPage
-{
- ImageData data;
-
- public ImagePage(ImageData data)
- {
- InitializeComponent();
- this.data = data;
- }
-
- protected override void OnHandlerChanged()
- {
- base.OnHandlerChanged();
- image.Source = data.ToImageSource();
- }
-}
-```
-
-### Run the Project
-
-Select your device and run the project.
-
-You can get the similar source code of the SimpleDocumentScanner app from the following link:
-
-- [C#](https://github.com/Dynamsoft/capture-vision-maui-samples/tree/main/DocumentScanner/AutoNormalize){:target="_blank"}.
-
-> Note: If you are running Android only on Visual Studio Windows, please manually exclude iOS and Windows platforms. Otherwise, the Visual Studio will report type or namespace not found errors.
-
-
-
-## Licensing
-
-- A one-day trial license is available by default for every new device to try Dynamsoft Capture Vision SDK.
-- You can request a 30-day trial license via the [Request a Trial License](https://www.dynamsoft.com/customer/license/trialLicense?product=dcv&package=mobile&utm_source=docs){:target="_blank"} link.
-- [Contact us](https://www.dynamsoft.com/company/contact/){:target="_blank"} to purchase a full license.
diff --git a/programming/maui/user-guide-v2.6.1001.md b/programming/maui/user-guide-v2.6.1001.md
deleted file mode 100644
index 0f06561..0000000
--- a/programming/maui/user-guide-v2.6.1001.md
+++ /dev/null
@@ -1,391 +0,0 @@
----
-layout: default-layout
-title: Detect and Normalize Document - MAUI User Guide
-description: This page introduce how to detect and normalize document with Dynamsoft Capture Vision MAUI SDK.
-keywords: user guide, maui
-needAutoGenerateSidebar: true
-needGenerateH3Content: true
-noTitleIndex: true
----
-
-# MAUI User Guide for Document Scanner Integration
-
-## Table of Contents
-
-- [MAUI User Guide for Document Scanner Integration](#maui-user-guide-for-document-scanner-integration)
- - [Table of Contents](#table-of-contents)
- - [System Requirements](#system-requirements)
- - [.Net](#net)
- - [Android](#android)
- - [iOS](#ios)
- - [Installation](#installation)
- - [Visual Studio for Mac](#visual-studio-for-mac)
- - [Visual Studio for Windows](#visual-studio-for-windows)
- - [Build Your Document Scanner App](#build-your-document-scanner-app)
- - [Set up Development Environment](#set-up-development-environment)
- - [Initialize the Project](#initialize-the-project)
- - [Visual Studio](#visual-studio)
- - [Visual Studio for Mac](#visual-studio-for-mac-1)
- - [Include the Library](#include-the-library)
- - [Initialize MauiProgram](#initialize-mauiprogram)
- - [License Activation](#license-activation)
- - [Initialize the Capture Vision SDK](#initialize-the-capture-vision-sdk)
- - [Add the CameraView control in the Main Page](#add-the-cameraview-control-in-the-main-page)
- - [Open the Camera and Start Document Detection and Normalization](#open-the-camera-and-start-document-detection-and-normalization)
- - [Obtaining Normalized Document Image](#obtaining-normalized-document-image)
- - [Add the Image control in the Image Page](#add-the-image-control-in-the-image-page)
- - [Display the Normalized Document Image](#display-the-normalized-document-image)
- - [Run the Project](#run-the-project)
- - [Licensing](#licensing)
-
-## System Requirements
-
-### .Net
-
-- .NET 7.0, 8.0 and 9.0.
-
-### Android
-
-- Supported OS: **Android 5.0** (API Level 21) or higher.
-- Supported ABI: **armeabi-v7a**, **arm64-v8a**, **x86** and **x86_64**.
-- Development Environment: Visual Studio 2022 recommended.
-- JDK: 1.8+
-
-### iOS
-
-- Supported OS: **iOS 11.0** or higher.
-- Supported ABI: **arm64** and **x86_64**.
-- Development Environment: Visual Studio 2022 for Mac and Xcode 14.3+ recommended.
-
-## Installation
-
-### Visual Studio for Mac
-
-In the **NuGet Package Manager>Manage Packages for Solution** of your project, search for **Dynamsoft.CaptureVisionBundle.Maui**. Select it and click **install**.
-
-### Visual Studio for Windows
-
-You need to add the library via the project file and complete additional steps for the installation.
-
-1. Add the library in the project file:
-
- ```xml
-
- ...
-
- ...
-
-
-
- ```
-
-2. Open the **Package Manager Console** and run the following commands:
-
- ```bash
- dotnet build
- ```
-
-> Note:
->
-> - Windows system have a limitation of 260 characters in the path. If you don't use console to install the package, you will receive error "Could not find a part of the path 'C:\Users\admin\.nuget\packages\dynamsoft.imageprocessing.ios\2.2.300\lib\net7.0-ios16.1\Dynamsoft.ImageProcessing.iOS.resources\DynamsoftImageProcessing.xcframework\ios-arm64\dSYMs\DynamsoftImageProcessing.framework.dSYM\Contents\Resources\DWARF\DynamsoftImageProcessing'"
-> - The library only support Android & iOS platform. Be sure that you remove the other platforms like Windows, maccatalyst, etc.
-
-## Build Your Document Scanner App
-
-Now you will learn how to create a SimpleDocumentScanner using Dynamsoft Capture Vision MAUI SDK.
-
->Note:
->
-> - You can get the similar source code of the SimpleDocumentScanner app from the following link
-> - [C#](https://github.com/Dynamsoft/capture-vision-maui-samples/tree/main/DocumentScanner/AutoNormalize){:target="_blank"}.
-
-### Set up Development Environment
-
-If you are a beginner with MAUI, please follow the guide on the .Net MAUI official website to set up the development environment.
-
-### Initialize the Project
-
-#### Visual Studio
-
-1. Open the Visual Studio and select **Create a new project**.
-2. Select **.Net MAUI App** and click **Next**.
-3. Name the project **SimpleDocumentScanner**. Select a location for the project and click **Next**.
-4. Select **.Net 7.0** and click **Create**.
-
-#### Visual Studio for Mac
-
-1. Open Visual Studio and select **New**.
-2. Select **Multiplatform > App > .Net MAUI App > C#** and click **Continue**.
-3. Select **.Net 7.0** and click **Continue**.
-4. Name the project **SimpleDocumentScanner** and select a location, click **Create**.
-
-### Include the Library
-
-Add NuGet package **Dynamsoft.CaptureVisionBundle.Maui** to your project. You can view the [installation section](#installation) on how to add the library.
-
-### Initialize MauiProgram
-
-In **MauiProgram.cs**, add a custom handler for the [`CameraView`]({{ site.dce_maui_api }}camera-view.html) control. Specifically, it maps the [`CameraView`]({{ site.dce_maui_api }}camera-view.html) type to the `CameraViewHandler` type.
-
-```c#
-namespace SimpleDocumentScanner;
-using Microsoft.Extensions.Logging;
-using Dynamsoft.CameraEnhancer.Maui;
-using Dynamsoft.CameraEnhancer.Maui.Handlers;
-
-public static class MauiProgram
-{
- public static MauiApp CreateMauiApp()
- {
- var builder = MauiApp.CreateBuilder();
- builder
- .UseMauiApp()
- .ConfigureFonts(fonts =>
- {
- fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular");
- fonts.AddFont("OpenSans-Semibold.ttf", "OpenSansSemibold");
- })
- .ConfigureMauiHandlers(handlers =>
- {
- handlers.AddHandler(typeof(CameraView), typeof(CameraViewHandler));
- });
-
-#if DEBUG
- builder.Logging.AddDebug();
-#endif
-
- return builder.Build();
- }
-}
-```
-
-### License Activation
-
-The Dynamsoft Capture Vision SDK needs a valid license to work. Please refer to the [Licensing](#licensing) section for more info on how to obtain a license.
-
-Go to **MainPage.xaml.cs**. Add the following code to activate the license:
-
-```c#
-namespace SimpleDocumentScanner;
-using Dynamsoft.License.Maui;
-using System.Diagnostics;
-
-public partial class MainPage : ContentPage, ILicenseVerificationListener
-{
- public MainPage()
- {
- InitializeComponent();
- LicenseManager.InitLicense("DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9", this);
- }
- public void OnLicenseVerified(bool isSuccess, string message)
- {
- if (!isSuccess)
- {
- Debug.WriteLine(message);
- }
- }
-}
-```
-
-### Initialize the Capture Vision SDK
-
-In the **MainPage.xaml.cs**, add the following code to initialize the Capture Vision SDK:
-
-```c#
-......
-using Dynamsoft.CaptureVisionRouter.Maui;
-using Dynamsoft.CameraEnhancer.Maui;
-using Dynamsoft.Core.Maui;
-using Dynamsoft.Utility.Maui;
-
-public partial class MainPage : ContentPage, ILicenseVerificationListener, ICapturedResultReceiver
-{
- CameraEnhancer enhancer;
- CaptureVisionRouter router;
-
- public MainPage()
- {
- ......
-
- // Create an instance of CameraEnhancer
- enhancer = new CameraEnhancer();
- // Create an instance of CaptureVisionRouter
- router = new CaptureVisionRouter();
- // Bind the router with the created CameraEnhancer
- router.SetInput(enhancer);
- // Add the result receiver to receive the document normalized image
- router.AddResultReceiver(this);
- // Add the result filter to verify the result across multiple frames
- var filter = new MultiFrameResultCrossFilter();
- filter.EnableResultCrossVerification(EnumCapturedResultItemType.CRIT_NORMALIZED_IMAGE, true);
- router.AddResultFilter(filter);
- }
-}
-```
-
-### Add the CameraView control in the Main Page
-
-In the **MainPage.xaml**, add a [`CameraView`]({{ site.dce_maui_api }}camera-view.html) control:
-
-```xml
-
-
-
-
-
-
-```
-
-### Open the Camera and Start Document Detection and Normalization
-
-In this section, we are going to add code to start document detection and normalization in the **MainPage.xaml.cs**.
-
-```c#
-......
-
-public partial class MainPage : ContentPage, ILicenseVerificationListener, ICapturedResultReceiver, ICompletionListener
-{
- ......
- protected override void OnHandlerChanged()
- {
- base.OnHandlerChanged();
-
- if (this.Handler != null)
- {
- enhancer.SetCameraView(cameraView);
- }
- }
-
- protected override async void OnAppearing()
- {
- base.OnAppearing();
- // Request camera permission
- await Permissions.RequestAsync();
- // Open camera
- enhancer?.Open();
- // Start document detection and normalization
- router?.StartCapturing(EnumPresetTemplate.PT_DETECT_AND_NORMALIZE_DOCUMENT, this);
- }
-
- protected override void OnDisappearing()
- {
- base.OnDisappearing();
- // Close camera
- enhancer?.Close();
- // Stop document detection and normalization
- router?.StopCapturing();
- }
-
- // It is called when StartCapturing is successful
- public void OnSuccess()
- {
- Debug.WriteLine("Success");
- }
-
- // It is called when StartCapturing is failed
- public void OnFailure(int errorCode, string errorMessage)
- {
- Debug.WriteLine(errorMessage);
- }
-}
-```
-
-Open the **Info.plist** file under the **Platforms/iOS/** folder (Open with XML Text Editor). Add the following lines to request camera permission on iOS platform:
-
-```xml
-NSCameraUsageDescription
-The sample needs to access your camera.
-```
-
-### Obtaining Normalized Document Image
-
-In **MainPage.xaml.cs**, implement [`ICapturedResultReceiver`]({{ site.dcv_maui_api }}capture-vision-router/auxiliary-classes/captured-result-receiver.html) to receive normalized images result in [`OnNormalizedImagesReceived`]({{ site.dcv_maui_api }}capture-vision-router/auxiliary-classes/captured-result-receiver.html#onnormalizedimagesreceived) callback function.
-
-```c#
-......
-using Dynamsoft.DocumentNormalizer.Maui;
-
-public partial class MainPage : ContentPage, ILicenseVerificationListener, ICapturedResultReceiver, ICompletionListener
-{
- ......
- public void OnNormalizedImagesReceived(NormalizedImagesResult result)
- {
- if (result?.Items?.Count > 0)
- {
- router?.StopCapturing();
- enhancer?.ClearBuffer();
- var data = result.Items[0].ImageData;
- MainThread.BeginInvokeOnMainThread(async () =>
- {
- await Navigation.PushAsync(new ImagePage(data));
- });
- }
- }
-}
-```
-
-### Add the Image control in the Image Page
-
-In the **ImagePage.xaml**, add a `Image` control and three buttons:
-
-```xml
-
-
-
-
-
-
-```
-
-### Display the Normalized Document Image
-
-```c#
-namespace SimpleDocumentScanner;
-using Dynamsoft.Core.Maui;
-
-public partial class ImagePage : ContentPage
-{
- ImageData data;
-
- public ImagePage(ImageData data)
- {
- InitializeComponent();
- this.data = data;
- }
-
- protected override void OnHandlerChanged()
- {
- base.OnHandlerChanged();
- image.Source = data.ToImageSource();
- }
-}
-```
-
-### Run the Project
-
-Select your device and run the project.
-
-You can get the similar source code of the SimpleDocumentScanner app from the following link:
-
-- [C#](https://github.com/Dynamsoft/capture-vision-maui-samples/tree/main/DocumentScanner/AutoNormalize){:target="_blank"}.
-
-> Note: If you are running Android only on Visual Studio Windows, please manually exclude iOS and Windows platforms. Otherwise, the Visual Studio will report type or namespace not found errors.
-
-
-
-## Licensing
-
-- A one-day trial license is available by default for every new device to try Dynamsoft Capture Vision SDK.
-- You can request a 30-day trial license via the [Request a Trial License](https://www.dynamsoft.com/customer/license/trialLicense?product=dcv&package=mobile&utm_source=docs){:target="_blank"} link.
-- [Contact us](https://www.dynamsoft.com/company/contact/){:target="_blank"} to purchase a full license.