Skip to content

Commit c5f44d0

Browse files
committed
Deploying to gh-pages from - 0f6e381 🚀
1 parent a819910 commit c5f44d0

27 files changed

+370
-2
lines changed

3rdpartylicenses.txt

+3
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ SEE LICENSE IN LICENSE
2828
dynamsoft-core
2929
SEE LICENSE IN LICENSE
3030

31+
dynamsoft-document-normalizer
32+
SEE LICENSE IN LICENSE
33+
3134
dynamsoft-license
3235
SEE LICENSE IN LICENSE
3336

404.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@
77
<style>*{font-family:Roboto,Arial,sans-serif;color:#616161;box-sizing:border-box;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}body{margin:0}</style><link rel="stylesheet" href="styles.c51ef225aea42d53.css" media="print" onload="this.media='all'"><noscript><link rel="stylesheet" href="styles.c51ef225aea42d53.css"></noscript></head>
88
<body>
99
<app-root></app-root>
10-
<script src="runtime.0c9176eabe07a57b.js" type="module"></script><script src="polyfills.a0338e8051ad5bf8.js" type="module"></script><script src="main.40f225f3e3659cf5.js" type="module"></script>
10+
<script src="runtime.0c9176eabe07a57b.js" type="module"></script><script src="polyfills.a0338e8051ad5bf8.js" type="module"></script><script src="main.e5185ba17043e510.js" type="module"></script>
1111

1212
</body></html>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,161 @@
1+
{
2+
"CaptureVisionTemplates": [
3+
{
4+
"Name": "DetectDocumentBoundaries_Default",
5+
"ImageROIProcessingNameArray": [
6+
"roi-detect-document-boundaries"
7+
]
8+
},
9+
{
10+
"Name": "DetectAndNormalizeDocument_Default",
11+
"ImageROIProcessingNameArray": [
12+
"roi-detect-and-normalize-document"
13+
]
14+
},
15+
{
16+
"Name": "NormalizeDocument_Default",
17+
"ImageROIProcessingNameArray": [
18+
"roi-normalize-document"
19+
]
20+
}
21+
],
22+
"TargetROIDefOptions": [
23+
{
24+
"Name": "roi-detect-document-boundaries",
25+
"TaskSettingNameArray": [
26+
"task-detect-document-boundaries"
27+
]
28+
},
29+
{
30+
"Name": "roi-detect-and-normalize-document",
31+
"TaskSettingNameArray": [
32+
"task-detect-and-normalize-document"
33+
]
34+
},
35+
{
36+
"Name": "roi-normalize-document",
37+
"TaskSettingNameArray": [
38+
"task-normalize-document"
39+
]
40+
}
41+
],
42+
"DocumentNormalizerTaskSettingOptions": [
43+
{
44+
"Name": "task-detect-and-normalize-document",
45+
"SectionImageParameterArray": [
46+
{
47+
"Section": "ST_REGION_PREDETECTION",
48+
"ImageParameterName": "ip-detect-and-normalize"
49+
},
50+
{
51+
"Section": "ST_DOCUMENT_DETECTION",
52+
"ImageParameterName": "ip-detect-and-normalize"
53+
},
54+
{
55+
"Section": "ST_DOCUMENT_NORMALIZATION",
56+
"ImageParameterName": "ip-detect-and-normalize"
57+
}
58+
]
59+
},
60+
{
61+
"Name": "task-detect-document-boundaries",
62+
"TerminateSetting": {
63+
"Section": "ST_DOCUMENT_DETECTION"
64+
},
65+
"SectionImageParameterArray": [
66+
{
67+
"Section": "ST_REGION_PREDETECTION",
68+
"ImageParameterName": "ip-detect"
69+
},
70+
{
71+
"Section": "ST_DOCUMENT_DETECTION",
72+
"ImageParameterName": "ip-detect"
73+
},
74+
{
75+
"Section": "ST_DOCUMENT_NORMALIZATION",
76+
"ImageParameterName": "ip-detect"
77+
}
78+
]
79+
},
80+
{
81+
"Name": "task-normalize-document",
82+
"StartSection": "ST_DOCUMENT_NORMALIZATION",
83+
"SectionImageParameterArray": [
84+
{
85+
"Section": "ST_REGION_PREDETECTION",
86+
"ImageParameterName": "ip-normalize"
87+
},
88+
{
89+
"Section": "ST_DOCUMENT_DETECTION",
90+
"ImageParameterName": "ip-normalize"
91+
},
92+
{
93+
"Section": "ST_DOCUMENT_NORMALIZATION",
94+
"ImageParameterName": "ip-normalize"
95+
}
96+
]
97+
}
98+
],
99+
"ImageParameterOptions": [
100+
{
101+
"Name": "ip-detect-and-normalize",
102+
"BinarizationModes": [
103+
{
104+
"Mode": "BM_LOCAL_BLOCK",
105+
"BlockSizeX": 0,
106+
"BlockSizeY": 0,
107+
"EnableFillBinaryVacancy": 0
108+
}
109+
],
110+
"TextDetectionMode": {
111+
"Mode": "TTDM_WORD",
112+
"Direction": "HORIZONTAL",
113+
"Sensitivity": 7
114+
}
115+
},
116+
{
117+
"Name": "ip-detect",
118+
"ScaleDownThreshold": 512,
119+
"BinarizationModes": [
120+
{
121+
"Mode": "BM_LOCAL_BLOCK",
122+
"BlockSizeX": 7,
123+
"BlockSizeY": 7,
124+
"MorphOperation": "Close",
125+
"MorphOperationKernelSizeX": 3,
126+
"MorphOperationKernelSizeY": 3,
127+
"EnableFillBinaryVacancy": 0,
128+
"ThresholdCompensation": 5
129+
}
130+
],
131+
"GrayscaleEnhancementModes": [
132+
{
133+
"Mode": "GEM_SHARPEN_SMOOTH",
134+
"SmoothBlockSizeX": 3,
135+
"SmoothBlockSizeY": 3
136+
}
137+
],
138+
"TextDetectionMode": {
139+
"Mode": "TTDM_WORD",
140+
"Direction": "HORIZONTAL",
141+
"Sensitivity": 7
142+
}
143+
},
144+
{
145+
"Name": "ip-normalize",
146+
"BinarizationModes": [
147+
{
148+
"Mode": "BM_LOCAL_BLOCK",
149+
"BlockSizeX": 0,
150+
"BlockSizeY": 0,
151+
"EnableFillBinaryVacancy": 0
152+
}
153+
],
154+
"TextDetectionMode": {
155+
"Mode": "TTDM_WORD",
156+
"Direction": "HORIZONTAL",
157+
"Sensitivity": 7
158+
}
159+
}
160+
]
161+
}

assets/dynamsoft-document-normalizer/ddn.esm.js

+11
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/dynamsoft-document-normalizer/ddn.js

+11
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
/*!
2+
* Dynamsoft JavaScript Library
3+
* @product Dynamsoft Document Normalizer JS Edition
4+
* @website http://www.dynamsoft.com
5+
* @copyright Copyright 2024, Dynamsoft Corporation
6+
* @author Dynamsoft
7+
* @version 2.2.10
8+
* @fileoverview Dynamsoft JavaScript Library for Document Normalizer
9+
* More info on ddn JS: https://www.dynamsoft.com/document-normalizer/docs/web/programming/javascript/
10+
*/
11+
import{EnumImagePixelFormat as e,engineResourcePaths as t,workerAutoResources as n,mapPackageRegister as r,compareVersion as o,innerVersions as a}from"dynamsoft-core";const s="undefined"==typeof self,i=(()=>{if(!s&&document.currentScript){let e=document.currentScript.src,t=e.indexOf("?");if(-1!=t)e=e.substring(0,t);else{let t=e.indexOf("#");-1!=t&&(e=e.substring(0,t))}return e.substring(0,e.lastIndexOf("/")+1)}return"./"})(),l=e=>{if(null==e&&(e="./"),s);else{let t=document.createElement("a");t.href=e,e=t.href}return e.endsWith("/")||(e+="/"),e},d=e=>{const t=document.createElement("canvas");return t.width=e.width,t.height=e.height,t.getContext("2d",{willReadFrequently:!0}).putImageData(e,0,0),t},c=async(e,t)=>{const n=d(t);return new Promise(((t,r)=>{n.toBlob((e=>t(e)),e)}))};null==t.ddn&&(t.ddn=i),n.ddn={js:!0,wasm:!0,deps:["license","dip"]},r.ddn={handleNormalizedImageResultItem:function(t){let n=t,r=(t=>{let n,r=t.bytes;if(!(r&&r instanceof Uint8Array))throw Error("Parameter type error");if(Number(t.format)===e.IPF_BGR_888){const e=r.length/3;n=new Uint8ClampedArray(4*e);for(let t=0;t<e;++t)n[4*t]=r[3*t],n[4*t+1]=r[3*t+1],n[4*t+2]=r[3*t+2],n[4*t+3]=255}else if(Number(t.format)===e.IPF_RGB_888){const e=r.length/3;n=new Uint8ClampedArray(4*e);for(let t=0;t<e;++t)n[4*t]=r[3*t+2],n[4*t+1]=r[3*t+1],n[4*t+2]=r[3*t],n[4*t+3]=255}else if(Number(t.format)===e.IPF_GRAYSCALED){const e=r.length;n=new Uint8ClampedArray(4*e);for(let t=0;t<e;t++)n[4*t]=n[4*t+1]=n[4*t+2]=r[t],n[4*t+3]=255}else if(Number(t.format)===e.IPF_BINARY_8){const e=r.length,o=t.width,a=t.height,s=t.stride;n=new Uint8ClampedArray(o*a*4);for(let t=0;t<e;t++){let e=r[t],a=t%s,i=Math.floor(t/s);for(let t=0;t<8;t++){let r=a+t,s=4*(i*o+r);if(r>=o)break;n[s]=n[s+1]=n[s+2]=(128&e)/128*255,n[s+3]=255,e<<=1}}}else if(Number(t.format)===e.IPF_ABGR_8888){const e=r.length/4;n=new Uint8ClampedArray(r.length);for(let t=0;t<e;++t)n[4*t]=r[4*t],n[4*t+1]=r[4*t+1],n[4*t+2]=r[4*t+2],n[4*t+3]=r[4*t+3]}else if(Number(t.format)===e.IPF_ARGB_8888){const e=r.length/4;n=new Uint8ClampedArray(r.length);for(let t=0;t<e;++t)n[4*t]=r[4*t],n[4*t+1]=r[4*t+1],n[4*t+2]=r[4*t+2],n[4*t+3]=r[4*t+3]}return new ImageData(n,t.width,t.height)})(n.imageData);n.toCanvas=()=>d(r),n.toImage=e=>((e,t)=>{const n=d(t);let r=new Image,o=n.toDataURL(e);return r.src=o,r})(e,r),n.toBlob=e=>c(e,r),n.saveToFile=async(e,t)=>{if(!e)return null;if("string"!=typeof e)throw new TypeError("FileName must be of type string.");return(async(e,t,n)=>await new Promise((async(r,o)=>{try{const o=t.split(".");let a=o[o.length-1];const s=await c(`image/${a}`,e);o.length<=1&&(a="png");const i=new File([s],t,{type:`image/${a}`});if(n){const e=URL.createObjectURL(i),n=document.createElement("a");n.href=e,n.download=t,n.click()}return r(i)}catch(e){return o()}})))(r,e,t)}}};const m="1.2.0";"string"!=typeof t.std&&o(t.std.version,m)<0&&(t.std={version:m,path:l(i+`../../dynamsoft-capture-vision-std@${m}/dist/`)});const f="2.2.10";(!t.dip||"string"!=typeof t.dip&&o(t.dip.version,f)<0)&&(t.dip={version:f,path:l(i+`../../dynamsoft-image-processing@${f}/dist/`)});class u{static getVersion(){const e=a.ddn&&a.ddn.wasm,t=a.ddn&&a.ddn.worker;return`2.2.10(Worker: ${t||"Not Loaded"}, Wasm: ${e||"Not Loaded"})`}}var g;!function(e){e[e.ICM_COLOUR=0]="ICM_COLOUR",e[e.ICM_GRAYSCALE=1]="ICM_GRAYSCALE",e[e.ICM_BINARY=2]="ICM_BINARY"}(g||(g={}));export{u as DocumentNormalizerModule,g as EnumImageColourMode};
444 KB
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
/*!
2+
* Dynamsoft JavaScript Library
3+
* @product Dynamsoft Document Normalizer JS Edition
4+
* @website http://www.dynamsoft.com
5+
* @copyright Copyright 2024, Dynamsoft Corporation
6+
* @author Dynamsoft
7+
* @version 2.2.10
8+
* @fileoverview Dynamsoft JavaScript Library for Document Normalizer
9+
* More info on ddn JS: https://www.dynamsoft.com/document-normalizer/docs/web/programming/javascript/
10+
*/
11+
!function(){"use strict";self.ddnWorkerVersion="2.2.10",Object.assign(mapController,{ddn_setThresholdValue:async(s,e,t)=>{try{const r=wasmImports.emscripten_bind_DdnWasm_0(t);wasmImports.emscripten_bind_DdnWasm_setThresholdValue_3(r,s.threshold,s.leftLimit,s.rightLimit),handleTaskRes(e,{success:!0})}catch(s){return void handleTaskErr(e,s)}}})}();
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export default class DocumentNormalizerModule {
2+
static getVersion(): string;
3+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import DocumentNormalizerModule from "./class/DocumentNormalizerModule";
2+
import { EnumImageColourMode } from "./enum/EnumImageColourMode";
3+
export * from "./interface";
4+
export { DocumentNormalizerModule, EnumImageColourMode };
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
/**
2+
* `EnumImageColourMode` determines the output colour mode of the normalized image.
3+
*/
4+
export declare enum EnumImageColourMode {
5+
/** Output image in color mode. */
6+
ICM_COLOUR = 0,
7+
/** Output image in grayscale mode. */
8+
ICM_GRAYSCALE = 1,
9+
/** Output image in binary mode. */
10+
ICM_BINARY = 2
11+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import { Edge, IntermediateResultExtraInfo, IntermediateResultUnit } from "dynamsoft-core";
2+
export interface CandidateQuadEdgesUnit extends IntermediateResultUnit {
3+
candidateQuadEdges: Array<Edge>;
4+
}
5+
declare module "dynamsoft-capture-vision-router" {
6+
interface IntermediateResultReceiver {
7+
onCandidateQuadEdgesUnitReceived?: (result: CandidateQuadEdgesUnit, info: IntermediateResultExtraInfo) => void;
8+
}
9+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import { Corner, IntermediateResultExtraInfo, IntermediateResultUnit } from "dynamsoft-core";
2+
export interface CornersUnit extends IntermediateResultUnit {
3+
corners: Array<Corner>;
4+
}
5+
declare module "dynamsoft-capture-vision-router" {
6+
interface IntermediateResultReceiver {
7+
onCornersUnitReceived?: (result: CornersUnit, info: IntermediateResultExtraInfo) => void;
8+
}
9+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import { RegionObjectElement } from "dynamsoft-core";
2+
export interface DetectedQuadElement extends RegionObjectElement {
3+
confidenceAsDocumentBoundary: number;
4+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import { Quadrilateral, CapturedResultItem } from "dynamsoft-core";
2+
export interface DetectedQuadResultItem extends CapturedResultItem {
3+
location: Quadrilateral;
4+
confidenceAsDocumentBoundary: number;
5+
}

0 commit comments

Comments
 (0)