dynamsoft-barcode-reader-bundle 11.4.2001 → 11.6.2000-beta-202608131436
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/LEGAL.txt +1 -8
- package/LICENSE +1 -1
- package/README.html +26 -62
- package/README.md +26 -62
- package/dist/dbr.bundle.d.ts +1867 -1658
- package/dist/dbr.bundle.esm.js +2 -2
- package/dist/dbr.bundle.js +2 -2
- package/dist/dbr.bundle.mjs +2 -2
- package/dist/dbr.bundle.worker.js +2 -2
- package/dist/dynamsoft-barcode-reader-bundle-ml-simd-pthread-with-pdf.js +1 -0
- package/dist/dynamsoft-barcode-reader-bundle-ml-simd-pthread-with-pdf.wasm +0 -0
- package/dist/dynamsoft-barcode-reader-bundle-ml-simd-pthread-with-pdf.worker.js +6 -0
- package/dist/dynamsoft-barcode-reader-bundle-ml-simd-pthread.js +1 -1
- package/dist/dynamsoft-barcode-reader-bundle-ml-simd-pthread.wasm +0 -0
- package/dist/dynamsoft-barcode-reader-bundle-ml-simd-with-pdf.js +1 -0
- package/dist/dynamsoft-barcode-reader-bundle-ml-simd-with-pdf.wasm +0 -0
- package/dist/dynamsoft-barcode-reader-bundle-ml-simd.js +1 -1
- package/dist/dynamsoft-barcode-reader-bundle-ml-simd.wasm +0 -0
- package/dist/dynamsoft-barcode-reader-bundle.js +1 -1
- package/dist/dynamsoft-barcode-reader-bundle.wasm +0 -0
- package/dist/models/Code128Decoder.data +0 -0
- package/dist/models/Code39ITFDecoder.data +0 -0
- package/dist/models/DataMatrixQRCodeDeblur.data +0 -0
- package/dist/models/DataMatrixQRCodeLocalization.data +0 -0
- package/dist/models/EAN13Decoder.data +0 -0
- package/dist/models/OneDDeblur.data +0 -0
- package/dist/models/OneDLocalization.data +0 -0
- package/dist/models/PDF417Deblur.data +0 -0
- package/dist/models/PDF417Localization.data +0 -0
- package/dist/templates/DBR-PresetTemplates.json +12 -1
- package/dist/ui/barcode-scanner.ui.xml +3 -3
- package/dist/ui/dce.mobile-native.ui.xml +222 -0
- package/package.json +79 -78
- package/samples.url +1 -1
- package/dist/parser-resources/MRTD.data +0 -1
package/dist/dbr.bundle.d.ts
CHANGED
|
@@ -3,8 +3,8 @@ declare enum EnumBufferOverflowProtectionMode {
|
|
|
3
3
|
BOPM_BLOCK = 0,
|
|
4
4
|
/** New images are appended at the end, and oldest images are pushed out from the beginning if the buffer is full.*/
|
|
5
5
|
BOPM_UPDATE = 1
|
|
6
|
-
}
|
|
7
|
-
|
|
6
|
+
}
|
|
7
|
+
|
|
8
8
|
declare enum EnumCapturedResultItemType {
|
|
9
9
|
CRIT_ORIGINAL_IMAGE = 1,
|
|
10
10
|
CRIT_BARCODE = 2,
|
|
@@ -13,15 +13,15 @@ declare enum EnumCapturedResultItemType {
|
|
|
13
13
|
CRIT_DESKEWED_IMAGE = 16,
|
|
14
14
|
CRIT_PARSED_RESULT = 32,
|
|
15
15
|
CRIT_ENHANCED_IMAGE = 64
|
|
16
|
-
}
|
|
17
|
-
|
|
16
|
+
}
|
|
17
|
+
|
|
18
18
|
declare enum EnumCornerType {
|
|
19
19
|
CT_NORMAL_INTERSECTED = 0,
|
|
20
20
|
CT_T_INTERSECTED = 1,
|
|
21
21
|
CT_CROSS_INTERSECTED = 2,
|
|
22
22
|
CT_NOT_INTERSECTED = 3
|
|
23
|
-
}
|
|
24
|
-
|
|
23
|
+
}
|
|
24
|
+
|
|
25
25
|
/**
|
|
26
26
|
* `ErrorCode` enumerates the specific error codes that the SDK may return, providing a systematic way to identify and handle errors encountered during its operation.
|
|
27
27
|
*/
|
|
@@ -190,8 +190,8 @@ declare enum EnumErrorCode {
|
|
|
190
190
|
EC_DOCUMENT_NORMALIZER_LICENSE_NOT_FOUND = -50058,
|
|
191
191
|
/**[Code Parser] No license found.*/
|
|
192
192
|
EC_CODE_PARSER_LICENSE_NOT_FOUND = -90012
|
|
193
|
-
}
|
|
194
|
-
|
|
193
|
+
}
|
|
194
|
+
|
|
195
195
|
declare enum EnumGrayscaleEnhancementMode {
|
|
196
196
|
/**
|
|
197
197
|
* Disables any grayscale image preprocessing. Selecting this mode skips the preprocessing step, passing the image through to subsequent operations without modification.
|
|
@@ -228,8 +228,8 @@ declare enum EnumGrayscaleEnhancementMode {
|
|
|
228
228
|
* Placeholder value with no functional meaning.
|
|
229
229
|
*/
|
|
230
230
|
GEM_END = -1
|
|
231
|
-
}
|
|
232
|
-
|
|
231
|
+
}
|
|
232
|
+
|
|
233
233
|
declare enum EnumGrayscaleTransformationMode {
|
|
234
234
|
/**
|
|
235
235
|
* Bypasses grayscale transformation, leaving the image in its current state without any modification to its grayscale values.
|
|
@@ -257,8 +257,8 @@ declare enum EnumGrayscaleTransformationMode {
|
|
|
257
257
|
* Placeholder value with no functional meaning.
|
|
258
258
|
*/
|
|
259
259
|
GTM_END = -1
|
|
260
|
-
}
|
|
261
|
-
|
|
260
|
+
}
|
|
261
|
+
|
|
262
262
|
declare enum EnumImagePixelFormat {
|
|
263
263
|
/** Binary format representing images with two colors: 0 for black and 1 for white. */
|
|
264
264
|
IPF_BINARY = 0,
|
|
@@ -292,34 +292,39 @@ declare enum EnumImagePixelFormat {
|
|
|
292
292
|
IPF_NV12 = 14,
|
|
293
293
|
/** Inverted binary format with 8 bits per pixel. */
|
|
294
294
|
IPF_BINARY_8_INVERTED = 15
|
|
295
|
-
}
|
|
296
|
-
|
|
295
|
+
}
|
|
296
|
+
|
|
297
297
|
declare enum EnumImageTagType {
|
|
298
298
|
/** Represents an image that has been sourced from a static file. */
|
|
299
299
|
ITT_FILE_IMAGE = 0,
|
|
300
300
|
/** Indicates that the image is a frame extracted from a video stream. */
|
|
301
301
|
ITT_VIDEO_FRAME = 1
|
|
302
|
-
}
|
|
303
|
-
|
|
302
|
+
}
|
|
303
|
+
|
|
304
304
|
declare enum EnumPDFReadingMode {
|
|
305
|
-
/**
|
|
305
|
+
/**
|
|
306
|
+
* Deprecated. Covered by PDFRM_MULTIMODAL.
|
|
307
|
+
*/
|
|
306
308
|
PDFRM_VECTOR = 1,
|
|
307
|
-
/**
|
|
308
|
-
*
|
|
309
|
-
|
|
310
|
-
* the SDK may rasterize the PDF pages.
|
|
311
|
-
* Check the template for available argument settings.*/
|
|
309
|
+
/**
|
|
310
|
+
* Renders the entire page as a bitmap regardless of object type.
|
|
311
|
+
*/
|
|
312
312
|
PDFRM_RASTER = 2,
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
313
|
+
/**
|
|
314
|
+
* Extracts multimodal information from a PDF, including vector graphics,
|
|
315
|
+
* text content, and embedded images, which can be used for subsequent
|
|
316
|
+
* tasks such as barcode reading, text recognition, and document analysis.
|
|
317
|
+
*/
|
|
318
|
+
PDFRM_MULTIMODAL = 3
|
|
319
|
+
}
|
|
320
|
+
|
|
316
321
|
declare enum EnumRasterDataSource {
|
|
317
322
|
/** Specifies the target type for reading a PDF, where the SDK rasterizes the pages of the PDF into images. */
|
|
318
323
|
RDS_RASTERIZED_PAGES = 0,
|
|
319
324
|
/** Specifies the target type for reading a PDF, where the SDK extracts images from the PDF pages. */
|
|
320
325
|
RDS_EXTRACTED_IMAGES = 1
|
|
321
|
-
}
|
|
322
|
-
|
|
326
|
+
}
|
|
327
|
+
|
|
323
328
|
declare enum EnumColourChannelUsageType {
|
|
324
329
|
/**
|
|
325
330
|
* Automatically determines how color channels are used.
|
|
@@ -351,8 +356,8 @@ declare enum EnumColourChannelUsageType {
|
|
|
351
356
|
* This mode is useful for tasks where the blue component is of particular interest.
|
|
352
357
|
*/
|
|
353
358
|
CCUT_RGB_B_CHANNEL_ONLY = 5
|
|
354
|
-
}
|
|
355
|
-
|
|
359
|
+
}
|
|
360
|
+
|
|
356
361
|
declare enum EnumCrossVerificationStatus {
|
|
357
362
|
/** The cross verification has not been performed yet. */
|
|
358
363
|
CVS_NOT_VERIFIED = 0,
|
|
@@ -360,8 +365,8 @@ declare enum EnumCrossVerificationStatus {
|
|
|
360
365
|
CVS_PASSED = 1,
|
|
361
366
|
/** The cross verification has failed. */
|
|
362
367
|
CVS_FAILED = 2
|
|
363
|
-
}
|
|
364
|
-
|
|
368
|
+
}
|
|
369
|
+
|
|
365
370
|
declare const EnumIntermediateResultUnitType: {
|
|
366
371
|
/** No intermediate result. */
|
|
367
372
|
IRUT_NULL: bigint;
|
|
@@ -428,8 +433,8 @@ declare const EnumIntermediateResultUnitType: {
|
|
|
428
433
|
/** A mask to select all types of intermediate results. */
|
|
429
434
|
IRUT_ALL: bigint;
|
|
430
435
|
};
|
|
431
|
-
type EnumIntermediateResultUnitType = bigint;
|
|
432
|
-
|
|
436
|
+
type EnumIntermediateResultUnitType = bigint;
|
|
437
|
+
|
|
433
438
|
declare enum EnumRegionObjectElementType {
|
|
434
439
|
/** Corresponds to the `PredetectedRegionElement` subclass, representing areas within the image identified as potentially significant for further analysis before detailed processing. */
|
|
435
440
|
ROET_PREDETECTED_REGION = 0,
|
|
@@ -453,8 +458,8 @@ declare enum EnumRegionObjectElementType {
|
|
|
453
458
|
ROET_ENHANCED_IMAGE = 9,
|
|
454
459
|
/** Corresponds to the `AuxiliaryRegionElement` subclass, representing auxiliary regions detected within the image. */
|
|
455
460
|
ROET_AUXILIARY_REGION = 10
|
|
456
|
-
}
|
|
457
|
-
|
|
461
|
+
}
|
|
462
|
+
|
|
458
463
|
declare enum EnumSectionType {
|
|
459
464
|
/** Indicates that no specific section type has been specified. */
|
|
460
465
|
ST_NULL = 0,
|
|
@@ -474,8 +479,8 @@ declare enum EnumSectionType {
|
|
|
474
479
|
ST_DOCUMENT_DESKEWING = 7,
|
|
475
480
|
/** Corresponds to results generated in the "document enhancement" section. */
|
|
476
481
|
ST_IMAGE_ENHANCEMENT = 8
|
|
477
|
-
}
|
|
478
|
-
|
|
482
|
+
}
|
|
483
|
+
|
|
479
484
|
declare enum EnumImageFileFormat {
|
|
480
485
|
/** JPEG image format. */
|
|
481
486
|
IFF_JPEG = 0,
|
|
@@ -485,13 +490,13 @@ declare enum EnumImageFileFormat {
|
|
|
485
490
|
IFF_BMP = 2,
|
|
486
491
|
/** PDF (Portable Document Format) format. */
|
|
487
492
|
IFF_PDF = 3
|
|
488
|
-
}
|
|
489
|
-
|
|
493
|
+
}
|
|
494
|
+
|
|
490
495
|
declare enum EnumImageCaptureDistanceMode {
|
|
491
496
|
ICDM_NEAR = 0,
|
|
492
497
|
ICDM_FAR = 1
|
|
493
|
-
}
|
|
494
|
-
|
|
498
|
+
}
|
|
499
|
+
|
|
495
500
|
declare enum EnumModuleName {
|
|
496
501
|
MN_DYNAMSOFT_CAPTURE_VISION_ROUTER = "cvr",
|
|
497
502
|
MN_DYNAMSOFT_CORE = "core",
|
|
@@ -506,8 +511,28 @@ declare enum EnumModuleName {
|
|
|
506
511
|
MN_DYNAMSOFT_CODE_PARSER = "dcp",
|
|
507
512
|
MN_DYNAMSOFT_CAMERA_ENHANCER = "dce",
|
|
508
513
|
MN_DYNAMSOFT_CAPTURE_VISION_STD = "std"
|
|
509
|
-
}
|
|
510
|
-
|
|
514
|
+
}
|
|
515
|
+
|
|
516
|
+
/**
|
|
517
|
+
* Specifies how a numeric value should be interpreted relative to a reference dimension.
|
|
518
|
+
* * Used wherever a numeric parameter (e.g. spacing, ROI coordinates) can be expressed
|
|
519
|
+
* either as an absolute pixel count or as a proportion of a reference size.
|
|
520
|
+
*/
|
|
521
|
+
declare enum EnumMeasureUnit {
|
|
522
|
+
MU_PIXEL = 0,// The value is an absolute pixel count.
|
|
523
|
+
MU_PERCENTAGE = 1
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
declare enum EnumWasmType {
|
|
527
|
+
BASELINE = "baseline",
|
|
528
|
+
ML = "ml",
|
|
529
|
+
ML_SIMD = "ml-simd",
|
|
530
|
+
ML_SIMD_PTHREAD = "ml-simd-pthread",
|
|
531
|
+
ML_SIMD_WITH_PDF = "ml-simd-with-pdf",
|
|
532
|
+
ML_SIMD_PTHREAD_WITH_PDF = "ml-simd-pthread-with-pdf",
|
|
533
|
+
AUTO = "auto"
|
|
534
|
+
}
|
|
535
|
+
|
|
511
536
|
type WorkerAutoResources = {
|
|
512
537
|
[key in EnumModuleName]?: {
|
|
513
538
|
js?: boolean;
|
|
@@ -579,13 +604,12 @@ interface WasmVersions {
|
|
|
579
604
|
interface MapController {
|
|
580
605
|
[key: string]: ((body: any, taskID: number, instanceID?: number) => void);
|
|
581
606
|
}
|
|
582
|
-
type WasmType = "baseline" | "ml" | "ml-simd" | "ml-simd-pthread" | "auto";
|
|
583
607
|
interface WasmLoadOptions {
|
|
584
|
-
wasmType?:
|
|
608
|
+
wasmType?: EnumWasmType;
|
|
585
609
|
pthreadPoolSize?: number;
|
|
586
610
|
}
|
|
587
|
-
type MimeType = "image/png" | "image/jpeg" | "image/bmp";
|
|
588
|
-
|
|
611
|
+
type MimeType = "image/png" | "image/jpeg" | "image/bmp";
|
|
612
|
+
|
|
589
613
|
interface CapturedResultItem {
|
|
590
614
|
/** The type of the captured result item, indicating what kind of data it represents. */
|
|
591
615
|
readonly type: EnumCapturedResultItemType;
|
|
@@ -595,15 +619,15 @@ interface CapturedResultItem {
|
|
|
595
619
|
readonly targetROIDefName: string;
|
|
596
620
|
/** The name of the task that generated the result. */
|
|
597
621
|
readonly taskName: string;
|
|
598
|
-
}
|
|
599
|
-
|
|
622
|
+
}
|
|
623
|
+
|
|
600
624
|
interface ImageTag {
|
|
601
625
|
/** The unique identifier of the image. */
|
|
602
626
|
imageId: number;
|
|
603
627
|
/** The type of the image. */
|
|
604
628
|
type: EnumImageTagType;
|
|
605
|
-
}
|
|
606
|
-
|
|
629
|
+
}
|
|
630
|
+
|
|
607
631
|
interface DSImageData {
|
|
608
632
|
/** The raw bytes of the image as a Uint8Array. */
|
|
609
633
|
bytes: Uint8Array;
|
|
@@ -617,8 +641,8 @@ interface DSImageData {
|
|
|
617
641
|
format: EnumImagePixelFormat;
|
|
618
642
|
/** An optional tag associated with the image data. */
|
|
619
643
|
imageTag?: ImageTag;
|
|
620
|
-
}
|
|
621
|
-
|
|
644
|
+
}
|
|
645
|
+
|
|
622
646
|
interface OriginalImageResultItem extends CapturedResultItem {
|
|
623
647
|
/** The image data associated with this result item. */
|
|
624
648
|
imageData: DSImageData;
|
|
@@ -628,27 +652,27 @@ interface OriginalImageResultItem extends CapturedResultItem {
|
|
|
628
652
|
toImage: (MIMEType: "image/png" | "image/jpeg") => HTMLImageElement;
|
|
629
653
|
/** Converts the image data into a Blob object of a specified MIME type ('image/png' or 'image/jpeg'). */
|
|
630
654
|
toBlob: (MIMEType: "image/png" | "image/jpeg") => Promise<Blob>;
|
|
631
|
-
}
|
|
632
|
-
|
|
655
|
+
}
|
|
656
|
+
|
|
633
657
|
interface Point {
|
|
634
658
|
/** The x-coordinate of the point. */
|
|
635
659
|
x: number;
|
|
636
660
|
/** The y-coordinate of the point. */
|
|
637
661
|
y: number;
|
|
638
|
-
}
|
|
639
|
-
|
|
662
|
+
}
|
|
663
|
+
|
|
640
664
|
interface Contour {
|
|
641
665
|
/** An array of `Point` objects defining the vertices of the contour. */
|
|
642
666
|
points: Array<Point>;
|
|
643
|
-
}
|
|
644
|
-
|
|
667
|
+
}
|
|
668
|
+
|
|
645
669
|
interface LineSegment {
|
|
646
670
|
/** The starting point of the line segment. */
|
|
647
671
|
startPoint: Point;
|
|
648
672
|
/** The ending point of the line segment. */
|
|
649
673
|
endPoint: Point;
|
|
650
|
-
}
|
|
651
|
-
|
|
674
|
+
}
|
|
675
|
+
|
|
652
676
|
interface Corner {
|
|
653
677
|
/** The type of the corner, represented by the enumeration EnumCornerType. */
|
|
654
678
|
type: EnumCornerType;
|
|
@@ -658,8 +682,8 @@ interface Corner {
|
|
|
658
682
|
line1: LineSegment;
|
|
659
683
|
/** The second line segment forming the corner. */
|
|
660
684
|
line2: LineSegment;
|
|
661
|
-
}
|
|
662
|
-
|
|
685
|
+
}
|
|
686
|
+
|
|
663
687
|
interface Rect {
|
|
664
688
|
/** The x-coordinate of the rectangle's top-left corner. */
|
|
665
689
|
x: number;
|
|
@@ -671,8 +695,8 @@ interface Rect {
|
|
|
671
695
|
height: number;
|
|
672
696
|
/** [Optional] Indicates if the rectangle's measurements are in percentages. */
|
|
673
697
|
isMeasuredInPercentage?: boolean;
|
|
674
|
-
}
|
|
675
|
-
|
|
698
|
+
}
|
|
699
|
+
|
|
676
700
|
interface Arc {
|
|
677
701
|
/** The x-coordinate of the arc's center. */
|
|
678
702
|
x: number;
|
|
@@ -684,13 +708,13 @@ interface Arc {
|
|
|
684
708
|
startAngle: number;
|
|
685
709
|
/** The ending angle of the arc, in radians. */
|
|
686
710
|
endAngle: number;
|
|
687
|
-
}
|
|
688
|
-
|
|
711
|
+
}
|
|
712
|
+
|
|
689
713
|
interface Polygon {
|
|
690
714
|
/** An array of `Point` objects defining the vertices of the polygon. */
|
|
691
715
|
points: Array<Point>;
|
|
692
|
-
}
|
|
693
|
-
|
|
716
|
+
}
|
|
717
|
+
|
|
694
718
|
interface DSRect {
|
|
695
719
|
/** The left coordinate of the rectangle. */
|
|
696
720
|
left: number;
|
|
@@ -702,21 +726,21 @@ interface DSRect {
|
|
|
702
726
|
bottom: number;
|
|
703
727
|
/** Indicates if the rectangle's measurements are in percentages. */
|
|
704
728
|
isMeasuredInPercentage?: boolean;
|
|
705
|
-
}
|
|
706
|
-
|
|
729
|
+
}
|
|
730
|
+
|
|
707
731
|
interface Edge {
|
|
708
732
|
/** The starting corner of the edge. */
|
|
709
733
|
startCorner: Corner;
|
|
710
734
|
/** The ending corner of the edge. */
|
|
711
735
|
endCorner: Corner;
|
|
712
|
-
}
|
|
713
|
-
|
|
736
|
+
}
|
|
737
|
+
|
|
714
738
|
interface FileImageTag extends ImageTag {
|
|
715
739
|
filePath: string;
|
|
716
740
|
pageNumber: number;
|
|
717
741
|
totalPages: number;
|
|
718
|
-
}
|
|
719
|
-
|
|
742
|
+
}
|
|
743
|
+
|
|
720
744
|
interface ImageSourceErrorListener {
|
|
721
745
|
/**
|
|
722
746
|
* Called when an error is received from the image source.
|
|
@@ -726,14 +750,14 @@ interface ImageSourceErrorListener {
|
|
|
726
750
|
* additional information about the error.
|
|
727
751
|
*/
|
|
728
752
|
onErrorReceived: (errorCode: EnumErrorCode, errorMessage: string) => void;
|
|
729
|
-
}
|
|
730
|
-
|
|
753
|
+
}
|
|
754
|
+
|
|
731
755
|
interface PDFReadingParameter {
|
|
732
|
-
mode
|
|
733
|
-
dpi
|
|
734
|
-
rasterDataSource
|
|
735
|
-
}
|
|
736
|
-
|
|
756
|
+
mode?: EnumPDFReadingMode;
|
|
757
|
+
dpi?: number;
|
|
758
|
+
rasterDataSource?: EnumRasterDataSource;
|
|
759
|
+
}
|
|
760
|
+
|
|
737
761
|
interface Quadrilateral {
|
|
738
762
|
/** An array of four `Point` objects defining the vertices of the quadrilateral. */
|
|
739
763
|
points: [Point, Point, Point, Point];
|
|
@@ -741,20 +765,20 @@ interface Quadrilateral {
|
|
|
741
765
|
boundingRect?: DSRect;
|
|
742
766
|
/** The area of the quadrilateral. */
|
|
743
767
|
area?: number;
|
|
744
|
-
}
|
|
745
|
-
|
|
768
|
+
}
|
|
769
|
+
|
|
746
770
|
interface DSFile extends File {
|
|
747
771
|
/** Downloads the file in memory to the local drive via the browser. */
|
|
748
772
|
download: () => void;
|
|
749
|
-
}
|
|
750
|
-
|
|
773
|
+
}
|
|
774
|
+
|
|
751
775
|
interface Warning {
|
|
752
776
|
/** A unique identifier for the warning message. */
|
|
753
777
|
id: number;
|
|
754
778
|
/** The textual description of the warning. */
|
|
755
779
|
message: string;
|
|
756
|
-
}
|
|
757
|
-
|
|
780
|
+
}
|
|
781
|
+
|
|
758
782
|
interface IntermediateResultUnit {
|
|
759
783
|
/** A unique identifier for the intermediate result unit. */
|
|
760
784
|
hashId: string;
|
|
@@ -764,38 +788,38 @@ interface IntermediateResultUnit {
|
|
|
764
788
|
originalImageTag: ImageTag;
|
|
765
789
|
/** The type of the intermediate result unit, defined by the enumeration `EnumIntermediateResultUnitType`. */
|
|
766
790
|
unitType: EnumIntermediateResultUnitType;
|
|
767
|
-
}
|
|
768
|
-
|
|
791
|
+
}
|
|
792
|
+
|
|
769
793
|
interface BinaryImageUnit extends IntermediateResultUnit {
|
|
770
794
|
/** The image data for the binary image. */
|
|
771
795
|
imageData: DSImageData;
|
|
772
|
-
}
|
|
773
|
-
|
|
796
|
+
}
|
|
797
|
+
|
|
774
798
|
interface ColourImageUnit extends IntermediateResultUnit {
|
|
775
799
|
/** The image data for the colour image. */
|
|
776
800
|
imageData: DSImageData;
|
|
777
|
-
}
|
|
778
|
-
|
|
801
|
+
}
|
|
802
|
+
|
|
779
803
|
interface ContoursUnit extends IntermediateResultUnit {
|
|
780
804
|
/** An array of `Contour` objects, each representing a series of points that outline a shape within the image. */
|
|
781
805
|
contours: Array<Contour>;
|
|
782
|
-
}
|
|
783
|
-
|
|
806
|
+
}
|
|
807
|
+
|
|
784
808
|
interface EnhancedGrayscaleImageUnit extends IntermediateResultUnit {
|
|
785
809
|
/** The image data for the enhanced grayscale image. */
|
|
786
810
|
imageData: DSImageData;
|
|
787
|
-
}
|
|
788
|
-
|
|
811
|
+
}
|
|
812
|
+
|
|
789
813
|
interface GrayscaleImageUnit extends IntermediateResultUnit {
|
|
790
814
|
/** The image data for the grayscale image. */
|
|
791
815
|
imageData: DSImageData;
|
|
792
|
-
}
|
|
793
|
-
|
|
816
|
+
}
|
|
817
|
+
|
|
794
818
|
interface IntermediateResult {
|
|
795
819
|
/** An array of `IntermediateResultUnit` objects, each representing a different type of intermediate result. */
|
|
796
820
|
intermediateResultUnits: Array<IntermediateResultUnit>;
|
|
797
|
-
}
|
|
798
|
-
|
|
821
|
+
}
|
|
822
|
+
|
|
799
823
|
interface IntermediateResultExtraInfo {
|
|
800
824
|
/** The property indicates the name of the `TargetROIDef` object that generates the intermediate result. */
|
|
801
825
|
targetROIDefName: string;
|
|
@@ -805,13 +829,13 @@ interface IntermediateResultExtraInfo {
|
|
|
805
829
|
isSectionLevelResult: boolean;
|
|
806
830
|
/** The type of section, if applicable, as defined by the enumeration `EnumSectionType`. */
|
|
807
831
|
sectionType: EnumSectionType;
|
|
808
|
-
}
|
|
809
|
-
|
|
832
|
+
}
|
|
833
|
+
|
|
810
834
|
interface LineSegmentsUnit extends IntermediateResultUnit {
|
|
811
835
|
/** An array of `LineSegment` objects, each representing a segment of a line detected within the image. */
|
|
812
836
|
lineSegments: Array<LineSegment>;
|
|
813
|
-
}
|
|
814
|
-
|
|
837
|
+
}
|
|
838
|
+
|
|
815
839
|
interface RegionObjectElement {
|
|
816
840
|
/** The location of the region object, represented as a quadrilateral. */
|
|
817
841
|
location: Quadrilateral;
|
|
@@ -819,8 +843,8 @@ interface RegionObjectElement {
|
|
|
819
843
|
referencedElement: RegionObjectElement;
|
|
820
844
|
/** The type of the region object element, defined by the enumeration EnumRegionObjectElementType. */
|
|
821
845
|
elementType: EnumRegionObjectElementType;
|
|
822
|
-
}
|
|
823
|
-
|
|
846
|
+
}
|
|
847
|
+
|
|
824
848
|
interface PredetectedRegionElement extends RegionObjectElement {
|
|
825
849
|
/** The name of the detection mode used to detect this region element. */
|
|
826
850
|
modeName: string;
|
|
@@ -828,28 +852,28 @@ interface PredetectedRegionElement extends RegionObjectElement {
|
|
|
828
852
|
labelID: number;
|
|
829
853
|
/** The name of the label associated with this region element. */
|
|
830
854
|
labelName: string;
|
|
831
|
-
}
|
|
832
|
-
|
|
855
|
+
}
|
|
856
|
+
|
|
833
857
|
interface PredetectedRegionsUnit extends IntermediateResultUnit {
|
|
834
858
|
/** An array of `PredetectedRegionElement` objects, each representing a pre-detected region detected within the image. */
|
|
835
859
|
predetectedRegions: Array<PredetectedRegionElement>;
|
|
836
|
-
}
|
|
837
|
-
|
|
860
|
+
}
|
|
861
|
+
|
|
838
862
|
interface ScaledColourImageUnit extends IntermediateResultUnit {
|
|
839
863
|
/** The image data for the scaled colour image. */
|
|
840
864
|
imageData: DSImageData;
|
|
841
|
-
}
|
|
842
|
-
|
|
865
|
+
}
|
|
866
|
+
|
|
843
867
|
interface ShortLinesUnit extends IntermediateResultUnit {
|
|
844
868
|
/** An array of `LineSegment` objects, each representing a short line detected within the image. */
|
|
845
869
|
shortLines: Array<LineSegment>;
|
|
846
|
-
}
|
|
847
|
-
|
|
870
|
+
}
|
|
871
|
+
|
|
848
872
|
interface TextRemovedBinaryImageUnit extends IntermediateResultUnit {
|
|
849
873
|
/** The image data for the text-removed binary image. */
|
|
850
874
|
imageData: DSImageData;
|
|
851
|
-
}
|
|
852
|
-
|
|
875
|
+
}
|
|
876
|
+
|
|
853
877
|
interface TextureDetectionResultUnit extends IntermediateResultUnit {
|
|
854
878
|
/** This value represents the detected horizontal distance in pixels between consecutive texture patterns, providing an indication of the texture's density and orientation within the image. */
|
|
855
879
|
xSpacing: number;
|
|
@@ -858,35 +882,35 @@ interface TextureDetectionResultUnit extends IntermediateResultUnit {
|
|
|
858
882
|
* It offers insights into the vertical density and alignment of the texture within the image, contributing to the understanding of the texture's characteristics and spatial distribution.
|
|
859
883
|
*/
|
|
860
884
|
ySpacing: number;
|
|
861
|
-
}
|
|
862
|
-
|
|
885
|
+
}
|
|
886
|
+
|
|
863
887
|
interface TextureRemovedBinaryImageUnit extends IntermediateResultUnit {
|
|
864
888
|
/** The image data for the texture-removed binary image. */
|
|
865
889
|
imageData: DSImageData;
|
|
866
|
-
}
|
|
867
|
-
|
|
890
|
+
}
|
|
891
|
+
|
|
868
892
|
interface TextureRemovedGrayscaleImageUnit extends IntermediateResultUnit {
|
|
869
893
|
/** The image data for the texture-removed grayscale image. */
|
|
870
894
|
imageData: DSImageData;
|
|
871
|
-
}
|
|
872
|
-
|
|
895
|
+
}
|
|
896
|
+
|
|
873
897
|
interface TextZone {
|
|
874
898
|
/** The location of the text zone. */
|
|
875
899
|
location: Quadrilateral;
|
|
876
900
|
/** The indices of the character contours. */
|
|
877
901
|
charContoursIndices: Array<number>;
|
|
878
|
-
}
|
|
879
|
-
|
|
902
|
+
}
|
|
903
|
+
|
|
880
904
|
interface TextZonesUnit extends IntermediateResultUnit {
|
|
881
905
|
/** An array of `TextZone` objects, each representing the geometric boundaries of a detected text zone within the image. */
|
|
882
906
|
textZones: Array<TextZone>;
|
|
883
|
-
}
|
|
884
|
-
|
|
907
|
+
}
|
|
908
|
+
|
|
885
909
|
interface TransformedGrayscaleImageUnit extends IntermediateResultUnit {
|
|
886
910
|
/** The image data for the transformed grayscale image. */
|
|
887
911
|
imageData: DSImageData;
|
|
888
|
-
}
|
|
889
|
-
|
|
912
|
+
}
|
|
913
|
+
|
|
890
914
|
/**
|
|
891
915
|
* The `ObservationParameters` interface represents an object used to configure intermediate result observation.
|
|
892
916
|
*/
|
|
@@ -924,8 +948,8 @@ interface ObservationParameters {
|
|
|
924
948
|
* @returns Boolean indicating whether the task is observed.
|
|
925
949
|
*/
|
|
926
950
|
isTaskObserved: (taskName: string) => boolean;
|
|
927
|
-
}
|
|
928
|
-
|
|
951
|
+
}
|
|
952
|
+
|
|
929
953
|
interface CapturedResultBase {
|
|
930
954
|
/** Error code associated with the capture result. */
|
|
931
955
|
readonly errorCode: number;
|
|
@@ -935,44 +959,36 @@ interface CapturedResultBase {
|
|
|
935
959
|
readonly originalImageHashId: string;
|
|
936
960
|
/** The tag associated with the original image. */
|
|
937
961
|
readonly originalImageTag: ImageTag;
|
|
938
|
-
}
|
|
939
|
-
|
|
962
|
+
}
|
|
963
|
+
|
|
940
964
|
interface ErrorInfo {
|
|
941
965
|
errorCode: EnumErrorCode;
|
|
942
966
|
errorString: string;
|
|
943
|
-
}
|
|
944
|
-
|
|
967
|
+
}
|
|
968
|
+
|
|
945
969
|
interface AuxiliaryRegionElement extends RegionObjectElement {
|
|
946
970
|
/** The name of this auxiliary region(e.g., "PortraitZone", "SignatureArea"). */
|
|
947
971
|
name: string;
|
|
948
972
|
/** The confidence level of this auxiliary region detection, typically in the range [0, 100] */
|
|
949
973
|
confidence: number;
|
|
950
|
-
}
|
|
951
|
-
|
|
952
|
-
declare const mapAsyncDependency: {
|
|
953
|
-
[key: string]: any;
|
|
954
|
-
};
|
|
955
|
-
declare const waitAsyncDependency: (depName: string | string[]) => Promise<void>;
|
|
956
|
-
declare const doOrWaitAsyncDependency: (depName: string | string[], asyncFunc: () => Promise<void>) => Promise<void>;
|
|
974
|
+
}
|
|
975
|
+
|
|
957
976
|
declare const imagePtrToUint8Array: (data: {
|
|
958
977
|
ptr: number;
|
|
959
978
|
length: number;
|
|
960
|
-
}) => Promise<Uint8Array
|
|
979
|
+
}) => Promise<Uint8Array<ArrayBufferLike>>;
|
|
961
980
|
declare const resolveDsImageData: (point: number) => Promise<DSImageData>;
|
|
962
981
|
declare let worker: Worker;
|
|
963
982
|
declare const getNextTaskID: () => number;
|
|
964
983
|
declare const mapTaskCallBack: {
|
|
965
984
|
[key: string]: (body: any) => void;
|
|
966
985
|
};
|
|
967
|
-
declare let onLog: (message: string) => void | undefined;
|
|
968
|
-
declare const setOnLog: (value: typeof onLog) => void;
|
|
969
986
|
declare let bDebug: boolean;
|
|
970
987
|
declare const setBDebug: (value: boolean) => void;
|
|
971
988
|
declare const innerVersions: InnerVersions;
|
|
972
989
|
declare const mapPackageRegister: {
|
|
973
990
|
[key: string]: any;
|
|
974
991
|
};
|
|
975
|
-
declare const workerAutoResources: WorkerAutoResources;
|
|
976
992
|
declare class CoreModule {
|
|
977
993
|
static get engineResourcePaths(): EngineResourcePaths;
|
|
978
994
|
static set engineResourcePaths(value: EngineResourcePaths);
|
|
@@ -982,8 +998,7 @@ declare class CoreModule {
|
|
|
982
998
|
static get bSupportIRTModule(): number;
|
|
983
999
|
private static _versions;
|
|
984
1000
|
static get versions(): any;
|
|
985
|
-
static
|
|
986
|
-
static set _onLog(value: (message: string) => void);
|
|
1001
|
+
static _onLog: (message: string) => void;
|
|
987
1002
|
static get _bDebug(): boolean;
|
|
988
1003
|
static set _bDebug(value: boolean);
|
|
989
1004
|
static _bundleEnv: "DCV" | "DBR";
|
|
@@ -991,14 +1006,14 @@ declare class CoreModule {
|
|
|
991
1006
|
private static _wasmLoadOptions;
|
|
992
1007
|
static get wasmLoadOptions(): WasmLoadOptions;
|
|
993
1008
|
static set wasmLoadOptions(options: WasmLoadOptions);
|
|
994
|
-
static loadedWasmType: Exclude<
|
|
1009
|
+
static loadedWasmType: Exclude<EnumWasmType, "auto">;
|
|
995
1010
|
/**
|
|
996
1011
|
* Initiates the loading process for the .wasm file(s) corresponding to the specified module(s).
|
|
997
1012
|
* If a module relies on other modules, the other modules will be loaded as well.
|
|
998
1013
|
*
|
|
999
1014
|
* @returns A promise that resolves when the resources have been successfully released. It does not provide any value upon resolution.
|
|
1000
1015
|
*/
|
|
1001
|
-
static isModuleLoaded(
|
|
1016
|
+
static isModuleLoaded(): boolean;
|
|
1002
1017
|
static loadWasm(): Promise<void>;
|
|
1003
1018
|
/**
|
|
1004
1019
|
* An event that fires during the loading of a WebAssembly module (.wasm).
|
|
@@ -1025,8 +1040,8 @@ declare class CoreModule {
|
|
|
1025
1040
|
static enableLogging(): void;
|
|
1026
1041
|
static disableLogging(): void;
|
|
1027
1042
|
static cfd(count: number): Promise<void>;
|
|
1028
|
-
}
|
|
1029
|
-
|
|
1043
|
+
}
|
|
1044
|
+
|
|
1030
1045
|
declare abstract class ImageSourceAdapter {
|
|
1031
1046
|
#private;
|
|
1032
1047
|
/**
|
|
@@ -1145,8 +1160,8 @@ declare abstract class ImageSourceAdapter {
|
|
|
1145
1160
|
* @returns The current buffer overflow protection mode.
|
|
1146
1161
|
*/
|
|
1147
1162
|
getColourChannelUsageType(): EnumColourChannelUsageType;
|
|
1148
|
-
}
|
|
1149
|
-
|
|
1163
|
+
}
|
|
1164
|
+
|
|
1150
1165
|
/**
|
|
1151
1166
|
* Judge if the input is an object(exclude array and function). If `null` or `undefined`, return `false`.
|
|
1152
1167
|
* @param value
|
|
@@ -1224,12 +1239,12 @@ declare const isQuad: (value: any) => value is Quadrilateral;
|
|
|
1224
1239
|
* @returns
|
|
1225
1240
|
* @ignore
|
|
1226
1241
|
*/
|
|
1227
|
-
declare const isRect: (value: any) => value is Rect;
|
|
1228
|
-
|
|
1242
|
+
declare const isRect: (value: any) => value is Rect;
|
|
1243
|
+
|
|
1229
1244
|
declare const requestResource: (url: string, type: "text" | "blob" | "arraybuffer", callbacks?: {
|
|
1230
|
-
loadstartCallback?: () => any;
|
|
1231
|
-
progressCallback?: (pe: any) => any;
|
|
1232
|
-
loadendCallback?: () => any;
|
|
1245
|
+
loadstartCallback?: (xhr: XMLHttpRequest) => any;
|
|
1246
|
+
progressCallback?: (pe: any, xhr: XMLHttpRequest) => any;
|
|
1247
|
+
loadendCallback?: (xhr: XMLHttpRequest) => any;
|
|
1233
1248
|
}) => Promise<any>;
|
|
1234
1249
|
declare const checkIsLink: (str: string) => boolean;
|
|
1235
1250
|
declare const compareVersion: (strV1: string, strV2: string) => number;
|
|
@@ -1263,15 +1278,16 @@ declare const productNameMap: {
|
|
|
1263
1278
|
readonly dwt: "dwt";
|
|
1264
1279
|
readonly dbrBundle: "dynamsoft-barcode-reader-bundle";
|
|
1265
1280
|
readonly dcvBundle: "dynamsoft-capture-vision-bundle";
|
|
1266
|
-
};
|
|
1267
|
-
|
|
1268
|
-
export {
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1281
|
+
};
|
|
1282
|
+
|
|
1283
|
+
export { CoreModule, EnumBufferOverflowProtectionMode, EnumCapturedResultItemType, EnumColourChannelUsageType, EnumCornerType, EnumCrossVerificationStatus, EnumErrorCode, EnumGrayscaleEnhancementMode, EnumGrayscaleTransformationMode, EnumImageCaptureDistanceMode, EnumImageFileFormat, EnumImagePixelFormat, EnumImageTagType, EnumIntermediateResultUnitType, EnumMeasureUnit, EnumModuleName, EnumPDFReadingMode, EnumRasterDataSource, EnumRegionObjectElementType, EnumSectionType, EnumWasmType, ImageSourceAdapter, _saveToFile, _toBlob, _toCanvas, _toImage, bDebug, blobToDsImage, checkIsLink, compareVersion, createImageData, d, e, encodeBMP, getNextTaskID, handleEngineResourcePaths, imagePtrToUint8Array, innerVersions, isArc, isContour, isDSImageData, isDSRect, isDsImageKeyValue, isImageTag, isLineSegment, isObject, isOriginalDsImageData, isPoint, isPolygon, isQuad, isRect, isSimdSupported, mapPackageRegister, mapTaskCallBack, productNameMap, requestResource, resolveDsImageData, setBDebug, worker };
|
|
1284
|
+
export type { Arc, AuxiliaryRegionElement, BinaryImageUnit, CapturedResultBase, CapturedResultItem, ColourImageUnit, Contour, ContoursUnit, Corner, DSFile, DSImageData, DSRect, DwtInfo, Edge, EngineResourcePaths, EnhancedGrayscaleImageUnit, ErrorInfo, FileImageTag, GrayscaleImageUnit, ImageSourceErrorListener, ImageTag, InnerVersions, IntermediateResult, IntermediateResultExtraInfo, IntermediateResultUnit, LineSegment, LineSegmentsUnit, MapController, MimeType, ObservationParameters, OriginalImageResultItem, PDFReadingParameter, PathInfo, Point, Polygon, PostMessageBody, PredetectedRegionElement, PredetectedRegionsUnit, Quadrilateral, Rect, RegionObjectElement, ScaledColourImageUnit, ShortLinesUnit, TextRemovedBinaryImageUnit, TextZone, TextZonesUnit, TextureDetectionResultUnit, TextureRemovedBinaryImageUnit, TextureRemovedGrayscaleImageUnit, TransformedGrayscaleImageUnit, Warning, WasmLoadOptions, WasmVersions, WorkerAutoResources };
|
|
1285
|
+
|
|
1286
|
+
|
|
1287
|
+
|
|
1288
|
+
|
|
1289
|
+
|
|
1290
|
+
|
|
1275
1291
|
interface CapturedResult extends CapturedResultBase {
|
|
1276
1292
|
/** An array of `CapturedResultItem` objects representing the captured result items. */
|
|
1277
1293
|
items: Array<CapturedResultItem>;
|
|
@@ -1283,8 +1299,8 @@ interface CapturedResult extends CapturedResultBase {
|
|
|
1283
1299
|
processedDocumentResult?: ProcessedDocumentResult;
|
|
1284
1300
|
/** The parsed results within the original image. */
|
|
1285
1301
|
parsedResult?: ParsedResult;
|
|
1286
|
-
}
|
|
1287
|
-
|
|
1302
|
+
}
|
|
1303
|
+
|
|
1288
1304
|
declare class CapturedResultReceiver {
|
|
1289
1305
|
/**
|
|
1290
1306
|
* Event triggered when a generic captured result is available, occurring each time an image finishes its processing.
|
|
@@ -1302,8 +1318,8 @@ declare class CapturedResultReceiver {
|
|
|
1302
1318
|
onRecognizedTextLinesReceived?: (result: RecognizedTextLinesResult) => void;
|
|
1303
1319
|
onProcessedDocumentResultReceived?: (result: ProcessedDocumentResult) => void;
|
|
1304
1320
|
onParsedResultsReceived?: (result: ParsedResult) => void;
|
|
1305
|
-
}
|
|
1306
|
-
|
|
1321
|
+
}
|
|
1322
|
+
|
|
1307
1323
|
declare class BufferedItemsManager {
|
|
1308
1324
|
private _cvr;
|
|
1309
1325
|
constructor(cvr: any);
|
|
@@ -1322,8 +1338,8 @@ declare class BufferedItemsManager {
|
|
|
1322
1338
|
* @return the buffered character items
|
|
1323
1339
|
*/
|
|
1324
1340
|
getBufferedCharacterItemSet(): Promise<BufferedCharacterItemSet>;
|
|
1325
|
-
}
|
|
1326
|
-
|
|
1341
|
+
}
|
|
1342
|
+
|
|
1327
1343
|
declare class IntermediateResultReceiver {
|
|
1328
1344
|
private _observedResultUnitTypes;
|
|
1329
1345
|
private _observedTaskMap;
|
|
@@ -1366,8 +1382,8 @@ declare class IntermediateResultReceiver {
|
|
|
1366
1382
|
onEnhancedImageReceived?: (result: EnhancedImageUnit, info: IntermediateResultExtraInfo) => void;
|
|
1367
1383
|
onLogicLinesUnitReceived?: (result: LogicLinesUnit, info: IntermediateResultExtraInfo) => void;
|
|
1368
1384
|
onLongLinesUnitReceived?: (result: LongLinesUnit, info: IntermediateResultExtraInfo) => void;
|
|
1369
|
-
}
|
|
1370
|
-
|
|
1385
|
+
}
|
|
1386
|
+
|
|
1371
1387
|
declare class IntermediateResultManager {
|
|
1372
1388
|
private _cvr;
|
|
1373
1389
|
private _irrRegistryState;
|
|
@@ -1390,8 +1406,8 @@ declare class IntermediateResultManager {
|
|
|
1390
1406
|
* @returns A promise that resolves when the operation has successfully completed. It provides the original image upon resolution.
|
|
1391
1407
|
*/
|
|
1392
1408
|
getOriginalImage(): DSImageData;
|
|
1393
|
-
}
|
|
1394
|
-
|
|
1409
|
+
}
|
|
1410
|
+
|
|
1395
1411
|
declare enum EnumImageSourceState {
|
|
1396
1412
|
/**
|
|
1397
1413
|
* Indicates that the buffer of the image source is currently empty.
|
|
@@ -1401,8 +1417,8 @@ declare enum EnumImageSourceState {
|
|
|
1401
1417
|
* Signifies that the source for the image source has been depleted.
|
|
1402
1418
|
*/
|
|
1403
1419
|
ISS_EXHAUSTED = 1
|
|
1404
|
-
}
|
|
1405
|
-
|
|
1420
|
+
}
|
|
1421
|
+
|
|
1406
1422
|
interface ImageSourceStateListener {
|
|
1407
1423
|
/**
|
|
1408
1424
|
* Event triggered whenever there is a change in the image source's state.
|
|
@@ -1410,8 +1426,8 @@ interface ImageSourceStateListener {
|
|
|
1410
1426
|
* This enumeration defines various possible states of an image source.
|
|
1411
1427
|
*/
|
|
1412
1428
|
onImageSourceStateReceived?: (status: EnumImageSourceState) => void;
|
|
1413
|
-
}
|
|
1414
|
-
|
|
1429
|
+
}
|
|
1430
|
+
|
|
1415
1431
|
interface SimplifiedCaptureVisionSettings {
|
|
1416
1432
|
/**
|
|
1417
1433
|
* Specifies weather to output the original image.
|
|
@@ -1429,6 +1445,10 @@ interface SimplifiedCaptureVisionSettings {
|
|
|
1429
1445
|
* Specifies the timeout duration for processing an image, in milliseconds.
|
|
1430
1446
|
*/
|
|
1431
1447
|
timeout: number;
|
|
1448
|
+
/**
|
|
1449
|
+
* Specifies the maximum number of parallel tasks that can be used for image capture and recognition.
|
|
1450
|
+
*/
|
|
1451
|
+
maxParallelTasks: number;
|
|
1432
1452
|
/**
|
|
1433
1453
|
* Specifies the shortest time span, in milliseconds, that must elapse between two successive image captures. Opting for a higher interval decreases capture frequency, which can lower the system's processing load and conserve energy. On the other hand, a smaller interval value increases the frequency of image captures, enhancing the system's responsiveness.
|
|
1434
1454
|
* @remarks Handling of Special Values:
|
|
@@ -1439,16 +1459,8 @@ interface SimplifiedCaptureVisionSettings {
|
|
|
1439
1459
|
* Specifies the basic settings for the barcode reader module. It is of type `SimplifiedBarcodeReaderSettings`.
|
|
1440
1460
|
*/
|
|
1441
1461
|
barcodeSettings: SimplifiedBarcodeReaderSettings;
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
*/
|
|
1445
|
-
documentSettings: SimplifiedDocumentNormalizerSettings;
|
|
1446
|
-
/**
|
|
1447
|
-
* Specifies the basic settings for the label recognizer module. It is of type `SimplifiedLabelRecognizerSettings`.
|
|
1448
|
-
*/
|
|
1449
|
-
labelSettings: SimplifiedLabelRecognizerSettings;
|
|
1450
|
-
}
|
|
1451
|
-
|
|
1462
|
+
}
|
|
1463
|
+
|
|
1452
1464
|
interface CapturedResultFilter {
|
|
1453
1465
|
onOriginalImageResultReceived?: (result: OriginalImageResultItem) => void;
|
|
1454
1466
|
onDecodedBarcodesReceived?: (result: DecodedBarcodesResult) => void;
|
|
@@ -1456,8 +1468,13 @@ interface CapturedResultFilter {
|
|
|
1456
1468
|
onProcessedDocumentResultReceived?: (result: ProcessedDocumentResult) => void;
|
|
1457
1469
|
onParsedResultsReceived?: (result: ParsedResult) => void;
|
|
1458
1470
|
getFilteredResultItemTypes(): number;
|
|
1459
|
-
}
|
|
1460
|
-
|
|
1471
|
+
}
|
|
1472
|
+
|
|
1473
|
+
type PDFOptions = {
|
|
1474
|
+
pages?: number[];
|
|
1475
|
+
dpi?: number;
|
|
1476
|
+
};
|
|
1477
|
+
|
|
1461
1478
|
declare class CaptureVisionRouter {
|
|
1462
1479
|
#private;
|
|
1463
1480
|
static _onLog: (message: string) => void;
|
|
@@ -1493,7 +1510,6 @@ declare class CaptureVisionRouter {
|
|
|
1493
1510
|
private _minImageCaptureInterval;
|
|
1494
1511
|
private _averageProcessintTimeArray;
|
|
1495
1512
|
private _averageFetchImageTimeArray;
|
|
1496
|
-
private _currentSettings;
|
|
1497
1513
|
private _averageTime;
|
|
1498
1514
|
private _dynamsoft;
|
|
1499
1515
|
private _enhancedFeaturesIrr;
|
|
@@ -1607,6 +1623,24 @@ declare class CaptureVisionRouter {
|
|
|
1607
1623
|
* @returns A promise that resolves with a `CapturedResult` object which contains the derived information from the image processed.
|
|
1608
1624
|
*/
|
|
1609
1625
|
capture(imageOrFile: Blob | string | DSImageData | HTMLImageElement | HTMLVideoElement | HTMLCanvasElement, templateName?: string): Promise<CapturedResult>;
|
|
1626
|
+
/**
|
|
1627
|
+
* Captures multiple pages from a PDF file and returns the extracted content for each specified page.
|
|
1628
|
+
*
|
|
1629
|
+
* This method processes a PDF document and extracts data from one or more pages using the
|
|
1630
|
+
* PDFRM_MULTIMODAL capture mode. The extracted content is returned as an array of results,
|
|
1631
|
+
* one per requested page.
|
|
1632
|
+
*
|
|
1633
|
+
* @param file - The PDF file to process. Can be provided as a Blob object or a file path string.
|
|
1634
|
+
* @param templateName - The name of the template to use for extraction.
|
|
1635
|
+
* @param options - Optional configuration parameters for the capture operation.
|
|
1636
|
+
* @param options.pages - An array of page numbers (0-indexed) to extract. If empty or omitted,
|
|
1637
|
+
* all pages in the document will be processed.
|
|
1638
|
+
* @param options.dpi - The DPI (dots per inch) resolution for rendering. Defaults to 300.
|
|
1639
|
+
*
|
|
1640
|
+
* @returns A Promise that resolves to an array of CapturedResult objects, where each object
|
|
1641
|
+
* corresponds to the extracted data from a single page in the order specified.
|
|
1642
|
+
*/
|
|
1643
|
+
captureMultiPages(file: Blob | string, templateName?: string, options?: PDFOptions): Promise<CapturedResult[]>;
|
|
1610
1644
|
private _captureDsimage;
|
|
1611
1645
|
private _captureUrl;
|
|
1612
1646
|
private _captureBase64;
|
|
@@ -1686,6 +1720,8 @@ declare class CaptureVisionRouter {
|
|
|
1686
1720
|
models: string[];
|
|
1687
1721
|
specss: string[];
|
|
1688
1722
|
}>;
|
|
1723
|
+
static disposeCvrWasm(instanceID: number): void;
|
|
1724
|
+
static _fr4DisposeCvrWasm: FinalizationRegistry<number>;
|
|
1689
1725
|
/**
|
|
1690
1726
|
* Releases all resources used by the `CaptureVisionRouter` instance.
|
|
1691
1727
|
*
|
|
@@ -1697,20 +1733,20 @@ declare class CaptureVisionRouter {
|
|
|
1697
1733
|
*/
|
|
1698
1734
|
private _getInternalData;
|
|
1699
1735
|
private _getWasmFilterState;
|
|
1700
|
-
}
|
|
1701
|
-
|
|
1736
|
+
}
|
|
1737
|
+
|
|
1702
1738
|
declare class CaptureVisionRouterModule {
|
|
1703
1739
|
private static _version;
|
|
1704
1740
|
/**
|
|
1705
1741
|
* Returns the version of the CaptureVisionRouter module.
|
|
1706
1742
|
*/
|
|
1707
1743
|
static getVersion(): string;
|
|
1708
|
-
}
|
|
1709
|
-
|
|
1744
|
+
}
|
|
1745
|
+
|
|
1710
1746
|
interface RawImageResultItem extends CapturedResultItem {
|
|
1711
1747
|
imageData: DSImageData;
|
|
1712
|
-
}
|
|
1713
|
-
|
|
1748
|
+
}
|
|
1749
|
+
|
|
1714
1750
|
declare enum EnumPresetTemplate {
|
|
1715
1751
|
/**
|
|
1716
1752
|
* @brief Versatile function for barcode reading, document detection, or text recognition.
|
|
@@ -1804,18 +1840,19 @@ declare enum EnumPresetTemplate {
|
|
|
1804
1840
|
* @brief Represents a text recognition mode focused on recognizing uppercase letters.
|
|
1805
1841
|
*/
|
|
1806
1842
|
PT_RECOGNIZE_UPPERCASE_LETTERS = "RecognizeUppercaseLetters"
|
|
1807
|
-
}
|
|
1808
|
-
|
|
1809
|
-
export { CaptureVisionRouter, CaptureVisionRouterModule,
|
|
1810
|
-
|
|
1811
|
-
|
|
1843
|
+
}
|
|
1844
|
+
|
|
1845
|
+
export { CaptureVisionRouter, CaptureVisionRouterModule, CapturedResultReceiver, EnumImageSourceState, EnumPresetTemplate, IntermediateResultReceiver };
|
|
1846
|
+
export type { CapturedResult, CapturedResultFilter, ImageSourceStateListener, RawImageResultItem, SimplifiedCaptureVisionSettings };
|
|
1847
|
+
|
|
1848
|
+
|
|
1812
1849
|
declare class BarcodeReaderModule {
|
|
1813
1850
|
/**
|
|
1814
1851
|
* Returns the version of the BarcodeReader module.
|
|
1815
1852
|
*/
|
|
1816
1853
|
static getVersion(): string;
|
|
1817
|
-
}
|
|
1818
|
-
|
|
1854
|
+
}
|
|
1855
|
+
|
|
1819
1856
|
declare const EnumBarcodeFormat: {
|
|
1820
1857
|
/**No barcode format in BarcodeFormat*/
|
|
1821
1858
|
BF_NULL: bigint;
|
|
@@ -1918,8 +1955,8 @@ declare const EnumBarcodeFormat: {
|
|
|
1918
1955
|
/**Telepen Numeric. A variation of the Telepen format optimized for encoding numeric data only.*/
|
|
1919
1956
|
BF_TELEPEN_NUMERIC: bigint;
|
|
1920
1957
|
};
|
|
1921
|
-
type EnumBarcodeFormat = bigint;
|
|
1922
|
-
|
|
1958
|
+
type EnumBarcodeFormat = bigint;
|
|
1959
|
+
|
|
1923
1960
|
declare enum EnumExtendedBarcodeResultType {
|
|
1924
1961
|
/**Specifies the standard text. This means the barcode value. */
|
|
1925
1962
|
EBRT_STANDARD_RESULT = 0,
|
|
@@ -1927,8 +1964,8 @@ declare enum EnumExtendedBarcodeResultType {
|
|
|
1927
1964
|
EBRT_CANDIDATE_RESULT = 1,
|
|
1928
1965
|
/**Specifies the partial text. This means part of the text result decoded from the barcode. */
|
|
1929
1966
|
EBRT_PARTIAL_RESULT = 2
|
|
1930
|
-
}
|
|
1931
|
-
|
|
1967
|
+
}
|
|
1968
|
+
|
|
1932
1969
|
declare enum EnumQRCodeErrorCorrectionLevel {
|
|
1933
1970
|
/** High error correction level, allowing for up to 30% data recovery. Suitable for environments where QR codes might be subject to significant damage. */
|
|
1934
1971
|
QRECL_ERROR_CORRECTION_H = 0,
|
|
@@ -1938,8 +1975,8 @@ declare enum EnumQRCodeErrorCorrectionLevel {
|
|
|
1938
1975
|
QRECL_ERROR_CORRECTION_M = 2,
|
|
1939
1976
|
/** Medium-high error correction level, allowing for up to 25% data recovery. Designed for situations where some QR code damage might be expected. */
|
|
1940
1977
|
QRECL_ERROR_CORRECTION_Q = 3
|
|
1941
|
-
}
|
|
1942
|
-
|
|
1978
|
+
}
|
|
1979
|
+
|
|
1943
1980
|
declare enum EnumLocalizationMode {
|
|
1944
1981
|
/** Automatic localization mode selection; not yet implemented. */
|
|
1945
1982
|
LM_AUTO = 1,
|
|
@@ -1967,8 +2004,8 @@ declare enum EnumLocalizationMode {
|
|
|
1967
2004
|
LM_SKIP = 0,
|
|
1968
2005
|
/** Placeholder value with no functional meaning. */
|
|
1969
2006
|
LM_END = -1
|
|
1970
|
-
}
|
|
1971
|
-
|
|
2007
|
+
}
|
|
2008
|
+
|
|
1972
2009
|
declare enum EnumDeblurMode {
|
|
1973
2010
|
/** Applies a direct binarization algorithm for generating the binary image. */
|
|
1974
2011
|
DM_DIRECT_BINARIZATION = 1,
|
|
@@ -1996,11 +2033,11 @@ declare enum EnumDeblurMode {
|
|
|
1996
2033
|
DM_SKIP = 0,
|
|
1997
2034
|
/** Placeholder value with no functional meaning. */
|
|
1998
2035
|
DM_END = -1
|
|
1999
|
-
}
|
|
2000
|
-
|
|
2036
|
+
}
|
|
2037
|
+
|
|
2001
2038
|
interface BarcodeDetails {
|
|
2002
|
-
}
|
|
2003
|
-
|
|
2039
|
+
}
|
|
2040
|
+
|
|
2004
2041
|
interface AztecDetails extends BarcodeDetails {
|
|
2005
2042
|
/** Number of rows in the Aztec barcode. */
|
|
2006
2043
|
rows: number;
|
|
@@ -2011,8 +2048,8 @@ interface AztecDetails extends BarcodeDetails {
|
|
|
2011
2048
|
* while positive values represent full-range codes.
|
|
2012
2049
|
*/
|
|
2013
2050
|
layerNumber: number;
|
|
2014
|
-
}
|
|
2015
|
-
|
|
2051
|
+
}
|
|
2052
|
+
|
|
2016
2053
|
/**
|
|
2017
2054
|
* Represents the Extended Channel Interpretation (ECI) information within a barcode.
|
|
2018
2055
|
*
|
|
@@ -2028,8 +2065,8 @@ interface ECISegment {
|
|
|
2028
2065
|
startIndex: number;
|
|
2029
2066
|
/** The length (in bytes) of this segment within the decoded barcode bytes. */
|
|
2030
2067
|
length: number;
|
|
2031
|
-
}
|
|
2032
|
-
|
|
2068
|
+
}
|
|
2069
|
+
|
|
2033
2070
|
interface BarcodeResultItem extends CapturedResultItem {
|
|
2034
2071
|
/** The format of the decoded barcode, as defined by `EnumBarcodeFormat`. */
|
|
2035
2072
|
format: EnumBarcodeFormat;
|
|
@@ -2055,8 +2092,8 @@ interface BarcodeResultItem extends CapturedResultItem {
|
|
|
2055
2092
|
isDPM: boolean;
|
|
2056
2093
|
/** An array of ECI segments present in the barcode, if any. Each segment is represented by a `ECISegment` object. */
|
|
2057
2094
|
eciSegments: Array<ECISegment>;
|
|
2058
|
-
}
|
|
2059
|
-
|
|
2095
|
+
}
|
|
2096
|
+
|
|
2060
2097
|
interface DataMatrixDetails extends BarcodeDetails {
|
|
2061
2098
|
/** Number of rows in the Data Matrix barcode. */
|
|
2062
2099
|
rows: number;
|
|
@@ -2068,15 +2105,15 @@ interface DataMatrixDetails extends BarcodeDetails {
|
|
|
2068
2105
|
dataRegionColumns: number;
|
|
2069
2106
|
/** Number of data regions in the barcode. */
|
|
2070
2107
|
dataRegionNumber: number;
|
|
2071
|
-
}
|
|
2072
|
-
|
|
2108
|
+
}
|
|
2109
|
+
|
|
2073
2110
|
interface DecodedBarcodesResult extends CapturedResultBase {
|
|
2074
2111
|
/**
|
|
2075
2112
|
* An array of `BarcodeResultItem` objects, each representing a decoded barcode within the original image.
|
|
2076
2113
|
*/
|
|
2077
2114
|
barcodeResultItems: Array<BarcodeResultItem>;
|
|
2078
|
-
}
|
|
2079
|
-
|
|
2115
|
+
}
|
|
2116
|
+
|
|
2080
2117
|
interface DecodedBarcodeElement extends RegionObjectElement {
|
|
2081
2118
|
/** The format of the decoded barcode, as defined by `EnumBarcodeFormat`. */
|
|
2082
2119
|
format: EnumBarcodeFormat;
|
|
@@ -2102,8 +2139,8 @@ interface DecodedBarcodeElement extends RegionObjectElement {
|
|
|
2102
2139
|
extendedBarcodeResults: Array<ExtendedBarcodeResult>;
|
|
2103
2140
|
/** An array of ECI segments present in the barcode, if any. Each segment is represented by a `ECISegment` object. */
|
|
2104
2141
|
eciSegments: Array<ECISegment>;
|
|
2105
|
-
}
|
|
2106
|
-
|
|
2142
|
+
}
|
|
2143
|
+
|
|
2107
2144
|
interface ExtendedBarcodeResult extends DecodedBarcodeElement {
|
|
2108
2145
|
/** Type of the extended barcode result. */
|
|
2109
2146
|
extendedBarcodeResultType: EnumExtendedBarcodeResultType;
|
|
@@ -2113,8 +2150,8 @@ interface ExtendedBarcodeResult extends DecodedBarcodeElement {
|
|
|
2113
2150
|
clarity: number;
|
|
2114
2151
|
/** Image data sampled from the barcode. */
|
|
2115
2152
|
samplingImage: DSImageData;
|
|
2116
|
-
}
|
|
2117
|
-
|
|
2153
|
+
}
|
|
2154
|
+
|
|
2118
2155
|
interface OneDCodeDetails extends BarcodeDetails {
|
|
2119
2156
|
/** Start characters of the barcode in a byte array, used to identify the beginning of the barcode. */
|
|
2120
2157
|
startCharsBytes: Array<number>;
|
|
@@ -2128,8 +2165,8 @@ interface OneDCodeDetails extends BarcodeDetails {
|
|
|
2128
2165
|
middlePatternRange: number;
|
|
2129
2166
|
/** Position range of the end pattern relative to the barcode's location. */
|
|
2130
2167
|
endPatternRange: number;
|
|
2131
|
-
}
|
|
2132
|
-
|
|
2168
|
+
}
|
|
2169
|
+
|
|
2133
2170
|
interface PDF417Details extends BarcodeDetails {
|
|
2134
2171
|
/** Number of rows in the PDF417 barcode. */
|
|
2135
2172
|
rows: number;
|
|
@@ -2143,8 +2180,8 @@ interface PDF417Details extends BarcodeDetails {
|
|
|
2143
2180
|
hasRightRowIndicator: boolean;
|
|
2144
2181
|
/** The codewords array of the PDF417 Code. */
|
|
2145
2182
|
codewords: Array<number>;
|
|
2146
|
-
}
|
|
2147
|
-
|
|
2183
|
+
}
|
|
2184
|
+
|
|
2148
2185
|
interface QRCodeDetails extends BarcodeDetails {
|
|
2149
2186
|
/** Number of rows in the QR Code. */
|
|
2150
2187
|
rows: number;
|
|
@@ -2168,8 +2205,8 @@ interface QRCodeDetails extends BarcodeDetails {
|
|
|
2168
2205
|
dataMaskPattern: number;
|
|
2169
2206
|
/** The codewords array of the QR Code. */
|
|
2170
2207
|
codewords: Array<string>;
|
|
2171
|
-
}
|
|
2172
|
-
|
|
2208
|
+
}
|
|
2209
|
+
|
|
2173
2210
|
interface SimplifiedBarcodeReaderSettings {
|
|
2174
2211
|
/** Specifies the barcode formats to be detected. */
|
|
2175
2212
|
barcodeFormatIds: EnumBarcodeFormat;
|
|
@@ -2191,8 +2228,8 @@ interface SimplifiedBarcodeReaderSettings {
|
|
|
2191
2228
|
barcodeTextRegExPattern: string;
|
|
2192
2229
|
/** Threshold for reducing the size of large images to speed up processing. If the size of the image's shorter edge exceeds this threshold, the image may be downscaled to decrease processing time. The standard setting is 2300. */
|
|
2193
2230
|
scaleDownThreshold: number;
|
|
2194
|
-
}
|
|
2195
|
-
|
|
2231
|
+
}
|
|
2232
|
+
|
|
2196
2233
|
/**
|
|
2197
2234
|
* The `CandidateBarcodeZone` interface represents a candidate barcode zone.
|
|
2198
2235
|
*/
|
|
@@ -2201,25 +2238,25 @@ interface CandidateBarcodeZone {
|
|
|
2201
2238
|
location: Quadrilateral;
|
|
2202
2239
|
/** Possible formats of the localized barcode. */
|
|
2203
2240
|
possibleFormats: EnumBarcodeFormat;
|
|
2204
|
-
}
|
|
2205
|
-
|
|
2241
|
+
}
|
|
2242
|
+
|
|
2206
2243
|
/**
|
|
2207
2244
|
* The `CandidateBarcodeZonesUnit` interface extends the `IntermediateResultUnit` interface and represents a unit of candidate barcode zones.
|
|
2208
2245
|
*/
|
|
2209
2246
|
interface CandidateBarcodeZonesUnit extends IntermediateResultUnit {
|
|
2210
2247
|
/** Array of candidate barcode zones represented as quadrilaterals. */
|
|
2211
2248
|
candidateBarcodeZones: Array<CandidateBarcodeZone>;
|
|
2212
|
-
}
|
|
2213
|
-
|
|
2249
|
+
}
|
|
2250
|
+
|
|
2214
2251
|
interface ComplementedBarcodeImageUnit extends IntermediateResultUnit {
|
|
2215
2252
|
imageData: DSImageData;
|
|
2216
2253
|
location: Quadrilateral;
|
|
2217
|
-
}
|
|
2218
|
-
|
|
2254
|
+
}
|
|
2255
|
+
|
|
2219
2256
|
interface DecodedBarcodesUnit extends IntermediateResultUnit {
|
|
2220
2257
|
decodedBarcodes: Array<DecodedBarcodeElement>;
|
|
2221
|
-
}
|
|
2222
|
-
|
|
2258
|
+
}
|
|
2259
|
+
|
|
2223
2260
|
/**
|
|
2224
2261
|
* The `DeformationResistedBarcode` interface represents a deformation-resisted barcode image.
|
|
2225
2262
|
*/
|
|
@@ -2230,16 +2267,16 @@ interface DeformationResistedBarcode {
|
|
|
2230
2267
|
format: EnumBarcodeFormat;
|
|
2231
2268
|
/** Location of the deformation-resisted barcode within the image. */
|
|
2232
2269
|
location: Quadrilateral;
|
|
2233
|
-
}
|
|
2234
|
-
|
|
2270
|
+
}
|
|
2271
|
+
|
|
2235
2272
|
/**
|
|
2236
2273
|
* The `DeformationResistedBarcodeImageUnit` interface extends the `IntermediateResultUnit` interface and represents a unit that holds the deformation-resisted barcode which includes the corresponding image data, its location, and the barcode format.
|
|
2237
2274
|
*/
|
|
2238
2275
|
interface DeformationResistedBarcodeImageUnit extends IntermediateResultUnit {
|
|
2239
2276
|
/** The deformation-resisted barcode. */
|
|
2240
2277
|
deformationResistedBarcode: DeformationResistedBarcode;
|
|
2241
|
-
}
|
|
2242
|
-
|
|
2278
|
+
}
|
|
2279
|
+
|
|
2243
2280
|
interface LocalizedBarcodeElement extends RegionObjectElement {
|
|
2244
2281
|
/** Possible formats of the localized barcode. */
|
|
2245
2282
|
possibleFormats: EnumBarcodeFormat;
|
|
@@ -2251,22 +2288,22 @@ interface LocalizedBarcodeElement extends RegionObjectElement {
|
|
|
2251
2288
|
moduleSize: number;
|
|
2252
2289
|
/** A confidence score for the localized barcode detection. */
|
|
2253
2290
|
confidence: number;
|
|
2254
|
-
}
|
|
2255
|
-
|
|
2291
|
+
}
|
|
2292
|
+
|
|
2256
2293
|
interface LocalizedBarcodesUnit extends IntermediateResultUnit {
|
|
2257
2294
|
/** An array of `LocalizedBarcodeElement` objects, each representing a localized barcode. */
|
|
2258
2295
|
localizedBarcodes: Array<LocalizedBarcodeElement>;
|
|
2259
|
-
}
|
|
2260
|
-
|
|
2296
|
+
}
|
|
2297
|
+
|
|
2261
2298
|
interface ScaledBarcodeImageUnit extends IntermediateResultUnit {
|
|
2262
2299
|
/** Image data of the scaled barcode. */
|
|
2263
2300
|
imageData: DSImageData;
|
|
2264
|
-
}
|
|
2265
|
-
|
|
2266
|
-
export { BarcodeReaderModule, EnumBarcodeFormat, EnumDeblurMode, EnumExtendedBarcodeResultType, EnumLocalizationMode, EnumQRCodeErrorCorrectionLevel };
|
|
2267
|
-
export type { AztecDetails, BarcodeDetails, BarcodeResultItem, CandidateBarcodeZone, CandidateBarcodeZonesUnit, ComplementedBarcodeImageUnit, DataMatrixDetails, DecodedBarcodeElement, DecodedBarcodesResult, DecodedBarcodesUnit, DeformationResistedBarcode, DeformationResistedBarcodeImageUnit, ExtendedBarcodeResult, LocalizedBarcodeElement, LocalizedBarcodesUnit, OneDCodeDetails, PDF417Details, QRCodeDetails, ScaledBarcodeImageUnit, SimplifiedBarcodeReaderSettings };
|
|
2268
|
-
|
|
2269
|
-
|
|
2301
|
+
}
|
|
2302
|
+
|
|
2303
|
+
export { BarcodeReaderModule, EnumBarcodeFormat, EnumDeblurMode, EnumExtendedBarcodeResultType, EnumLocalizationMode, EnumQRCodeErrorCorrectionLevel };
|
|
2304
|
+
export type { AztecDetails, BarcodeDetails, BarcodeResultItem, CandidateBarcodeZone, CandidateBarcodeZonesUnit, ComplementedBarcodeImageUnit, DataMatrixDetails, DecodedBarcodeElement, DecodedBarcodesResult, DecodedBarcodesUnit, DeformationResistedBarcode, DeformationResistedBarcodeImageUnit, ExtendedBarcodeResult, LocalizedBarcodeElement, LocalizedBarcodesUnit, OneDCodeDetails, PDF417Details, QRCodeDetails, ScaledBarcodeImageUnit, SimplifiedBarcodeReaderSettings };
|
|
2305
|
+
|
|
2306
|
+
|
|
2270
2307
|
interface ParsedResultItem extends CapturedResultItem {
|
|
2271
2308
|
/**
|
|
2272
2309
|
* The code type of the parsed result.
|
|
@@ -2311,8 +2348,8 @@ interface ParsedResultItem extends CapturedResultItem {
|
|
|
2311
2348
|
* @returns The validation status of the specified field as an EnumValidationStatus value.
|
|
2312
2349
|
*/
|
|
2313
2350
|
getFieldValidationStatus: (fieldName: string) => EnumValidationStatus;
|
|
2314
|
-
}
|
|
2315
|
-
|
|
2351
|
+
}
|
|
2352
|
+
|
|
2316
2353
|
declare class CodeParser {
|
|
2317
2354
|
private _instanceID;
|
|
2318
2355
|
/**
|
|
@@ -2355,8 +2392,8 @@ declare class CodeParser {
|
|
|
2355
2392
|
* @returns A promise that resolves with a `ParsedResultItem` object which contains the parsed result.
|
|
2356
2393
|
*/
|
|
2357
2394
|
parse(source: Uint8Array | string | Array<number>, taskSettingName?: string): Promise<ParsedResultItem>;
|
|
2358
|
-
}
|
|
2359
|
-
|
|
2395
|
+
}
|
|
2396
|
+
|
|
2360
2397
|
declare class CodeParserModule {
|
|
2361
2398
|
/**
|
|
2362
2399
|
* Returns the version of the CodeParser module.
|
|
@@ -2380,8 +2417,8 @@ declare class CodeParserModule {
|
|
|
2380
2417
|
loaded: number;
|
|
2381
2418
|
total: number;
|
|
2382
2419
|
}) => void;
|
|
2383
|
-
}
|
|
2384
|
-
|
|
2420
|
+
}
|
|
2421
|
+
|
|
2385
2422
|
declare enum EnumMappingStatus {
|
|
2386
2423
|
/**
|
|
2387
2424
|
* Indicates that no mapping operation has been initiated.
|
|
@@ -2395,8 +2432,8 @@ declare enum EnumMappingStatus {
|
|
|
2395
2432
|
* Indicates that the mapping operation failed to complete.
|
|
2396
2433
|
*/
|
|
2397
2434
|
MS_FAILED = 2
|
|
2398
|
-
}
|
|
2399
|
-
|
|
2435
|
+
}
|
|
2436
|
+
|
|
2400
2437
|
declare enum EnumValidationStatus {
|
|
2401
2438
|
/**
|
|
2402
2439
|
* Indicates that no validation has been performed.
|
|
@@ -2410,8 +2447,8 @@ declare enum EnumValidationStatus {
|
|
|
2410
2447
|
* Indicates that the validation process failed.
|
|
2411
2448
|
*/
|
|
2412
2449
|
VS_FAILED = 2
|
|
2413
|
-
}
|
|
2414
|
-
|
|
2450
|
+
}
|
|
2451
|
+
|
|
2415
2452
|
declare enum EnumCodeType {
|
|
2416
2453
|
CT_MRTD_TD1_ID = "MRTD_TD1_ID",
|
|
2417
2454
|
CT_MRTD_TD2_ID = "MRTD_TD2_ID",
|
|
@@ -2425,25 +2462,26 @@ declare enum EnumCodeType {
|
|
|
2425
2462
|
CT_AADHAAR = "AADHAAR",
|
|
2426
2463
|
CT_VIN = "VIN",
|
|
2427
2464
|
CT_GS1_AI = "GS1_AI"
|
|
2428
|
-
}
|
|
2429
|
-
|
|
2465
|
+
}
|
|
2466
|
+
|
|
2430
2467
|
interface ParsedResult extends CapturedResultBase {
|
|
2431
2468
|
/**
|
|
2432
2469
|
* An array of `ParsedResultItem` objects.
|
|
2433
2470
|
*/
|
|
2434
2471
|
parsedResultItems: Array<ParsedResultItem>;
|
|
2435
|
-
}
|
|
2436
|
-
|
|
2437
|
-
export { CodeParser, CodeParserModule, EnumCodeType, EnumMappingStatus, EnumValidationStatus
|
|
2438
|
-
|
|
2439
|
-
|
|
2472
|
+
}
|
|
2473
|
+
|
|
2474
|
+
export { CodeParser, CodeParserModule, EnumCodeType, EnumMappingStatus, EnumValidationStatus };
|
|
2475
|
+
export type { ParsedResult, ParsedResultItem };
|
|
2476
|
+
|
|
2477
|
+
|
|
2440
2478
|
declare class DocumentNormalizerModule {
|
|
2441
2479
|
/**
|
|
2442
2480
|
* Returns the version of the DocumentNormalizer module.
|
|
2443
2481
|
*/
|
|
2444
2482
|
static getVersion(): string;
|
|
2445
|
-
}
|
|
2446
|
-
|
|
2483
|
+
}
|
|
2484
|
+
|
|
2447
2485
|
/**
|
|
2448
2486
|
* `EnumImageColourMode` determines the output colour mode of the normalized image.
|
|
2449
2487
|
*/
|
|
@@ -2454,8 +2492,8 @@ declare enum EnumImageColourMode {
|
|
|
2454
2492
|
ICM_GRAYSCALE = 1,
|
|
2455
2493
|
/** Output image in binary mode. */
|
|
2456
2494
|
ICM_BINARY = 2
|
|
2457
|
-
}
|
|
2458
|
-
|
|
2495
|
+
}
|
|
2496
|
+
|
|
2459
2497
|
interface DetectedQuadResultItem extends CapturedResultItem {
|
|
2460
2498
|
/** The location of the detected quadrilateral within the original image, represented as a quadrilateral shape. */
|
|
2461
2499
|
location: Quadrilateral;
|
|
@@ -2463,8 +2501,8 @@ interface DetectedQuadResultItem extends CapturedResultItem {
|
|
|
2463
2501
|
confidenceAsDocumentBoundary: number;
|
|
2464
2502
|
/** Indicates whether the DetectedQuadResultItem has passed cross verification. */
|
|
2465
2503
|
crossVerificationStatus: EnumCrossVerificationStatus;
|
|
2466
|
-
}
|
|
2467
|
-
|
|
2504
|
+
}
|
|
2505
|
+
|
|
2468
2506
|
interface DeskewedImageResultItem extends CapturedResultItem {
|
|
2469
2507
|
/** The image data for the deskewed image result. */
|
|
2470
2508
|
imageData: DSImageData;
|
|
@@ -2475,12 +2513,12 @@ interface DeskewedImageResultItem extends CapturedResultItem {
|
|
|
2475
2513
|
toCanvas: () => HTMLCanvasElement;
|
|
2476
2514
|
toImage: (MIMEType: "image/png" | "image/jpeg") => HTMLImageElement;
|
|
2477
2515
|
toBlob: (MIMEType: "image/png" | "image/jpeg") => Promise<Blob>;
|
|
2478
|
-
}
|
|
2479
|
-
|
|
2516
|
+
}
|
|
2517
|
+
|
|
2480
2518
|
interface EnhancedImageElement extends RegionObjectElement {
|
|
2481
2519
|
imageData: DSImageData;
|
|
2482
|
-
}
|
|
2483
|
-
|
|
2520
|
+
}
|
|
2521
|
+
|
|
2484
2522
|
interface EnhancedImageResultItem extends CapturedResultItem {
|
|
2485
2523
|
/** The image data for the enhanced image result. */
|
|
2486
2524
|
imageData: DSImageData;
|
|
@@ -2490,54 +2528,54 @@ interface EnhancedImageResultItem extends CapturedResultItem {
|
|
|
2490
2528
|
toImage: (MIMEType: "image/png" | "image/jpeg") => HTMLImageElement;
|
|
2491
2529
|
/** Converts the enhanced image data into a Blob object of a specified MIME type ('image/png' or 'image/jpeg'). */
|
|
2492
2530
|
toBlob: (MIMEType: "image/png" | "image/jpeg") => Promise<Blob>;
|
|
2493
|
-
}
|
|
2494
|
-
|
|
2531
|
+
}
|
|
2532
|
+
|
|
2495
2533
|
interface EnhancedImageUnit extends IntermediateResultUnit {
|
|
2496
2534
|
/** An array of `EnhancedImageElement` objects, each representing a piece of the original image after enhancement. */
|
|
2497
2535
|
enhancedImage: EnhancedImageElement;
|
|
2498
|
-
}
|
|
2499
|
-
|
|
2536
|
+
}
|
|
2537
|
+
|
|
2500
2538
|
interface CandidateQuadEdgesUnit extends IntermediateResultUnit {
|
|
2501
2539
|
/** An array of candidate edges that may form quadrilaterals, identified during image processing. */
|
|
2502
2540
|
candidateQuadEdges: Array<Edge>;
|
|
2503
|
-
}
|
|
2504
|
-
|
|
2541
|
+
}
|
|
2542
|
+
|
|
2505
2543
|
interface CornersUnit extends IntermediateResultUnit {
|
|
2506
2544
|
/** An array of detected corners within the image, identified during image processing. */
|
|
2507
2545
|
corners: Array<Corner>;
|
|
2508
|
-
}
|
|
2509
|
-
|
|
2546
|
+
}
|
|
2547
|
+
|
|
2510
2548
|
interface DetectedQuadElement extends RegionObjectElement {
|
|
2511
2549
|
/** A confidence score measuring the certainty that the detected quadrilateral represents the boundary of a document. */
|
|
2512
2550
|
confidenceAsDocumentBoundary: number;
|
|
2513
|
-
}
|
|
2514
|
-
|
|
2551
|
+
}
|
|
2552
|
+
|
|
2515
2553
|
interface DetectedQuadsUnit extends IntermediateResultUnit {
|
|
2516
2554
|
/** An array of `DetectedQuadElement` objects, each representing a potential document or area of interest within the image. */
|
|
2517
2555
|
detectedQuads: Array<DetectedQuadElement>;
|
|
2518
|
-
}
|
|
2519
|
-
|
|
2556
|
+
}
|
|
2557
|
+
|
|
2520
2558
|
interface LongLinesUnit extends IntermediateResultUnit {
|
|
2521
2559
|
/** An array of long line segments detected within the image. */
|
|
2522
2560
|
longLines: Array<LineSegment>;
|
|
2523
|
-
}
|
|
2524
|
-
|
|
2561
|
+
}
|
|
2562
|
+
|
|
2525
2563
|
interface LogicLinesUnit extends IntermediateResultUnit {
|
|
2526
2564
|
/** An array of logic line segments detected within the image. */
|
|
2527
2565
|
logicLines: Array<LineSegment>;
|
|
2528
|
-
}
|
|
2529
|
-
|
|
2566
|
+
}
|
|
2567
|
+
|
|
2530
2568
|
interface DeskewedImageElement extends RegionObjectElement {
|
|
2531
2569
|
/** A quadrilateral representing the four corners of the quadrilateral used to deskew the image. */
|
|
2532
2570
|
sourceLocation: Quadrilateral;
|
|
2533
2571
|
imageData: DSImageData;
|
|
2534
|
-
}
|
|
2535
|
-
|
|
2572
|
+
}
|
|
2573
|
+
|
|
2536
2574
|
interface DeskewedImageUnit extends IntermediateResultUnit {
|
|
2537
2575
|
/** The `DeskewedImageElement` objects representing a piece of the original image after deskewing. */
|
|
2538
2576
|
deskewedImage: DeskewedImageElement;
|
|
2539
|
-
}
|
|
2540
|
-
|
|
2577
|
+
}
|
|
2578
|
+
|
|
2541
2579
|
interface ProcessedDocumentResult extends CapturedResultBase {
|
|
2542
2580
|
/** An array of `DetectedQuadResultItem` objects, each representing a quadrilateral after document detection. */
|
|
2543
2581
|
detectedQuadResultItems: Array<DetectedQuadResultItem>;
|
|
@@ -2545,8 +2583,8 @@ interface ProcessedDocumentResult extends CapturedResultBase {
|
|
|
2545
2583
|
deskewedImageResultItems: Array<DeskewedImageResultItem>;
|
|
2546
2584
|
/** An array of `EnhancedImageResultItem` objects, each representing a piece of the original image after enhancement. */
|
|
2547
2585
|
enhancedImageResultItems: Array<EnhancedImageResultItem>;
|
|
2548
|
-
}
|
|
2549
|
-
|
|
2586
|
+
}
|
|
2587
|
+
|
|
2550
2588
|
/**
|
|
2551
2589
|
* The `SimplifiedDocumentNormalizerSettings` interface defines simplified settings for document detection and normalization.
|
|
2552
2590
|
*/
|
|
@@ -2572,11 +2610,21 @@ interface SimplifiedDocumentNormalizerSettings {
|
|
|
2572
2610
|
minQuadrilateralAreaRatio: number;
|
|
2573
2611
|
/** The number of documents expected to be detected.*/
|
|
2574
2612
|
expectedDocumentsCount: number;
|
|
2575
|
-
}
|
|
2576
|
-
|
|
2577
|
-
export {
|
|
2578
|
-
|
|
2579
|
-
|
|
2613
|
+
}
|
|
2614
|
+
|
|
2615
|
+
export { DocumentNormalizerModule, EnumImageColourMode };
|
|
2616
|
+
export type { CandidateQuadEdgesUnit, CornersUnit, DeskewedImageElement, DeskewedImageResultItem, DeskewedImageUnit, DetectedQuadElement, DetectedQuadResultItem, DetectedQuadsUnit, EnhancedImageElement, EnhancedImageResultItem, EnhancedImageUnit, LogicLinesUnit, LongLinesUnit, ProcessedDocumentResult, SimplifiedDocumentNormalizerSettings };
|
|
2617
|
+
|
|
2618
|
+
declare class ImageProcessingModule {
|
|
2619
|
+
/**
|
|
2620
|
+
* Returns the version of the image processing module.
|
|
2621
|
+
*/
|
|
2622
|
+
static getVersion(): string;
|
|
2623
|
+
}
|
|
2624
|
+
|
|
2625
|
+
export { ImageProcessingModule };
|
|
2626
|
+
|
|
2627
|
+
|
|
2580
2628
|
declare class LabelRecognizerModule {
|
|
2581
2629
|
#private;
|
|
2582
2630
|
/**
|
|
@@ -2605,8 +2653,8 @@ declare class LabelRecognizerModule {
|
|
|
2605
2653
|
* @param dataPath specifies the path to find the data file. If not specified, the default path points to the package “dynamsoft-capture-vision-data”.
|
|
2606
2654
|
*/
|
|
2607
2655
|
static loadOverlappingCharsData(dataName: string, dataPath?: string): Promise<ErrorInfo>;
|
|
2608
|
-
}
|
|
2609
|
-
|
|
2656
|
+
}
|
|
2657
|
+
|
|
2610
2658
|
interface CharacterResult {
|
|
2611
2659
|
/** The highest confidence character recognized. */
|
|
2612
2660
|
characterH: string;
|
|
@@ -2622,8 +2670,8 @@ interface CharacterResult {
|
|
|
2622
2670
|
characterLConfidence: number;
|
|
2623
2671
|
/** The location of the recognized character within the image. */
|
|
2624
2672
|
location: Quadrilateral;
|
|
2625
|
-
}
|
|
2626
|
-
|
|
2673
|
+
}
|
|
2674
|
+
|
|
2627
2675
|
interface TextLineResultItem extends CapturedResultItem {
|
|
2628
2676
|
/** The recognized text of the line. */
|
|
2629
2677
|
text: string;
|
|
@@ -2637,8 +2685,8 @@ interface TextLineResultItem extends CapturedResultItem {
|
|
|
2637
2685
|
specificationName: string;
|
|
2638
2686
|
/** The recognized raw text of the line. */
|
|
2639
2687
|
rawText: string;
|
|
2640
|
-
}
|
|
2641
|
-
|
|
2688
|
+
}
|
|
2689
|
+
|
|
2642
2690
|
declare function filterVINResult(vinItem: TextLineResultItem): string;
|
|
2643
2691
|
/**
|
|
2644
2692
|
* check if the vin code is valid
|
|
@@ -2669,8 +2717,8 @@ declare const utilsFuncs: {
|
|
|
2669
2717
|
checkValidMRP: typeof checkValidMRP;
|
|
2670
2718
|
checkValidMRV: typeof checkValidMRV;
|
|
2671
2719
|
checkValidIDCard: typeof checkValidIDCard;
|
|
2672
|
-
};
|
|
2673
|
-
|
|
2720
|
+
};
|
|
2721
|
+
|
|
2674
2722
|
/**
|
|
2675
2723
|
* Enumerates the status of a raw text line.
|
|
2676
2724
|
*/
|
|
@@ -2681,22 +2729,22 @@ declare enum EnumRawTextLineStatus {
|
|
|
2681
2729
|
RTLS_RECOGNITION_FAILED = 1,
|
|
2682
2730
|
/** Successfully recognized. */
|
|
2683
2731
|
RTLS_RECOGNITION_SUCCEEDED = 2
|
|
2684
|
-
}
|
|
2685
|
-
|
|
2732
|
+
}
|
|
2733
|
+
|
|
2686
2734
|
interface LocalizedTextLineElement extends RegionObjectElement {
|
|
2687
2735
|
/** Quadrilaterals for each character in the text line. */
|
|
2688
2736
|
characterQuads: Array<Quadrilateral>;
|
|
2689
2737
|
/** The row number of the text line, starting from 1. */
|
|
2690
2738
|
rowNumber: number;
|
|
2691
|
-
}
|
|
2692
|
-
|
|
2739
|
+
}
|
|
2740
|
+
|
|
2693
2741
|
interface LocalizedTextLinesUnit extends IntermediateResultUnit {
|
|
2694
2742
|
/** An array of `LocalizedTextLineElement` objects, each representing a localized text line. */
|
|
2695
2743
|
localizedTextLines: Array<LocalizedTextLineElement>;
|
|
2696
2744
|
/** An array of `AuxiliaryRegionElement` objects, each representing an auxiliary region. */
|
|
2697
2745
|
auxiliaryRegionElements: Array<AuxiliaryRegionElement>;
|
|
2698
|
-
}
|
|
2699
|
-
|
|
2746
|
+
}
|
|
2747
|
+
|
|
2700
2748
|
interface RecognizedTextLineElement extends RegionObjectElement {
|
|
2701
2749
|
/** The recognized text of the line. */
|
|
2702
2750
|
text: string;
|
|
@@ -2710,15 +2758,15 @@ interface RecognizedTextLineElement extends RegionObjectElement {
|
|
|
2710
2758
|
specificationName: string;
|
|
2711
2759
|
/** The recognized raw text of the line. */
|
|
2712
2760
|
rawText: string;
|
|
2713
|
-
}
|
|
2714
|
-
|
|
2761
|
+
}
|
|
2762
|
+
|
|
2715
2763
|
interface RecognizedTextLinesResult extends CapturedResultBase {
|
|
2716
2764
|
/**
|
|
2717
2765
|
* An array of `TextLineResultItem` objects, each representing a recognized text line within the original image.
|
|
2718
2766
|
*/
|
|
2719
2767
|
textLineResultItems: Array<TextLineResultItem>;
|
|
2720
|
-
}
|
|
2721
|
-
|
|
2768
|
+
}
|
|
2769
|
+
|
|
2722
2770
|
interface SimplifiedLabelRecognizerSettings {
|
|
2723
2771
|
/** Name of the character model used for recognition. */
|
|
2724
2772
|
characterModelName: string;
|
|
@@ -2731,31 +2779,34 @@ interface SimplifiedLabelRecognizerSettings {
|
|
|
2731
2779
|
/**
|
|
2732
2780
|
* Threshold for reducing the size of large images to speed up processing. If the size of the image's shorter edge exceeds this threshold, the image may be downscaled to decrease processing time. The standard setting is 2300. */
|
|
2733
2781
|
scaleDownThreshold: number;
|
|
2734
|
-
}
|
|
2735
|
-
|
|
2782
|
+
}
|
|
2783
|
+
|
|
2736
2784
|
interface BufferedCharacterItem {
|
|
2737
2785
|
/** The buffered character value. */
|
|
2738
2786
|
character: string;
|
|
2739
2787
|
/** The image data of the buffered character. */
|
|
2740
2788
|
imageData: DSImageData;
|
|
2741
2789
|
/** An array of features, each feature object contains feature id and value of the buffered character.*/
|
|
2742
|
-
features:
|
|
2743
|
-
|
|
2744
|
-
|
|
2790
|
+
features: Array<{
|
|
2791
|
+
id: number;
|
|
2792
|
+
value: number;
|
|
2793
|
+
}>;
|
|
2794
|
+
}
|
|
2795
|
+
|
|
2745
2796
|
interface CharacterCluster {
|
|
2746
2797
|
/** The character value of the cluster. */
|
|
2747
2798
|
character: string;
|
|
2748
2799
|
/** The mean of the cluster. */
|
|
2749
2800
|
mean: BufferedCharacterItem;
|
|
2750
|
-
}
|
|
2751
|
-
|
|
2801
|
+
}
|
|
2802
|
+
|
|
2752
2803
|
interface BufferedCharacterItemSet {
|
|
2753
2804
|
/** An array of BufferedCharacterItem. */
|
|
2754
2805
|
items: Array<BufferedCharacterItem>;
|
|
2755
2806
|
/** An array of CharacterCluster. */
|
|
2756
2807
|
characterClusters: Array<CharacterCluster>;
|
|
2757
|
-
}
|
|
2758
|
-
|
|
2808
|
+
}
|
|
2809
|
+
|
|
2759
2810
|
/**
|
|
2760
2811
|
* The `RawTextLine` represents a text line in an image. It can be in one of the following states:
|
|
2761
2812
|
* - `TLS_LOCALIZED`: Localized but recognition not performed.
|
|
@@ -2777,26 +2828,27 @@ interface RawTextLine {
|
|
|
2777
2828
|
location: Quadrilateral;
|
|
2778
2829
|
/** The status of a raw text line.*/
|
|
2779
2830
|
status: EnumRawTextLineStatus;
|
|
2780
|
-
}
|
|
2781
|
-
|
|
2831
|
+
}
|
|
2832
|
+
|
|
2782
2833
|
interface RawTextLinesUnit extends IntermediateResultUnit {
|
|
2783
2834
|
/** An array of RawTextLine. */
|
|
2784
2835
|
rawTextlines: Array<RawTextLine>;
|
|
2785
|
-
}
|
|
2786
|
-
|
|
2836
|
+
}
|
|
2837
|
+
|
|
2787
2838
|
interface RecognizedTextLinesUnit extends IntermediateResultUnit {
|
|
2788
2839
|
recognizedTextLines: Array<RecognizedTextLineElement>;
|
|
2789
|
-
}
|
|
2790
|
-
|
|
2791
|
-
export {
|
|
2792
|
-
|
|
2840
|
+
}
|
|
2841
|
+
|
|
2842
|
+
export { EnumRawTextLineStatus, LabelRecognizerModule, utilsFuncs };
|
|
2843
|
+
export type { BufferedCharacterItem, BufferedCharacterItemSet, CharacterCluster, CharacterResult, LocalizedTextLineElement, LocalizedTextLinesUnit, RawTextLine, RawTextLinesUnit, RecognizedTextLineElement, RecognizedTextLinesResult, RecognizedTextLinesUnit, SimplifiedLabelRecognizerSettings, TextLineResultItem };
|
|
2844
|
+
|
|
2793
2845
|
declare class LicenseModule {
|
|
2794
2846
|
/**
|
|
2795
2847
|
* Returns the version of the License module.
|
|
2796
2848
|
*/
|
|
2797
2849
|
static getVersion(): string;
|
|
2798
|
-
}
|
|
2799
|
-
|
|
2850
|
+
}
|
|
2851
|
+
|
|
2800
2852
|
declare class LicenseManager {
|
|
2801
2853
|
private static setLicenseServer;
|
|
2802
2854
|
static _pLoad: any;
|
|
@@ -2823,7 +2875,7 @@ declare class LicenseManager {
|
|
|
2823
2875
|
*/
|
|
2824
2876
|
static initLicense(license: string, options?: {
|
|
2825
2877
|
executeNow: boolean;
|
|
2826
|
-
} | boolean):
|
|
2878
|
+
} | boolean): Promise<void>;
|
|
2827
2879
|
/**
|
|
2828
2880
|
* The following methods should be called before `initLicense`.
|
|
2829
2881
|
*/
|
|
@@ -2836,8 +2888,8 @@ declare class LicenseManager {
|
|
|
2836
2888
|
*/
|
|
2837
2889
|
static getDeviceUUID(): Promise<string>;
|
|
2838
2890
|
static _e: boolean;
|
|
2839
|
-
}
|
|
2840
|
-
|
|
2891
|
+
}
|
|
2892
|
+
|
|
2841
2893
|
interface InitConfig {
|
|
2842
2894
|
pk: string;
|
|
2843
2895
|
dm: string;
|
|
@@ -2849,20 +2901,21 @@ interface InitConfig {
|
|
|
2849
2901
|
ic?: any;
|
|
2850
2902
|
mlo?: any;
|
|
2851
2903
|
pv?: any;
|
|
2852
|
-
}
|
|
2853
|
-
|
|
2854
|
-
export {
|
|
2855
|
-
|
|
2856
|
-
|
|
2857
|
-
|
|
2858
|
-
|
|
2904
|
+
}
|
|
2905
|
+
|
|
2906
|
+
export { LicenseManager, LicenseModule };
|
|
2907
|
+
export type { InitConfig };
|
|
2908
|
+
|
|
2909
|
+
|
|
2910
|
+
|
|
2911
|
+
|
|
2859
2912
|
declare class UtilityModule {
|
|
2860
2913
|
/**
|
|
2861
2914
|
* Returns the version of the Utility module.
|
|
2862
2915
|
*/
|
|
2863
2916
|
static getVersion(): string;
|
|
2864
|
-
}
|
|
2865
|
-
|
|
2917
|
+
}
|
|
2918
|
+
|
|
2866
2919
|
type CEdge = [Point, Point];
|
|
2867
2920
|
type CQuadrilateral = Quadrilateral & {
|
|
2868
2921
|
area: number;
|
|
@@ -2883,8 +2936,8 @@ type CrossVerificationCriteria = {
|
|
|
2883
2936
|
};
|
|
2884
2937
|
type CapturedResultMap<T> = {
|
|
2885
2938
|
[K in EnumCapturedResultItemType]?: T;
|
|
2886
|
-
};
|
|
2887
|
-
|
|
2939
|
+
};
|
|
2940
|
+
|
|
2888
2941
|
declare class MultiFrameResultCrossFilter implements CapturedResultFilter {
|
|
2889
2942
|
#private;
|
|
2890
2943
|
constructor();
|
|
@@ -2991,8 +3044,8 @@ declare class MultiFrameResultCrossFilter implements CapturedResultFilter {
|
|
|
2991
3044
|
*/
|
|
2992
3045
|
getMaxOverlappingFrames(resultItemType: EnumCapturedResultItemType): number;
|
|
2993
3046
|
latestOverlappingFilter(result: any): void;
|
|
2994
|
-
}
|
|
2995
|
-
|
|
3047
|
+
}
|
|
3048
|
+
|
|
2996
3049
|
declare class ImageIO {
|
|
2997
3050
|
#private;
|
|
2998
3051
|
/**
|
|
@@ -3029,7 +3082,7 @@ declare class ImageIO {
|
|
|
3029
3082
|
*
|
|
3030
3083
|
* @returns A promise that resolves with an object containing the image data as a Uint8Array and the file format.
|
|
3031
3084
|
*/
|
|
3032
|
-
static saveToMemory(image: Blob, fileFormat
|
|
3085
|
+
static saveToMemory(image: Blob, fileFormat?: string): Promise<number>;
|
|
3033
3086
|
/**
|
|
3034
3087
|
* This method reads an image from a Base64-encoded string. The image format is automatically detected based on the content of the string.
|
|
3035
3088
|
*
|
|
@@ -3046,9 +3099,9 @@ declare class ImageIO {
|
|
|
3046
3099
|
*
|
|
3047
3100
|
* @returns A promise that resolves with a Base64-encoded string representing the image.
|
|
3048
3101
|
*/
|
|
3049
|
-
static saveToBase64String(image: Blob | DSImageData, fileFormat
|
|
3050
|
-
}
|
|
3051
|
-
|
|
3102
|
+
static saveToBase64String(image: Blob | DSImageData, fileFormat?: string): Promise<string>;
|
|
3103
|
+
}
|
|
3104
|
+
|
|
3052
3105
|
declare class ImageDrawer {
|
|
3053
3106
|
/**
|
|
3054
3107
|
* This method draws various shapes on an image, and save it in PNG format.
|
|
@@ -3063,8 +3116,8 @@ declare class ImageDrawer {
|
|
|
3063
3116
|
* @returns A promise that resolves with the saved File object.
|
|
3064
3117
|
*/
|
|
3065
3118
|
static drawOnImage(image: Blob | string | DSImageData, drawingItem: Array<Quadrilateral> | Quadrilateral | Array<LineSegment> | LineSegment | Array<Contour> | Contour | Array<Corner> | Corner | Array<Edge> | Edge, type: "quads" | "lines" | "contours" | "corners" | "edges", color?: number, thickness?: number, name?: string, download?: boolean): Promise<DSImageData>;
|
|
3066
|
-
}
|
|
3067
|
-
|
|
3119
|
+
}
|
|
3120
|
+
|
|
3068
3121
|
declare enum EnumFilterType {
|
|
3069
3122
|
/**High-pass filter: Enhances edges and fine details by attenuating low-frequency components.*/
|
|
3070
3123
|
FT_HIGH_PASS = 0,
|
|
@@ -3072,8 +3125,8 @@ declare enum EnumFilterType {
|
|
|
3072
3125
|
FT_SHARPEN = 1,
|
|
3073
3126
|
/**Smooth (blur) filter: Reduces noise and detail by averaging pixel values, creating a softening effect.*/
|
|
3074
3127
|
FT_SMOOTH = 2
|
|
3075
|
-
}
|
|
3076
|
-
|
|
3128
|
+
}
|
|
3129
|
+
|
|
3077
3130
|
declare class ImageProcessor {
|
|
3078
3131
|
/**
|
|
3079
3132
|
* Crops an image using a rectangle or quadrilateral.
|
|
@@ -3140,28 +3193,142 @@ declare class ImageProcessor {
|
|
|
3140
3193
|
* @returns A promise that resolves with the cropped and deskewed image data.
|
|
3141
3194
|
*/
|
|
3142
3195
|
static cropAndDeskewImage(image: Blob | DSImageData, roi: Quadrilateral, dstWidth?: number, dstHeight?: number, padding?: number): Promise<DSImageData>;
|
|
3143
|
-
}
|
|
3144
|
-
|
|
3145
|
-
|
|
3146
|
-
|
|
3147
|
-
|
|
3148
|
-
|
|
3149
|
-
|
|
3150
|
-
|
|
3151
|
-
|
|
3152
|
-
|
|
3153
|
-
|
|
3154
|
-
|
|
3155
|
-
|
|
3156
|
-
|
|
3157
|
-
|
|
3158
|
-
|
|
3159
|
-
|
|
3160
|
-
|
|
3161
|
-
|
|
3162
|
-
|
|
3163
|
-
|
|
3164
|
-
|
|
3196
|
+
}
|
|
3197
|
+
|
|
3198
|
+
/**
|
|
3199
|
+
* Strategy for the layout engine to organize quadrilaterals.
|
|
3200
|
+
*/
|
|
3201
|
+
declare enum EnumLayoutPattern {
|
|
3202
|
+
LP_UNKNOWN = 0,// Algorithm automatically detects the best layout pattern.
|
|
3203
|
+
LP_LINES = 1,// Elements are organized into sequential lines (rows or columns).
|
|
3204
|
+
LP_MATRIX = 2
|
|
3205
|
+
}
|
|
3206
|
+
|
|
3207
|
+
/**
|
|
3208
|
+
* Configuration for a specific orientation axis.
|
|
3209
|
+
* Axis 0 is primary, axis 1 is secondary.
|
|
3210
|
+
*/
|
|
3211
|
+
interface LayoutAxis {
|
|
3212
|
+
/** Expected number of elements along this axis. -1 means auto-detect. */
|
|
3213
|
+
elementCount: number;
|
|
3214
|
+
/** Whether the layout uses an offset / staggered pattern. */
|
|
3215
|
+
isStaggered: boolean;
|
|
3216
|
+
/** Target angle in [0, 180]. -1 means auto-detect. */
|
|
3217
|
+
angle: number;
|
|
3218
|
+
/** Whether equal spacing is enforced along this axis. */
|
|
3219
|
+
isEqualSpacing: boolean;
|
|
3220
|
+
/**
|
|
3221
|
+
* Spacing between elements along this axis.
|
|
3222
|
+
* -1 means auto-detect.
|
|
3223
|
+
*/
|
|
3224
|
+
spacing: number;
|
|
3225
|
+
/** Interpretation of the spacing value. */
|
|
3226
|
+
spacingUnit: EnumMeasureUnit;
|
|
3227
|
+
}
|
|
3228
|
+
|
|
3229
|
+
/**
|
|
3230
|
+
* Input parameters to guide layout analysis.
|
|
3231
|
+
*/
|
|
3232
|
+
interface LayoutAnalysisParameter {
|
|
3233
|
+
/** Desired layout pattern. LP_UNKNOWN means auto-detect. */
|
|
3234
|
+
pattern: EnumLayoutPattern;
|
|
3235
|
+
/** Configuration for primary and secondary axes. */
|
|
3236
|
+
axes: [LayoutAxis, LayoutAxis];
|
|
3237
|
+
/**
|
|
3238
|
+
* Width of the source image in pixels.
|
|
3239
|
+
* 0 means no boundary check.
|
|
3240
|
+
*/
|
|
3241
|
+
inputImageWidth: number;
|
|
3242
|
+
/**
|
|
3243
|
+
* Height of the source image in pixels.
|
|
3244
|
+
* 0 means no boundary check.
|
|
3245
|
+
*/
|
|
3246
|
+
inputImageHeight: number;
|
|
3247
|
+
}
|
|
3248
|
+
|
|
3249
|
+
/**
|
|
3250
|
+
* Origin of the element.
|
|
3251
|
+
*/
|
|
3252
|
+
declare enum EnumLayoutElementSource {
|
|
3253
|
+
LES_NONE = 0,// No element exists at this logical grid position (used for alignment in non-uniform rows).
|
|
3254
|
+
LES_INPUT = 1,// Element is provided from the original input array.
|
|
3255
|
+
LES_INFERRED = 2
|
|
3256
|
+
}
|
|
3257
|
+
|
|
3258
|
+
/**
|
|
3259
|
+
* Represents an element in the analyzed layout.
|
|
3260
|
+
*/
|
|
3261
|
+
interface LayoutElement {
|
|
3262
|
+
/** Geometric coordinates of the element. */
|
|
3263
|
+
quad: Quadrilateral;
|
|
3264
|
+
/** Origin of this element. */
|
|
3265
|
+
source: EnumLayoutElementSource;
|
|
3266
|
+
}
|
|
3267
|
+
|
|
3268
|
+
/**
|
|
3269
|
+
* Comprehensive results of layout analysis.
|
|
3270
|
+
*/
|
|
3271
|
+
interface LayoutAnalysisResult {
|
|
3272
|
+
/** Newly generated quadrilaterals. */
|
|
3273
|
+
inferredQuads: Array<Quadrilateral>;
|
|
3274
|
+
/** Number of rows in the logical grid. */
|
|
3275
|
+
rowCount: number;
|
|
3276
|
+
/** Maximum number of columns across all rows. */
|
|
3277
|
+
colCount: number;
|
|
3278
|
+
/**
|
|
3279
|
+
* 2D layout grid.
|
|
3280
|
+
* In line mode, shorter rows can be padded with LES_NONE elements.
|
|
3281
|
+
*/
|
|
3282
|
+
elements: Array<Array<LayoutElement>>;
|
|
3283
|
+
/** Actual layout pattern detected by the engine. */
|
|
3284
|
+
detectedPattern: EnumLayoutPattern;
|
|
3285
|
+
/**
|
|
3286
|
+
* Error information.
|
|
3287
|
+
* errorCode indicates the execution result.
|
|
3288
|
+
* errorString provides a human-readable description.
|
|
3289
|
+
* For successful execution, errorCode should be 0 and
|
|
3290
|
+
* errorString may be empty.
|
|
3291
|
+
*/
|
|
3292
|
+
errorInfo: ErrorInfo;
|
|
3293
|
+
}
|
|
3294
|
+
|
|
3295
|
+
/**
|
|
3296
|
+
* High-performance layout analysis engine.
|
|
3297
|
+
*/
|
|
3298
|
+
declare class LayoutAnalyzer {
|
|
3299
|
+
/**
|
|
3300
|
+
* Performs layout analysis on the input quadrilaterals.
|
|
3301
|
+
*
|
|
3302
|
+
* @param inputQuads Input quadrilaterals.
|
|
3303
|
+
* @param parameter Optional analysis constraints.
|
|
3304
|
+
* @returns A promise that resolves with the analysis result.
|
|
3305
|
+
*/
|
|
3306
|
+
static analyze(inputQuads: Array<Quadrilateral>, parameter?: LayoutAnalysisParameter): Promise<LayoutAnalysisResult>;
|
|
3307
|
+
}
|
|
3308
|
+
|
|
3309
|
+
export { EnumFilterType, EnumLayoutElementSource, EnumLayoutPattern, ImageDrawer, ImageIO, ImageProcessor, LayoutAnalyzer, MultiFrameResultCrossFilter, UtilityModule };
|
|
3310
|
+
export type { CBarcodeResultItem, CDecodedBarcodeElement, CEdge, CLocalizedBarcodeElement, CQuadrilateral, CapturedResultMap, CrossVerificationCriteria, LayoutAnalysisParameter, LayoutAnalysisResult, LayoutAxis, LayoutElement, resultItemTypeString };
|
|
3311
|
+
|
|
3312
|
+
|
|
3313
|
+
|
|
3314
|
+
|
|
3315
|
+
|
|
3316
|
+
|
|
3317
|
+
|
|
3318
|
+
|
|
3319
|
+
|
|
3320
|
+
|
|
3321
|
+
|
|
3322
|
+
|
|
3323
|
+
|
|
3324
|
+
|
|
3325
|
+
|
|
3326
|
+
|
|
3327
|
+
|
|
3328
|
+
|
|
3329
|
+
|
|
3330
|
+
|
|
3331
|
+
|
|
3165
3332
|
declare enum EnumScanMode {
|
|
3166
3333
|
SM_SINGLE = 0,
|
|
3167
3334
|
SM_MULTI_UNIQUE = 1
|
|
@@ -3170,8 +3337,8 @@ declare enum EnumResultStatus {
|
|
|
3170
3337
|
RS_SUCCESS = 0,
|
|
3171
3338
|
RS_CANCELLED = 1,
|
|
3172
3339
|
RS_FAILED = 2
|
|
3173
|
-
}
|
|
3174
|
-
|
|
3340
|
+
}
|
|
3341
|
+
|
|
3175
3342
|
type CacheKeys = "dceUI" | "dbsUI" | "presetTemplates" | "templateFile";
|
|
3176
3343
|
type CameraSwitchControlMode = "hidden" | "listAll" | "toggleFrontBack";
|
|
3177
3344
|
type PathConfig = {
|
|
@@ -3229,8 +3396,8 @@ interface BarcodeScannerConfig {
|
|
|
3229
3396
|
cvRouter: CaptureVisionRouter;
|
|
3230
3397
|
}) => void;
|
|
3231
3398
|
onCameraOpenFailed?: (ex: Error) => void;
|
|
3232
|
-
}
|
|
3233
|
-
|
|
3399
|
+
}
|
|
3400
|
+
|
|
3234
3401
|
type ResultStatus = {
|
|
3235
3402
|
code: EnumResultStatus;
|
|
3236
3403
|
message: string;
|
|
@@ -3250,8 +3417,8 @@ interface UtilizedTemplateNames {
|
|
|
3250
3417
|
single?: string;
|
|
3251
3418
|
multi_unique?: string;
|
|
3252
3419
|
image?: string;
|
|
3253
|
-
}
|
|
3254
|
-
|
|
3420
|
+
}
|
|
3421
|
+
|
|
3255
3422
|
declare class BarcodeScanner {
|
|
3256
3423
|
#private;
|
|
3257
3424
|
private _cameraEnhancer;
|
|
@@ -3263,1253 +3430,1295 @@ declare class BarcodeScanner {
|
|
|
3263
3430
|
launch(): Promise<BarcodeScanResult>;
|
|
3264
3431
|
decode(imageOrFile: Blob | string | DSImageData | HTMLImageElement | HTMLVideoElement | HTMLCanvasElement, templateName?: string): Promise<CapturedResult>;
|
|
3265
3432
|
dispose(): void;
|
|
3266
|
-
}
|
|
3267
|
-
|
|
3268
|
-
export { BarcodeScanner, EnumResultStatus, EnumScanMode, isPathConfig };
|
|
3269
|
-
export type { BarcodeScanResult, BarcodeScannerConfig, CacheKeys, ResultStatus, ToolbarButtonConfig, UtilizedTemplateNames };
|
|
3270
|
-
interface CameraInfo extends InputDeviceInfo {
|
|
3271
|
-
trackLabel: string;
|
|
3272
|
-
capabilities: DMMoreMediaTrackCapabilities;
|
|
3273
|
-
isFront: boolean;
|
|
3274
|
-
}
|
|
3275
|
-
interface DMMoreMediaTrackCapabilities extends MediaTrackCapabilities {
|
|
3276
|
-
focusMode?: ('continuous' | 'single-shot' | 'manual')[];
|
|
3277
|
-
focusDistance?: {
|
|
3278
|
-
max?: number;
|
|
3279
|
-
min: number;
|
|
3280
|
-
};
|
|
3281
|
-
zoom?: {
|
|
3282
|
-
max: number;
|
|
3283
|
-
min: number;
|
|
3284
|
-
};
|
|
3285
|
-
torch?: true;
|
|
3286
|
-
}
|
|
3287
|
-
type CameraZsFunc = (this: Camera, ...argArray: any[]) => void | any;
|
|
3288
|
-
interface Camera {
|
|
3289
|
-
/**
|
|
3290
|
-
* The `opened` event is triggered when the camera `open()` from the `paused`/`closed`
|
|
3291
|
-
* or when call `requestResolution()` and camera is `opened`.
|
|
3292
|
-
*/
|
|
3293
|
-
addEventListener(type: 'opened', listener: (this: Camera) => void | any): void;
|
|
3294
|
-
removeEventListener(type: 'opened', listener: (this: Camera) => void | any): void;
|
|
3295
|
-
/** The `closed` event is triggered when camera is `closed`. */
|
|
3296
|
-
addEventListener(type: 'closed', listener: (this: Camera) => void | any): void;
|
|
3297
|
-
removeEventListener(type: 'closed', listener: (this: Camera) => void | any): void;
|
|
3298
|
-
}
|
|
3299
|
-
declare class Camera {
|
|
3300
|
-
static _cameraNameMatcher: string[][];
|
|
3301
|
-
static
|
|
3302
|
-
|
|
3303
|
-
|
|
3304
|
-
|
|
3305
|
-
|
|
3306
|
-
|
|
3307
|
-
|
|
3308
|
-
|
|
3309
|
-
|
|
3310
|
-
|
|
3311
|
-
|
|
3312
|
-
|
|
3313
|
-
|
|
3314
|
-
|
|
3315
|
-
|
|
3316
|
-
|
|
3317
|
-
|
|
3318
|
-
|
|
3319
|
-
|
|
3320
|
-
|
|
3321
|
-
|
|
3322
|
-
|
|
3323
|
-
|
|
3324
|
-
|
|
3325
|
-
|
|
3326
|
-
|
|
3327
|
-
|
|
3328
|
-
|
|
3329
|
-
|
|
3330
|
-
|
|
3331
|
-
|
|
3332
|
-
|
|
3333
|
-
|
|
3334
|
-
|
|
3335
|
-
|
|
3336
|
-
|
|
3337
|
-
|
|
3338
|
-
|
|
3339
|
-
|
|
3340
|
-
|
|
3341
|
-
|
|
3342
|
-
|
|
3343
|
-
static
|
|
3344
|
-
static
|
|
3345
|
-
static
|
|
3346
|
-
static
|
|
3347
|
-
static
|
|
3348
|
-
static
|
|
3349
|
-
|
|
3350
|
-
|
|
3351
|
-
static
|
|
3352
|
-
|
|
3353
|
-
|
|
3354
|
-
|
|
3355
|
-
|
|
3356
|
-
|
|
3357
|
-
|
|
3358
|
-
|
|
3359
|
-
|
|
3360
|
-
|
|
3361
|
-
|
|
3362
|
-
|
|
3363
|
-
|
|
3364
|
-
|
|
3365
|
-
|
|
3366
|
-
|
|
3367
|
-
*
|
|
3368
|
-
*
|
|
3369
|
-
* If `value`
|
|
3370
|
-
|
|
3371
|
-
|
|
3372
|
-
|
|
3373
|
-
|
|
3374
|
-
|
|
3375
|
-
|
|
3376
|
-
|
|
3377
|
-
|
|
3378
|
-
get
|
|
3379
|
-
get
|
|
3380
|
-
|
|
3381
|
-
|
|
3382
|
-
|
|
3383
|
-
|
|
3384
|
-
get
|
|
3385
|
-
|
|
3386
|
-
|
|
3387
|
-
|
|
3388
|
-
|
|
3389
|
-
|
|
3390
|
-
|
|
3391
|
-
|
|
3392
|
-
|
|
3393
|
-
|
|
3394
|
-
|
|
3395
|
-
|
|
3396
|
-
|
|
3397
|
-
|
|
3398
|
-
|
|
3399
|
-
|
|
3400
|
-
|
|
3401
|
-
|
|
3402
|
-
|
|
3403
|
-
|
|
3404
|
-
|
|
3405
|
-
static
|
|
3406
|
-
|
|
3407
|
-
|
|
3408
|
-
|
|
3409
|
-
|
|
3410
|
-
|
|
3411
|
-
|
|
3412
|
-
|
|
3413
|
-
/**
|
|
3414
|
-
|
|
3415
|
-
/**
|
|
3416
|
-
|
|
3417
|
-
/** If call `requestCamera()` when the camera is `opened`, it will call `close()` then re`open()` Internally. */
|
|
3418
|
-
requestCamera(
|
|
3419
|
-
/**
|
|
3420
|
-
|
|
3421
|
-
|
|
3422
|
-
|
|
3423
|
-
requestCamera(
|
|
3424
|
-
|
|
3425
|
-
|
|
3426
|
-
*
|
|
3427
|
-
*
|
|
3428
|
-
|
|
3429
|
-
|
|
3430
|
-
|
|
3431
|
-
|
|
3432
|
-
|
|
3433
|
-
|
|
3434
|
-
|
|
3435
|
-
|
|
3436
|
-
|
|
3437
|
-
|
|
3438
|
-
requestResolution(
|
|
3439
|
-
requestResolution(
|
|
3440
|
-
|
|
3441
|
-
|
|
3442
|
-
|
|
3443
|
-
|
|
3444
|
-
|
|
3445
|
-
|
|
3446
|
-
|
|
3447
|
-
|
|
3448
|
-
|
|
3449
|
-
|
|
3450
|
-
*
|
|
3451
|
-
*
|
|
3452
|
-
*
|
|
3453
|
-
*
|
|
3454
|
-
|
|
3455
|
-
|
|
3456
|
-
|
|
3457
|
-
|
|
3458
|
-
|
|
3459
|
-
|
|
3460
|
-
|
|
3461
|
-
|
|
3462
|
-
|
|
3463
|
-
|
|
3464
|
-
|
|
3465
|
-
|
|
3466
|
-
|
|
3467
|
-
|
|
3468
|
-
|
|
3469
|
-
|
|
3470
|
-
|
|
3471
|
-
|
|
3472
|
-
|
|
3473
|
-
|
|
3474
|
-
|
|
3475
|
-
|
|
3476
|
-
|
|
3477
|
-
|
|
3478
|
-
|
|
3479
|
-
|
|
3480
|
-
|
|
3481
|
-
|
|
3482
|
-
|
|
3483
|
-
|
|
3484
|
-
|
|
3485
|
-
|
|
3486
|
-
|
|
3487
|
-
|
|
3488
|
-
|
|
3489
|
-
*
|
|
3490
|
-
*
|
|
3491
|
-
|
|
3492
|
-
|
|
3493
|
-
|
|
3494
|
-
|
|
3495
|
-
|
|
3496
|
-
|
|
3497
|
-
|
|
3498
|
-
|
|
3499
|
-
|
|
3500
|
-
|
|
3501
|
-
|
|
3502
|
-
|
|
3503
|
-
|
|
3504
|
-
|
|
3505
|
-
|
|
3506
|
-
|
|
3507
|
-
|
|
3508
|
-
|
|
3509
|
-
|
|
3510
|
-
|
|
3511
|
-
|
|
3512
|
-
|
|
3513
|
-
|
|
3514
|
-
|
|
3515
|
-
|
|
3516
|
-
|
|
3517
|
-
|
|
3518
|
-
|
|
3519
|
-
|
|
3520
|
-
|
|
3521
|
-
|
|
3522
|
-
|
|
3523
|
-
|
|
3524
|
-
|
|
3525
|
-
|
|
3526
|
-
|
|
3527
|
-
|
|
3528
|
-
|
|
3529
|
-
|
|
3530
|
-
|
|
3531
|
-
|
|
3532
|
-
|
|
3533
|
-
|
|
3534
|
-
|
|
3535
|
-
|
|
3536
|
-
|
|
3537
|
-
|
|
3538
|
-
|
|
3539
|
-
|
|
3540
|
-
|
|
3541
|
-
|
|
3542
|
-
|
|
3543
|
-
|
|
3544
|
-
|
|
3545
|
-
|
|
3546
|
-
|
|
3547
|
-
|
|
3548
|
-
|
|
3549
|
-
zoom: number;
|
|
3550
|
-
center: {
|
|
3551
|
-
x: number;
|
|
3552
|
-
y: number;
|
|
3553
|
-
};
|
|
3554
|
-
};
|
|
3555
|
-
|
|
3556
|
-
|
|
3557
|
-
|
|
3558
|
-
|
|
3559
|
-
|
|
3560
|
-
|
|
3561
|
-
|
|
3562
|
-
|
|
3563
|
-
|
|
3564
|
-
|
|
3565
|
-
|
|
3566
|
-
|
|
3567
|
-
|
|
3568
|
-
|
|
3569
|
-
|
|
3570
|
-
|
|
3571
|
-
|
|
3572
|
-
|
|
3573
|
-
|
|
3574
|
-
|
|
3575
|
-
|
|
3576
|
-
|
|
3577
|
-
|
|
3578
|
-
|
|
3579
|
-
|
|
3580
|
-
|
|
3581
|
-
|
|
3582
|
-
|
|
3583
|
-
*
|
|
3584
|
-
*
|
|
3585
|
-
|
|
3586
|
-
|
|
3587
|
-
|
|
3588
|
-
|
|
3589
|
-
|
|
3590
|
-
|
|
3591
|
-
|
|
3592
|
-
|
|
3593
|
-
|
|
3594
|
-
|
|
3595
|
-
|
|
3596
|
-
|
|
3597
|
-
|
|
3598
|
-
|
|
3599
|
-
|
|
3600
|
-
|
|
3601
|
-
|
|
3602
|
-
|
|
3603
|
-
|
|
3604
|
-
zoom: number;
|
|
3605
|
-
center: {
|
|
3606
|
-
x: number;
|
|
3607
|
-
y: number;
|
|
3608
|
-
};
|
|
3609
|
-
}) => void | any): void;
|
|
3610
|
-
|
|
3611
|
-
|
|
3612
|
-
|
|
3613
|
-
|
|
3614
|
-
|
|
3615
|
-
|
|
3616
|
-
|
|
3617
|
-
|
|
3618
|
-
|
|
3619
|
-
|
|
3620
|
-
|
|
3621
|
-
|
|
3622
|
-
|
|
3623
|
-
|
|
3624
|
-
|
|
3625
|
-
|
|
3626
|
-
|
|
3627
|
-
|
|
3628
|
-
|
|
3629
|
-
|
|
3630
|
-
|
|
3631
|
-
|
|
3632
|
-
|
|
3633
|
-
|
|
3634
|
-
|
|
3635
|
-
|
|
3636
|
-
|
|
3637
|
-
|
|
3638
|
-
|
|
3639
|
-
|
|
3640
|
-
|
|
3641
|
-
|
|
3642
|
-
|
|
3643
|
-
|
|
3644
|
-
|
|
3645
|
-
|
|
3646
|
-
|
|
3647
|
-
|
|
3648
|
-
|
|
3649
|
-
|
|
3650
|
-
|
|
3651
|
-
|
|
3652
|
-
|
|
3653
|
-
|
|
3654
|
-
|
|
3655
|
-
|
|
3656
|
-
|
|
3657
|
-
|
|
3658
|
-
|
|
3659
|
-
|
|
3660
|
-
|
|
3661
|
-
|
|
3662
|
-
|
|
3663
|
-
|
|
3664
|
-
|
|
3665
|
-
|
|
3666
|
-
|
|
3667
|
-
|
|
3668
|
-
|
|
3669
|
-
|
|
3670
|
-
|
|
3671
|
-
|
|
3672
|
-
|
|
3673
|
-
|
|
3674
|
-
|
|
3675
|
-
|
|
3676
|
-
|
|
3677
|
-
|
|
3678
|
-
|
|
3679
|
-
|
|
3680
|
-
/**
|
|
3681
|
-
|
|
3682
|
-
|
|
3683
|
-
|
|
3684
|
-
|
|
3685
|
-
|
|
3686
|
-
|
|
3687
|
-
|
|
3688
|
-
|
|
3689
|
-
|
|
3690
|
-
|
|
3691
|
-
|
|
3692
|
-
|
|
3693
|
-
|
|
3694
|
-
|
|
3695
|
-
|
|
3696
|
-
|
|
3697
|
-
|
|
3698
|
-
|
|
3699
|
-
|
|
3700
|
-
|
|
3701
|
-
|
|
3702
|
-
|
|
3703
|
-
|
|
3704
|
-
}
|
|
3705
|
-
|
|
3706
|
-
|
|
3707
|
-
|
|
3708
|
-
|
|
3709
|
-
|
|
3710
|
-
|
|
3711
|
-
|
|
3712
|
-
|
|
3713
|
-
|
|
3714
|
-
|
|
3715
|
-
|
|
3716
|
-
|
|
3717
|
-
|
|
3718
|
-
|
|
3719
|
-
|
|
3720
|
-
|
|
3721
|
-
|
|
3722
|
-
|
|
3723
|
-
|
|
3724
|
-
|
|
3725
|
-
|
|
3726
|
-
|
|
3727
|
-
|
|
3728
|
-
|
|
3729
|
-
|
|
3730
|
-
|
|
3731
|
-
|
|
3732
|
-
|
|
3733
|
-
|
|
3734
|
-
|
|
3735
|
-
|
|
3736
|
-
|
|
3737
|
-
|
|
3738
|
-
|
|
3739
|
-
|
|
3740
|
-
|
|
3741
|
-
|
|
3742
|
-
|
|
3743
|
-
|
|
3744
|
-
|
|
3745
|
-
|
|
3746
|
-
|
|
3747
|
-
|
|
3748
|
-
|
|
3749
|
-
|
|
3750
|
-
|
|
3751
|
-
}
|
|
3752
|
-
|
|
3753
|
-
declare class
|
|
3754
|
-
|
|
3755
|
-
|
|
3756
|
-
|
|
3757
|
-
|
|
3758
|
-
|
|
3759
|
-
|
|
3760
|
-
|
|
3761
|
-
|
|
3762
|
-
|
|
3763
|
-
|
|
3764
|
-
|
|
3765
|
-
|
|
3766
|
-
|
|
3767
|
-
|
|
3768
|
-
|
|
3769
|
-
|
|
3770
|
-
|
|
3771
|
-
|
|
3772
|
-
|
|
3773
|
-
|
|
3774
|
-
|
|
3775
|
-
|
|
3776
|
-
|
|
3777
|
-
|
|
3778
|
-
|
|
3779
|
-
|
|
3780
|
-
|
|
3781
|
-
|
|
3782
|
-
|
|
3783
|
-
|
|
3784
|
-
|
|
3785
|
-
|
|
3786
|
-
|
|
3787
|
-
|
|
3788
|
-
|
|
3789
|
-
|
|
3790
|
-
|
|
3791
|
-
|
|
3792
|
-
|
|
3793
|
-
|
|
3794
|
-
|
|
3795
|
-
|
|
3796
|
-
|
|
3797
|
-
|
|
3798
|
-
|
|
3799
|
-
|
|
3800
|
-
|
|
3801
|
-
|
|
3802
|
-
|
|
3803
|
-
|
|
3804
|
-
|
|
3805
|
-
|
|
3806
|
-
|
|
3807
|
-
|
|
3808
|
-
|
|
3809
|
-
|
|
3810
|
-
|
|
3811
|
-
|
|
3812
|
-
|
|
3813
|
-
|
|
3814
|
-
|
|
3815
|
-
|
|
3816
|
-
|
|
3817
|
-
|
|
3818
|
-
|
|
3819
|
-
|
|
3820
|
-
|
|
3821
|
-
|
|
3822
|
-
|
|
3823
|
-
|
|
3824
|
-
|
|
3825
|
-
|
|
3826
|
-
|
|
3827
|
-
|
|
3828
|
-
|
|
3829
|
-
|
|
3830
|
-
|
|
3831
|
-
|
|
3832
|
-
|
|
3833
|
-
|
|
3834
|
-
|
|
3835
|
-
|
|
3836
|
-
|
|
3837
|
-
|
|
3838
|
-
|
|
3839
|
-
|
|
3840
|
-
|
|
3841
|
-
|
|
3842
|
-
deviceId: string;
|
|
3843
|
-
|
|
3844
|
-
|
|
3845
|
-
|
|
3846
|
-
|
|
3847
|
-
|
|
3848
|
-
|
|
3849
|
-
|
|
3850
|
-
|
|
3851
|
-
|
|
3852
|
-
|
|
3853
|
-
|
|
3854
|
-
|
|
3855
|
-
|
|
3856
|
-
|
|
3857
|
-
|
|
3858
|
-
|
|
3859
|
-
|
|
3860
|
-
|
|
3861
|
-
|
|
3862
|
-
|
|
3863
|
-
|
|
3864
|
-
|
|
3865
|
-
|
|
3866
|
-
|
|
3867
|
-
|
|
3868
|
-
|
|
3869
|
-
|
|
3870
|
-
|
|
3871
|
-
|
|
3872
|
-
|
|
3873
|
-
|
|
3874
|
-
|
|
3875
|
-
|
|
3876
|
-
|
|
3877
|
-
|
|
3878
|
-
|
|
3879
|
-
|
|
3880
|
-
|
|
3881
|
-
|
|
3882
|
-
|
|
3883
|
-
|
|
3884
|
-
|
|
3885
|
-
|
|
3886
|
-
|
|
3887
|
-
|
|
3888
|
-
|
|
3889
|
-
|
|
3890
|
-
|
|
3891
|
-
|
|
3892
|
-
|
|
3893
|
-
|
|
3894
|
-
|
|
3895
|
-
|
|
3896
|
-
|
|
3897
|
-
|
|
3898
|
-
|
|
3899
|
-
|
|
3900
|
-
|
|
3901
|
-
|
|
3902
|
-
|
|
3903
|
-
|
|
3904
|
-
|
|
3905
|
-
|
|
3906
|
-
|
|
3907
|
-
|
|
3908
|
-
|
|
3909
|
-
|
|
3910
|
-
|
|
3911
|
-
|
|
3912
|
-
|
|
3913
|
-
|
|
3914
|
-
}
|
|
3915
|
-
|
|
3916
|
-
|
|
3917
|
-
|
|
3918
|
-
|
|
3919
|
-
|
|
3920
|
-
|
|
3921
|
-
|
|
3922
|
-
|
|
3923
|
-
|
|
3924
|
-
|
|
3925
|
-
|
|
3926
|
-
|
|
3927
|
-
|
|
3928
|
-
|
|
3929
|
-
|
|
3930
|
-
|
|
3931
|
-
|
|
3932
|
-
|
|
3933
|
-
|
|
3934
|
-
|
|
3935
|
-
|
|
3936
|
-
|
|
3937
|
-
|
|
3938
|
-
|
|
3939
|
-
|
|
3940
|
-
|
|
3941
|
-
|
|
3942
|
-
|
|
3943
|
-
|
|
3944
|
-
|
|
3945
|
-
|
|
3946
|
-
|
|
3947
|
-
|
|
3948
|
-
|
|
3949
|
-
|
|
3950
|
-
|
|
3951
|
-
|
|
3952
|
-
|
|
3953
|
-
|
|
3954
|
-
|
|
3955
|
-
|
|
3956
|
-
|
|
3957
|
-
|
|
3958
|
-
|
|
3959
|
-
|
|
3960
|
-
|
|
3961
|
-
|
|
3962
|
-
|
|
3963
|
-
|
|
3964
|
-
|
|
3965
|
-
|
|
3966
|
-
|
|
3967
|
-
|
|
3968
|
-
|
|
3969
|
-
|
|
3970
|
-
|
|
3971
|
-
|
|
3972
|
-
|
|
3973
|
-
|
|
3974
|
-
|
|
3975
|
-
|
|
3976
|
-
|
|
3977
|
-
|
|
3978
|
-
|
|
3979
|
-
|
|
3980
|
-
|
|
3981
|
-
|
|
3982
|
-
|
|
3983
|
-
|
|
3984
|
-
|
|
3985
|
-
|
|
3986
|
-
|
|
3987
|
-
|
|
3988
|
-
|
|
3989
|
-
}
|
|
3990
|
-
|
|
3991
|
-
|
|
3992
|
-
|
|
3993
|
-
|
|
3994
|
-
|
|
3995
|
-
|
|
3996
|
-
|
|
3997
|
-
|
|
3998
|
-
|
|
3999
|
-
|
|
4000
|
-
|
|
4001
|
-
|
|
4002
|
-
|
|
4003
|
-
|
|
4004
|
-
|
|
4005
|
-
|
|
4006
|
-
|
|
4007
|
-
|
|
4008
|
-
|
|
4009
|
-
|
|
4010
|
-
|
|
4011
|
-
|
|
4012
|
-
|
|
4013
|
-
|
|
4014
|
-
|
|
4015
|
-
|
|
4016
|
-
|
|
4017
|
-
|
|
4018
|
-
|
|
4019
|
-
|
|
4020
|
-
|
|
4021
|
-
|
|
4022
|
-
|
|
4023
|
-
|
|
4024
|
-
|
|
4025
|
-
|
|
4026
|
-
|
|
4027
|
-
|
|
4028
|
-
|
|
4029
|
-
|
|
4030
|
-
|
|
4031
|
-
|
|
4032
|
-
|
|
4033
|
-
|
|
4034
|
-
|
|
4035
|
-
|
|
4036
|
-
|
|
4037
|
-
|
|
4038
|
-
|
|
4039
|
-
|
|
4040
|
-
|
|
4041
|
-
|
|
4042
|
-
|
|
4043
|
-
|
|
4044
|
-
|
|
4045
|
-
|
|
4046
|
-
|
|
4047
|
-
|
|
4048
|
-
|
|
4049
|
-
|
|
4050
|
-
|
|
4051
|
-
|
|
4052
|
-
|
|
4053
|
-
|
|
4054
|
-
|
|
4055
|
-
|
|
4056
|
-
|
|
4057
|
-
|
|
4058
|
-
|
|
4059
|
-
|
|
4060
|
-
|
|
4061
|
-
|
|
4062
|
-
|
|
4063
|
-
|
|
4064
|
-
|
|
4065
|
-
|
|
4066
|
-
|
|
4067
|
-
|
|
4068
|
-
|
|
4069
|
-
|
|
4070
|
-
|
|
4071
|
-
|
|
4072
|
-
};
|
|
4073
|
-
|
|
4074
|
-
|
|
4075
|
-
|
|
4076
|
-
|
|
4077
|
-
|
|
4078
|
-
|
|
4079
|
-
|
|
4080
|
-
|
|
4081
|
-
|
|
4082
|
-
|
|
4083
|
-
|
|
4084
|
-
|
|
4085
|
-
|
|
4086
|
-
|
|
4087
|
-
|
|
4088
|
-
|
|
4089
|
-
|
|
4090
|
-
|
|
4091
|
-
|
|
4092
|
-
|
|
4093
|
-
|
|
4094
|
-
|
|
4095
|
-
|
|
4096
|
-
|
|
4097
|
-
|
|
4098
|
-
|
|
4099
|
-
|
|
4100
|
-
|
|
4101
|
-
|
|
4102
|
-
|
|
4103
|
-
|
|
4104
|
-
|
|
4105
|
-
|
|
4106
|
-
|
|
4107
|
-
|
|
4108
|
-
|
|
4109
|
-
|
|
4110
|
-
|
|
4111
|
-
|
|
4112
|
-
|
|
4113
|
-
|
|
4114
|
-
|
|
4115
|
-
|
|
4116
|
-
|
|
4117
|
-
|
|
4118
|
-
|
|
4119
|
-
|
|
4120
|
-
|
|
4121
|
-
|
|
4122
|
-
|
|
4123
|
-
|
|
4124
|
-
|
|
4125
|
-
|
|
4126
|
-
|
|
4127
|
-
|
|
4128
|
-
|
|
4129
|
-
|
|
4130
|
-
|
|
4131
|
-
|
|
4132
|
-
|
|
4133
|
-
|
|
4134
|
-
|
|
4135
|
-
|
|
4136
|
-
|
|
4137
|
-
|
|
4138
|
-
|
|
4139
|
-
|
|
4140
|
-
|
|
4141
|
-
|
|
4142
|
-
|
|
4143
|
-
|
|
4144
|
-
|
|
4145
|
-
|
|
4146
|
-
|
|
4147
|
-
|
|
4148
|
-
|
|
4149
|
-
|
|
4150
|
-
|
|
4151
|
-
|
|
4152
|
-
|
|
4153
|
-
|
|
4154
|
-
|
|
4155
|
-
|
|
4156
|
-
|
|
4157
|
-
|
|
4158
|
-
|
|
4159
|
-
|
|
4160
|
-
|
|
4161
|
-
|
|
4162
|
-
|
|
4163
|
-
|
|
4164
|
-
|
|
4165
|
-
|
|
4166
|
-
|
|
4167
|
-
|
|
4168
|
-
|
|
4169
|
-
|
|
4170
|
-
|
|
4171
|
-
|
|
4172
|
-
|
|
4173
|
-
|
|
4174
|
-
|
|
4175
|
-
|
|
4176
|
-
|
|
4177
|
-
|
|
4178
|
-
|
|
4179
|
-
|
|
4180
|
-
|
|
4181
|
-
|
|
4182
|
-
|
|
4183
|
-
|
|
4184
|
-
|
|
4185
|
-
|
|
4186
|
-
|
|
4187
|
-
|
|
4188
|
-
|
|
4189
|
-
|
|
4190
|
-
|
|
4191
|
-
|
|
4192
|
-
|
|
4193
|
-
|
|
4194
|
-
|
|
4195
|
-
|
|
4196
|
-
|
|
4197
|
-
|
|
4198
|
-
|
|
4199
|
-
|
|
4200
|
-
|
|
4201
|
-
|
|
4202
|
-
|
|
4203
|
-
|
|
4204
|
-
|
|
4205
|
-
}
|
|
4206
|
-
|
|
4207
|
-
|
|
4208
|
-
|
|
4209
|
-
|
|
4210
|
-
|
|
4211
|
-
|
|
4212
|
-
|
|
4213
|
-
|
|
4214
|
-
|
|
4215
|
-
|
|
4216
|
-
|
|
4217
|
-
|
|
4218
|
-
|
|
4219
|
-
|
|
4220
|
-
|
|
4221
|
-
|
|
4222
|
-
|
|
4223
|
-
|
|
4224
|
-
|
|
4225
|
-
|
|
4226
|
-
|
|
4227
|
-
|
|
4228
|
-
|
|
4229
|
-
|
|
4230
|
-
|
|
4231
|
-
|
|
4232
|
-
|
|
4233
|
-
|
|
4234
|
-
|
|
4235
|
-
|
|
4236
|
-
|
|
4237
|
-
|
|
4238
|
-
|
|
4239
|
-
|
|
4240
|
-
|
|
4241
|
-
|
|
4242
|
-
|
|
4243
|
-
|
|
4244
|
-
|
|
4245
|
-
|
|
4246
|
-
|
|
4247
|
-
|
|
4248
|
-
|
|
4249
|
-
|
|
4250
|
-
|
|
4251
|
-
|
|
4252
|
-
|
|
4253
|
-
|
|
4254
|
-
|
|
4255
|
-
|
|
4256
|
-
|
|
4257
|
-
|
|
4258
|
-
|
|
4259
|
-
|
|
4260
|
-
|
|
4261
|
-
|
|
4262
|
-
|
|
4263
|
-
|
|
4264
|
-
|
|
4265
|
-
|
|
4266
|
-
|
|
4267
|
-
|
|
4268
|
-
|
|
4269
|
-
|
|
4270
|
-
|
|
4271
|
-
|
|
4272
|
-
|
|
4273
|
-
|
|
4274
|
-
|
|
4275
|
-
|
|
4276
|
-
|
|
4277
|
-
|
|
4278
|
-
|
|
4279
|
-
|
|
4280
|
-
|
|
4281
|
-
}
|
|
4282
|
-
|
|
4283
|
-
|
|
4284
|
-
|
|
4285
|
-
|
|
4286
|
-
|
|
4287
|
-
|
|
4288
|
-
|
|
4289
|
-
|
|
4290
|
-
|
|
4291
|
-
|
|
4292
|
-
|
|
4293
|
-
|
|
4294
|
-
|
|
4295
|
-
|
|
4296
|
-
|
|
4297
|
-
|
|
4298
|
-
|
|
4299
|
-
|
|
4300
|
-
|
|
4301
|
-
|
|
4302
|
-
|
|
4303
|
-
|
|
4304
|
-
|
|
4305
|
-
|
|
4306
|
-
|
|
4307
|
-
|
|
4308
|
-
|
|
4309
|
-
|
|
4310
|
-
|
|
4311
|
-
|
|
4312
|
-
|
|
4313
|
-
|
|
4314
|
-
|
|
4315
|
-
|
|
4316
|
-
|
|
4317
|
-
|
|
4318
|
-
|
|
4319
|
-
|
|
4320
|
-
|
|
4321
|
-
|
|
4322
|
-
|
|
4323
|
-
|
|
4324
|
-
|
|
4325
|
-
x: number;
|
|
4326
|
-
y: number;
|
|
4327
|
-
width: number;
|
|
4328
|
-
height: number;
|
|
4329
|
-
}
|
|
4330
|
-
|
|
4331
|
-
|
|
4332
|
-
|
|
4333
|
-
|
|
4334
|
-
|
|
4335
|
-
|
|
4336
|
-
|
|
4337
|
-
|
|
4338
|
-
|
|
4339
|
-
|
|
4340
|
-
|
|
4341
|
-
|
|
4342
|
-
|
|
4343
|
-
|
|
4344
|
-
|
|
4345
|
-
|
|
4346
|
-
|
|
4347
|
-
|
|
4348
|
-
|
|
4349
|
-
|
|
4350
|
-
|
|
4351
|
-
|
|
4352
|
-
|
|
4353
|
-
|
|
4354
|
-
|
|
4355
|
-
|
|
4356
|
-
|
|
4357
|
-
|
|
4358
|
-
|
|
4359
|
-
|
|
4360
|
-
|
|
4361
|
-
|
|
4362
|
-
|
|
4363
|
-
|
|
4364
|
-
}
|
|
4365
|
-
|
|
4366
|
-
|
|
4367
|
-
|
|
4368
|
-
|
|
4369
|
-
|
|
4370
|
-
|
|
4371
|
-
|
|
4372
|
-
|
|
4373
|
-
|
|
4374
|
-
|
|
4375
|
-
|
|
4376
|
-
|
|
4377
|
-
|
|
4378
|
-
|
|
4379
|
-
|
|
4380
|
-
|
|
4381
|
-
|
|
4382
|
-
|
|
4383
|
-
|
|
4384
|
-
|
|
4385
|
-
|
|
4386
|
-
|
|
4387
|
-
|
|
4388
|
-
|
|
4389
|
-
|
|
4390
|
-
|
|
4391
|
-
|
|
4392
|
-
|
|
4393
|
-
|
|
4394
|
-
|
|
4395
|
-
|
|
4396
|
-
|
|
4397
|
-
|
|
4398
|
-
|
|
4399
|
-
|
|
4400
|
-
|
|
4401
|
-
|
|
4402
|
-
|
|
4403
|
-
|
|
4404
|
-
|
|
4405
|
-
|
|
4406
|
-
|
|
4407
|
-
|
|
4408
|
-
|
|
4409
|
-
|
|
4410
|
-
|
|
4411
|
-
|
|
4412
|
-
|
|
4413
|
-
|
|
4414
|
-
|
|
4415
|
-
|
|
4416
|
-
|
|
4417
|
-
|
|
4418
|
-
|
|
4419
|
-
|
|
4420
|
-
|
|
4421
|
-
|
|
4422
|
-
|
|
4423
|
-
|
|
4424
|
-
|
|
4425
|
-
|
|
4426
|
-
|
|
4427
|
-
|
|
4428
|
-
|
|
4429
|
-
|
|
4430
|
-
|
|
4431
|
-
|
|
4432
|
-
|
|
4433
|
-
|
|
4434
|
-
|
|
4435
|
-
|
|
4436
|
-
|
|
4437
|
-
|
|
4438
|
-
|
|
4439
|
-
|
|
4440
|
-
|
|
4441
|
-
|
|
4442
|
-
|
|
4443
|
-
|
|
4444
|
-
|
|
4445
|
-
|
|
4446
|
-
|
|
4447
|
-
|
|
4448
|
-
|
|
4449
|
-
|
|
4450
|
-
|
|
4451
|
-
|
|
4452
|
-
|
|
4453
|
-
|
|
4454
|
-
|
|
4455
|
-
|
|
4456
|
-
|
|
4457
|
-
|
|
4458
|
-
|
|
4459
|
-
|
|
4460
|
-
|
|
4461
|
-
|
|
4462
|
-
|
|
4463
|
-
|
|
4464
|
-
|
|
4465
|
-
|
|
4466
|
-
|
|
4467
|
-
|
|
4468
|
-
|
|
4469
|
-
|
|
4470
|
-
|
|
4471
|
-
|
|
4472
|
-
|
|
4473
|
-
|
|
4474
|
-
|
|
4475
|
-
|
|
4476
|
-
|
|
4477
|
-
|
|
4478
|
-
|
|
4479
|
-
|
|
4480
|
-
|
|
4481
|
-
|
|
4482
|
-
|
|
4483
|
-
|
|
4484
|
-
|
|
4485
|
-
|
|
4486
|
-
|
|
4487
|
-
|
|
4488
|
-
|
|
4489
|
-
|
|
4490
|
-
|
|
4491
|
-
|
|
4492
|
-
|
|
4493
|
-
|
|
4494
|
-
|
|
4495
|
-
|
|
4496
|
-
|
|
4497
|
-
|
|
4498
|
-
|
|
4499
|
-
|
|
4500
|
-
|
|
4501
|
-
|
|
4502
|
-
|
|
4503
|
-
|
|
4504
|
-
|
|
4505
|
-
|
|
4506
|
-
}
|
|
4507
|
-
interface
|
|
4508
|
-
|
|
4509
|
-
|
|
4510
|
-
|
|
4511
|
-
|
|
4512
|
-
|
|
4513
|
-
|
|
4514
|
-
|
|
4515
|
-
|
|
3433
|
+
}
|
|
3434
|
+
|
|
3435
|
+
export { BarcodeScanner, EnumResultStatus, EnumScanMode, isPathConfig };
|
|
3436
|
+
export type { BarcodeScanResult, BarcodeScannerConfig, CacheKeys, ResultStatus, ToolbarButtonConfig, UtilizedTemplateNames };
|
|
3437
|
+
interface CameraInfo extends InputDeviceInfo {
|
|
3438
|
+
trackLabel: string;
|
|
3439
|
+
capabilities: DMMoreMediaTrackCapabilities;
|
|
3440
|
+
isFront: boolean;
|
|
3441
|
+
}
|
|
3442
|
+
interface DMMoreMediaTrackCapabilities extends MediaTrackCapabilities {
|
|
3443
|
+
focusMode?: ('continuous' | 'single-shot' | 'manual')[];
|
|
3444
|
+
focusDistance?: {
|
|
3445
|
+
max?: number;
|
|
3446
|
+
min: number;
|
|
3447
|
+
};
|
|
3448
|
+
zoom?: {
|
|
3449
|
+
max: number;
|
|
3450
|
+
min: number;
|
|
3451
|
+
};
|
|
3452
|
+
torch?: true;
|
|
3453
|
+
}
|
|
3454
|
+
type CameraZsFunc = (this: Camera, ...argArray: any[]) => void | any;
|
|
3455
|
+
interface Camera {
|
|
3456
|
+
/**
|
|
3457
|
+
* The `opened` event is triggered when the camera `open()` from the `paused`/`closed`
|
|
3458
|
+
* or when call `requestResolution()` and camera is `opened`.
|
|
3459
|
+
*/
|
|
3460
|
+
addEventListener(type: 'opened', listener: (this: Camera) => void | any): void;
|
|
3461
|
+
removeEventListener(type: 'opened', listener: (this: Camera) => void | any): void;
|
|
3462
|
+
/** The `closed` event is triggered when camera is `closed`. */
|
|
3463
|
+
addEventListener(type: 'closed', listener: (this: Camera) => void | any): void;
|
|
3464
|
+
removeEventListener(type: 'closed', listener: (this: Camera) => void | any): void;
|
|
3465
|
+
}
|
|
3466
|
+
declare class Camera {
|
|
3467
|
+
static _cameraNameMatcher: string[][];
|
|
3468
|
+
static _currentOpenedCamera: Camera | null;
|
|
3469
|
+
static _mapDeviceInfo: {
|
|
3470
|
+
[deviceId: string]: CameraInfo;
|
|
3471
|
+
};
|
|
3472
|
+
_coreShell: HTMLElement;
|
|
3473
|
+
_video: HTMLVideoElement;
|
|
3474
|
+
_coreInnerLayer: HTMLElement;
|
|
3475
|
+
_coreOuterLayer: HTMLElement;
|
|
3476
|
+
_regionBoxWrapper?: HTMLElement | null;
|
|
3477
|
+
_regionBoxMask?: HTMLElement | null;
|
|
3478
|
+
_regionBoxBorder?: HTMLElement | null;
|
|
3479
|
+
_objectFit: 'contain' | 'cover' | 'fill';
|
|
3480
|
+
_uiInlineScript2Blob: boolean;
|
|
3481
|
+
_uiInternalCss2Blob: boolean;
|
|
3482
|
+
_uiInternalCss2ExistedSheet: boolean;
|
|
3483
|
+
_ui?: HTMLElement;
|
|
3484
|
+
_pOpen?: (Promise<void> & {
|
|
3485
|
+
isPending: boolean;
|
|
3486
|
+
resolve: () => void;
|
|
3487
|
+
reject: () => void;
|
|
3488
|
+
}) | null;
|
|
3489
|
+
_getUserMediaTimeout: number;
|
|
3490
|
+
_paused: boolean;
|
|
3491
|
+
_shouldClose: boolean;
|
|
3492
|
+
_cameraChangedWhenPaused: boolean;
|
|
3493
|
+
_requestedCamera: CameraPreset | MediaTrackConstraints | null;
|
|
3494
|
+
_requestedResolution: MediaTrackConstraints | null;
|
|
3495
|
+
_regionBox: {
|
|
3496
|
+
width?: number;
|
|
3497
|
+
height?: number;
|
|
3498
|
+
unit: 'view-size' | 'view-min';
|
|
3499
|
+
center: {
|
|
3500
|
+
x: number;
|
|
3501
|
+
y: number;
|
|
3502
|
+
};
|
|
3503
|
+
maskStyle?: Partial<CSSStyleDeclaration>;
|
|
3504
|
+
borderStyle?: Partial<CSSStyleDeclaration>;
|
|
3505
|
+
innerUi?: Node | NodeList;
|
|
3506
|
+
};
|
|
3507
|
+
_eventListeners: {
|
|
3508
|
+
[key: string]: Set<Function>;
|
|
3509
|
+
};
|
|
3510
|
+
static _delayBeforeEnumerateDevices: number;
|
|
3511
|
+
static _delayBeforeGetUserMedia: number;
|
|
3512
|
+
static _delayBeforeApplyConstraints: number;
|
|
3513
|
+
static _countEnsureResolution: number;
|
|
3514
|
+
static _videoPlayTimeout: number;
|
|
3515
|
+
static _bReopenWhenChangeResolution: boolean;
|
|
3516
|
+
_bTryAnotherCameraWhenFailToOpen: boolean;
|
|
3517
|
+
_constraints4Fallback: MediaTrackConstraints | true;
|
|
3518
|
+
static _arrConstructors: CameraZsFunc[];
|
|
3519
|
+
static _arrOnOpen: CameraZsFunc[];
|
|
3520
|
+
static _arrBeforeClose: CameraZsFunc[];
|
|
3521
|
+
static _arrOnClose: CameraZsFunc[];
|
|
3522
|
+
constructor();
|
|
3523
|
+
_taskIdIOSResizeProblem: any;
|
|
3524
|
+
_updateObjectFit(): void;
|
|
3525
|
+
get video(): HTMLVideoElement;
|
|
3526
|
+
get track(): MediaStreamTrack;
|
|
3527
|
+
get objectFit(): "contain" | "cover" | "fill";
|
|
3528
|
+
set objectFit(value: "contain" | "cover" | "fill");
|
|
3529
|
+
/**
|
|
3530
|
+
* While `ui` can accept various types during assignment, its value will always be an `HTMLElement` upon retrieval.
|
|
3531
|
+
*/
|
|
3532
|
+
get ui(): HTMLElement;
|
|
3533
|
+
/**
|
|
3534
|
+
* Generally, the `value` can be an `HTMLElement`, `DocumentFragment` or a string of serialized html.
|
|
3535
|
+
* This `ui` or one of its descendants, must have class `dm-camera-core-container`.
|
|
3536
|
+
* If the `value` already contains the `coreShell`, `coreShell` does not move.
|
|
3537
|
+
* Otherwise the `coreShell` of `DMCamera` is appended to the first element that has the class `dm-camera-core-container`.
|
|
3538
|
+
*
|
|
3539
|
+
* If `value` is a falsy value, `coreShell` is used as `ui`.
|
|
3540
|
+
**/
|
|
3541
|
+
set ui(value: HTMLElement | DocumentFragment | string | undefined);
|
|
3542
|
+
/**
|
|
3543
|
+
* "closed" | "opening" | "opened" | "paused" | "closing"
|
|
3544
|
+
*/
|
|
3545
|
+
get status(): CameraStatus;
|
|
3546
|
+
get requestedCamera(): "back" | "front" | "macro-back" | "quick-back" | "customized-video" | MediaTrackConstraints;
|
|
3547
|
+
get requestedResolution(): {
|
|
3548
|
+
width: number;
|
|
3549
|
+
height: number;
|
|
3550
|
+
};
|
|
3551
|
+
get currentCamera(): CameraInfo;
|
|
3552
|
+
get currentResolution(): {
|
|
3553
|
+
width: number;
|
|
3554
|
+
height: number;
|
|
3555
|
+
};
|
|
3556
|
+
/** width 0 ~ 1, height 0 ~ 1, center.x -0.5 ~ 0.5, center.y -0.5 ~ 0.5 */
|
|
3557
|
+
get regionBox(): {
|
|
3558
|
+
width?: number;
|
|
3559
|
+
height?: number;
|
|
3560
|
+
unit: "view-size" | "view-min";
|
|
3561
|
+
center: {
|
|
3562
|
+
x: number;
|
|
3563
|
+
y: number;
|
|
3564
|
+
};
|
|
3565
|
+
maskStyle?: Partial<CSSStyleDeclaration>;
|
|
3566
|
+
borderStyle?: Partial<CSSStyleDeclaration>;
|
|
3567
|
+
innerUi?: Node | NodeList;
|
|
3568
|
+
};
|
|
3569
|
+
onOpened?: (camera: Camera) => void | any;
|
|
3570
|
+
static hasCamera(): Promise<boolean>;
|
|
3571
|
+
static hasMacroCamera(): Promise<boolean>;
|
|
3572
|
+
static hasFrontCamera(): Promise<boolean>;
|
|
3573
|
+
/**
|
|
3574
|
+
* tips:
|
|
3575
|
+
* Call getDeviceInfos() will ask for camera permission, then open camera and close internally.
|
|
3576
|
+
* 2nd time open camera will be a lot faster.
|
|
3577
|
+
**/
|
|
3578
|
+
static getDeviceInfos(): Promise<Readonly<CameraInfo>[]>;
|
|
3579
|
+
static _setCapabilities(deviceInfos: CameraInfo[]): Promise<void>;
|
|
3580
|
+
/** `pause()` is an idempotent operation, you can call it repeatedly without error. */
|
|
3581
|
+
pause(): Promise<void>;
|
|
3582
|
+
/** `close()` is an idempotent operation, you can call it repeatedly without error. */
|
|
3583
|
+
close(): Promise<void>;
|
|
3584
|
+
/** If call `requestCamera()` when the camera is `opened`, it will call `close()` then re`open()` Internally. */
|
|
3585
|
+
requestCamera(cameraPreset: CameraPreset): Promise<void>;
|
|
3586
|
+
/** If call `requestCamera()` when the camera is `opened`, it will call `close()` then re`open()` Internally. */
|
|
3587
|
+
requestCamera(deviceId: string): Promise<void>;
|
|
3588
|
+
/** If call `requestCamera()` when the camera is `opened`, it will call `close()` then re`open()` Internally. */
|
|
3589
|
+
requestCamera(deviceInfo: CameraInfo): Promise<void>;
|
|
3590
|
+
/** If call `requestCamera()` when the camera is `opened`, it will call `close()` then re`open()` Internally. */
|
|
3591
|
+
requestCamera(constraints: MediaTrackConstraints): Promise<void>;
|
|
3592
|
+
/**
|
|
3593
|
+
* If call `requestCamera()` when the camera is `opened`, it will call `close()` then re`open()` Internally.
|
|
3594
|
+
* @param notRequired Let browser choose use what camera.
|
|
3595
|
+
* */
|
|
3596
|
+
requestCamera(notRequired: null): Promise<void>;
|
|
3597
|
+
/**
|
|
3598
|
+
* If call `requestCamera()` when the camera is `opened`, it will call `close()` then re`open()` Internally.
|
|
3599
|
+
* @param resetToDefault Use SDK's dafault logic.
|
|
3600
|
+
* */
|
|
3601
|
+
requestCamera(resetToDefault: undefined): Promise<void>;
|
|
3602
|
+
/** If call `requestCamera()` when the camera is `opened`, it will call `close()` then re`open()` Internally. */
|
|
3603
|
+
requestCamera(camera: string | CameraInfo | MediaTrackConstraints | null | undefined): Promise<void>;
|
|
3604
|
+
requestResolution(width: number, height?: number): Promise<void>;
|
|
3605
|
+
requestResolution(widthHeightPair: [number, number] | number[]): Promise<void>;
|
|
3606
|
+
requestResolution(constraints: {
|
|
3607
|
+
width?: ConstrainULong;
|
|
3608
|
+
height?: ConstrainULong;
|
|
3609
|
+
aspectRatio?: ConstrainDouble;
|
|
3610
|
+
}): Promise<void>;
|
|
3611
|
+
requestResolution(notRequired: null): Promise<void>;
|
|
3612
|
+
requestResolution(resetToDefault: undefined): Promise<void>;
|
|
3613
|
+
requestResolution(arg1: any, arg2?: any): Promise<void>;
|
|
3614
|
+
/**
|
|
3615
|
+
* Similar to `camera.track.applyConstraints`,
|
|
3616
|
+
* but auto add constraints of original camera and original resolution.
|
|
3617
|
+
* Primarily used for advanced camera settings like focusDistance, zoom, colorTemperature.
|
|
3618
|
+
* Don't directly change camera or resolution by this API,
|
|
3619
|
+
* use `requestCamera` and `requestResolution` instead.
|
|
3620
|
+
* Set camera or resolution using `applyConstraints` will result in undefined behavior.
|
|
3621
|
+
*/
|
|
3622
|
+
applyConstraints(constraints?: MediaTrackConstraints): Promise<void>;
|
|
3623
|
+
/**
|
|
3624
|
+
* @param config
|
|
3625
|
+
* `x`/`y`/`width`/`height` is normally `0 ~ video.videoWidth` or `0 ~ video.videoHeight`,
|
|
3626
|
+
* same as [drawImage](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/drawImage).
|
|
3627
|
+
* If values contain decimals, it will be rounded.
|
|
3628
|
+
* Note that the round method takes the effect of `x` into account when rounding `width` to minimize the cumulative error.
|
|
3629
|
+
* The same logic applies to `height`.
|
|
3630
|
+
*/
|
|
3631
|
+
getFrame(config?: {
|
|
3632
|
+
x?: number;
|
|
3633
|
+
y?: number;
|
|
3634
|
+
width?: number;
|
|
3635
|
+
height?: number;
|
|
3636
|
+
reusedContext?: CanvasRenderingContext2D;
|
|
3637
|
+
}): HTMLCanvasElement;
|
|
3638
|
+
/**
|
|
3639
|
+
* @param regionBox width 0 ~ 1, height 0 ~ 1, center.x -0.5 ~ 0.5, center.y -0.5 ~ 0.5
|
|
3640
|
+
* TODO: support unit pixel
|
|
3641
|
+
*/
|
|
3642
|
+
setRegionBox(regionBox: {
|
|
3643
|
+
width?: number;
|
|
3644
|
+
height?: number;
|
|
3645
|
+
unit?: 'view-size' | 'view-min';
|
|
3646
|
+
center?: {
|
|
3647
|
+
x: number;
|
|
3648
|
+
y: number;
|
|
3649
|
+
};
|
|
3650
|
+
maskStyle?: Partial<CSSStyleDeclaration>;
|
|
3651
|
+
borderStyle?: Partial<CSSStyleDeclaration>;
|
|
3652
|
+
innerUi?: Node | NodeList | DocumentFragment | Node[] | string;
|
|
3653
|
+
}): void;
|
|
3654
|
+
/**
|
|
3655
|
+
* Add a canvas dynamically keep with the same size of the video resolution, as a overlay.
|
|
3656
|
+
* You can remove it by `camera.video.parentElement.removeChild(thatCanvas)` or `thatCanvas.remove()`.
|
|
3657
|
+
* When you add multiple canvases, you can also use `camera.video.parentElement` to control stack order.
|
|
3658
|
+
*/
|
|
3659
|
+
addCanvas(): HTMLCanvasElement;
|
|
3660
|
+
_updateCanvasSize(): void;
|
|
3661
|
+
_callOpenedListeners(): void;
|
|
3662
|
+
/**
|
|
3663
|
+
* Convert video x/y to absolute left/top in `document.body`.
|
|
3664
|
+
* So you can easily add a overlay with absolute position.
|
|
3665
|
+
* Processing multiple points at once has higher performance than calling multiple times.
|
|
3666
|
+
*/
|
|
3667
|
+
videoXY2AbsoluteLT(points: {
|
|
3668
|
+
x: number;
|
|
3669
|
+
y: number;
|
|
3670
|
+
}[]): {
|
|
3671
|
+
left: number;
|
|
3672
|
+
top: number;
|
|
3673
|
+
}[];
|
|
3674
|
+
/**
|
|
3675
|
+
* Convert video x/y to fixed left/top in `document.body`.
|
|
3676
|
+
* So you can easily add a overlay with fixed position.
|
|
3677
|
+
* Processing multiple points at once has higher performance than calling multiple times.
|
|
3678
|
+
*/
|
|
3679
|
+
videoXY2FixedLT(points: {
|
|
3680
|
+
x: number;
|
|
3681
|
+
y: number;
|
|
3682
|
+
}[]): {
|
|
3683
|
+
left: number;
|
|
3684
|
+
top: number;
|
|
3685
|
+
}[];
|
|
3686
|
+
/**
|
|
3687
|
+
* @param isConsiderRegionBox Default is `false`. Only consider the visible area in the region box.
|
|
3688
|
+
* @param rounded Default is `false`. Controls whether the result should be rounded.
|
|
3689
|
+
* Note that the round method takes the effect of `x` into account when rounding `width` to minimize the cumulative error.
|
|
3690
|
+
* The same logic applies to `height`.
|
|
3691
|
+
* @returns
|
|
3692
|
+
* `x`/`width` is `0 ~ video.videoWidth`, `y`/`height` is `0 ~ video.videoHeight`.
|
|
3693
|
+
*/
|
|
3694
|
+
getVisibleAreaInVideoXY(config?: {
|
|
3695
|
+
isConsiderRegionBox?: boolean;
|
|
3696
|
+
rounded?: boolean;
|
|
3697
|
+
}): {
|
|
3698
|
+
x: number;
|
|
3699
|
+
y: number;
|
|
3700
|
+
width: number;
|
|
3701
|
+
height: number;
|
|
3702
|
+
};
|
|
3703
|
+
}
|
|
3704
|
+
type CameraStatus = 'closed' | 'opening' | 'opened' | 'paused' | 'closing';
|
|
3705
|
+
declare const ArrCameraPreset: readonly ["back", "front", "macro-back", "quick-back", "customized-video"];
|
|
3706
|
+
type CameraPreset = typeof ArrCameraPreset[number];
|
|
3707
|
+
|
|
3708
|
+
|
|
3709
|
+
interface Camera {
|
|
3710
|
+
correctAdvancedConstraint(constraints?: MediaTrackConstraints): MediaTrackConstraints;
|
|
3711
|
+
}
|
|
3712
|
+
|
|
3713
|
+
|
|
3714
|
+
interface Camera {
|
|
3715
|
+
_softZoom: {
|
|
3716
|
+
zoom: number;
|
|
3717
|
+
center: {
|
|
3718
|
+
x: number;
|
|
3719
|
+
y: number;
|
|
3720
|
+
};
|
|
3721
|
+
};
|
|
3722
|
+
get softZoom(): {
|
|
3723
|
+
zoom: number;
|
|
3724
|
+
center: {
|
|
3725
|
+
x: number;
|
|
3726
|
+
y: number;
|
|
3727
|
+
};
|
|
3728
|
+
};
|
|
3729
|
+
_isMirrored: boolean;
|
|
3730
|
+
get isMirrored(): boolean;
|
|
3731
|
+
set isMirrored(value: boolean);
|
|
3732
|
+
maxZoom4GestureWheel: number;
|
|
3733
|
+
_lastZoomTime: number;
|
|
3734
|
+
_mapZoomTouchs: Map<number, {
|
|
3735
|
+
x: number;
|
|
3736
|
+
y: number;
|
|
3737
|
+
}>;
|
|
3738
|
+
_gestureZoomListener: ((this: HTMLElement, ev: TouchEvent) => any) | null;
|
|
3739
|
+
get enableGestureZoom(): boolean;
|
|
3740
|
+
set enableGestureZoom(value: boolean);
|
|
3741
|
+
_wheelZoomListener: ((this: HTMLElement, ev: WheelEvent) => any) | null;
|
|
3742
|
+
get enableWheelZoom(): boolean;
|
|
3743
|
+
set enableWheelZoom(value: boolean);
|
|
3744
|
+
getZoomRange(): {
|
|
3745
|
+
min: number;
|
|
3746
|
+
max: number;
|
|
3747
|
+
} | undefined;
|
|
3748
|
+
setZoom(zoom: number): Promise<void>;
|
|
3749
|
+
/**
|
|
3750
|
+
* Js software-level zoom.
|
|
3751
|
+
* It does not rely on camera device and camera driver support for zoom.
|
|
3752
|
+
* @param center
|
|
3753
|
+
* zoomed camera center in orignal frame.
|
|
3754
|
+
* `x`: -0.5 ~ 0.5, `y`: -0.5 ~ 0.5.
|
|
3755
|
+
* @param limit
|
|
3756
|
+
* limit `zoom` >= 1.
|
|
3757
|
+
* limit the center point position according to `zoom`,
|
|
3758
|
+
* so zoomed frame is inside video boundary;
|
|
3759
|
+
*/
|
|
3760
|
+
setSoftZoom(zoom: number, config?: {
|
|
3761
|
+
center?: {
|
|
3762
|
+
x: number;
|
|
3763
|
+
y: number;
|
|
3764
|
+
};
|
|
3765
|
+
limit?: boolean;
|
|
3766
|
+
}): void;
|
|
3767
|
+
_changeZoomByWheel(ev: WheelEvent): void;
|
|
3768
|
+
_changeZoomByTouch(ev: TouchEvent): void;
|
|
3769
|
+
/** The `zoom` event is triggered when zoom updated via a touch gesture or mouse wheel. */
|
|
3770
|
+
addEventListener(type: 'zoom', listener: (this: Camera, softZoom: {
|
|
3771
|
+
zoom: number;
|
|
3772
|
+
center: {
|
|
3773
|
+
x: number;
|
|
3774
|
+
y: number;
|
|
3775
|
+
};
|
|
3776
|
+
}) => void | any): void;
|
|
3777
|
+
removeEventListener(type: 'zoom', listener: (this: Camera, softZoom: {
|
|
3778
|
+
zoom: number;
|
|
3779
|
+
center: {
|
|
3780
|
+
x: number;
|
|
3781
|
+
y: number;
|
|
3782
|
+
};
|
|
3783
|
+
}) => void | any): void;
|
|
3784
|
+
}
|
|
3785
|
+
|
|
3786
|
+
interface AdvancedFocusParameters {
|
|
3787
|
+
minFocusDistanceLimit: number;
|
|
3788
|
+
maxFocusDistanceLimit: number;
|
|
3789
|
+
firstStepWaitDuration: number;
|
|
3790
|
+
coarseStepWaitDuration: number;
|
|
3791
|
+
switchStepWaitDuration: number;
|
|
3792
|
+
fineStepWaitDuration: number;
|
|
3793
|
+
maxStepCount: number;
|
|
3794
|
+
/** value < 0 means no never */
|
|
3795
|
+
backToContinousDuration: number;
|
|
3796
|
+
/** The focus width and height, 0 ~ 1, represents the ratio of the length to the `Math.min(video.videoWidth, video.videoHeight)` */
|
|
3797
|
+
focusWH: number;
|
|
3798
|
+
/** From far to near, 0 ~ 1. The closer to 1, the more sensitive but more slow. */
|
|
3799
|
+
coarseTuneRate: number;
|
|
3800
|
+
/**
|
|
3801
|
+
* 0 ~ 1.
|
|
3802
|
+
* When the correct focus is closer, the far focus contrast data is unreliable
|
|
3803
|
+
* and requires a certain degree of error tolerance.
|
|
3804
|
+
* When closer to 1, it will be more sensitive to contrast changes and may also cause the focus to be too far.
|
|
3805
|
+
* When closer to 0, there will be more error tolerance,
|
|
3806
|
+
* and it may also cause the focus to be too close and the process to be too slow.
|
|
3807
|
+
**/
|
|
3808
|
+
coarseTuneTolerance: number;
|
|
3809
|
+
/** From near to far, 1 ~ 1.xx. The closer to 1, the more sensitive but more slow. */
|
|
3810
|
+
fineTuneRate: number;
|
|
3811
|
+
}
|
|
3812
|
+
declare namespace Camera {
|
|
3813
|
+
function _getImageContrast(data: Uint8Array | Uint8ClampedArray, width: number, height: number): number;
|
|
3814
|
+
}
|
|
3815
|
+
interface Camera {
|
|
3816
|
+
_enableTapToFocus: false | 'simple' | 'experimental-advanced';
|
|
3817
|
+
_isFocusing: boolean;
|
|
3818
|
+
_tapToFocusListner: ((this: HTMLElement, ev: PointerEvent) => any) | null;
|
|
3819
|
+
_simpleFocus(): Promise<void>;
|
|
3820
|
+
_advancedFocusParameters: AdvancedFocusParameters;
|
|
3821
|
+
_advancedFocusTaskId: number;
|
|
3822
|
+
_advancedFocus(center?: {
|
|
3823
|
+
x: number;
|
|
3824
|
+
y: number;
|
|
3825
|
+
}, width?: number, height?: number): Promise<void>;
|
|
3826
|
+
get enableTapToFocus(): false | "simple" | "experimental-advanced";
|
|
3827
|
+
set enableTapToFocus(value: false | 'simple' | 'experimental-advanced');
|
|
3828
|
+
}
|
|
3829
|
+
|
|
3830
|
+
interface AutoTorchParameters {
|
|
3831
|
+
shortDelay: number;
|
|
3832
|
+
longDelay: number;
|
|
3833
|
+
shortLongDelaySwitchCount: number;
|
|
3834
|
+
/** 0 ~ 255 */
|
|
3835
|
+
grayThreshold: number;
|
|
3836
|
+
maxDarkCount: number;
|
|
3837
|
+
}
|
|
3838
|
+
|
|
3839
|
+
interface Camera {
|
|
3840
|
+
get isSupportTorch(): boolean;
|
|
3841
|
+
_isTorchOn: boolean | undefined;
|
|
3842
|
+
/** `undefined` means in auto torch mode */
|
|
3843
|
+
get isTorchOn(): boolean | undefined;
|
|
3844
|
+
turnOnTorch(): Promise<void>;
|
|
3845
|
+
turnOffTorch(): Promise<void>;
|
|
3846
|
+
_autoTorchParameters: AutoTorchParameters;
|
|
3847
|
+
/**
|
|
3848
|
+
* Detect how dark the picture and turn on torch automatically.
|
|
3849
|
+
* After camera open, it may take a few seconds for picture to be ready.
|
|
3850
|
+
* So it's suggested not to `turnAutoTorch()` immediately.
|
|
3851
|
+
* Waiting for 3 seconds may bring a better user experience.
|
|
3852
|
+
**/
|
|
3853
|
+
turnAutoTorch(): void;
|
|
3854
|
+
/** The auto torch logic detected that the image was too dark and turn on the torch. */
|
|
3855
|
+
addEventListener(type: 'torchAutoOn', listener: (this: Camera) => void | any): void;
|
|
3856
|
+
removeEventListener(type: 'torchAutoOn', listener: (this: Camera) => void | any): void;
|
|
3857
|
+
}
|
|
3858
|
+
|
|
3859
|
+
|
|
3860
|
+
interface Camera {
|
|
3861
|
+
_shouldCloseWhenHide: boolean;
|
|
3862
|
+
_isDuringCloseWhenHide: boolean;
|
|
3863
|
+
_isOpenBeforeHide: boolean;
|
|
3864
|
+
_maxReopenTry4CloseWhenHide: number;
|
|
3865
|
+
get shouldCloseWhenHide(): boolean;
|
|
3866
|
+
set shouldCloseWhenHide(value: boolean);
|
|
3867
|
+
_closeWhenHide(): Promise<void>;
|
|
3868
|
+
_closeWhenHideListener: EventListener | null;
|
|
3869
|
+
_bindCloseWhenHide(): void;
|
|
3870
|
+
_unbindCloseWhenHide(): void;
|
|
3871
|
+
}
|
|
3872
|
+
declare namespace Camera {
|
|
3873
|
+
let _id4CloseWhenNotInDOM: number;
|
|
3874
|
+
let _stMSBNotInDOMCamera: Set<Camera>;
|
|
3875
|
+
}
|
|
3876
|
+
interface Camera {
|
|
3877
|
+
_id4CloseWhenNotInDOM: number;
|
|
3878
|
+
_shouldCloseWhenNotInDOM: boolean;
|
|
3879
|
+
_bClosedBecauseOfNotInDOM: boolean;
|
|
3880
|
+
/**
|
|
3881
|
+
* After turn on `shouldCloseWhenNotInDOM`:
|
|
3882
|
+
* 1. Once a camera insert into DOM, if the camera leave DOM, it auto close.
|
|
3883
|
+
* 2. Once a mediaStream-binded camera insert into DOM, or a already in DOM camera is opened,
|
|
3884
|
+
* we call this camera as A,
|
|
3885
|
+
* Other cameras who is not in DOM and created before A, will be closed.
|
|
3886
|
+
*/
|
|
3887
|
+
get shouldCloseWhenNotInDOM(): boolean;
|
|
3888
|
+
set shouldCloseWhenNotInDOM(value: boolean);
|
|
3889
|
+
_updateMo4CloseWhenNotInDOM(): void;
|
|
3890
|
+
_mo4CloseWhenNotInDOM: MutationObserver | null;
|
|
3891
|
+
}
|
|
3892
|
+
declare namespace Camera {
|
|
3893
|
+
function showFilePicker(inputOptions?: {
|
|
3894
|
+
accept?: string;
|
|
3895
|
+
multiple: boolean;
|
|
3896
|
+
capture?: 'user' | 'environment' | '';
|
|
3897
|
+
onchange?: (this: HTMLInputElement, ev: Event) => any;
|
|
3898
|
+
}): Promise<File[]>;
|
|
3899
|
+
function showFilePicker(inputOptions?: any): Promise<File[]>;
|
|
3900
|
+
let filePicker2CanvasMaxWH: number;
|
|
3901
|
+
function showFilePicker2Canvas(inputOptions?: {
|
|
3902
|
+
accept?: string;
|
|
3903
|
+
multiple: boolean;
|
|
3904
|
+
capture?: 'user' | 'environment' | '';
|
|
3905
|
+
onchange?: (this: HTMLInputElement, ev: Event) => any;
|
|
3906
|
+
canvasMaxWH?: number;
|
|
3907
|
+
}): Promise<HTMLCanvasElement[]>;
|
|
3908
|
+
function showFilePicker2Canvas(inputOptions?: any): Promise<HTMLCanvasElement[]>;
|
|
3909
|
+
}
|
|
3910
|
+
|
|
3911
|
+
/**
|
|
3912
|
+
* Return `Element` if possible, otherwise return `DocumentFragment`.
|
|
3913
|
+
*/
|
|
3914
|
+
declare const stringToHtml: (str: string, config?: {
|
|
3915
|
+
inlineScript2Blob?: boolean;
|
|
3916
|
+
internalCss2Blob: boolean;
|
|
3917
|
+
insertInternalCss2ExistedSheet?: boolean;
|
|
3918
|
+
}) => Node;
|
|
3919
|
+
|
|
3920
|
+
declare class FramePipeline {
|
|
3921
|
+
camera?: Camera;
|
|
3922
|
+
_ctx: CanvasRenderingContext2D;
|
|
3923
|
+
_data?: Uint8Array<ArrayBuffer> | null;
|
|
3924
|
+
_dataTime: number;
|
|
3925
|
+
_x?: number;
|
|
3926
|
+
_y?: number;
|
|
3927
|
+
_w?: number;
|
|
3928
|
+
_h?: number;
|
|
3929
|
+
_type?: 'rgba' | 'gray' | 'r' | 'g' | 'b';
|
|
3930
|
+
maxTimeout: number;
|
|
3931
|
+
_pipeTaskId: any;
|
|
3932
|
+
isSaveOriginalRgba: boolean;
|
|
3933
|
+
/**
|
|
3934
|
+
* The `originalRgba` share `ArrayBuffer` with the `data` returned by `getData(..., type: 'rgba')`.
|
|
3935
|
+
* So you should be careful when transferring `data` to other thread.
|
|
3936
|
+
*/
|
|
3937
|
+
originalRgba?: Uint8ClampedArray<ArrayBuffer> | null;
|
|
3938
|
+
constructor(camera?: Camera);
|
|
3939
|
+
_getData(): Uint8Array<ArrayBuffer>;
|
|
3940
|
+
/**
|
|
3941
|
+
* @param config
|
|
3942
|
+
* Each parameter should be kept as stable as possible.
|
|
3943
|
+
* If you need to switch between multiple parameters frequently, please create multiple `FramePipeline` instances.
|
|
3944
|
+
*
|
|
3945
|
+
* `x`, `y`, `width`, `height` will be rounded.
|
|
3946
|
+
* Note that the round method takes the effect of `x` into account when rounding `width` to minimize the cumulative error.
|
|
3947
|
+
* The same logic applies to `height`.
|
|
3948
|
+
*/
|
|
3949
|
+
getData(config?: {
|
|
3950
|
+
x?: number;
|
|
3951
|
+
y?: number;
|
|
3952
|
+
width?: number;
|
|
3953
|
+
height?: number;
|
|
3954
|
+
type?: 'rgba' | 'gray' | 'r' | 'g' | 'b';
|
|
3955
|
+
}): Uint8Array | null;
|
|
3956
|
+
}
|
|
3957
|
+
|
|
3958
|
+
declare class Beep {
|
|
3959
|
+
_stAudioFree: Set<HTMLAudioElement>;
|
|
3960
|
+
_stAudioPlaying: Set<HTMLAudioElement>;
|
|
3961
|
+
_timeLastPlay: number;
|
|
3962
|
+
_bWarnedMaxTrack: boolean;
|
|
3963
|
+
maxPlayingBeep: number;
|
|
3964
|
+
beepSoundSource: string;
|
|
3965
|
+
beep(): void;
|
|
3966
|
+
}
|
|
3967
|
+
/**
|
|
3968
|
+
* The function will play the default beep sound.
|
|
3969
|
+
* To play different beep sound, you need create another `Beep` instance.
|
|
3970
|
+
**/
|
|
3971
|
+
declare const beep: () => void;
|
|
3972
|
+
declare const vibrate: (duration?: number) => void;
|
|
3973
|
+
|
|
3974
|
+
declare const CameraEnhancerModule: {
|
|
3975
|
+
getVersion(): string;
|
|
3976
|
+
};
|
|
3977
|
+
declare const CameraEnhancer: typeof Camera;
|
|
3978
|
+
type CameraEnhancer = Camera;
|
|
3979
|
+
declare const CameraView: typeof Camera;
|
|
3980
|
+
type CameraView = Camera;
|
|
3981
|
+
declare namespace Camera {
|
|
3982
|
+
function createInstance(_?: any): Promise<CameraEnhancer>;
|
|
3983
|
+
function testCameraAccess(): Promise<{
|
|
3984
|
+
ok: boolean;
|
|
3985
|
+
message?: string;
|
|
3986
|
+
}>;
|
|
3987
|
+
let defaultUIElementURL: string;
|
|
3988
|
+
let onWarning: any;
|
|
3989
|
+
}
|
|
3990
|
+
interface Camera {
|
|
3991
|
+
isCameraEnhancer: true;
|
|
3992
|
+
disposed: boolean;
|
|
3993
|
+
dispose(): void;
|
|
3994
|
+
_cameraEnhancer: CameraEnhancer;
|
|
3995
|
+
_cameraView: CameraView;
|
|
3996
|
+
_dceLastDeviceId: any;
|
|
3997
|
+
_dceLastResolution: any;
|
|
3998
|
+
cameraOpenTimeout: any;
|
|
3999
|
+
_bAutoSingleFrameModeWhenIosPwaFail: boolean;
|
|
4000
|
+
_oriOpen(): Promise<void>;
|
|
4001
|
+
open(): Promise<void | {
|
|
4002
|
+
deviceId: string;
|
|
4003
|
+
width: number;
|
|
4004
|
+
height: number;
|
|
4005
|
+
}>;
|
|
4006
|
+
_oriUpdateCanvasSize(): void;
|
|
4007
|
+
_oriAddCanvas(): HTMLCanvasElement;
|
|
4008
|
+
getAllCameras(): Promise<{
|
|
4009
|
+
deviceId: string;
|
|
4010
|
+
label: string;
|
|
4011
|
+
}[]>;
|
|
4012
|
+
getAvailableResolutions(): Promise<{
|
|
4013
|
+
width: number;
|
|
4014
|
+
height: number;
|
|
4015
|
+
}[]>;
|
|
4016
|
+
getCameraState(): 'opening' | 'open' | 'closed';
|
|
4017
|
+
getResolution(): {
|
|
4018
|
+
width: number;
|
|
4019
|
+
height: number;
|
|
4020
|
+
};
|
|
4021
|
+
getSelectedCamera(): {
|
|
4022
|
+
deviceId: string;
|
|
4023
|
+
label: string;
|
|
4024
|
+
};
|
|
4025
|
+
getVideoSettings(): MediaStreamConstraints;
|
|
4026
|
+
_ifSaveLastUsedCamera: boolean;
|
|
4027
|
+
get ifSaveLastUsedCamera(): boolean;
|
|
4028
|
+
set ifSaveLastUsedCamera(value: boolean);
|
|
4029
|
+
get ifSkipCameraInspection(): boolean;
|
|
4030
|
+
set ifSkipCameraInspection(value: boolean);
|
|
4031
|
+
isOpen(): boolean;
|
|
4032
|
+
isPaused(): boolean;
|
|
4033
|
+
resume(): Promise<void>;
|
|
4034
|
+
selectCamera(device: string | {
|
|
4035
|
+
deviceId: string;
|
|
4036
|
+
label: string;
|
|
4037
|
+
}): Promise<{
|
|
4038
|
+
deviceId: string;
|
|
4039
|
+
width: number;
|
|
4040
|
+
height: number;
|
|
4041
|
+
}>;
|
|
4042
|
+
setResolution(resolution: {
|
|
4043
|
+
width: number;
|
|
4044
|
+
height: number;
|
|
4045
|
+
}): Promise<{
|
|
4046
|
+
deviceId: string;
|
|
4047
|
+
width: number;
|
|
4048
|
+
height: number;
|
|
4049
|
+
}>;
|
|
4050
|
+
updateVideoSettings(constraints: MediaStreamConstraints): Promise<void>;
|
|
4051
|
+
_dceVideoSrc: string;
|
|
4052
|
+
get videoSrc(): string;
|
|
4053
|
+
set videoSrc(value: string | null);
|
|
4054
|
+
_dceEnhancedFeatures: any;
|
|
4055
|
+
_dceAutoZoomRange: {
|
|
4056
|
+
min: number;
|
|
4057
|
+
max: number;
|
|
4058
|
+
};
|
|
4059
|
+
disableEnhancedFeatures(feature: any): void;
|
|
4060
|
+
enableEnhancedFeatures(feature: any): void;
|
|
4061
|
+
getCameraSettings(): MediaTrackSettings;
|
|
4062
|
+
getCapabilities(): MediaTrackCapabilities;
|
|
4063
|
+
getColorTemperature(): number;
|
|
4064
|
+
getExposureCompensation(): number;
|
|
4065
|
+
getFrameRate(): number;
|
|
4066
|
+
setColorTemperature(value: number): Promise<void>;
|
|
4067
|
+
setExposureCompensation(value: number): Promise<void>;
|
|
4068
|
+
setFrameRate(value: number): Promise<void>;
|
|
4069
|
+
getZoomSettings(): {
|
|
4070
|
+
factor: number;
|
|
4071
|
+
};
|
|
4072
|
+
_oriSetZoom(zoom: number): Promise<void>;
|
|
4073
|
+
_dceZoom: number;
|
|
4074
|
+
setZoom(settings: {
|
|
4075
|
+
factor: number;
|
|
4076
|
+
}): Promise<void>;
|
|
4077
|
+
resetZoom(): void;
|
|
4078
|
+
_dceFocusSettings: any;
|
|
4079
|
+
getFocusSettings(): {
|
|
4080
|
+
mode: string;
|
|
4081
|
+
} | {
|
|
4082
|
+
mode: 'manual';
|
|
4083
|
+
distance: number;
|
|
4084
|
+
} | {
|
|
4085
|
+
mode: 'manual';
|
|
4086
|
+
area: {
|
|
4087
|
+
centerPoint: {
|
|
4088
|
+
x: string;
|
|
4089
|
+
y: string;
|
|
4090
|
+
};
|
|
4091
|
+
width?: string;
|
|
4092
|
+
height?: string;
|
|
4093
|
+
};
|
|
4094
|
+
};
|
|
4095
|
+
setFocus(settings: {
|
|
4096
|
+
mode: string;
|
|
4097
|
+
} | {
|
|
4098
|
+
mode: 'manual';
|
|
4099
|
+
distance: number;
|
|
4100
|
+
} | {
|
|
4101
|
+
mode: 'manual';
|
|
4102
|
+
area: {
|
|
4103
|
+
centerPoint: {
|
|
4104
|
+
x: string;
|
|
4105
|
+
y: string;
|
|
4106
|
+
};
|
|
4107
|
+
width?: string;
|
|
4108
|
+
height?: string;
|
|
4109
|
+
};
|
|
4110
|
+
}): Promise<void>;
|
|
4111
|
+
setAutoZoomRange(value: {
|
|
4112
|
+
min: number;
|
|
4113
|
+
max: number;
|
|
4114
|
+
}): void;
|
|
4115
|
+
getAutoZoomRange(): {
|
|
4116
|
+
min: number;
|
|
4117
|
+
max: number;
|
|
4118
|
+
};
|
|
4119
|
+
toggleMirroring(enable: boolean): void;
|
|
4120
|
+
_framePipeline: FramePipeline;
|
|
4121
|
+
fetchImage(): {
|
|
4122
|
+
bytes: Uint8Array;
|
|
4123
|
+
width: number;
|
|
4124
|
+
height: number;
|
|
4125
|
+
stride: number;
|
|
4126
|
+
format: any;
|
|
4127
|
+
toCanvas(): HTMLCanvasElement;
|
|
4128
|
+
};
|
|
4129
|
+
getImage(): {
|
|
4130
|
+
bytes: Uint8Array;
|
|
4131
|
+
width: number;
|
|
4132
|
+
height: number;
|
|
4133
|
+
stride: number;
|
|
4134
|
+
format: any;
|
|
4135
|
+
toCanvas(): HTMLCanvasElement;
|
|
4136
|
+
};
|
|
4137
|
+
_dceScanRegion: {
|
|
4138
|
+
x: number;
|
|
4139
|
+
y: number;
|
|
4140
|
+
width: number;
|
|
4141
|
+
height: number;
|
|
4142
|
+
isMeasuredInPercentage?: boolean;
|
|
4143
|
+
} | {
|
|
4144
|
+
left: number;
|
|
4145
|
+
top: number;
|
|
4146
|
+
right: number;
|
|
4147
|
+
bottom: number;
|
|
4148
|
+
isMeasuredInPercentage?: boolean;
|
|
4149
|
+
};
|
|
4150
|
+
getScanRegion(): {
|
|
4151
|
+
x: number;
|
|
4152
|
+
y: number;
|
|
4153
|
+
width: number;
|
|
4154
|
+
height: number;
|
|
4155
|
+
isMeasuredInPercentage?: boolean;
|
|
4156
|
+
} | {
|
|
4157
|
+
left: number;
|
|
4158
|
+
top: number;
|
|
4159
|
+
right: number;
|
|
4160
|
+
bottom: number;
|
|
4161
|
+
isMeasuredInPercentage?: boolean;
|
|
4162
|
+
};
|
|
4163
|
+
hasNextImageToFetch(): boolean;
|
|
4164
|
+
isBufferEmpty(): boolean;
|
|
4165
|
+
startFetching(): void;
|
|
4166
|
+
_pixelFormat: number;
|
|
4167
|
+
getPixelFormat(): number;
|
|
4168
|
+
setPixelFormat(format: number): void;
|
|
4169
|
+
_colourChannelUsageType: number;
|
|
4170
|
+
setColourChannelUsageType(format: number): void;
|
|
4171
|
+
getColourChannelUsageType(): number;
|
|
4172
|
+
setScanRegion(region?: {
|
|
4173
|
+
x: number;
|
|
4174
|
+
y: number;
|
|
4175
|
+
width: number;
|
|
4176
|
+
height: number;
|
|
4177
|
+
isMeasuredInPercentage?: boolean;
|
|
4178
|
+
} | {
|
|
4179
|
+
left: number;
|
|
4180
|
+
top: number;
|
|
4181
|
+
right: number;
|
|
4182
|
+
bottom: number;
|
|
4183
|
+
isMeasuredInPercentage?: boolean;
|
|
4184
|
+
}): void;
|
|
4185
|
+
stopFetching(): void;
|
|
4186
|
+
takePhoto(listener: (dceFrame: {
|
|
4187
|
+
bytes: Uint8Array;
|
|
4188
|
+
width: number;
|
|
4189
|
+
height: number;
|
|
4190
|
+
stride: number;
|
|
4191
|
+
format: any;
|
|
4192
|
+
toCanvas(): HTMLCanvasElement;
|
|
4193
|
+
}) => void): Promise<{
|
|
4194
|
+
bytes: Uint8Array;
|
|
4195
|
+
width: number;
|
|
4196
|
+
height: number;
|
|
4197
|
+
stride: number;
|
|
4198
|
+
format: any;
|
|
4199
|
+
toCanvas(): HTMLCanvasElement;
|
|
4200
|
+
}>;
|
|
4201
|
+
addImageToBuffer: any;
|
|
4202
|
+
clearBuffer: any;
|
|
4203
|
+
getBufferOverflowProtectionMode: any;
|
|
4204
|
+
getImageCount: any;
|
|
4205
|
+
getImageFetchInterval: any;
|
|
4206
|
+
getMaxImageCount: any;
|
|
4207
|
+
hasImage: any;
|
|
4208
|
+
setBufferOverflowProtectionMode: any;
|
|
4209
|
+
setErrorListener: any;
|
|
4210
|
+
setImageFetchInterval: any;
|
|
4211
|
+
setMaxImageCount: any;
|
|
4212
|
+
setNextImageToReturn: any;
|
|
4213
|
+
_dceSettingsBeforeSingleFrameMode: any;
|
|
4214
|
+
_singleFrameMode: "disabled" | "camera" | "image";
|
|
4215
|
+
_singleFrameModeClickCallback: any;
|
|
4216
|
+
_singleFrameModeResultForDcv: DCEFrame | null;
|
|
4217
|
+
_singleFrameModeCvs: HTMLCanvasElement | null;
|
|
4218
|
+
_singleFrameModeUIAutoFitRO: ResizeObserver | undefined;
|
|
4219
|
+
get singleFrameMode(): "disabled" | "camera" | "image";
|
|
4220
|
+
set singleFrameMode(value: "disabled" | "camera" | "image");
|
|
4221
|
+
_singleFrameModeObjectFit: 'contain' | 'cover' | 'fill';
|
|
4222
|
+
_singleFrameModeUpdateObjectFit(): void;
|
|
4223
|
+
setCameraView(view: CameraView): void;
|
|
4224
|
+
getCameraView(): CameraView;
|
|
4225
|
+
getVideoEl(): HTMLVideoElement;
|
|
4226
|
+
convertToPageCoordinates(point: {
|
|
4227
|
+
x: number;
|
|
4228
|
+
y: number;
|
|
4229
|
+
}): {
|
|
4230
|
+
x: number;
|
|
4231
|
+
y: number;
|
|
4232
|
+
};
|
|
4233
|
+
convertToClientCoordinates(point: {
|
|
4234
|
+
x: number;
|
|
4235
|
+
y: number;
|
|
4236
|
+
}): {
|
|
4237
|
+
x: number;
|
|
4238
|
+
y: number;
|
|
4239
|
+
};
|
|
4240
|
+
convertToScanRegionCoordinates(point: {
|
|
4241
|
+
x: number;
|
|
4242
|
+
y: number;
|
|
4243
|
+
}): {
|
|
4244
|
+
x: number;
|
|
4245
|
+
y: number;
|
|
4246
|
+
};
|
|
4247
|
+
convertToContainCoordinates(point: {
|
|
4248
|
+
x: number;
|
|
4249
|
+
y: number;
|
|
4250
|
+
}): {
|
|
4251
|
+
x: number;
|
|
4252
|
+
y: number;
|
|
4253
|
+
};
|
|
4254
|
+
_dceEventListeners: {
|
|
4255
|
+
[key: string]: Set<Function>;
|
|
4256
|
+
};
|
|
4257
|
+
on(eventName: string, listener: Function): void;
|
|
4258
|
+
off(eventName: string, listener: Function): void;
|
|
4259
|
+
_dceMNIsBeepBarcode: boolean;
|
|
4260
|
+
_dceMNIsVibrateBarcode: boolean;
|
|
4261
|
+
getUIElement(): HTMLElement;
|
|
4262
|
+
setUIElement(ui: HTMLDivElement | string): Promise<void>;
|
|
4263
|
+
getVideoElement(): HTMLVideoElement;
|
|
4264
|
+
setVideoFit(fit: 'contain' | 'cover' | 'fill'): void;
|
|
4265
|
+
getVideoFit(): 'contain' | 'cover' | 'fill';
|
|
4266
|
+
getVisibleRegionOfVideo(options?: {
|
|
4267
|
+
inPixels?: boolean;
|
|
4268
|
+
}): {
|
|
4269
|
+
x: number;
|
|
4270
|
+
y: number;
|
|
4271
|
+
width: number;
|
|
4272
|
+
height: number;
|
|
4273
|
+
isMeasuredInPercentage?: boolean;
|
|
4274
|
+
};
|
|
4275
|
+
_dceRegionMaskStyle: {
|
|
4276
|
+
lineWidth: number;
|
|
4277
|
+
strokeStyle: string;
|
|
4278
|
+
fillStyle: string;
|
|
4279
|
+
};
|
|
4280
|
+
setScanRegionMaskStyle(style: {
|
|
4281
|
+
lineWidth: number;
|
|
4282
|
+
strokeStyle: string;
|
|
4283
|
+
fillStyle: string;
|
|
4284
|
+
}): void;
|
|
4285
|
+
getScanRegionMaskStyle(): {
|
|
4286
|
+
lineWidth: number;
|
|
4287
|
+
strokeStyle: string;
|
|
4288
|
+
fillStyle: string;
|
|
4289
|
+
};
|
|
4290
|
+
_dceRegionMaskVisible: boolean;
|
|
4291
|
+
setScanRegionMaskVisible(visible: boolean): void;
|
|
4292
|
+
isScanRegionMaskVisible(): boolean;
|
|
4293
|
+
setScanLaserVisible(visible: boolean): void;
|
|
4294
|
+
isScanLaserVisible(): boolean;
|
|
4295
|
+
setPowerByMessageVisible(visible: boolean): void;
|
|
4296
|
+
isPowerByMessageVisible(): boolean;
|
|
4297
|
+
_dceTipDuration: number;
|
|
4298
|
+
_dceTipMessage: string;
|
|
4299
|
+
getTipConfig(): TipConfig;
|
|
4300
|
+
setTipConfig(tipConfig: TipConfig): void;
|
|
4301
|
+
setTipVisible(visible: boolean): void;
|
|
4302
|
+
isTipVisible(): boolean;
|
|
4303
|
+
updateTipMessage(message: string): void;
|
|
4304
|
+
_drawingLayers: DrawingLayer[];
|
|
4305
|
+
createDrawingLayer(): DrawingLayer;
|
|
4306
|
+
getDrawingLayer(id: number): DrawingLayer;
|
|
4307
|
+
getAllDrawingLayers(): DrawingLayer[];
|
|
4308
|
+
clearUserDefinedDrawingLayers(): void;
|
|
4309
|
+
deleteUserDefinedDrawingLayer(id: number): void;
|
|
4310
|
+
clearAllInnerDrawingItems(_?: boolean): void;
|
|
4311
|
+
_capturedResultReceiver: any;
|
|
4312
|
+
}
|
|
4313
|
+
declare function _bufferToCanvas(uint8Array: Uint8Array, width: number, height: number, format: number): HTMLCanvasElement;
|
|
4314
|
+
declare class Feedback {
|
|
4315
|
+
static _beepInstance: Beep;
|
|
4316
|
+
static beep(): void;
|
|
4317
|
+
static get beepSoundSource(): string;
|
|
4318
|
+
static set beepSoundSource(value: string);
|
|
4319
|
+
static vibrate(): void;
|
|
4320
|
+
static vibrateDuration: number;
|
|
4321
|
+
}
|
|
4322
|
+
declare const DrawingStyleManager: {
|
|
4323
|
+
STYLE_BLUE_STROKE: any;
|
|
4324
|
+
STYLE_GREEN_STROKE: any;
|
|
4325
|
+
STYLE_ORANGE_STROKE: any;
|
|
4326
|
+
STYLE_YELLOW_STROKE: any;
|
|
4327
|
+
STYLE_BLUE_STROKE_FILL: any;
|
|
4328
|
+
STYLE_GREEN_STROKE_FILL: any;
|
|
4329
|
+
STYLE_ORANGE_STROKE_FILL: any;
|
|
4330
|
+
STYLE_YELLOW_STROKE_FILL: any;
|
|
4331
|
+
STYLE_BLUE_STROKE_TRANSPARENT: any;
|
|
4332
|
+
STYLE_GREEN_STROKE_TRANSPARENT: any;
|
|
4333
|
+
STYLE_ORANGE_STROKE_TRANSPARENT: any;
|
|
4334
|
+
STYLE_YELLOW_STROKE_TRANSPARENT: any;
|
|
4335
|
+
createDrawingStyle(style: any): any;
|
|
4336
|
+
getDrawingStyle(id: any): any;
|
|
4337
|
+
getAllDrawingStyles(): any[];
|
|
4338
|
+
updateDrawingStyle(id: any, style: any): void;
|
|
4339
|
+
};
|
|
4340
|
+
declare class DrawingLayer {
|
|
4341
|
+
_visible: boolean;
|
|
4342
|
+
_dce: CameraView;
|
|
4343
|
+
_ctx: CanvasRenderingContext2D;
|
|
4344
|
+
_defaultStyle: any;
|
|
4345
|
+
_drawingItems: DrawingItem[];
|
|
4346
|
+
_mode: 'editor' | 'viewer';
|
|
4347
|
+
_editorView: any;
|
|
4348
|
+
_extraEditorView: any;
|
|
4349
|
+
_renderTask: any;
|
|
4350
|
+
_newSelectedDrawingItems: DrawingItem[];
|
|
4351
|
+
_newDeselectedDrawingItems: DrawingItem[];
|
|
4352
|
+
_selectionChangedTask: any;
|
|
4353
|
+
_onSelectionChanged?: (newSelectedDrawingItems: DrawingItem[], newDeselectedDrawingItems: DrawingItem[]) => void;
|
|
4354
|
+
getId(): this;
|
|
4355
|
+
isVisible(): boolean;
|
|
4356
|
+
setVisible(value: boolean): void;
|
|
4357
|
+
setDefaultStyle(drawingStyleId: any, _1?: any, _2?: any): void;
|
|
4358
|
+
addDrawingItems(drawingItems: DrawingItem[]): void;
|
|
4359
|
+
removeDrawingItems(drawingItems: DrawingItem[]): void;
|
|
4360
|
+
setDrawingItems(drawingItems: DrawingItem[]): void;
|
|
4361
|
+
getDrawingItems(filter?: (drawingItem: DrawingItem) => boolean): DrawingItem[];
|
|
4362
|
+
hasDrawingItem(drawingItem: DrawingItem): boolean;
|
|
4363
|
+
getSelectedDrawingItems(): any;
|
|
4364
|
+
clearDrawingItems(): void;
|
|
4365
|
+
_delayRenderAll(): void;
|
|
4366
|
+
renderAll(): void;
|
|
4367
|
+
getMode(): "editor" | "viewer";
|
|
4368
|
+
setMode(mode: 'editor' | 'viewer'): Promise<void>;
|
|
4369
|
+
_delaySelectionChanged(): void;
|
|
4370
|
+
get onSelectionChanged(): ((newSelectedDrawingItems: DrawingItem[], newDeselectedDrawingItems: DrawingItem[]) => void) | undefined;
|
|
4371
|
+
set onSelectionChanged(value: ((newSelectedDrawingItems: DrawingItem[], newDeselectedDrawingItems: DrawingItem[]) => void) | undefined);
|
|
4372
|
+
}
|
|
4373
|
+
/**
|
|
4374
|
+
* Determines if a point is inside a quadrilateral.
|
|
4375
|
+
* @param {number[]} point - [x, y] coordinates of the point.
|
|
4376
|
+
* @param {number[][]} polygon - Array of points [[x0, y0], [x1, y1], [x2, y2], [x3, y3]].
|
|
4377
|
+
* @returns {boolean} - True if the point is inside.
|
|
4378
|
+
*/
|
|
4379
|
+
declare function _isPointInPolygon(point: number[], polygon: number[][]): boolean;
|
|
4380
|
+
/**
|
|
4381
|
+
* Calculates the shortest distance from a point to a line segment.
|
|
4382
|
+
* @param {number[]} p - The point [x, y]
|
|
4383
|
+
* @param {number[][]} segment - The segment [[x1, y1], [x2, y2]]
|
|
4384
|
+
* @returns {number} The shortest distance
|
|
4385
|
+
*/
|
|
4386
|
+
declare function _distToSegment(p: number[], segment: number[][]): number;
|
|
4387
|
+
declare class DrawingItem {
|
|
4388
|
+
coordinateBase: string;
|
|
4389
|
+
drawingLayerId: any;
|
|
4390
|
+
drawingStyleId: any;
|
|
4391
|
+
mediaType: EnumDrawingItemMediaType;
|
|
4392
|
+
_notes: Note[];
|
|
4393
|
+
_bSelected: boolean;
|
|
4394
|
+
_dceEventListeners: {
|
|
4395
|
+
[key: string]: Set<Function>;
|
|
4396
|
+
};
|
|
4397
|
+
get _ps(): {
|
|
4398
|
+
x: number;
|
|
4399
|
+
y: number;
|
|
4400
|
+
}[];
|
|
4401
|
+
getState(): EnumDrawingItemState;
|
|
4402
|
+
addNote(note: Note, replace?: boolean): void;
|
|
4403
|
+
getNote(name: string): Note | null;
|
|
4404
|
+
getNotes(): Note[];
|
|
4405
|
+
hasNote(name: string): boolean;
|
|
4406
|
+
updateNote(name: string, content: any, isMergeContent?: boolean): void;
|
|
4407
|
+
deleteNote(name: string): void;
|
|
4408
|
+
clearNotes(): void;
|
|
4409
|
+
_delayRenderAll(): void;
|
|
4410
|
+
_setSelected(value: boolean): void;
|
|
4411
|
+
on(type: string, listener: Function): void;
|
|
4412
|
+
off(type: string, listener: Function): void;
|
|
4413
|
+
}
|
|
4414
|
+
declare class LineDrawingItem extends DrawingItem {
|
|
4415
|
+
line: {
|
|
4416
|
+
startPoint: {
|
|
4417
|
+
x: number;
|
|
4418
|
+
y: number;
|
|
4419
|
+
};
|
|
4420
|
+
endPoint: {
|
|
4421
|
+
x: number;
|
|
4422
|
+
y: number;
|
|
4423
|
+
};
|
|
4424
|
+
};
|
|
4425
|
+
get _ps(): {
|
|
4426
|
+
x: number;
|
|
4427
|
+
y: number;
|
|
4428
|
+
}[];
|
|
4429
|
+
constructor(line: {
|
|
4430
|
+
startPoint: {
|
|
4431
|
+
x: number;
|
|
4432
|
+
y: number;
|
|
4433
|
+
};
|
|
4434
|
+
endPoint: {
|
|
4435
|
+
x: number;
|
|
4436
|
+
y: number;
|
|
4437
|
+
};
|
|
4438
|
+
}, drawingStyleId?: any);
|
|
4439
|
+
getLine(): {
|
|
4440
|
+
startPoint: {
|
|
4441
|
+
x: number;
|
|
4442
|
+
y: number;
|
|
4443
|
+
};
|
|
4444
|
+
endPoint: {
|
|
4445
|
+
x: number;
|
|
4446
|
+
y: number;
|
|
4447
|
+
};
|
|
4448
|
+
};
|
|
4449
|
+
setLine(value: {
|
|
4450
|
+
startPoint: {
|
|
4451
|
+
x: number;
|
|
4452
|
+
y: number;
|
|
4453
|
+
};
|
|
4454
|
+
endPoint: {
|
|
4455
|
+
x: number;
|
|
4456
|
+
y: number;
|
|
4457
|
+
};
|
|
4458
|
+
}): void;
|
|
4459
|
+
}
|
|
4460
|
+
declare class QuadDrawingItem extends DrawingItem {
|
|
4461
|
+
quad: {
|
|
4462
|
+
points: {
|
|
4463
|
+
x: number;
|
|
4464
|
+
y: number;
|
|
4465
|
+
}[];
|
|
4466
|
+
};
|
|
4467
|
+
get _ps(): {
|
|
4468
|
+
x: number;
|
|
4469
|
+
y: number;
|
|
4470
|
+
}[];
|
|
4471
|
+
constructor(quad: {
|
|
4472
|
+
points: {
|
|
4473
|
+
x: number;
|
|
4474
|
+
y: number;
|
|
4475
|
+
}[];
|
|
4476
|
+
}, drawingStyleId?: any);
|
|
4477
|
+
getQuad(): {
|
|
4478
|
+
points: {
|
|
4479
|
+
x: number;
|
|
4480
|
+
y: number;
|
|
4481
|
+
}[];
|
|
4482
|
+
};
|
|
4483
|
+
setQuad(value: {
|
|
4484
|
+
points: {
|
|
4485
|
+
x: number;
|
|
4486
|
+
y: number;
|
|
4487
|
+
}[];
|
|
4488
|
+
}): void;
|
|
4489
|
+
}
|
|
4490
|
+
declare class RectDrawingItem extends DrawingItem {
|
|
4491
|
+
rect: {
|
|
4492
|
+
x: number;
|
|
4493
|
+
y: number;
|
|
4494
|
+
width: number;
|
|
4495
|
+
height: number;
|
|
4496
|
+
};
|
|
4497
|
+
get _ps(): {
|
|
4498
|
+
x: number;
|
|
4499
|
+
y: number;
|
|
4500
|
+
}[];
|
|
4501
|
+
constructor(rect: {
|
|
4502
|
+
x: number;
|
|
4503
|
+
y: number;
|
|
4504
|
+
width: number;
|
|
4505
|
+
height: number;
|
|
4506
|
+
}, drawingStyleId?: any);
|
|
4507
|
+
getRect(): {
|
|
4508
|
+
x: number;
|
|
4509
|
+
y: number;
|
|
4510
|
+
width: number;
|
|
4511
|
+
height: number;
|
|
4512
|
+
};
|
|
4513
|
+
setRect(value: {
|
|
4514
|
+
x: number;
|
|
4515
|
+
y: number;
|
|
4516
|
+
width: number;
|
|
4517
|
+
height: number;
|
|
4518
|
+
}): void;
|
|
4519
|
+
}
|
|
4520
|
+
declare class TextDrawingItem extends DrawingItem {
|
|
4521
|
+
text: string;
|
|
4522
|
+
rect: {
|
|
4523
|
+
x: number;
|
|
4524
|
+
y: number;
|
|
4525
|
+
width: number;
|
|
4526
|
+
height: number;
|
|
4527
|
+
};
|
|
4528
|
+
get _ps(): {
|
|
4529
|
+
x: number;
|
|
4530
|
+
y: number;
|
|
4531
|
+
}[];
|
|
4532
|
+
constructor(text: string, rect: {
|
|
4533
|
+
x: number;
|
|
4534
|
+
y: number;
|
|
4535
|
+
width: number;
|
|
4536
|
+
height: number;
|
|
4537
|
+
}, drawingStyleId?: any);
|
|
4538
|
+
getText(): string;
|
|
4539
|
+
setText(value: string): void;
|
|
4540
|
+
getTextRect(): {
|
|
4541
|
+
x: number;
|
|
4542
|
+
y: number;
|
|
4543
|
+
width: number;
|
|
4544
|
+
height: number;
|
|
4545
|
+
};
|
|
4546
|
+
setTextRect(value: {
|
|
4547
|
+
x: number;
|
|
4548
|
+
y: number;
|
|
4549
|
+
width: number;
|
|
4550
|
+
height: number;
|
|
4551
|
+
}): void;
|
|
4552
|
+
}
|
|
4553
|
+
declare class ImageDrawingItem extends DrawingItem {
|
|
4554
|
+
image: HTMLImageElement | HTMLCanvasElement | HTMLVideoElement;
|
|
4555
|
+
rect: {
|
|
4556
|
+
x: number;
|
|
4557
|
+
y: number;
|
|
4558
|
+
width: number;
|
|
4559
|
+
height: number;
|
|
4560
|
+
};
|
|
4561
|
+
maintainAspectRatio: boolean;
|
|
4562
|
+
get _ps(): {
|
|
4563
|
+
x: number;
|
|
4564
|
+
y: number;
|
|
4565
|
+
}[];
|
|
4566
|
+
constructor(image: {
|
|
4567
|
+
bytes: Uint8Array;
|
|
4568
|
+
width: number;
|
|
4569
|
+
height: number;
|
|
4570
|
+
stride: number;
|
|
4571
|
+
format: any;
|
|
4572
|
+
} | HTMLImageElement | HTMLCanvasElement | HTMLVideoElement, rect: {
|
|
4573
|
+
x: number;
|
|
4574
|
+
y: number;
|
|
4575
|
+
width: number;
|
|
4576
|
+
height: number;
|
|
4577
|
+
}, maintainAspectRatio: boolean, drawingStyleId?: any);
|
|
4578
|
+
getImage(): HTMLVideoElement | HTMLCanvasElement | HTMLImageElement;
|
|
4579
|
+
setImage(image: {
|
|
4580
|
+
bytes: Uint8Array;
|
|
4581
|
+
width: number;
|
|
4582
|
+
height: number;
|
|
4583
|
+
stride: number;
|
|
4584
|
+
format: any;
|
|
4585
|
+
} | HTMLImageElement | HTMLCanvasElement | HTMLVideoElement): void;
|
|
4586
|
+
getImageRect(): {
|
|
4587
|
+
x: number;
|
|
4588
|
+
y: number;
|
|
4589
|
+
width: number;
|
|
4590
|
+
height: number;
|
|
4591
|
+
};
|
|
4592
|
+
setImageRect(value: {
|
|
4593
|
+
x: number;
|
|
4594
|
+
y: number;
|
|
4595
|
+
width: number;
|
|
4596
|
+
height: number;
|
|
4597
|
+
}): void;
|
|
4598
|
+
}
|
|
4599
|
+
|
|
4600
|
+
declare enum EnumDrawingItemMediaType {
|
|
4601
|
+
/**
|
|
4602
|
+
* Represents a rectangle, a basic geometric shape with four sides where opposite sides are equal in length and it has four right angles.
|
|
4603
|
+
*/
|
|
4604
|
+
DIMT_RECTANGLE = 1,
|
|
4605
|
+
/**
|
|
4606
|
+
* Represents any four-sided figure. This includes squares, rectangles, rhombuses, and more general forms that do not necessarily have right angles or equal sides.
|
|
4607
|
+
*/
|
|
4608
|
+
DIMT_QUADRILATERAL = 2,
|
|
4609
|
+
/**
|
|
4610
|
+
* Represents a text element. This allows for the inclusion of textual content as a distinct drawing item within the graphic representation.
|
|
4611
|
+
*/
|
|
4612
|
+
DIMT_TEXT = 4,
|
|
4613
|
+
/**
|
|
4614
|
+
* Represents an image. This enables embedding bitmap images within the drawing context.
|
|
4615
|
+
*/
|
|
4616
|
+
DIMT_IMAGE = 16,
|
|
4617
|
+
/**
|
|
4618
|
+
* Represents a line segment. This is the simplest form of a drawing item, defined by two endpoints and the straight path connecting them.
|
|
4619
|
+
*/
|
|
4620
|
+
DIMT_LINE = 64
|
|
4621
|
+
}
|
|
4622
|
+
declare enum EnumDrawingItemState {
|
|
4623
|
+
/**
|
|
4624
|
+
* DIS_DEFAULT: The default state of a drawing item. This state indicates that the drawing item is in its normal, unselected state.
|
|
4625
|
+
*/
|
|
4626
|
+
DIS_DEFAULT = 1,
|
|
4627
|
+
/**
|
|
4628
|
+
* DIS_SELECTED: Indicates that the drawing item is currently selected. This state can trigger different behaviors or visual styles, such as highlighting the item to show it is active or the focus of user interaction.
|
|
4629
|
+
*/
|
|
4630
|
+
DIS_SELECTED = 2
|
|
4631
|
+
}
|
|
4632
|
+
declare enum EnumEnhancedFeatures {
|
|
4633
|
+
/**
|
|
4634
|
+
* Enables auto-focus on areas likely to contain barcodes, assisting in their identification and interpretation.
|
|
4635
|
+
*/
|
|
4636
|
+
EF_ENHANCED_FOCUS = 4,
|
|
4637
|
+
/**
|
|
4638
|
+
* Facilitates automatic zooming in on areas likely to contain barcodes, aiding in their detection and decoding.
|
|
4639
|
+
*/
|
|
4640
|
+
EF_AUTO_ZOOM = 16,
|
|
4641
|
+
/**
|
|
4642
|
+
* Allows users to tap on a specific item or area in the video feed to focus on, simplifying the interaction for selecting or highlighting important elements.
|
|
4643
|
+
*/
|
|
4644
|
+
EF_TAP_TO_FOCUS = 64
|
|
4645
|
+
}
|
|
4646
|
+
declare enum EnumPixelFormat {
|
|
4647
|
+
GREY = "grey",
|
|
4648
|
+
GREY32 = "grey32",
|
|
4649
|
+
RGBA = "rgba",
|
|
4650
|
+
RBGA = "rbga",
|
|
4651
|
+
GRBA = "grba",
|
|
4652
|
+
GBRA = "gbra",
|
|
4653
|
+
BRGA = "brga",
|
|
4654
|
+
BGRA = "bgra"
|
|
4655
|
+
}
|
|
4656
|
+
interface Resolution {
|
|
4657
|
+
width: number;
|
|
4658
|
+
height: number;
|
|
4659
|
+
}
|
|
4660
|
+
interface DCEFrame {
|
|
4661
|
+
bytes: Uint8Array;
|
|
4662
|
+
width: number;
|
|
4663
|
+
height: number;
|
|
4664
|
+
stride: number;
|
|
4665
|
+
format: any;
|
|
4666
|
+
toCanvas(): HTMLCanvasElement;
|
|
4667
|
+
}
|
|
4668
|
+
interface DrawingStyle {
|
|
4669
|
+
fillStyle?: string;
|
|
4670
|
+
lineWidth?: number;
|
|
4671
|
+
paintMode?: string;
|
|
4672
|
+
strokeStyle?: string;
|
|
4673
|
+
}
|
|
4674
|
+
interface PlayCallbackInfo {
|
|
4675
|
+
deviceId: string;
|
|
4676
|
+
width: number;
|
|
4677
|
+
height: number;
|
|
4678
|
+
}
|
|
4679
|
+
interface VideoDeviceInfo {
|
|
4680
|
+
deviceId: string;
|
|
4681
|
+
label: string;
|
|
4682
|
+
}
|
|
4683
|
+
interface VideoFrameTag {
|
|
4684
|
+
/** The unique identifier of the image. */
|
|
4685
|
+
imageId: number;
|
|
4686
|
+
/** The type of the image. */
|
|
4687
|
+
type: any;
|
|
4688
|
+
/** Indicates whether the video frame is cropped. */
|
|
4689
|
+
isCropped: boolean;
|
|
4690
|
+
/** The region based on which the original frame was cropped. If `isCropped` is false, the region covers the entire original image. */
|
|
4691
|
+
cropRegion: any;
|
|
4692
|
+
/** The original width of the video frame before any cropping. */
|
|
4693
|
+
originalWidth: number;
|
|
4694
|
+
/** The original height of the video frame before any cropping. */
|
|
4695
|
+
originalHeight: number;
|
|
4696
|
+
/** The current width of the video frame after cropping. */
|
|
4697
|
+
currentWidth: number;
|
|
4698
|
+
/** The current height of the video frame after cropping. */
|
|
4699
|
+
currentHeight: number;
|
|
4700
|
+
/** The time spent acquiring the frame, in milliseconds. */
|
|
4701
|
+
timeSpent: number;
|
|
4702
|
+
/** The timestamp marking the completion of the frame acquisition. */
|
|
4703
|
+
timeStamp: number;
|
|
4704
|
+
}
|
|
4705
|
+
interface TipConfig {
|
|
4706
|
+
/** The top left point of the tip message box. */
|
|
4707
|
+
topLeftPoint?: any;
|
|
4708
|
+
/** The width of the tip message box. */
|
|
4709
|
+
width?: number;
|
|
4710
|
+
/** The display duration of the tip in milliseconds. */
|
|
4711
|
+
duration: number;
|
|
4712
|
+
/** The base coordinate system used (e.g., "view" or "image"). */
|
|
4713
|
+
coordinateBase?: "view" | "image";
|
|
4714
|
+
}
|
|
4715
|
+
interface Note {
|
|
4716
|
+
/** The name of the note. */
|
|
4717
|
+
name: string;
|
|
4718
|
+
/** The content of the note, can be of any type. */
|
|
4719
|
+
content: any;
|
|
4720
|
+
}
|
|
4721
|
+
|
|
4722
|
+
export { Beep, Camera, CameraEnhancer, CameraEnhancerModule, CameraView, DrawingItem, DrawingLayer, DrawingStyleManager, EnumDrawingItemMediaType, EnumDrawingItemState, EnumEnhancedFeatures, EnumPixelFormat, Feedback, FramePipeline, ImageDrawingItem, LineDrawingItem, QuadDrawingItem, RectDrawingItem, TextDrawingItem, _bufferToCanvas, _distToSegment, _isPointInPolygon, beep, stringToHtml, vibrate };
|
|
4723
|
+
export type { CameraInfo, CameraPreset, CameraStatus, CameraZsFunc, DCEFrame, DMMoreMediaTrackCapabilities, DrawingStyle, Note, PlayCallbackInfo, Resolution, TipConfig, VideoDeviceInfo, VideoFrameTag };
|
|
4724
|
+
|