Skip to content

Commit fcfd82e

Browse files
committed
Update DCV SDK
1 parent 1d1c374 commit fcfd82e

55 files changed

Lines changed: 117 additions & 14 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

dcv/include/DynamsoftBarcodeReader.h

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ typedef void* HANDLE;
1818

1919
#include "DynamsoftCore.h"
2020

21-
#define DBR_VERSION "11.0.30.4532"
21+
#define DBR_VERSION "11.0.60.5318"
2222

2323
/**Enumeration section*/
2424

@@ -38,7 +38,7 @@ enum BarcodeFormat : unsigned long long
3838
/**Use the default barcode format settings*/
3939
BF_DEFAULT = 0xFE3BFFFF,
4040

41-
/**Combined value of BF_CODABAR, BF_CODE_128, BF_CODE_39, BF_CODE_39_Extended, BF_CODE_93, BF_EAN_13, BF_EAN_8, INDUSTRIAL_25, BF_ITF, BF_UPC_A, BF_UPC_E, BF_MSI_CODE; */
41+
/**Combined value of BF_CODABAR, BF_CODE_128, BF_CODE_39, BF_CODE_39_Extended, BF_CODE_93, BF_EAN_13, BF_EAN_8, INDUSTRIAL_25, BF_ITF, BF_UPC_A, BF_UPC_E, BF_MSI_CODE, BF_CODE_11; */
4242
BF_ONED = 0x003007FF,
4343

4444
/**Combined value of BF_GS1_DATABAR_OMNIDIRECTIONAL, BF_GS1_DATABAR_TRUNCATED, BF_GS1_DATABAR_STACKED, BF_GS1_DATABAR_STACKED_OMNIDIRECTIONAL, BF_GS1_DATABAR_EXPANDED, BF_GS1_DATABAR_EXPANDED_STACKED, BF_GS1_DATABAR_LIMITED*/
@@ -156,7 +156,7 @@ enum BarcodeFormat : unsigned long long
156156
*/
157157
BF_TELEPEN_NUMERIC = 0x4000000000,
158158

159-
/**Combined value of BF2_USPSINTELLIGENTMAIL, BF2_POSTNET, BF2_PLANET, BF2_AUSTRALIANPOST, BF2_RM4SCC.*/
159+
/**Combined value of BF_USPSINTELLIGENTMAIL, BF_POSTNET, BF_PLANET, BF_AUSTRALIANPOST, BF_RM4SCC, BF_KIX.*/
160160
BF_POSTALCODE = 0x3F0000000000000,
161161

162162
/**Nonstandard barcode */
@@ -1345,6 +1345,9 @@ namespace dynamsoft
13451345
* @return Returns 0 if successful, otherwise returns a negative value.
13461346
*/
13471347
virtual int SetDecodedBarcode(const CDecodedBarcodeElement* element, const double matrixToOriginalImage[9] = IDENTITY_MATRIX) = 0;
1348+
1349+
1350+
virtual int RemoveDecodedBarcode(int index) = 0;
13481351
};
13491352
}
13501353

@@ -1465,7 +1468,6 @@ namespace dynamsoft
14651468
*
14661469
*/
14671470
virtual int SetLocation(const CQuadrilateral& location) = 0;
1468-
14691471
};
14701472

14711473
/**

dcv/include/DynamsoftCaptureVisionRouter.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
#include "DynamsoftCodeParser.h"
2828
//#endif
2929

30-
#define DCV_VERSION "3.0.30.4532"
30+
#define DCV_VERSION "3.0.60.5318"
3131

3232
/**Enumeration section*/
3333

dcv/include/DynamsoftCodeParser.h

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#endif
1212
#include "DynamsoftCore.h"
1313

14-
#define DCP_VERSION "3.0.30.4532"
14+
#define DCP_VERSION "3.0.60.5318"
1515
/**
1616
* @enum MappingStatus
1717
*
@@ -58,6 +58,23 @@ namespace dynamsoft
5858
{
5959
#pragma pack(push)
6060
#pragma pack(4)
61+
class CCodeType
62+
{
63+
public:
64+
DCP_API static const char* CT_MRTD_TD1_ID; //"MRTD_TD1_ID"
65+
DCP_API static const char* CT_MRTD_TD2_ID; //"MRTD_TD2_ID"
66+
DCP_API static const char* CT_MRTD_TD2_VISA; //"MRTD_TD2_VISA"
67+
DCP_API static const char* CT_MRTD_TD3_PASSPORT; //"MRTD_TD3_PASSPORT"
68+
DCP_API static const char* CT_MRTD_TD3_VISA; //"MRTD_TD3_VISA"
69+
DCP_API static const char* CT_MRTD_TD2_FRENCH_ID; //"MRTD_TD2_FRENCH_ID"
70+
DCP_API static const char* CT_AAMVA_DL_ID; //"AAMVA_DL_ID"
71+
DCP_API static const char* CT_AAMVA_DL_ID_WITH_MAG_STRIPE; //"AAMVA_DL_ID_WITH_MAG_STRIPE"
72+
DCP_API static const char* CT_SOUTH_AFRICA_DL; //"SOUTH_AFRICA_DL"
73+
DCP_API static const char* CT_AADHAAR; //"AADHAAR"
74+
DCP_API static const char* CT_VIN; //"VIN"
75+
DCP_API static const char* CT_GS1_AI; //"GS1_AI"
76+
};
77+
6178
/**
6279
* The `CParsedResultItem` class represents a item parsed by code parser sdk. It is derived from `CCapturedResultItem`.
6380
*
@@ -127,6 +144,25 @@ namespace dynamsoft
127144
*
128145
*/
129146
virtual const char* GetFieldRawValue(const char* fieldName) const = 0;
147+
148+
/**
149+
* Gets the total number of parsed fields.
150+
*
151+
* @return Returns an integer representing the count of parsed fields.
152+
*
153+
*/
154+
virtual int GetFieldCount() const = 0;
155+
156+
/**
157+
* Gets the name of a specific parsed field by its index.
158+
*
159+
* @param [in] index The index of the parsed field.
160+
*
161+
* @return Returns a string representing the specified field name. If the field is nested, the name includes all parent fields, separated by a dot (.).
162+
* The format follows this pattern: <root_field>[.<child_field1>[.<child_field2>...]]
163+
*
164+
*/
165+
virtual const char* GetFieldName(int index) const = 0;
130166
};
131167

132168
/**

dcv/include/DynamsoftCore.h

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#pragma once
2-
#define DYNAMSOFT_CORE_VERSION "4.0.30.4532"
2+
#define DYNAMSOFT_CORE_VERSION "4.0.60.5318"
33

44
/**Enumeration section*/
55

@@ -201,6 +201,9 @@ typedef enum ErrorCode {
201201
/**The rectangle is invalid.*/
202202
EC_RECT_INVALID = -10080,
203203

204+
/*The template version is incompatible. Please use a compatible template.*/
205+
EC_TEMPLATE_VERSION_INCOMPATIBLE = -10081,
206+
204207
/** -20000~-29999: DLS license error code. */
205208
/**No license.*/
206209
EC_NO_LICENSE = -20000,
@@ -237,7 +240,13 @@ typedef enum ErrorCode {
237240

238241
/**Online license validation failed due to network issues.Using cached license information for validation.*/
239242
EC_LICENSE_CACHE_USED = -20012,
240-
243+
244+
/*License authentication failed: quota exceeded.*/
245+
EC_LICENSE_AUTH_QUOTA_EXCEEDED = -20013,
246+
247+
/**License restriction: the number of results has exceeded the allowed limit.*/
248+
EC_LICENSE_RESULTS_LIMIT_EXCEEDED = -20014,
249+
241250
/**Failed to reach License Server.*/
242251
EC_FAILED_TO_REACH_DLS = -20200,
243252

@@ -313,7 +322,7 @@ typedef enum ErrorCode {
313322

314323

315324
/**-50000~-59999: DDN error code*/
316-
/*The quardrilateral is invalid*/
325+
/*The quadrilateral is invalid*/
317326
EC_QUADRILATERAL_INVALID = -50057,
318327

319328
/**The document normalizer license is not found.*/
@@ -1995,6 +2004,7 @@ namespace dynamsoft
19952004
* @return Returns a pointer to a copy of the captured result item.
19962005
*/
19972006
virtual CCapturedResultItem* Clone() const = 0;
2007+
19982008
};
19992009

20002010
/**

dcv/include/DynamsoftDocumentNormalizer.h

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
#include "DynamsoftCore.h"
1717

18-
#define DDN_VERSION "3.0.30.4532"
18+
#define DDN_VERSION "3.0.60.5318"
1919

2020
/**Enums section*/
2121

@@ -560,6 +560,8 @@ namespace dynamsoft
560560
* @return Returns 0 if successful, otherwise returns a negative value.
561561
*/
562562
virtual int SetDeskewedImage(const CDeskewedImageElement* element, const double matrixToOriginalImage[9] = IDENTITY_MATRIX) = 0;
563+
564+
virtual int RemoveDeskewedImage() = 0;
563565
};
564566

565567
class DDN_API CEnhancedImageUnit : public CIntermediateResultUnit
@@ -587,6 +589,8 @@ namespace dynamsoft
587589
* @return Returns 0 if successful, otherwise returns a negative value.
588590
*/
589591
virtual int SetEnhancedImage(const CEnhancedImageElement* element) = 0;
592+
593+
virtual int RemoveEnhancedImage() = 0;
590594
};
591595
}
592596

@@ -635,6 +639,7 @@ namespace dynamsoft
635639
*
636640
*/
637641
virtual void SetCrossVerificationStatus(CrossVerificationStatus status) = 0;
642+
638643
};
639644

640645
/**
@@ -691,6 +696,7 @@ namespace dynamsoft
691696
* coordinates from the original image to the local image.
692697
*/
693698
virtual void GetOriginalToLocalMatrix(double matrix[9]) const = 0;
699+
694700
};
695701

696702
/**
@@ -723,6 +729,7 @@ namespace dynamsoft
723729
* coordinates from the original image to the local image.
724730
*/
725731
virtual void GetOriginalToLocalMatrix(double matrix[9]) const = 0;
732+
726733
};
727734

728735
/**

dcv/include/DynamsoftImageProcessing.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
#endif
1414
#include "DynamsoftCore.h"
1515

16-
#define DIP_VERSION "3.0.30.4532"
16+
#define DIP_VERSION "3.0.60.5318"
1717

1818
namespace dynamsoft
1919
{

dcv/include/DynamsoftLabelRecognizer.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
#include "DynamsoftCore.h"
1616

17-
#define DLR_VERSION "4.0.30.4532"
17+
#define DLR_VERSION "4.0.60.5318"
1818

1919
/**
2020
* @enum RawTextLineStatus
@@ -256,6 +256,7 @@ namespace dynamsoft
256256
* @return Returns 0 if success, otherwise an error code.
257257
*/
258258
virtual int SetLocation(const CQuadrilateral& location) = 0;
259+
259260
};
260261

261262
/**
@@ -711,6 +712,7 @@ namespace dynamsoft
711712
*
712713
*/
713714
virtual int SetLocation(const CQuadrilateral& location) = 0;
715+
714716
};
715717

716718
/**

dcv/include/DynamsoftLicense.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#pragma once
22

3-
#define DYNAMSOFT_LICENSE_VERSION "4.0.30.4532"
3+
#define DYNAMSOFT_LICENSE_VERSION "4.0.60.5318"
44

55
#if !defined(_WIN32) && !defined(_WIN64)
66
#define LIC_API __attribute__((visibility("default")))

dcv/include/DynamsoftUtility.h

Lines changed: 47 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
#endif
1414

1515
#include"DynamsoftCaptureVisionRouter.h"
16-
#define DISA_VERSION "2.0.30.4532"
16+
#define DISA_VERSION "2.0.60.5318"
1717

1818
#ifdef __cplusplus
1919

@@ -452,6 +452,31 @@ namespace dynamsoft {
452452
* @return Returns 0 if succeeds, nonzero otherwise.
453453
*/
454454
int SaveToMemory(const CImageData* pImageData, ImageFileFormat imageFormat, unsigned char** imageFileBytes, int* imageFileBytesLength);
455+
456+
457+
/**
458+
* Reads an image from a Base64-encoded string.
459+
*
460+
* @param [in] base64String A null-terminated string containing the Base64-encoded image data.
461+
* @param [out] pErrorCode A pointer to an integer to receive the error code, if any. Defaults to NULL.
462+
*
463+
* @return Returns a pointer to a CImageData object representing the image if successful, or nullptr if an error occurs.
464+
* @remarks If the file format is gif, pdf or tiff, we read the first page of the image file.The caller is responsible for freeing the memory allocated for the image.
465+
*/
466+
CImageData* ReadFromBase64String(const char* base64String, int* pErrorCode = NULL);
467+
468+
469+
/**
470+
* Saves an image to a Base64-encoded string.
471+
*
472+
* @param [in] pImageData A pointer to the image data to be saved.
473+
* @param [in] imageFormat The image file format to be saved.
474+
* @param [out] base64String A pointer to a char* that will hold the Base64-encoded string.
475+
*
476+
* @return Returns an integer indicating the success of the operation. 0 indicates success, while a non-zero value indicates an error occurred.
477+
* @remarks The caller is responsible for freeing the memory allocated for the Base64-encoded string.
478+
*/
479+
int SaveToBase64String(const CImageData* pImageData, ImageFileFormat imageFormat, char** base64String);
455480
};
456481

457482
class UTIL_API CImageDrawer {
@@ -501,7 +526,28 @@ namespace dynamsoft {
501526
* If the specified rectangle or quadrilateral exceeds the image boundaries, white will be used to fill the exceeding area.
502527
*/
503528
CImageData* CropImage(const CImageData* pImageData, const CRect& rect, int* pErrorCode = NULL);
529+
/**
530+
* Announced as deprecated. Use CropAndDeskewImage instead.
531+
*/
504532
CImageData* CropImage(const CImageData* pImageData, const CQuadrilateral& quad, int* pErrorCode = NULL);
533+
534+
/**
535+
* Crops and deskews a region from the input image based on the specified quadrilateral.
536+
* @param [in] imageData The source image to be cropped and deskewed.
537+
* @param [in] quad A quadrilateral defining the region of interest to extract.
538+
* @param [in] dstWidth (Optional) The width of the output image. If set to 0, the width and height will be automatically calculated.
539+
* @param [in] dstHeight (Optional) The height of the output image. If set to 0, the width and height will be automatically calculated.
540+
* @param [in] padding (Optional) Extra padding (in pixels) applied to expand the boundaries of the extracted region. Default is 0.
541+
* @param [out] errorCode The error code.
542+
*
543+
* @return Returns a pointer to a new CImageData object containing the cropped and deskewed image.
544+
*
545+
* @remarks The caller is responsible for freeing the memory allocated for the cropped image.
546+
* The function will automatically calculate the perspective transform matrix and use it to crop the image.
547+
* If the specified quadrilateral exceeds the image boundaries, white will be used to fill the exceeding area.
548+
*/
549+
CImageData* CropAndDeskewImage(const CImageData* pImageData, const CQuadrilateral& quad,
550+
int dstWidth = 0, int dstHeight = 0, int padding = 0, int* pErrorCode = NULL);
505551
/**
506552
* Adjusts the brightness of the image.
507553
* @param pImageData: Input colour image.

0 commit comments

Comments
 (0)