scanbot-web-sdk 6.0.0-dev.1 → 6.0.0-dev.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/@types/barcode-scanner-view.d.ts +10 -10
- package/@types/consume-type.d.ts +8 -0
- package/@types/core/bridge/common.d.ts +24 -0
- package/@types/core/bridge/compiled/BarcodeConfigs.d.ts +973 -0
- package/@types/core/bridge/compiled/BarcodeScannerTypes.d.ts +185 -0
- package/@types/core/bridge/compiled/BarcodeTypes.d.ts +183 -0
- package/@types/core/bridge/compiled/CheckRecognizerTypes.d.ts +29 -0
- package/@types/core/bridge/compiled/CommonFieldType.d.ts +59 -0
- package/@types/core/bridge/compiled/DocumentDetectorTypes.d.ts +196 -0
- package/@types/core/bridge/compiled/DocumentQualityAnalyzerTypes.d.ts +105 -0
- package/@types/core/bridge/compiled/EhicTypes.d.ts +218 -0
- package/@types/core/bridge/compiled/FrameUtilities.d.ts +18 -0
- package/@types/core/bridge/compiled/GDRTypes.d.ts +38 -0
- package/@types/core/bridge/compiled/GenericDocument.d.ts +236 -0
- package/@types/core/bridge/compiled/GenericDocumentRecognizerConfigs.d.ts +183 -0
- package/@types/core/bridge/compiled/GenericDocumentRecognizerTypes.d.ts +105 -0
- package/@types/core/bridge/compiled/GenericDocumentTypes.d.ts +38 -0
- package/@types/core/bridge/compiled/GenericTextLineScannerTypes.d.ts +165 -0
- package/@types/core/bridge/compiled/Geometry.d.ts +49 -0
- package/@types/core/bridge/compiled/ImageProcessorTypes.d.ts +13 -0
- package/@types/core/bridge/compiled/LicensePlateScannerTypes.d.ts +67 -0
- package/@types/core/bridge/compiled/MRZTypes.d.ts +52 -0
- package/@types/core/bridge/compiled/MedicalCertificateTypes.d.ts +306 -0
- package/@types/core/bridge/compiled/OcrElements.d.ts +129 -0
- package/@types/core/bridge/compiled/ParametricFilters.d.ts +188 -0
- package/@types/core/bridge/compiled/PdfConfig.d.ts +197 -0
- package/@types/core/bridge/compiled/TiffTypes.d.ts +183 -0
- package/@types/core/bridge/utils.d.ts +7 -0
- package/@types/core/bridge/worker-bridge.d.ts +920 -0
- package/@types/core/worker/ScanbotSDK.Core-simd-threads.d.ts +0 -0
- package/@types/core/worker/ScanbotSDK.Core-simd.d.ts +0 -0
- package/@types/core/worker/ScanbotSDK.Core.d.ts +86 -0
- package/@types/core-types.d.ts +25 -0
- package/@types/cropping-view.d.ts +4 -2
- package/@types/document-scanner-view.d.ts +7 -5
- package/@types/generic-document-recognizer-view.d.ts +22 -0
- package/@types/index.d.ts +49 -21
- package/@types/interfaces/i-document-scanner-handle.d.ts +2 -2
- package/@types/interfaces/i-generic-document-recognizer-scanner-handle.d.ts +3 -0
- package/@types/model/barcode/barcode-result.d.ts +16 -8
- package/@types/model/barcode/barcode.d.ts +4 -14
- package/@types/model/camera-info.d.ts +3 -2
- package/@types/model/configuration/barcode-scanner-configuration.d.ts +15 -8
- package/@types/model/configuration/cropping-view-configuration.d.ts +7 -1
- package/@types/model/configuration/document-scanner-configuration.d.ts +6 -27
- package/@types/model/configuration/generic-document-recognizer-configuration.d.ts +9 -0
- package/@types/model/configuration/initialization-options.d.ts +10 -1
- package/@types/model/configuration/mrz-scanner-configuration.d.ts +4 -3
- package/@types/model/configuration/scanner-configuration.d.ts +8 -0
- package/@types/model/configuration/selection-overlay-configuration.d.ts +4 -4
- package/@types/model/configuration/text-data-scanner-configuration.d.ts +3 -6
- package/@types/model/configuration/view-finder-scanner-configuration.d.ts +3 -2
- package/@types/model/configuration/vin-scanner-configuration.d.ts +2 -1
- package/@types/model/error/media-error.d.ts +1 -0
- package/@types/model/response/cropping-result.d.ts +2 -1
- package/@types/scanbot-sdk.d.ts +510 -28
- package/@types/service/document-quality-analyzer.d.ts +7 -5
- package/@types/service/generic-document-recognizer.d.ts +13 -0
- package/@types/service/ocr-engine.d.ts +8 -5
- package/@types/service/pdf-generator.d.ts +7 -95
- package/@types/service/public-utils.d.ts +1 -1
- package/@types/service/simple-mrz-recognizer.d.ts +7 -5
- package/@types/service/text-data-recognizer.d.ts +7 -4
- package/@types/service/tiff-generator.d.ts +12 -10
- package/@types/ui2/common.d.ts +8 -0
- package/@types/ui2/configuration/ActionBarConfiguration.d.ts +30 -30
- package/@types/ui2/configuration/ArTrackingOverlayConfiguration.d.ts +220 -220
- package/@types/ui2/configuration/BarcodeInfoMapping.d.ts +52 -52
- package/@types/ui2/configuration/BarcodeItemMapper.d.ts +2 -2
- package/@types/ui2/configuration/BarcodeRecognizerConfiguration.d.ts +38 -181
- package/@types/ui2/configuration/BarcodeScannerConfiguration.d.ts +172 -188
- package/@types/ui2/configuration/BarcodeScannerTypes.d.ts +1 -0
- package/@types/ui2/configuration/BarcodeScannerUIResult.d.ts +29 -0
- package/@types/ui2/configuration/BarcodeTextLocalization.d.ts +102 -107
- package/@types/ui2/configuration/BarcodeTypes.d.ts +1 -0
- package/@types/ui2/configuration/BarcodeUseCase.d.ts +5 -1
- package/@types/ui2/configuration/CameraConfiguration.d.ts +44 -45
- package/@types/ui2/configuration/CameraPermission.d.ts +33 -48
- package/@types/ui2/configuration/Common.d.ts +190 -227
- package/@types/ui2/configuration/CommonFieldType.d.ts +1 -0
- package/@types/ui2/configuration/FindAndPickScanningModeUseCase.d.ts +366 -14
- package/@types/ui2/configuration/GenericDocument.d.ts +1 -0
- package/@types/ui2/configuration/Geometry.d.ts +1 -0
- package/@types/ui2/configuration/MultipleScanningModeUseCase.d.ts +489 -489
- package/@types/ui2/configuration/ScanbotAlertDialog.d.ts +27 -27
- package/@types/ui2/configuration/SingleScanningModeUseCase.d.ts +170 -170
- package/@types/ui2/configuration/TopBarConfiguration.d.ts +36 -52
- package/@types/ui2/configuration/UserGuidanceConfiguration.d.ts +16 -16
- package/@types/ui2/configuration/ViewFinderConfiguration.d.ts +49 -46
- package/@types/ui2/configuration.d.ts +3 -2
- package/@types/ui2/controllers/barcode-scanner-controller.d.ts +2 -2
- package/@types/ui2/controllers/multiple-scanning-mode-controller.d.ts +6 -3
- package/@types/ui2/controllers/single-scanning-mode-controller.d.ts +6 -3
- package/@types/ui2/model/counted-barcodes.d.ts +17 -23
- package/@types/ui2/scanbot-sdk-ui.d.ts +2 -2
- package/@types/ui2/scanbot-ui-library.d.ts +3 -2
- package/@types/ui2/utils/barcode-mapper/expected-barcode-mapper.d.ts +13 -0
- package/@types/ui2/utils/barcode-mapper/i-barcode-mapper.d.ts +18 -0
- package/@types/ui2/utils/{barcode-mapper.d.ts → barcode-mapper/user-barcode-mapper.d.ts} +11 -11
- package/@types/ui2/utils/camera-config.d.ts +2 -2
- package/@types/ui2/utils/find-and-pick.ts/expected-barcode-counter.d.ts +7 -0
- package/@types/ui2/utils/styled-badge.d.ts +1 -1
- package/@types/ui2/utils/styled-input.d.ts +1 -1
- package/@types/ui2/views/action-button/action-button-container.d.ts +2 -0
- package/@types/ui2/views/ar/ar-badge.d.ts +18 -0
- package/@types/ui2/views/ar/ar-overlay-barcode-info.d.ts +5 -1
- package/@types/ui2/views/ar/vertical-positions.d.ts +12 -0
- package/@types/ui2/views/barcode-info/barcode-info.d.ts +3 -1
- package/@types/ui2/views/barcode-scanner.d.ts +6 -5
- package/@types/ui2/views/dialog/base/confirmation-dialog.d.ts +20 -0
- package/@types/ui2/views/dialog/find-and-pick-submit-dialog.d.ts +10 -0
- package/@types/ui2/views/drawer/barcode-result-drawer.d.ts +1 -1
- package/@types/ui2/views/drawer/counting-button.d.ts +1 -1
- package/@types/ui2/views/drawer/subviews/barcode-drawer-empty-state.d.ts +1 -1
- package/@types/ui2/views/drawer/subviews/barcode-list-item.d.ts +5 -4
- package/@types/ui2/views/drawer/subviews/barcode-list.d.ts +8 -1
- package/@types/ui2/views/drawer/subviews/drawer-header-content.d.ts +1 -1
- package/@types/ui2/views/form/dialog-button.d.ts +2 -2
- package/@types/utils/barcode-utils.d.ts +10 -0
- package/@types/utils/browser-cameras.d.ts +92 -0
- package/@types/utils/dto/MagneticLine.d.ts +4 -4
- package/@types/utils/dto/Point.d.ts +2 -2
- package/@types/utils/dto/Polygon.d.ts +2 -1
- package/@types/utils/image-utils.d.ts +1 -0
- package/@types/utils/react/usePromise.d.ts +3 -1
- package/@types/utils/stats.d.ts +4 -0
- package/@types/utils/utils.d.ts +1 -1
- package/@types/utils/video-stream.d.ts +4 -3
- package/@types/utils/video-to-image-data/two-d-video-to-image-data.d.ts +8 -0
- package/@types/utils/video-to-image-data/video-to-image-data.d.ts +5 -0
- package/@types/utils/video-to-image-data/webgl-video-to-image-data.d.ts +21 -0
- package/@types/view/action-bar/bottom-action-bar.d.ts +2 -2
- package/@types/view/barcode-calculation/barcode-calculation-popup-list.d.ts +2 -2
- package/@types/view/barcode-calculation/barcode-calculation-popup.d.ts +4 -4
- package/@types/view/barcode-calculation/scanned-image-with-overlay.d.ts +2 -2
- package/@types/view/barcode-polygon/animated-barcode-selection-overlay.d.ts +7 -5
- package/@types/view/barcode-polygon/barcode-overlay.d.ts +3 -3
- package/@types/view/barcode-polygon/barcode-polygon-label.d.ts +2 -2
- package/@types/view/cropping/draggable-base-container.d.ts +8 -2
- package/@types/view/cropping/draggable-handles-component.d.ts +9 -2
- package/@types/view/scanbot-camera-view.d.ts +9 -3
- package/@types/view/view-finder.d.ts +1 -0
- package/@types/worker/worker-bridge.d.ts +906 -5
- package/Libraries.txt +307 -174
- package/README.md +3 -3
- package/bundle/ScanbotSDK.min.js +5 -5
- package/bundle/ScanbotSDK.ui2.min.js +108 -161
- package/bundle/ScanbotSDK.ui2.min.js.LICENSE.txt +0 -18
- package/bundle/bin/barcode-scanner/ScanbotSDK.Asm-simd-threads.js +1 -1
- package/bundle/bin/barcode-scanner/ScanbotSDK.Asm-simd-threads.wasm +0 -0
- package/bundle/bin/barcode-scanner/ScanbotSDK.Asm-simd.wasm +0 -0
- package/bundle/bin/barcode-scanner/ScanbotSDK.Asm.wasm +0 -0
- package/bundle/bin/barcode-scanner/ScanbotSDK.Core-simd-threads.js +1 -1
- package/bundle/bin/barcode-scanner/ScanbotSDK.Core-simd.js +1 -1
- package/bundle/bin/barcode-scanner/ScanbotSDK.Core.js +1 -1
- package/bundle/bin/complete/ScanbotSDK.Asm-simd-threads.js +1 -1
- package/bundle/bin/complete/ScanbotSDK.Asm-simd-threads.wasm +0 -0
- package/bundle/bin/complete/ScanbotSDK.Asm-simd.wasm +0 -0
- package/bundle/bin/complete/ScanbotSDK.Asm.wasm +0 -0
- package/bundle/bin/complete/ScanbotSDK.Core-simd-threads.js +1 -1
- package/bundle/bin/complete/ScanbotSDK.Core-simd.js +1 -1
- package/bundle/bin/complete/ScanbotSDK.Core.js +1 -1
- package/bundle/bin/document-scanner/ScanbotSDK.Asm-simd-threads.js +1 -1
- package/bundle/bin/document-scanner/ScanbotSDK.Asm-simd-threads.wasm +0 -0
- package/bundle/bin/document-scanner/ScanbotSDK.Asm-simd.wasm +0 -0
- package/bundle/bin/document-scanner/ScanbotSDK.Asm.wasm +0 -0
- package/bundle/bin/document-scanner/ScanbotSDK.Core-simd-threads.js +1 -1
- package/bundle/bin/document-scanner/ScanbotSDK.Core-simd.js +1 -1
- package/bundle/bin/document-scanner/ScanbotSDK.Core.js +1 -1
- package/package.json +4 -3
- package/ui.d.ts +3 -0
- package/ui.js +2 -0
- package/webpack/fileLoader.js +3 -5
- package/@types/core/compiled/ParametricFilters.d.ts +0 -181
- package/@types/core/utils.d.ts +0 -1
- package/@types/core/worker-bridge.d.ts +0 -20
- package/@types/model/barcode/barcode-format.d.ts +0 -1
- package/@types/model/barcode/engine-mode.d.ts +0 -1
- package/@types/model/configuration/document-quality-analyzer-configuration.d.ts +0 -13
- package/@types/model/document/contour-detection-result.d.ts +0 -11
- package/@types/model/document/detection-status.d.ts +0 -11
- package/@types/model/document/document-detection-result.d.ts +0 -8
- package/@types/model/filter-types.d.ts +0 -6
- package/@types/model/generic-text-line-recognizer/text-data-scanner-result.d.ts +0 -6
- package/@types/model/mrz/mrz-result.d.ts +0 -41
- package/@types/model/response/document-quality-analyzer-result.d.ts +0 -8
- package/@types/service/image-processor.d.ts +0 -35
- package/@types/ui2/configuration/BarcodeItem.d.ts +0 -30
- package/@types/ui2/configuration/BarcodeResult.d.ts +0 -14
- package/@types/ui2/configuration/utils.d.ts +0 -6
- package/@types/utils/networking.d.ts +0 -7
- package/bundle/bin/barcode-scanner/ScanbotSDK.Asm.wasm-webpack-file-loader +0 -0
- package/bundle/bin/complete/ScanbotSDK.Asm-simd-threads.wasm-webpack-file-loader +0 -0
- package/bundle/bin/complete/ScanbotSDK.Asm-simd.wasm-webpack-file-loader +0 -0
- package/bundle/bin/complete/ScanbotSDK.Asm.wasm-webpack-file-loader +0 -0
- package/bundle/bin/document-scanner/ScanbotSDK.Asm.wasm-webpack-file-loader +0 -0
- /package/@types/ui2/views/dialog/{styled-dialog.d.ts → base/styled-dialog.d.ts} +0 -0
|
@@ -1,12 +1,9 @@
|
|
|
1
|
-
import { TextDataScannerResult } from "../generic-text-line-recognizer/text-data-scanner-result";
|
|
2
1
|
import { ViewFinderScannerConfiguration } from "./view-finder-scanner-configuration";
|
|
3
|
-
|
|
4
|
-
export type TextDetectionCallback = (e:
|
|
2
|
+
import { GenericTextLineScannerTypes, DeepPartial } from "../../core-types";
|
|
3
|
+
export type TextDetectionCallback = (e: GenericTextLineScannerTypes.ScannerResult) => void;
|
|
5
4
|
export declare class TextDataScannerConfiguration extends ViewFinderScannerConfiguration {
|
|
6
5
|
constructor();
|
|
7
|
-
|
|
8
|
-
supportedLanguages?: string[];
|
|
9
|
-
validatorPreset?: ValidatorPreset;
|
|
6
|
+
ocrConfiguration?: DeepPartial<GenericTextLineScannerTypes.ScannerConfiguration>;
|
|
10
7
|
onTextDetected?: TextDetectionCallback;
|
|
11
8
|
static fromJson(json: any): TextDataScannerConfiguration;
|
|
12
9
|
}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { ScannerConfiguration } from "./scanner-configuration";
|
|
2
2
|
import { ViewFinderConfiguration, UserGuidanceConfiguration } from "../../ui2/configuration";
|
|
3
|
+
import { DeepPartial } from "../../ui2/common";
|
|
3
4
|
export declare class ViewFinderScannerConfiguration extends ScannerConfiguration {
|
|
4
5
|
constructor(resolution: {
|
|
5
6
|
width: number;
|
|
6
7
|
height: number;
|
|
7
8
|
});
|
|
8
|
-
finder?: ViewFinderConfiguration
|
|
9
|
-
userGuidance?: UserGuidanceConfiguration
|
|
9
|
+
finder?: DeepPartial<ViewFinderConfiguration>;
|
|
10
|
+
userGuidance?: DeepPartial<UserGuidanceConfiguration>;
|
|
10
11
|
static mapFinderConfiguration(result: ViewFinderScannerConfiguration, json: any): void;
|
|
11
12
|
}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { TextDetectionCallback } from "./text-data-scanner-configuration";
|
|
2
2
|
import { ViewFinderScannerConfiguration } from "./view-finder-scanner-configuration";
|
|
3
|
+
import { GenericTextLineScannerTypes, DeepPartial } from "../../core-types";
|
|
3
4
|
export declare class VINScannerConfiguration extends ViewFinderScannerConfiguration {
|
|
4
5
|
constructor();
|
|
5
|
-
|
|
6
|
+
ocrConfiguration?: Omit<DeepPartial<GenericTextLineScannerTypes.ScannerConfiguration>, "validator">;
|
|
6
7
|
onTextDetected?: TextDetectionCallback;
|
|
7
8
|
static fromJson(json: any): VINScannerConfiguration;
|
|
8
9
|
}
|
package/@types/scanbot-sdk.d.ts
CHANGED
|
@@ -3,31 +3,30 @@ import { InitializationOptions } from "./model/configuration/initialization-opti
|
|
|
3
3
|
import { DocumentScannerConfiguration } from "./model/configuration/document-scanner-configuration";
|
|
4
4
|
import { BarcodeScannerConfiguration } from "./model/configuration/barcode-scanner-configuration";
|
|
5
5
|
import { CroppingViewConfiguration } from "./model/configuration/cropping-view-configuration";
|
|
6
|
-
import { ImageFilter } from './model/filter-types';
|
|
7
6
|
import { LicenseInfo } from "./model/response/license-info";
|
|
8
7
|
import { IDocumentScannerHandle } from "./interfaces/i-document-scanner-handle";
|
|
9
8
|
import { IBarcodeScannerHandle } from "./interfaces/i-barcode-scanner-handle";
|
|
10
9
|
import { ICroppingViewHandle } from "./interfaces/i-cropping-view-handle";
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import PublicUtils from "./service/public-utils";
|
|
10
|
+
import { PdfGenerator } from './service/pdf-generator';
|
|
11
|
+
import { TiffGenerator } from './service/tiff-generator';
|
|
12
|
+
import { PublicUtils } from "./service/public-utils";
|
|
14
13
|
import { Polygon } from "./utils/dto/Polygon";
|
|
15
|
-
import { BarcodeResult } from "./model/barcode/barcode-result";
|
|
16
|
-
import { EngineMode } from "./model/barcode/engine-mode";
|
|
17
|
-
import { BarcodeFormat } from "./model/barcode/barcode-format";
|
|
18
14
|
import { MrzScannerConfiguration } from "./model/configuration/mrz-scanner-configuration";
|
|
19
15
|
import { IMrzScannerHandle } from "./interfaces/i-mrz-scanner-handle";
|
|
20
16
|
import SimpleMrzRecognizer from "./service/simple-mrz-recognizer";
|
|
21
17
|
import OcrEngine from "./service/ocr-engine";
|
|
22
|
-
import { ContourDetectionResult } from "./model/document/contour-detection-result";
|
|
23
18
|
import { TextDataScannerConfiguration } from "./model/configuration/text-data-scanner-configuration";
|
|
24
19
|
import { VINScannerConfiguration } from "./model/configuration/vin-scanner-configuration";
|
|
25
20
|
import { ITextDataScannerHandle } from "./interfaces/i-text-data-scanner-handle";
|
|
26
|
-
import DocumentQualityAnalyzerConfiguration from "./model/configuration/document-quality-analyzer-configuration";
|
|
27
21
|
import DocumentQualityAnalyzer from "./service/document-quality-analyzer";
|
|
28
|
-
import { ImageProcessor } from "./service/image-processor";
|
|
29
|
-
import * as imageFilters from "./core/compiled/ParametricFilters";
|
|
30
22
|
import ScanbotSDKUI from "./ui2/scanbot-sdk-ui";
|
|
23
|
+
import { Image, DeepPartial, RawImage, ObjectId, Point, GenericTextLineScannerTypes, GenericDocumentRecognizerTypes, TiffTypes, PdfConfig, ParametricFilters, ImageProcessorTypes, DocumentQualityAnalyzerTypes, MRZTypes, BarcodeScannerTypes, CroppedDetectionResult, DocumentDetectorTypes } from "./core-types";
|
|
24
|
+
import * as Config from "./core-types";
|
|
25
|
+
import GenericDocumentRecognizer from "./service/generic-document-recognizer";
|
|
26
|
+
import { GenericDocumentRecognizerConfiguration } from "./model/configuration/generic-document-recognizer-configuration";
|
|
27
|
+
import { ConsumeType } from "./consume-type";
|
|
28
|
+
import { Stats } from "./utils/stats";
|
|
29
|
+
import { BrowserCameras } from "./utils/browser-cameras";
|
|
31
30
|
export default class ScanbotSDK {
|
|
32
31
|
/** @internal */
|
|
33
32
|
bridge: WorkerBridge;
|
|
@@ -47,36 +46,519 @@ export default class ScanbotSDK {
|
|
|
47
46
|
openCroppingView(configuration: CroppingViewConfiguration): Promise<ICroppingViewHandle>;
|
|
48
47
|
createTextDataScanner(configuration: TextDataScannerConfiguration): Promise<ITextDataScannerHandle>;
|
|
49
48
|
createVINScanner(configuration: VINScannerConfiguration): Promise<ITextDataScannerHandle>;
|
|
49
|
+
createGenericDocumentRecognizerScanner(config: GenericDocumentRecognizerConfiguration): Promise<any>;
|
|
50
50
|
/**
|
|
51
51
|
* Image Operations
|
|
52
52
|
*/
|
|
53
53
|
toDataUrl(imageBuffer: ArrayBuffer): Promise<string>;
|
|
54
|
+
/** @param detectionParameters {@displayType `DeepPartial<DocumentDetectorTypes.DetectionParameters>`} {@link DocumentDetectorTypes.DetectionParameters}*/
|
|
55
|
+
detectDocument(imageBuffer: Image, detectionParameters?: DeepPartial<DocumentDetectorTypes.DetectionParameters>, consumeImage?: ConsumeType): Promise<DocumentDetectorTypes.DetectionResult>;
|
|
56
|
+
detectAndCropDocument(imageBuffer: Image, consumeImage?: ConsumeType): Promise<CroppedDetectionResult>;
|
|
54
57
|
/**
|
|
55
|
-
* @
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
detectBarcodes(base64: string, engineMode?: EngineMode, barcodeFormats?: BarcodeFormat[], returnBarcodeImage?: boolean): Promise<BarcodeResult>;
|
|
58
|
+
* @param image An image URL (e.g. Data URL or HTTP URL) or an Image object
|
|
59
|
+
* @param detectionParameters {@displayType `Omit<DeepPartial<BarcodeScannerTypes.BarcodeRecognizerParameters>, "live">`} {@link BarcodeScannerTypes.BarcodeRecognizerParameters}
|
|
60
|
+
* */
|
|
61
|
+
detectBarcodes(image: string | Image, partialDetectionParameters?: DeepPartial<Omit<BarcodeScannerTypes.BarcodeRecognizerParameters, "live">>, consumeImage?: ConsumeType): Promise<BarcodeScannerTypes.BarcodeScannerResult & {
|
|
62
|
+
originalImage: Image;
|
|
63
|
+
}>;
|
|
64
|
+
parseBarcodeDocument(acceptedDocumentFormats: BarcodeScannerTypes.BarcodeDocumentFormat[], rawBarcodeData: string): Promise<Config.GenericDocument.GenericDocument>;
|
|
63
65
|
createSimpleMRZRecognizer(): Promise<SimpleMrzRecognizer>;
|
|
64
|
-
createOcrEngine(
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
66
|
+
createOcrEngine(): Promise<OcrEngine>;
|
|
67
|
+
/** @param config {@displayType `DeepPartial<DocumentQualityAnalyzerTypes.Config>`} {@link DocumentQualityAnalyzerTypes.Config}*/
|
|
68
|
+
createDocumentQualityAnalyzer(config?: DeepPartial<DocumentQualityAnalyzerTypes.Config>): Promise<DocumentQualityAnalyzer>;
|
|
69
|
+
imageRotate(image: Image, rotation: ImageProcessorTypes.ImageRotation, consumeImage?: ConsumeType): Promise<RawImage>;
|
|
70
|
+
imageFilter(image: Image, filter: ParametricFilters.ParametricFilter, consumeImage?: ConsumeType): Promise<RawImage>;
|
|
71
|
+
/** Crops and stretches the image to the convex hull of the supplied points. All points should have relative coordinates between 0 and 1. */
|
|
72
|
+
imageCrop(image: Image, polygon: Polygon, consumeImage?: ConsumeType): Promise<RawImage>;
|
|
73
|
+
imageResize(image: Image, destinationSize: number, consumeImage?: ConsumeType): Promise<RawImage>;
|
|
69
74
|
/**
|
|
70
75
|
* Misc. Features
|
|
71
76
|
*/
|
|
72
77
|
getLicenseInfo(): Promise<LicenseInfo>;
|
|
73
|
-
|
|
74
|
-
|
|
78
|
+
/** @param options {@displayType `DeepPartial<PdfConfig.PdfConfig>`} {@link PdfConfig.PdfConfig}*/
|
|
79
|
+
beginPdf(options: DeepPartial<PdfConfig.PdfConfig>): Promise<PdfGenerator>;
|
|
80
|
+
/** @param options {@displayType `DeepPartial<TiffTypes.TIFFWriterParameters>`} {@link TiffTypes.TIFFWriterParameters} */
|
|
81
|
+
beginTiff(options?: DeepPartial<TiffTypes.TIFFWriterParameters>): Promise<TiffGenerator>;
|
|
82
|
+
/** @param options {@displayType `DeepPartial<GenericDocumentRecognizerTypes.GenericDocumentRecognizerParameters>`} {@link GenericDocumentRecognizerTypes.GenericDocumentRecognizerParameters}*/
|
|
83
|
+
createGenericDocumentRecognizer(options: DeepPartial<GenericDocumentRecognizerTypes.GenericDocumentRecognizerParameters>): Promise<GenericDocumentRecognizer>;
|
|
84
|
+
imageToJpeg(image: Image, consumeImage?: ConsumeType): Promise<Uint8Array>;
|
|
75
85
|
get version(): string;
|
|
76
86
|
private _utils;
|
|
77
87
|
get utils(): PublicUtils;
|
|
78
|
-
release(object: any
|
|
88
|
+
release(object: ObjectId<any>, source?: string): Promise<void>;
|
|
89
|
+
/** @internal */
|
|
90
|
+
getBridge(consumeImage: ConsumeType): {
|
|
91
|
+
initialize: (licenseKey?: string, engine?: string, appId?: string, cdnPath?: string, options?: {
|
|
92
|
+
captureConsole?: boolean;
|
|
93
|
+
allowThreads?: boolean;
|
|
94
|
+
jpegQuality?: number;
|
|
95
|
+
requestSuffix?: string;
|
|
96
|
+
}) => Promise<any>;
|
|
97
|
+
getLicenseInfo: () => Promise<any>;
|
|
98
|
+
encodeJpeg: (image: Image) => Promise<Uint8Array>;
|
|
99
|
+
detectDocument: (image: Image, options: {
|
|
100
|
+
acceptedAngleScore?: number;
|
|
101
|
+
acceptedSizeScore?: number;
|
|
102
|
+
acceptedBrightnessThreshold?: number;
|
|
103
|
+
requiredAspectRatios?: {
|
|
104
|
+
readonly width?: number;
|
|
105
|
+
readonly height?: number;
|
|
106
|
+
_marker?: () => void;
|
|
107
|
+
}[];
|
|
108
|
+
rectangleOfInterest?: Config.Rectangle;
|
|
109
|
+
_marker?: () => void;
|
|
110
|
+
}) => Promise<DocumentDetectorTypes.DetectionResult>;
|
|
111
|
+
detectAndCropDocument: (image: Image) => Promise<CroppedDetectionResult>;
|
|
112
|
+
createDocumentDetector: (options: {
|
|
113
|
+
acceptedAngleScore?: number;
|
|
114
|
+
acceptedSizeScore?: number;
|
|
115
|
+
acceptedBrightnessThreshold?: number;
|
|
116
|
+
requiredAspectRatios?: {
|
|
117
|
+
readonly width?: number;
|
|
118
|
+
readonly height?: number;
|
|
119
|
+
_marker?: () => void;
|
|
120
|
+
}[];
|
|
121
|
+
rectangleOfInterest?: Config.Rectangle;
|
|
122
|
+
_marker?: () => void;
|
|
123
|
+
}) => Promise<ObjectId<"DocumentDetector">>;
|
|
124
|
+
documentDetectorDetect: <ImageType extends Image>(documentDetectorToken: ObjectId<"DocumentDetector">, image: ImageType) => Promise<DocumentDetectorTypes.DetectionResult & {
|
|
125
|
+
originalImage: ImageType;
|
|
126
|
+
}>;
|
|
127
|
+
parseBarcodeDocument: (options: BarcodeScannerTypes.BarcodeDocumentFormat[], data: string) => Promise<Config.GenericDocument.GenericDocument>;
|
|
128
|
+
createBarcodeRecognizer: (options: {
|
|
129
|
+
configurators?: ({
|
|
130
|
+
readonly _type?: "CodabarConfig";
|
|
131
|
+
readonly minimum1DQuietZoneSize?: number;
|
|
132
|
+
readonly regexFilter?: string;
|
|
133
|
+
readonly minimumTextLength?: number;
|
|
134
|
+
readonly maximumTextLength?: number;
|
|
135
|
+
readonly returnStartEnd?: boolean;
|
|
136
|
+
_marker?: () => void;
|
|
137
|
+
} | {
|
|
138
|
+
readonly _type?: "Code11Config";
|
|
139
|
+
readonly minimum1DQuietZoneSize?: number;
|
|
140
|
+
readonly regexFilter?: string;
|
|
141
|
+
readonly stripCheckDigits?: boolean;
|
|
142
|
+
readonly minimumTextLength?: number;
|
|
143
|
+
readonly maximumTextLength?: number;
|
|
144
|
+
readonly checksum?: boolean;
|
|
145
|
+
_marker?: () => void;
|
|
146
|
+
} | {
|
|
147
|
+
readonly _type?: "Code39Config";
|
|
148
|
+
readonly minimum1DQuietZoneSize?: number;
|
|
149
|
+
readonly regexFilter?: string;
|
|
150
|
+
readonly stripCheckDigits?: boolean;
|
|
151
|
+
readonly minimumTextLength?: number;
|
|
152
|
+
readonly maximumTextLength?: number;
|
|
153
|
+
readonly code32?: boolean;
|
|
154
|
+
readonly code39?: boolean;
|
|
155
|
+
readonly pzn?: boolean;
|
|
156
|
+
readonly tryCode39ExtendedMode?: boolean;
|
|
157
|
+
readonly useCode39CheckDigit?: boolean;
|
|
158
|
+
_marker?: () => void;
|
|
159
|
+
} | {
|
|
160
|
+
readonly _type?: "Code93Config";
|
|
161
|
+
readonly minimum1DQuietZoneSize?: number;
|
|
162
|
+
readonly regexFilter?: string;
|
|
163
|
+
readonly minimumTextLength?: number;
|
|
164
|
+
readonly maximumTextLength?: number;
|
|
165
|
+
_marker?: () => void;
|
|
166
|
+
} | {
|
|
167
|
+
readonly _type?: "Code128Config";
|
|
168
|
+
readonly minimum1DQuietZoneSize?: number;
|
|
169
|
+
readonly regexFilter?: string;
|
|
170
|
+
readonly gs1Handling?: Config.BarcodeTypes.GS1Handling;
|
|
171
|
+
readonly minimumTextLength?: number;
|
|
172
|
+
readonly maximumTextLength?: number;
|
|
173
|
+
_marker?: () => void;
|
|
174
|
+
} | {
|
|
175
|
+
readonly _type?: "Code2Of5Config";
|
|
176
|
+
readonly minimum1DQuietZoneSize?: number;
|
|
177
|
+
readonly regexFilter?: string;
|
|
178
|
+
readonly stripCheckDigits?: boolean;
|
|
179
|
+
readonly minimumTextLength?: number;
|
|
180
|
+
readonly maximumTextLength?: number;
|
|
181
|
+
readonly iata2of5?: boolean;
|
|
182
|
+
readonly code25?: boolean;
|
|
183
|
+
readonly industrial2of5?: boolean;
|
|
184
|
+
readonly useIATA2OF5Checksum?: boolean;
|
|
185
|
+
_marker?: () => void;
|
|
186
|
+
} | {
|
|
187
|
+
readonly _type?: "DataBarConfig";
|
|
188
|
+
readonly minimum1DQuietZoneSize?: number;
|
|
189
|
+
readonly regexFilter?: string;
|
|
190
|
+
readonly gs1Handling?: Config.BarcodeTypes.GS1Handling;
|
|
191
|
+
_marker?: () => void;
|
|
192
|
+
} | {
|
|
193
|
+
readonly _type?: "DataBarExpandedConfig";
|
|
194
|
+
readonly minimum1DQuietZoneSize?: number;
|
|
195
|
+
readonly regexFilter?: string;
|
|
196
|
+
readonly gs1Handling?: Config.BarcodeTypes.GS1Handling;
|
|
197
|
+
_marker?: () => void;
|
|
198
|
+
} | {
|
|
199
|
+
readonly _type?: "DataBarLimitedConfig";
|
|
200
|
+
readonly minimum1DQuietZoneSize?: number;
|
|
201
|
+
readonly regexFilter?: string;
|
|
202
|
+
readonly gs1Handling?: Config.BarcodeTypes.GS1Handling;
|
|
203
|
+
_marker?: () => void;
|
|
204
|
+
} | {
|
|
205
|
+
readonly _type?: "ITFConfig";
|
|
206
|
+
readonly minimum1DQuietZoneSize?: number;
|
|
207
|
+
readonly regexFilter?: string;
|
|
208
|
+
readonly minimumTextLength?: number;
|
|
209
|
+
readonly maximumTextLength?: number;
|
|
210
|
+
_marker?: () => void;
|
|
211
|
+
} | {
|
|
212
|
+
readonly _type?: "MSIPlesseyConfig";
|
|
213
|
+
readonly minimum1DQuietZoneSize?: number;
|
|
214
|
+
readonly regexFilter?: string;
|
|
215
|
+
readonly stripCheckDigits?: boolean;
|
|
216
|
+
readonly minimumTextLength?: number;
|
|
217
|
+
readonly maximumTextLength?: number;
|
|
218
|
+
readonly checksumAlgorithms?: Config.BarcodeConfigs.MSIPlesseyChecksumAlgorithm[];
|
|
219
|
+
_marker?: () => void;
|
|
220
|
+
} | {
|
|
221
|
+
readonly _type?: "UpcEanConfig";
|
|
222
|
+
readonly minimum1DQuietZoneSize?: number;
|
|
223
|
+
readonly regexFilter?: string;
|
|
224
|
+
readonly stripCheckDigits?: boolean;
|
|
225
|
+
readonly ean8?: boolean;
|
|
226
|
+
readonly ean13?: boolean;
|
|
227
|
+
readonly upca?: boolean;
|
|
228
|
+
readonly upce?: boolean;
|
|
229
|
+
readonly extensions?: Config.BarcodeTypes.UpcEanExtensionBehavior;
|
|
230
|
+
_marker?: () => void;
|
|
231
|
+
} | {
|
|
232
|
+
readonly _type?: "PharmaCodeConfig";
|
|
233
|
+
readonly minimum1DQuietZoneSize?: number;
|
|
234
|
+
readonly regexFilter?: string;
|
|
235
|
+
readonly minimumValue?: number;
|
|
236
|
+
readonly allowNarrowBarsOnly?: boolean;
|
|
237
|
+
readonly allowWideBarsOnly?: boolean;
|
|
238
|
+
_marker?: () => void;
|
|
239
|
+
} | {
|
|
240
|
+
readonly _type?: "AztecConfig";
|
|
241
|
+
readonly regexFilter?: string;
|
|
242
|
+
readonly gs1Handling?: Config.BarcodeTypes.GS1Handling;
|
|
243
|
+
_marker?: () => void;
|
|
244
|
+
} | {
|
|
245
|
+
readonly _type?: "QRCodeConfig";
|
|
246
|
+
readonly regexFilter?: string;
|
|
247
|
+
readonly gs1Handling?: Config.BarcodeTypes.GS1Handling;
|
|
248
|
+
readonly strictMode?: boolean;
|
|
249
|
+
readonly qr?: boolean;
|
|
250
|
+
readonly microQr?: boolean;
|
|
251
|
+
readonly rmqr?: boolean;
|
|
252
|
+
_marker?: () => void;
|
|
253
|
+
} | {
|
|
254
|
+
readonly _type?: "PDF417Config";
|
|
255
|
+
readonly regexFilter?: string;
|
|
256
|
+
readonly gs1Handling?: Config.BarcodeTypes.GS1Handling;
|
|
257
|
+
readonly strictMode?: boolean;
|
|
258
|
+
_marker?: () => void;
|
|
259
|
+
} | {
|
|
260
|
+
readonly _type?: "MicroPDF417Config";
|
|
261
|
+
readonly regexFilter?: string;
|
|
262
|
+
readonly gs1Handling?: Config.BarcodeTypes.GS1Handling;
|
|
263
|
+
readonly strictMode?: boolean;
|
|
264
|
+
_marker?: () => void;
|
|
265
|
+
} | {
|
|
266
|
+
readonly _type?: "DataMatrixConfig";
|
|
267
|
+
readonly regexFilter?: string;
|
|
268
|
+
readonly gs1Handling?: Config.BarcodeTypes.GS1Handling;
|
|
269
|
+
_marker?: () => void;
|
|
270
|
+
} | {
|
|
271
|
+
readonly _type?: "MaxiCodeConfig";
|
|
272
|
+
readonly regexFilter?: string;
|
|
273
|
+
_marker?: () => void;
|
|
274
|
+
} | {
|
|
275
|
+
readonly _type?: "AustraliaPostConfig";
|
|
276
|
+
readonly regexFilter?: string;
|
|
277
|
+
readonly australiaPostCustomerFormat?: Config.BarcodeConfigs.AustraliaPostCustomerFormat;
|
|
278
|
+
_marker?: () => void;
|
|
279
|
+
} | {
|
|
280
|
+
readonly _type?: "JapanPostConfig";
|
|
281
|
+
readonly regexFilter?: string;
|
|
282
|
+
_marker?: () => void;
|
|
283
|
+
} | {
|
|
284
|
+
readonly _type?: "RoyalMailConfig";
|
|
285
|
+
readonly regexFilter?: string;
|
|
286
|
+
readonly stripCheckDigits?: boolean;
|
|
287
|
+
_marker?: () => void;
|
|
288
|
+
} | {
|
|
289
|
+
readonly _type?: "RoyalTNTPostConfig";
|
|
290
|
+
readonly regexFilter?: string;
|
|
291
|
+
_marker?: () => void;
|
|
292
|
+
} | {
|
|
293
|
+
readonly _type?: "USPSIntelligentMailConfig";
|
|
294
|
+
readonly regexFilter?: string;
|
|
295
|
+
_marker?: () => void;
|
|
296
|
+
} | {
|
|
297
|
+
readonly _type?: "PharmaCodeTwoTrackConfig";
|
|
298
|
+
readonly regexFilter?: string;
|
|
299
|
+
readonly minimumValue?: number;
|
|
300
|
+
_marker?: () => void;
|
|
301
|
+
} | {
|
|
302
|
+
readonly _type?: "GS1CompositeConfig";
|
|
303
|
+
readonly regexFilter?: string;
|
|
304
|
+
readonly minimum1DQuietZoneSize?: number;
|
|
305
|
+
readonly gs1Handling?: Config.BarcodeTypes.GS1Handling;
|
|
306
|
+
readonly strictMode?: boolean;
|
|
307
|
+
_marker?: () => void;
|
|
308
|
+
} | {
|
|
309
|
+
readonly _type?: "GroupOneDConfig";
|
|
310
|
+
readonly regexFilter?: string;
|
|
311
|
+
readonly minimum1DQuietZoneSize?: number;
|
|
312
|
+
readonly stripCheckDigits?: boolean;
|
|
313
|
+
readonly minimumTextLength?: number;
|
|
314
|
+
readonly maximumTextLength?: number;
|
|
315
|
+
readonly gs1Handling?: Config.BarcodeTypes.GS1Handling;
|
|
316
|
+
readonly strictMode?: boolean;
|
|
317
|
+
readonly formats?: Config.BarcodeTypes.BarcodeFormat[];
|
|
318
|
+
_marker?: () => void;
|
|
319
|
+
} | {
|
|
320
|
+
readonly _type?: "GroupTwoDConfig";
|
|
321
|
+
readonly regexFilter?: string;
|
|
322
|
+
readonly gs1Handling?: Config.BarcodeTypes.GS1Handling;
|
|
323
|
+
readonly strictMode?: boolean;
|
|
324
|
+
readonly formats?: Config.BarcodeTypes.BarcodeFormat[];
|
|
325
|
+
_marker?: () => void;
|
|
326
|
+
} | {
|
|
327
|
+
readonly _type?: "GroupFourStateConfig";
|
|
328
|
+
readonly regexFilter?: string;
|
|
329
|
+
readonly formats?: Config.BarcodeTypes.BarcodeFormat[];
|
|
330
|
+
_marker?: () => void;
|
|
331
|
+
} | {
|
|
332
|
+
readonly _type?: "GroupCommonConfig";
|
|
333
|
+
readonly regexFilter?: string;
|
|
334
|
+
readonly minimum1DQuietZoneSize?: number;
|
|
335
|
+
readonly stripCheckDigits?: boolean;
|
|
336
|
+
readonly minimumTextLength?: number;
|
|
337
|
+
readonly maximumTextLength?: number;
|
|
338
|
+
readonly gs1Handling?: Config.BarcodeTypes.GS1Handling;
|
|
339
|
+
readonly strictMode?: boolean;
|
|
340
|
+
readonly formats?: Config.BarcodeTypes.BarcodeFormat[];
|
|
341
|
+
_marker?: () => void;
|
|
342
|
+
})[];
|
|
343
|
+
engineMode?: BarcodeScannerTypes.EngineMode;
|
|
344
|
+
live?: boolean;
|
|
345
|
+
acceptedDocumentFormats?: BarcodeScannerTypes.BarcodeDocumentFormat[];
|
|
346
|
+
returnBarcodeImage?: boolean;
|
|
347
|
+
_marker?: () => void;
|
|
348
|
+
}) => Promise<ObjectId<"BarcodeRecognizer">>;
|
|
349
|
+
recognizeBarcodes: <ImageType_1 extends Image>(barcodeRecognizerToken: ObjectId<"BarcodeRecognizer">, image: ImageType_1) => Promise<BarcodeScannerTypes.BarcodeScannerResult & {
|
|
350
|
+
originalImage: ImageType_1;
|
|
351
|
+
}>;
|
|
352
|
+
beginPdf: (options: {
|
|
353
|
+
readonly attributes?: {
|
|
354
|
+
readonly author?: string;
|
|
355
|
+
readonly creator?: string;
|
|
356
|
+
readonly title?: string;
|
|
357
|
+
readonly subject?: string;
|
|
358
|
+
readonly keywords?: string;
|
|
359
|
+
_marker?: () => void;
|
|
360
|
+
};
|
|
361
|
+
readonly pageSize?: PdfConfig.PageSize;
|
|
362
|
+
readonly pageDirection?: PdfConfig.PageDirection;
|
|
363
|
+
readonly pageFit?: PdfConfig.PageFit;
|
|
364
|
+
readonly dpi?: number;
|
|
365
|
+
readonly jpegQuality?: number;
|
|
366
|
+
readonly resamplingMethod?: PdfConfig.ResamplingMethod;
|
|
367
|
+
_marker?: () => void;
|
|
368
|
+
}) => Promise<ObjectId<"PdfGenerationContext">>;
|
|
369
|
+
addPageToPdf: (pdfOperation: ObjectId<"PdfGenerationContext">, image: Image) => Promise<void>;
|
|
370
|
+
completePdf: (pdfOperation: ObjectId<"PdfGenerationContext">) => Promise<Uint8Array>;
|
|
371
|
+
beginTiff: (options: {
|
|
372
|
+
compression?: TiffTypes.CompressionMode;
|
|
373
|
+
jpegQuality?: number;
|
|
374
|
+
zipCompressionLevel?: number;
|
|
375
|
+
dpi?: number;
|
|
376
|
+
userFields?: {
|
|
377
|
+
readonly tag?: number;
|
|
378
|
+
readonly name?: string;
|
|
379
|
+
readonly value?: {
|
|
380
|
+
readonly _type?: "UserFieldDoubleValue";
|
|
381
|
+
readonly value?: number;
|
|
382
|
+
_marker?: () => void;
|
|
383
|
+
} | {
|
|
384
|
+
readonly _type?: "UserFieldStringValue";
|
|
385
|
+
readonly value?: string;
|
|
386
|
+
_marker?: () => void;
|
|
387
|
+
} | {
|
|
388
|
+
readonly _type?: "UserFieldIntValue";
|
|
389
|
+
readonly value?: number;
|
|
390
|
+
_marker?: () => void;
|
|
391
|
+
};
|
|
392
|
+
_marker?: () => void;
|
|
393
|
+
}[];
|
|
394
|
+
binarizationFilter?: {
|
|
395
|
+
readonly _type?: "ScanbotBinarizationFilter";
|
|
396
|
+
outputMode?: ParametricFilters.OutputMode;
|
|
397
|
+
_marker?: () => void;
|
|
398
|
+
} | {
|
|
399
|
+
readonly _type?: "CustomBinarizationFilter";
|
|
400
|
+
outputMode?: ParametricFilters.OutputMode;
|
|
401
|
+
denoise?: number;
|
|
402
|
+
radius?: number;
|
|
403
|
+
preset?: ParametricFilters.BinarizationFilterPreset;
|
|
404
|
+
_marker?: () => void;
|
|
405
|
+
} | {
|
|
406
|
+
readonly _type?: "ColorDocumentFilter";
|
|
407
|
+
_marker?: () => void;
|
|
408
|
+
} | {
|
|
409
|
+
readonly _type?: "BrightnessFilter";
|
|
410
|
+
brightness?: number;
|
|
411
|
+
_marker?: () => void;
|
|
412
|
+
} | {
|
|
413
|
+
readonly _type?: "ContrastFilter";
|
|
414
|
+
contrast?: number;
|
|
415
|
+
_marker?: () => void;
|
|
416
|
+
} | {
|
|
417
|
+
readonly _type?: "GrayscaleFilter";
|
|
418
|
+
borderWidthFraction?: number;
|
|
419
|
+
blackOutliersFraction?: number;
|
|
420
|
+
whiteOutliersFraction?: number;
|
|
421
|
+
_marker?: () => void;
|
|
422
|
+
} | {
|
|
423
|
+
readonly _type?: "LegacyFilter";
|
|
424
|
+
filterType?: number;
|
|
425
|
+
_marker?: () => void;
|
|
426
|
+
} | {
|
|
427
|
+
readonly _type?: "WhiteBlackPointFilter";
|
|
428
|
+
blackPoint?: number;
|
|
429
|
+
whitePoint?: number;
|
|
430
|
+
_marker?: () => void;
|
|
431
|
+
};
|
|
432
|
+
_marker?: () => void;
|
|
433
|
+
}) => Promise<ObjectId<"TiffGenerationContext">>;
|
|
434
|
+
addPageToTiff: (tiffOperation: ObjectId<"TiffGenerationContext">, image: Image, binarize: TiffTypes.Binarize) => Promise<unknown>;
|
|
435
|
+
completeTiff: (tiffOperation: ObjectId<"TiffGenerationContext">) => Promise<Uint8Array>;
|
|
436
|
+
createMRZRecognizer: (configuration: {
|
|
437
|
+
accumulatedResultsVerifierConfig?: {
|
|
438
|
+
maximumNumberOfAccumulatedFrames?: number;
|
|
439
|
+
minimumNumberOfRequiredFramesWithEqualRecognitionResult?: number;
|
|
440
|
+
_marker?: () => void;
|
|
441
|
+
};
|
|
442
|
+
_marker?: () => void;
|
|
443
|
+
}) => Promise<ObjectId<"MrzRecognizerContext">>;
|
|
444
|
+
recognizeMRZ: <ImageType_2 extends Image>(mrzRecognizerToken: ObjectId<"MrzRecognizerContext">, image: ImageType_2) => Promise<MRZTypes.RecognitionResult & {
|
|
445
|
+
originalImage: ImageType_2;
|
|
446
|
+
}>;
|
|
447
|
+
releaseObject: <T>(objectToken: ObjectId<T>) => Promise<void>;
|
|
448
|
+
createOcrEngine: () => Promise<ObjectId<"TLDROcrContext">>;
|
|
449
|
+
performOcr: (tldrOcrToken: ObjectId<"TLDROcrContext">, image: Image) => Promise<Config.OcrElements.Page>;
|
|
450
|
+
createGenericTextLineScanner: (configuration: {
|
|
451
|
+
ocrResolutionLimit?: number;
|
|
452
|
+
maximumNumberOfAccumulatedFrames?: number;
|
|
453
|
+
minimumNumberOfRequiredFramesWithEqualRecognitionResult?: number;
|
|
454
|
+
validator?: {
|
|
455
|
+
readonly _type?: "DefaultContentValidator";
|
|
456
|
+
allowedCharacters?: string;
|
|
457
|
+
_marker?: () => void;
|
|
458
|
+
} | {
|
|
459
|
+
readonly _type?: "PresetContentValidator";
|
|
460
|
+
preset?: "VEHICLE_IDENTIFICATION_NUMBER";
|
|
461
|
+
_marker?: () => void;
|
|
462
|
+
} | {
|
|
463
|
+
readonly _type?: "PatternContentValidator";
|
|
464
|
+
allowedCharacters?: string;
|
|
465
|
+
pattern?: string;
|
|
466
|
+
matchSubstring?: boolean;
|
|
467
|
+
_marker?: () => void;
|
|
468
|
+
};
|
|
469
|
+
_marker?: () => void;
|
|
470
|
+
}) => Promise<ObjectId<"GenericTextLineScanner">>;
|
|
471
|
+
recognizeTextLine: <ImageType_3 extends Image>(scannerToken: ObjectId<"GenericTextLineScanner">, image: ImageType_3) => Promise<GenericTextLineScannerTypes.ScannerResult & {
|
|
472
|
+
originalImage: ImageType_3;
|
|
473
|
+
}>;
|
|
474
|
+
cleanTextLineRecognitionQueue: (scannerToken: ObjectId<"GenericTextLineScanner">) => Promise<void>;
|
|
475
|
+
createDocumentQualityAnalyzer: (options: {
|
|
476
|
+
readonly qualityThresholds?: {
|
|
477
|
+
readonly symbolQuality?: number;
|
|
478
|
+
readonly symbolRatio?: number;
|
|
479
|
+
_marker?: () => void;
|
|
480
|
+
}[];
|
|
481
|
+
readonly qualityIndices?: DocumentQualityAnalyzerTypes.Quality[];
|
|
482
|
+
readonly maxImageSize?: number;
|
|
483
|
+
minEstimatedNumberOfSymbolsForDocument?: number;
|
|
484
|
+
readonly minProcessedFraction?: number;
|
|
485
|
+
readonly maxProcessedFraction?: number;
|
|
486
|
+
readonly earlyStopIfNSymbolsFound?: number;
|
|
487
|
+
readonly tileSize?: number;
|
|
488
|
+
_marker?: () => void;
|
|
489
|
+
}) => Promise<ObjectId<"DocumentQualityAnalyzer">>;
|
|
490
|
+
documentQualityAnalyzerAnalyze: (dqaToken: ObjectId<"DocumentQualityAnalyzer">, image: Image) => Promise<DocumentQualityAnalyzerTypes.AnalysisResult>;
|
|
491
|
+
imageApplyFilter: (image: Image, filter: DeepPartial<ParametricFilters.ParametricFilter>) => Promise<RawImage>;
|
|
492
|
+
imageCrop: (image: Image, polygon: [Point, Point, Point, Point]) => Promise<RawImage>;
|
|
493
|
+
imageResize: (image: Image, destinationSize: number) => Promise<RawImage>;
|
|
494
|
+
imageRotate: (image: Image, rotations: ImageProcessorTypes.ImageRotation) => Promise<RawImage>;
|
|
495
|
+
genericDocumentRecognizerCreate: (parameters: {
|
|
496
|
+
resultAccumulationConfig?: {
|
|
497
|
+
minConfirmations?: number;
|
|
498
|
+
minConfidenceForStableField?: number;
|
|
499
|
+
autoClearThreshold?: number;
|
|
500
|
+
_marker?: () => void;
|
|
501
|
+
};
|
|
502
|
+
fieldExcludeList?: string[];
|
|
503
|
+
configurations?: ({
|
|
504
|
+
readonly _type?: "DateValidationConfig";
|
|
505
|
+
readonly minBirthYear?: number;
|
|
506
|
+
readonly maxBirthYear?: number;
|
|
507
|
+
readonly minExpirationYear?: number;
|
|
508
|
+
readonly maxExpirationYear?: number;
|
|
509
|
+
readonly documentTypes?: Config.GenericDocumentTypes.DocumentType[];
|
|
510
|
+
_marker?: () => void;
|
|
511
|
+
} | {
|
|
512
|
+
readonly _type?: "EuropeanHealthInsuranceCardConfig";
|
|
513
|
+
readonly minBirthYear?: number;
|
|
514
|
+
readonly maxBirthYear?: number;
|
|
515
|
+
readonly minExpirationYear?: number;
|
|
516
|
+
readonly maxExpirationYear?: number;
|
|
517
|
+
readonly expectedCountry?: Config.GenericDocumentRecognizerConfigs.EHICIssuingCountry;
|
|
518
|
+
_marker?: () => void;
|
|
519
|
+
} | {
|
|
520
|
+
readonly _type?: "MRZFallbackConfig";
|
|
521
|
+
readonly acceptedCountries?: string[];
|
|
522
|
+
readonly acceptedMRZTypes?: MRZTypes.DocumentType[];
|
|
523
|
+
_marker?: () => void;
|
|
524
|
+
} | {
|
|
525
|
+
readonly _type?: "GDRGroupConfig";
|
|
526
|
+
readonly acceptedDocumentTypes?: Config.GenericDocumentTypes.DocumentType[];
|
|
527
|
+
_marker?: () => void;
|
|
528
|
+
})[];
|
|
529
|
+
_marker?: () => void;
|
|
530
|
+
}) => Promise<ObjectId<"GenericDocumentRecognizer">>;
|
|
531
|
+
genericDocumentRecognizerRecognize: <ImageType_4 extends Image>(gdrToken: ObjectId<"GenericDocumentRecognizer">, image: ImageType_4, parameters: {
|
|
532
|
+
mode?: GenericDocumentRecognizerTypes.RecognitionMode;
|
|
533
|
+
_marker?: () => void;
|
|
534
|
+
}) => Promise<GenericDocumentRecognizerTypes.RecognitionResult & {
|
|
535
|
+
originalImage: ImageType_4;
|
|
536
|
+
}>;
|
|
537
|
+
version: () => Promise<string>;
|
|
538
|
+
__hasModuleFunction: (functionName: string) => Promise<any>;
|
|
539
|
+
__callModuleFunction: (functionName: string, args?: any[]) => Promise<any>;
|
|
540
|
+
};
|
|
79
541
|
private licenseCheck;
|
|
542
|
+
/** @param partialConfig {@displayType `DeepPartial<GenericTextLineScannerTypes.ScannerConfiguration>`} {@link GenericTextLineScannerTypes.ScannerConfiguration}*/
|
|
80
543
|
private createGenericTextLineScanner;
|
|
81
|
-
|
|
544
|
+
/**
|
|
545
|
+
* This method will destroy all web workers and free the memory held by the
|
|
546
|
+
* SDK (after the next run of the garbage collector).
|
|
547
|
+
*
|
|
548
|
+
* This function should not be called while a scanner is open or an API call is pending.
|
|
549
|
+
* If you do call this function while a scanner is open, the scanner will stop detecting anything,
|
|
550
|
+
* but the video will keep running. If you call this function while an API call is pending, that
|
|
551
|
+
* pending API call might never finish.
|
|
552
|
+
*
|
|
553
|
+
* After calling this function, no further calls to this object are allowed. To further use the SDK,
|
|
554
|
+
* it needs to be initialized again.
|
|
555
|
+
*/
|
|
556
|
+
destroy(): void;
|
|
557
|
+
static cameras: BrowserCameras;
|
|
558
|
+
static Config: typeof Config;
|
|
559
|
+
/**
|
|
560
|
+
* Used for testing purposes only.
|
|
561
|
+
* @internal
|
|
562
|
+
*/
|
|
563
|
+
static _stats: Stats;
|
|
82
564
|
}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import ScanbotSDK from '../scanbot-sdk';
|
|
2
|
-
import
|
|
2
|
+
import type { DocumentQualityAnalyzerTypes, Image, ObjectId } from '../core-types';
|
|
3
|
+
import { ConsumeType } from "../consume-type";
|
|
3
4
|
export default class DocumentQualityAnalyzer {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
private _sdk;
|
|
6
|
+
private _token;
|
|
7
|
+
/** @internal */
|
|
8
|
+
constructor(_sdk: ScanbotSDK, _token: ObjectId<"DocumentQualityAnalyzer">);
|
|
9
|
+
analyze(image: Image, consumeImage?: ConsumeType): Promise<DocumentQualityAnalyzerTypes.AnalysisResult>;
|
|
8
10
|
release(): Promise<void>;
|
|
9
11
|
}
|