Skip to content

Commit

Permalink
Merge pull request #46 from dynamsoft-docs/preview
Browse files Browse the repository at this point in the history
update to internal commit b3118d6c
  • Loading branch information
Dynamsoft-Jerson authored May 15, 2024
2 parents 2a7f6d3 + c787702 commit 913a368
Show file tree
Hide file tree
Showing 8 changed files with 614 additions and 18 deletions.
81 changes: 66 additions & 15 deletions assets/js/ddnMobileVersionSearch.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,56 +2,107 @@
{
"version": "2.2.11",
"matchList": {
"android":{
"dcvRepoMobile": [
{
"path": "/programming/android/api-reference/utility",
"version": "1.2.20"
}, {
"path": "/programming/android/api-reference/license",
"version": "3.2.20"
}, {
"path": "/programming/android/api-reference/capture-vision-router",
"version": "2.2.30"
}, {
"path": "/programming/android/api-reference/core",
"version": "3.2.30"
}, {
"path": "/programming/android/api-reference/image-processing",
"version": "2.2.30"
}
],
"dcvRepoCore": [
{
"path": "/introduction/",
"version": "2.2.10"
}, {
"path": "/enums/capture-vision-router",
"version": "2.2.30"
}, {
"path": "/enums/core",
"version": "3.2.30"
},{
"path": "/parameters/reference/capture-vision-template",
"version": "2.2.30"
},{
"path": "/parameters/reference/target-roi-def",
"version": "2.2.30"
},{
"path": "/parameters/reference/document-normalizer-task-settings",
"version": "2.2.10"
},{
"path": "/parameters/reference/image-parameter",
"version": "2.2.30"
},{
"path": "/parameters/reference/image-source-options",
"version": "3.2.30"
},{
"path": "/parameters/reference/global-parameter",
"version": "2.2.30"
}
],
"dce": "4.2.10"
},
"ios":{
"dcvRepoMobile": [
{
"path": "/programming/objectivec-swift/api-reference/utility",
"version": "1.2.11"
"version": "1.2.20"
}, {
"path": "/programming/objectivec-swift/api-reference/license",
"version": "3.2.11"
"version": "3.2.20"
}, {
"path": "/programming/objectivec-swift/api-reference/capture-vision-router",
"version": "2.2.11"
"version": "2.2.30"
}, {
"path": "/programming/objectivec-swift/api-reference/core",
"version": "3.2.11"
"version": "3.2.30"
}, {
"path": "/programming/objectivec-swift/api-reference/image-processing",
"version": "2.2.11"
"version": "2.2.30"
}
],
"dcvRepoCore": [
{
"path": "/introduction/",
"version": "2.2.11"
"version": "2.2.10"
}, {
"path": "/enums/capture-vision-router",
"version": "2.2.11"
"version": "2.2.30"
}, {
"path": "/enums/core",
"version": "3.2.11"
"version": "3.2.30"
},{
"path": "/parameters/reference/capture-vision-template",
"version": "2.2.11"
"version": "2.2.30"
},{
"path": "/parameters/reference/target-roi-def",
"version": "2.2.11"
"version": "2.2.30"
},{
"path": "/parameters/reference/document-normalizer-task-settings",
"version": "2.2.11"
"version": "2.2.10"
},{
"path": "/parameters/reference/image-parameter",
"version": "2.2.11"
"version": "2.2.30"
},{
"path": "/parameters/reference/image-source-options",
"version": "3.2.11"
"version": "3.2.30"
},{
"path": "/parameters/reference/global-parameter",
"version": "2.2.11"
"version": "2.2.30"
}
],
"dce": "4.2.1"
"dce": "4.2.10"
}
}
},{
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
---
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
```

## 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. |

### 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;
```
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ The `SimplifiedDocumentNormalizerSettings` class represents a series of simple s
class SimplifiedDocumentNormalizerSettings
```

## Attributes
## Methods & Attributes

| Attributes | Type | Description |
| ---------- | ---- | ----------- |
Expand All @@ -35,6 +35,10 @@ class SimplifiedDocumentNormalizerSettings
| [`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.
Expand Down Expand Up @@ -98,3 +102,31 @@ If the original image size is quite large, then the `scaledownThreshold` can be
```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.
4 changes: 4 additions & 0 deletions programming/android/release-notes/android-2.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ permalink: /programming/android/release-notes/android-2.html

# Release Notes for Android SDK - v2.x

## 2.2.11 (05/15/2024)

- Added new methods `toJson` & `fromJson` to the [`SimplifiedDocumentNormalizerSettings`]({{ site.dbr_android_api }}simplified-document-normalizer-settings.html) class.

## 2.2.10 (03/07/2024)

### New
Expand Down
1 change: 1 addition & 0 deletions programming/android/release-notes/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ permalink: /programming/android/release-notes/index.html

# Release Notes - Android Edition

- [2.2.11 (05/15/2024)]({{ site.android_release_notes }}android-2.html#2211-05152024)
- [2.2.10 (03/07/2024)]({{ site.android_release_notes }}android-2.html#2210-03072024)
- [2.0.20 (12/12/2023)]({{ site.android_release_notes }}android-2.html#2020-12122023)
- [2.0.10 (08/10/2023)]({{ site.android_release_notes }}android-2.html#2010-08102023)
Expand Down
Loading

0 comments on commit 913a368

Please sign in to comment.