Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions _includes/sidelist-parameter-reference.html
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@
<li><a href="{{ site.dcvb_parameters_reference }}image-parameter/stage-binarize-texture-removed-grayscale.html" class="otherLinkColour">Binarize Texture Removed Grayscale Stage</a>
<ul>
<li><a href="{{ site.dcvb_parameters_reference }}image-parameter/stage-binarize-texture-removed-grayscale.html#stage" class="otherLinkColour">Stage</a></li>
<li><a href="{{ site.dcvb_parameters_reference }}image-parameter/binarization-modes.html" class="otherLinkColour">BinarizationModes</a></li>
</ul>
</li>
<li><a href="{{ site.dcvb_parameters_reference }}image-parameter/stage-convert-to-grayscale.html" class="otherLinkColour">Convert to Grayscale Stage</a>
Expand Down
1 change: 1 addition & 0 deletions _includes/sidelist-parameters-organization.html
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,7 @@
<li><a href="{{ site.dcvb_parameters_reference }}image-parameter/stage-binarize-texture-removed-grayscale.html" class="otherLinkColour">Binarize Texture Removed Grayscale Stage</a>
<ul>
<li><a href="{{ site.dcvb_parameters_reference }}image-parameter/stage-binarize-texture-removed-grayscale.html#stage" class="otherLinkColour">Stage</a></li>
<li><a href="{{ site.dcvb_parameters_reference }}image-parameter/binarization-modes.html" class="otherLinkColour">BinarizationModes</a></li>
</ul>
</li>
<li><a href="{{ site.dcvb_parameters_reference }}image-parameter/stage-convert-to-grayscale.html" class="otherLinkColour">Convert to Grayscale Stage</a>
Expand Down
98 changes: 38 additions & 60 deletions parameters/reference/image-parameter/binarization-modes.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,20 @@ Parameter `BinarizationModes` helps control the process of binarization, i.e., c

```json
{
"BinarizationModes": [
"BinarizationModes" :
[
{
"Mode": "BM_LOCAL_BLOCK",
"BlockSizeX": 5,
"BlockSizeY": 5,
"BinarizationThreshold" : -1,
"BlockSizeX" : 0,
"BlockSizeY" : 0,
"EnableFillBinaryVacancy" : 1,
"ThresholdCompensation" : 5,
"LibraryFileName" : "",
"LibraryParameters" : ""
},
{
"Mode": "BM_THRESHOLD",
"BinarizationThreshold": 125
"GrayscaleEnhancementModesIndex" : -1,
"Mode" : "BM_LOCAL_BLOCK",
"MorphOperation" : "None",
"MorphOperationKernelSizeX" : 0,
"MorphOperationKernelSizeY" : 0,
"MorphShape" : "Rectangle",
"ThresholdCompensation" : 10
}
]
}
Expand Down Expand Up @@ -282,93 +283,70 @@ Parameter `BinarizationModes` consist of a group of binarization mode objects. E

If the `BinarizationModes` is not configured in your template file, the following settings will be used as the default settings.

#### For Barcode Decoding
#### For Stage SST_BINARIZE_IMAGE

```json
{
"BinarizationModes" :
[
{
"BinarizationThreshold" : -1,
"BlockSizeX" : 0,
"BlockSizeY" : 0,
"EnableFillBinaryVacancy" : 1,
"GrayscaleEnhancementModesIndex" : -1,
"Mode" : "BM_LOCAL_BLOCK",
"MorphOperation" : "Close",
"MorphOperationKernelSizeX" : -1,
"MorphOperationKernelSizeY" : -1,
"MorphOperation" : "None",
"MorphOperationKernelSizeX" : 0,
"MorphOperationKernelSizeY" : 0,
"MorphShape" : "Rectangle",
"ThresholdCompensation" : 10
}
]
}
```

#### For Label Recognizing
#### For Stage SST_BINARIZE_TEXTURE_REMOVED_GRAYSCALE

```json
{
"BinarizationModes" :
[
{
"BinarizationThreshold" : -1,
"BlockSizeX" : 0,
"BlockSizeY" : 0,
"EnableFillBinaryVacancy" : 1,
"GrayscaleEnhancementModesIndex" : -1,
"Mode" : "BM_LOCAL_BLOCK",
"MorphOperation" : "Close",
"MorphOperationKernelSizeX" : -1,
"MorphOperationKernelSizeY" : -1,
"Mode" : "BM_AUTO",
"MorphOperation" : "None",
"MorphOperationKernelSizeX" : 0,
"MorphOperationKernelSizeY" : 0,
"MorphShape" : "Rectangle",
"ThresholdCompensation" : 10
}
]
}
```

#### For Document Normalizing
#### For DeformationResistingModes

```json
{
"BinarizationModes" :
[
{
"BlockSizeX" : 0,
"BlockSizeY" : 0,
"EnableFillBinaryVacancy" : 0,
"GrayscaleEnhancementModesIndex" : -1,
"Mode" : "BM_LOCAL_BLOCK",
"MorphOperation" : "Close",
"MorphOperationKernelSizeX" : -1,
"MorphOperationKernelSizeY" : -1,
"MorphShape" : "Rectangle",
"ThresholdCompensation" : 10
}
]
}
```

#### For Text Line Specification

Re-binarize the text line area to support the character segmentation.

```json
{
"BinarizationModes" :
[
{
"BlockSizeX": 11,
"BlockSizeY": 11,
"EnableFillBinaryVacancy": 1,
"GrayscaleEnhancementModesIndex": -1,
"Mode": "BM_LOCAL_BLOCK",
"MorphOperation": "Erode",
"MorphOperationKernelSizeX": -1,
"MorphOperationKernelSizeY": -1,
"MorphShape": "Rectangle",
"ThresholdCompensation": 10
}
]
"BinarizationMode" :
{
"BinarizationThreshold" : -1,
"BlockSizeX" : 0,
"BlockSizeY" : 0,
"EnableFillBinaryVacancy" : 1,
"GrayscaleEnhancementModesIndex" : -1,
"Mode" : "BM_LOCAL_BLOCK",
"MorphOperation" : "None",
"MorphOperationKernelSizeX" : 0,
"MorphOperationKernelSizeY" : 0,
"MorphShape" : "Rectangle",
"ThresholdCompensation" : 10
}
}
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,19 @@ The parameters that available under the Binarize texture removed grayscale image

```json
{
"Stage":"SST_BINARIZE_TEXTURE_REMOVED_GRAYSCALE"
"Stage":"SST_BINARIZE_TEXTURE_REMOVED_GRAYSCALE",
"BinarizationModes" : []
},
```

## Stage

The stage name of binarize texture removed grayscale image stage is `SST_BINARIZE_TEXTURE_REMOVED_GRAYSCALE`.

## BinarizationModes

Defines the binarization options with an array of [`BinarizationMode`](binarization-modes.md) objects. The modes in the array will be executed sequentially until the task is completed.

| Stage Parameter Summary |
| :---------------------- |
| **Type**<br>An array of [`BinarizationMode`](binarization-modes.md) objects |