CVB++ 15.0
c_code_reader.h
1#pragma once
2
3#if defined __GNUC__ && !defined CVB_SHOW_WARNINGS
4# pragma GCC system_header
5#endif // __GNUC__
6
7#include <cstddef>
8#include <cstdint>
9
10#include "../namespace.hpp"
11
12#include "c_img.h"
13
14namespace Cvb
15{
16
17CVB_BEGIN_INLINE_NS
18
19namespace CExports
20{
21
22#pragma region Symbology enums
23 // Configuration
24 enum CVCRSymbologies
25 {
26 CVCRS_DataMatrix = 101, // P_ENABLE_DM 101
27 CVCRS_QR = 102, // P_ENABLE_QR_2005 102
28 CVCRS_Aztec = 103, // P_ENABLE_AZ 103
29 CVCRS_MaxiCode = 104, // P_ENABLE_MAXICODE 104
30 CVCRS_PDF417 = 105, // P_ENABLE_PDF 105
31 CVCRS_MicroPDF417 = 106, // P_ENABLE_MICRO_PDF 106
32 CVCRS_CCA = 107, // P_ENABLE_CCA 107
33 CVCRS_CCB = 108, // P_ENABLE_CCB 108
34 CVCRS_CCC = 109, // P_ENABLE_CCC 109
35 CVCRS_Code128 = 110, // P_ENABLE_C128 110
36 CVCRS_Code39 = 111, // P_ENABLE_C39 111
37 CVCRS_Code93 = 112, // P_ENABLE_C93 112
38 CVCRS_Interleaved2of5 = 113, // P_ENABLE_I25 113
39 CVCRS_Codabar = 114, // P_ENABLE_CBAR 114
40 CVCRS_UPCA = 115, // P_ENABLE_UPCA 115
41 CVCRS_UPCE = 116, // P_ENABLE_UPCE 116
42 CVCRS_EAN13 = 117, // P_ENABLE_EAN13 117
43 CVCRS_EAN8 = 118, // P_ENABLE_EAN8 118
44 CVCRS_GS1DataBar14 = 119, // P_ENABLE_DB_14 119
45 CVCRS_GS1DataBarStacked = 120, // P_ENABLE_DB_14_STACKED 120
46 CVCRS_GS1DataBarLimited = 121, // P_ENABLE_DB_LIMITED 121
47 CVCRS_GS1DataBarExpanded = 122, // P_ENABLE_DB_EXPANDED 122
48 CVCRS_GS1DataBarExpandedStacked = 123, // P_ENABLE_DB_EXPANDED_STACKED 123
49 CVCRS_HanXin = 127, // P_ENABLE_HX 127
50 CVCRS_MicroQR = 128, // P_ENABLE_MICRO_QR 128
51 CVCRS_QRModel1 = 129, // P_ENABLE_QR_MODEL1 129
52 CVCRS_GridMatrix = 130, // P_ENABLE_GM 130
53 CVCRS_DotCode = 133, // P_ENABLE_DC 133
54 CVCRS_Code11 = 140, // P_ENABLE_C11 140
55 CVCRS_Code32 = 141, // P_ENABLE_C32 141
56 CVCRS_Plessey = 142, // P_ENABLE_PLE 142
57 CVCRS_MSIPlessey = 143, // P_ENABLE_MSI_PLE 143
58 CVCRS_Telepen = 144, // P_ENABLE_TLP 144
59 CVCRS_Trioptic = 145, // P_ENABLE_TRI 145
60 CVCRS_Pharmacode = 146, // P_ENABLE_PHA 146
61 CVCRS_Matrix2of5 = 147, // P_ENABLE_M25 147
62 CVCRS_Straight2of5 = 148, // P_ENABLE_S25 148
63 CVCRS_Code49 = 149, // P_ENABLE_C49 149
64 CVCRS_Code16K = 150, // P_ENABLE_C16K 150
65 CVCRS_CodablockF = 151, // P_ENABLE_CBLK 151
66 CVCRS_HongKong2of5 = 152, // P_ENABLE_HK25 152
67 CVCRS_USPSPostnet = 153, // P_ENABLE_POSTNET 153
68 CVCRS_USPSPlanet = 154, // P_ENABLE_PLANET 154
69 CVCRS_USPSIntelligentMail = 155, // P_ENABLE_INTEL_MAIL 155
70 CVCRS_UPUIDTags = 156, // P_ENABLE_UPU 156
71 CVCRS_AustralianPost = 157, // P_ENABLE_AUSTRA_POST 157
72 CVCRS_DutchPost = 158, // P_ENABLE_DUTCH_POST 158
73 CVCRS_JapanPost = 159, // P_ENABLE_JAPAN_POST 159
74 CVCRS_RoyalMail = 160, // P_ENABLE_ROYAL_MAIL 160
75 CVCRS_KoreaPost = 161, // P_ENABLE_KOREA_POST 161
76 CVCRS_NEC2of5 = 162, // P_ENABLE_NEC25 162
77 CVCRS_IATA2of5 = 163, // P_ENABLE_IATA25 163
78 CVCRS_CanadaPost = 164, // P_ENABLE_CANADA_POST 164
79 CVCRS_TLC39 = 166 // P_ENABLE_TLC39 166
80 };
81
82 // Result
83 enum CVCRValueSymbology
84 {
85 CVCRVS_GoCode = (1 << 0), // V_SYMB_GC (1 << 0)
86 CVCRVS_DataMatrix = (1 << 1), // V_SYMB_DM (1 << 1)
87 CVCRVS_QR = (1 << 2), // V_SYMB_QR_2005 (1 << 2)
88 CVCRVS_Aztec = (1 << 3), // V_SYMB_AZ (1 << 3)
89 CVCRVS_MaxiCode = (1 << 4), // V_SYMB_MC (1 << 4)
90 CVCRVS_PDF417 = (1 << 5), // V_SYMB_PDF (1 << 5)
91 CVCRVS_MicroPDF417 = (1 << 6), // V_SYMB_MPDF (1 << 6)
92 CVCRVS_CCA = (1 << 7), // V_SYMB_CCA (1 << 7)
93 CVCRVS_CCB = (1 << 8), // V_SYMB_CCB (1 << 8)
94 CVCRVS_CCC = (1 << 9), // V_SYMB_CCC (1 << 9)
95 CVCRVS_Code39 = (1 << 10), // V_SYMB_C39 (1 << 10)
96 CVCRVS_Interleaved2of5 = (1 << 11), // V_SYMB_I25 (1 << 11)
97 CVCRVS_CodaBar = (1 << 12), // V_SYMB_CBAR (1 << 12)
98 CVCRVS_Code128 = (1 << 13), // V_SYMB_C128 (1 << 13)
99 CVCRVS_Code93 = (1 << 14), // V_SYMB_C93 (1 << 14)
100 CVCRVS_UPCA = (1 << 15), // V_SYMB_UPCA (1 << 15)
101 CVCRVS_UPCE = (1 << 16), // V_SYMB_UPCE (1 << 16)
102 CVCRVS_EAN13 = (1 << 17), // V_SYMB_EAN13 (1 << 17)
103 CVCRVS_EAN8 = (1 << 18), // V_SYMB_EAN8 (1 << 18)
104 CVCRVS_GS1DataBar14 = (1 << 19), // V_SYMB_DB_14 (1 << 19)
105 CVCRVS_GS1DataBar14Stacked = (1 << 20), // V_SYMB_DB_14_STA (1 << 20)
106 CVCRVS_GS1DataBar14Limited = (1 << 21), // V_SYMB_DB_LIM (1 << 21)
107 CVCRVS_GS1DataBar14Expanded = (1 << 22), // V_SYMB_DB_EXP (1 << 22)
108 CVCRVS_GS1DataBar14ExpandedStacked = (1 << 23), // V_SYMB_DB_EXP_STA (1 << 23)
109 CVCRVS_HanXin = (1 << 24), // V_SYMB_HX (1 << 24)
110 CVCRVS_MicroQR = (1 << 25), // V_SYMB_QR_MICRO (1 << 25)
111 CVCRVS_QRModel1 = (1 << 26), // V_SYMB_QR_MODEL1 (1 << 26)
112 CVCRVS_GridMatrix = (1 << 27), // V_SYMB_GM (1 << 27)
113 CVCRVS_DotCode = (1 << 28), // V_SYMB_DC (1 << 28)
114 CVCRVS_QRConfigCode = (1 << 29), // V_SYMB_QR_CONFIG_CODE (1 << 29) (not documented)
115 CVCRVS_CustumNC = (1 << 30) // V_SYMB_CUSTOM_NC (1 << 30) (not documented)
116 };
117
118 enum CVCRValueSymbologyEx
119 {
120 CVCRVSE_Extended = 0, // V_SYMB_EXTENDED 0
121 CVCRVSE_Code11 = (1 << 0), // V_SYMB_C11 (1 << 0)
122 CVCRVSE_Code32 = (1 << 1), // V_SYMB_C32 (1 << 1)
123 CVCRVSE_Plessey = (1 << 2), // V_SYMB_PLE (1 << 2)
124 CVCRVSE_MSIPlessey = (1 << 3), // V_SYMB_MSI_PLE (1 << 3)
125 CVCRVSE_Telepen = (1 << 4), // V_SYMB_TLP (1 << 4)
126 CVCRVSE_Trioptic = (1 << 5), // V_SYMB_TRI (1 << 5)
127 CVCRVSE_Pharmacode = (1 << 6), // V_SYMB_PHA (1 << 6)
128 CVCRVSE_Matrix2of5 = (1 << 7), // V_SYMB_M25 (1 << 7)
129 CVCRVSE_Straight2of5 = (1 << 8), // V_SYMB_S25 (1 << 8) // Standard 2of5 with 3 Start/Stop bars
130 CVCRVSE_Code49 = (1 << 9), // V_SYMB_C49 (1 << 9)
131 CVCRVSE_Code16K = (1 << 10), // V_SYMB_C16K (1 << 10)
132 CVCRVSE_CodablockF = (1 << 11), // V_SYMB_CBLK (1 << 11)
133 CVCRVSE_USPSPostnet = (1 << 12), // V_SYMB_POSTNET (1 << 12)
134 CVCRVSE_USPSPlanet = (1 << 13), // V_SYMB_PLANET (1 << 13)
135 CVCRVSE_USPSIntelligentMail = (1 << 14), // V_SYMB_INTEL_MAIL (1 << 14)
136 CVCRVSE_AustralianPost = (1 << 15), // V_SYMB_AUSTRA_POST (1 << 15)
137 CVCRVSE_DutchPost = (1 << 16), // V_SYMB_DUTCH_POST (1 << 16)
138 CVCRVSE_JapanPost = (1 << 17), // V_SYMB_JAPAN_POST (1 << 17)
139 CVCRVSE_RoyalMail = (1 << 18), // V_SYMB_ROYAL_MAIL (1 << 18)
140 CVCRVSE_UPUIDTags = (1 << 19), // V_SYMB_UPU (1 << 19)
141 CVCRVSE_KoreaPost = (1 << 20), // V_SYMB_KOREA_POST (1 << 20)
142 CVCRVSE_HongKong2of5 = (1 << 21), // V_SYMB_HK25 (1 << 21)
143 CVCRVSE_NEC2of5 = (1 << 22), // V_SYMB_NEC25 (1 << 22)
144 CVCRVSE_IATA2of5 = (1 << 23), // V_SYMB_IATA25 (1 << 23) // Standard 2of5 with 2 Start/Stop bars
145 CVCRVSE_CanadaPost = (1 << 24), // V_SYMB_CANADA_POST (1 << 24)
146 CVCRVSE_BC412 = (1 << 25), // V_SYMB_BC412 (1 << 25) (Presently only the IBM version is supported.)
147 CVCRVSE_TLC39 = (1 << 26), // V_SYMB_TLC39 (1 << 26)
148 CVCRVSE_Pro1 = (1 << 31) // V_SYMB_PRO1 (1 << 31) (not documented)
149 };
150#pragma endregion
151
152#pragma region Properties
153 enum CVCRSymbologyPropertiesDataMatrix
154 {
155 CVCRSPDM_Rect = 205, // P_DM_RECT 205
156 CVCRSPDM_Polarity = 209, // P_POLARITY_DM 209
157 CVCRSPDM_Mirror = 217, // P_MIRROR_DM 217
158 CVCRSPDM_RectExtended = 225, // P_DM_RECT_EXTENDED 225
159
160 // Attention: If you enable the following property, it is enabled for QR codes, too!
161 CVCRSPDM_SendEccCodeWords = 268, // P_SEND_ECC_CODEWORDS 268
162
163 CVCRSPDM_MinimumSize = 542, // P_MINIMUM_SIZE_DM 542 /* code size in pixels */
164 CVCRSPDM_MaximumSize = 543, // P_MAXIMUM_SIZE_DM 543 /* code size in pixels */
165 CVCRSPDM_MinFixedPatternQuality = 544, // P_MIN_FIXED_PATTERN_QUALITY_DM 544
166 CVCRSPDM_MinNumModule = 545, // P_MIN_NUM_MODULE_DM 545
167 CVCRSPDM_MaxNumModule = 546, // P_MAX_NUM_MODULE_DM 546
168 CVCRSPDM_MaxModuleSize = 547, // P_MAX_MODULE_SIZE_DM 547 /* Max module size is pixels */
169 CVCRSPDM_MaxLineFilterSize = 548, // P_MAX_LINE_FILTER_SIZE 548 /* Reject non-code lines in image: 0 - 32 pixels */
170 CVCRSPDM_SearchThickBorder = 619 // P_SEARCH_THICK_BORDER_DM 619
171 };
172
173 enum CVCRSymbologyPropertiesQR
174 {
175 CVCRSPQR_Polarity = 210, // P_POLARITY_QR 210 // Note: Not sure, if this applies to QRModel1, too.
176 CVCRSPQR_Mirror = 218, // P_MIRROR_QR 218 // Note: Not sure, if this applies to QRModel1, too.
177
178 // Attention: If you enable the following property, it is enabled for DataMatrix codes, too!
179 CVCRSPQR_SendEccCodeWords = 268, // P_SEND_ECC_CODEWORDS 268
180
181 CVCRSPQR_PreciseCornerQR = 608 // P_PRECISE_CORNER_QR 608
182 };
183
184enum CVCRSymbologyPropertiesUPCE
185 {
186 CVCRSPUE_Expansion = 207, // P_UPC_E_EXPANSION 207
187 CVCRSPUE_StripNumberSystem = 255, // P_STRIP_NUM_SYS_UPCE 255
188 CVCRSPUE_StripChar = 257, // P_STRIP_CHAR_UPCE 257
189
190 // Attention: If you enable the following property, it is enabled for UPCA and
191 // EAN8+13 codes, too!
192 CVCRSPUE_SendAimModifier = 270, // P_SEND_UPC_AIM_MODIFIER 270
193
194 CVCRSPUE_Supplemental2digit = 279, // P_SUPPLEMENT_2_DIGIT_UPCE 279
195 CVCRSPUE_Supplemental5digit = 283, // P_SUPPLEMENT_5_DIGIT_UPCE 283
196 CVCRSPUE_SupplementalAddSpace = 287, // P_SUPPLEMENT_ADD_SPACE_UPCE 287
197 CVCRSPUE_SupplementalRequired = 291, // P_SUPPLEMENT_REQUIRED_UPCE 291
198 CVCRSPUE_UPCE1 = 294, // P_UPC_E1_ENABLED 294
199 CVCRSPUE_RejectUPCEPartial = 613, // P_REJECT_UPCE_PARTIAL_EAN13 613
200
201 // Attention: If you enable the following property, it is enabled for UPCA and
202 // EAN8+13 codes, too!
203 CVCRSPUE_CompositeRequired = 298 // P_COMPOSITE_REQUIRED_UPC_EAN 298
204 };
205
206 enum CVCRSymbologyPropertiesUPCA
207 {
208 CVCRSPUA_ConvertToEAN13 = 250, // P_UPCA_TO_EAN13 250
209 CVCRSPUA_StripNumberSystem = 254, // P_STRIP_NUM_SYS_UPCA 254
210 CVCRSPUA_StripChar = 256, // P_STRIP_CHAR_UPCA 256
211
212 // Attention: If you enable the following property, it is enabled for UPCE and
213 // EAN8+13 codes, too!
214 CVCRSPUA_SendAimModifier = 270, // P_SEND_UPC_AIM_MODIFIER 270
215
216 CVCRSPUA_Supplemental2digit = 278, // P_SUPPLEMENT_2_DIGIT_UPCA 278
217 CVCRSPUA_Supplemental5digit = 282, // P_SUPPLEMENT_5_DIGIT_UPCA 282
218 CVCRSPUA_SupplementalAddSpace = 286, // P_SUPPLEMENT_ADD_SPACE_UPCA 286
219 CVCRSPUA_SupplementalRequired = 290, // P_SUPPLEMENT_REQUIRED_UPCA 290
220
221 // Attention: If you enable the following property, it is enabled for UPCE and
222 // EAN8+13 codes, too!
223 CVCRSPUA_CompositeRequired = 298, // P_COMPOSITE_REQUIRED_UPC_EAN 298
224 };
225
226 enum CVCRSymbologyPropertiesEAN8
227 {
228 CVCRSPE8_ConvertToEAN13 = 251, // P_EAN8_TO_EAN13 251
229 CVCRSPE8_StripChar = 259, // P_STRIP_CHAR_EAN8 259
230
231 // Attention: If you enable the following property, it is enabled for UPCE, UPCA and
232 // EAN13 codes, too!
233 CVCRSPE8_SendAimModifier = 270, // P_SEND_UPC_AIM_MODIFIER 270
234
235 CVCRSPE8_Supplemental2digit = 281, // P_SUPPLEMENT_2_DIGIT_EAN8 281
236 CVCRSPE8_Supplemental5digit = 285, // P_SUPPLEMENT_5_DIGIT_EAN8 285
237 CVCRSPE8_SupplementalAddSpace = 289, // P_SUPPLEMENT_ADD_SPACE_EAN8 289
238 CVCRSPE8_SupplementalRequired = 293, // P_SUPPLEMENT_REQUIRED_EAN8 293
239
240 // Attention: If you enable the following property, it is enabled for UPCE, UPCA and
241 // EAN13 codes, too!
242 CVCRSPE8_CompositeRequired = 298 // P_COMPOSITE_REQUIRED_UPC_EAN 298
243 };
244
245 enum CVCRSymbologyPropertiesEAN13
246 {
247 CVCRSPE13_ConvertBooklandToISBN = 252, // P_BOOKLAND_TO_ISBN 252
248 CVCRSPE13_ConvertBooklandToISSN = 253, // P_BOOKLAND_TO_ISSN 253
249 CVCRSPE13_StripChar = 258, // P_STRIP_CHAR_EAN13 258
250
251 // Attention: If you enable the following property, it is enabled for UPCE, UPCA and
252 // EAN8 codes, too!
253 CVCRSPE13_SendAimModifier = 270, // P_SEND_UPC_AIM_MODIFIER 270
254
255 CVCRSPE13_Supplemental2digit = 280, // P_SUPPLEMENT_2_DIGIT_EAN13 280
256 CVCRSPE13_Supplemental5digit = 284, // P_SUPPLEMENT_5_DIGIT_EAN13 284
257 CVCRSPE13_SupplementalAddSpace = 288, // P_SUPPLEMENT_ADD_SPACE_EAN13 288
258 CVCRSPE13_SupplementalRequired = 292, // P_SUPPLEMENT_REQUIRED_EAN13 292
259
260 // Attention: If you enable the following property, it is enabled for UPCE, UPCA and
261 // EAN8 codes, too!
262 CVCRSPE13_CompositeRequired = 298, // P_COMPOSITE_REQUIRED_UPC_EAN 298
263 };
264
265 enum CVCRSymbologyPropertiesCode128
266 {
267 CVCRSPC128_MinLength = 502, // P_MIN_LENGTH_C128 502
268 CVCRSPC128_MaxLength = 522, // P_MAX_LENGTH_C128 522
269 CVCRSPC128_PoorStartA = 670, // P_C128_POOR_START_A 670
270 CVCRSPC128_PoorStartB = 671, // P_C128_POOR_START_B 671
271 CVCRSPC128_PoorStartC = 672, // P_C128_POOR_START_C 672
272 CVCRSPC128_EnhanceMethod1 = 673, // P_C128_ENHANCE_METHOD_1 673
273 CVCRSPC128_EnhanceMethod2 = 674 // P_C128_ENHANCE_METHOD_2 674
274 };
275
276 enum CVCRSymbologyPropertiesCode39
277 {
278 CVCRSPC39_CheckSum = 200, // P_CHECKSUM_C39 200
279 CVCRSPC39_FullASCII = 203, // P_FULL_ASCII_C39 203
280 CVCRSPC39_SendStartStop = 261, // P_SEND_STARTSTOP_C39 261
281 CVCRSPC39_MinLength = 500, // P_MIN_LENGTH_C39 500
282 CVCRSPC39_MaxLength = 520 // P_MAX_LENGTH_C39 520
283 };
284
285 enum CVCRSymbologyPropertiesCode93
286 {
287 CVCRSPC93_MinLength = 503, // P_MIN_LENGTH_C93 503
288 CVCRSPC93_MaxLength = 523 // P_MAX_LENGTH_C93 523
289 };
290
291enum CVCRSymbologyPropertiesInterleaved2of5
292 {
293 CVCRSPI25_CheckSum = 201, // P_CHECKSUM_I25 201
294 CVCRSPI25_MinLength = 204, // P_MIN_LENGTH_I25 204
295 CVCRSPI25_RejectPartial = 296, // P_REJECT_PARTIAL_I25 296
296 CVCRSPI25_MaxLength = 519 // P_MAX_LENGTH_I25 519
297 };
298
299 enum CVCRSymbologyPropertiesRoyalMail
300 {
301 CVCRSPRM_SendCheckChar = 272 // P_SEND_ROYAL_MAIL_CHECK_CHAR 272
302 };
303
304 enum CVCRSymbologyPropertiesAustraliaPost
305 {
306 CVCRSPAP_StripCheckChars = 273 // P_STRIP_AUSTRALIA_POST_CHECK_CHARS 273
307 };
308
309 enum CVCRSymbologyPropertiesPharmacode
310 {
311 CVCRSPP_MinNumBars = 243, // P_PHARMA_MIN_NUM_BARS 243
312 CVCRSPP_MaxNumBars = 244, // P_PHARMA_MAX_NUM_BARS 244
313 CVCRSPP_MinValue = 245, // P_PHARMA_MIN_VALUE 245
314 CVCRSPP_MaxValue = 246, // P_PHARMA_MAX_VALUE 246
315 CVCRSPP_RevDec = 247, // P_PHARMA_REV_DEC 247 (not documented)
316 CVCRSPP_ColorBars = 248 // P_PHARMA_COLOR_BARS 248 (not documented)
317 };
318
319 enum CVCRSymbologyPropertiesCode11
320 {
321 CVCRSPC11_CheckSum = 239, // P_CHECKSUM_C11 239
322 CVCRSPC11_StripChar = 249 // P_STRIPCHAR_C11 249
323 };
324
325#pragma endregion
326
327#pragma region Performance Properties
328enum CVCRPerformanceProperties
329{
330 CVCRPP_PreprocessType = 43, // P_PREPROCESS_TYPE 43
331 CVCRPP_StopDecode = 301, // P_STOP_DECODE 301 // for callback functions
332 CVCRPP_TimeLimitDecode = 310, // P_TIME_LIMIT_DECODE 310
333 CVCRPP_SecurityLevel = 311, // P_SECURITY_LEVEL 311 // applies only to 1d codes (Code 128, Code
334 // 39, UPC/EAN/JAN, I 2of 5, Codabar, and Code 93.)
335 CVCRPP_TargetTolerancePercent = 313, // P_TARGET_TOLERANCE_PERCENT 313
336 CVCRPP_TargetLocation = 314, // P_TARGET_LOCATION 314 /* ((location_x << 16) + location_y) */
337 CVCRPP_CodeSearchSpeed = 315, // P_CODE_SEARCH_SPEED 315
338 CVCRPP_TimeLimitLocate = 318, // P_TIME_LIMIT_LOCATE 318
339 CVCRPP_EnsureROI = 350, // P_ENSURE_ROI 350
340 CVCRPP_LowContrast = 355, // P_LOW_CONTRAST 355
341 CVCRPP_BasicInkjet = 370, // P_BASIC_INKJET_DPM 370
342 CVCRPP_MultiCodeSpeedUp = 373, // P_MULTICODE_SPEEDUP 373 /* speed up multicode image decoding */
343 CVCRPP_CustomPerformance = 375, // P_CUSTOM_PERFORMANCE 375
344 CVCRPP_DetectorDensity = 376 // P_DETECTOR_DENSITY 376
345};
346
347#pragma region Possible Values for Performance Properties
348// Possible values for property CVCRPerformanceProperties::CVCRPP_PreprocessType (P_PREPROCESS_TYPE)
349enum CVCRPreProcessType
350{
351 CVCRPPT_PreProcNone, /* disabled */
352 CVCRPPT_LowPass1, /* type 1 lowpass filtering used for CustomShortRange, P_HIGH_RES_SINGLE_LENS */
353 CVCRPPT_LowPass2, /* type 2 lowpass filtering used for CustomShortRange, P_HIGH_RES_SINGLE_LENS */
354 CVCRPPT_EnhanceDpmImage, /* enhance dot peen or laser images for CR6000 */
355 CVCRPPT_EnhanceCurvedDotPeen, /* enhanced curved dot peen image for CR6000 */
356 CVCRPPT_Deblur1dMethod1, /* Deblur blurry 1D images captured from mobile phone */
357 CVCRPPT_Deblur1dMethod2, /* Deblur blurry 1D images captured from imaging device */
358 CVCRPPT_ZoomROI, /* Replaced P_ZOOM_ROI */
359 CVCRPPT_Decimate, /* Replaces P_CUSTOM_DECIMATE */
360 CVCRPPT_ErodeDark,
361 CVCRPPT_DilatLight,
362 CVCRPPT_LowPass,
363 CVCRPPT_EnhanceContrast /* Replaces P_ENHANCE_CONTRAST */
364};
365
366// Possible values for property CVCRPerformanceProperties::CVCRPP_SecurityLevel
367enum CVCRDecodeSecurityLevel
368{
369 CVCRDSL_0, /* Default, most agressive decoding */
370 CVCRDSL_1, /* Reduced aggressiveness for poor quality 1D barcode */
371 CVCRDSL_2, /* Lowest aggressiveness to avoid misdecode of poor quality 1D barcode */
372 CVCRDSL_3, /* Conditions signal quality for CR4300 mode */
373 CVCRDSL_11 = 11, /* Reduced aggressiveness for low resolution 1D barcode */
374 CVCRDSL_12, /* Lowest aggressiveness to avoid misdecode of low resolution 1D barcode */
375 CVCRDSL_61 = 61 /* No longer needed in 23.1.1+. Kept for backward compatibility */
376};
377
378// Possible values for property CVCRPerformanceProperties::CVCRPP_CodeSearchSpeed (P_CODE_SEARCH_SPEED)
379enum CVCRCodeSearchSpeed
380{
381 CVCRCSS_0, /* Default, can find low contrast code */
382 CVCRCSS_1, /* Faster, less damage tolerant, can find low contrast code */
383 CVCRCSS_2, /* Faster than above, even less damage tolerance, find medium contrast code */
384 CVCRCSS_3 /* Faster than above, same damage tolerance, find high contrast code only */
385};
386
387// Possible values for property CVCRPerformanceProperties::CVCRPP_CustomPerformance (P_CUSTOM_PERFORMANCE)
388enum CVCRCustomPerformance
389{
390 CVCRCP_None,
391 CVCRCP_ShortRange, /* was set via P_HIGH_RES_SINGLE_LENS */
392 CVCRCP_Robust, /* was set via P_CUSTOM_ROBUST */
393 CVCRCP_ExtendedRange2D, /* extended range for 2D decoding */
394 CVCRCP_Reserved
395};
396#pragma endregion
397
398#pragma region Result Properties
399 enum CVCRResultProperties
400 {
401 CVCRRP_Corners = 400, // P_RESULT_CORNERS 400
402 CVCRRP_Center = 401, // P_RESULT_CENTER 401
403 CVCRRP_SymbolType = 402, // P_RESULT_SYMBOL_TYPE 402
404 CVCRRP_Length = 403, // P_RESULT_LENGTH 403
405 CVCRRP_String = 404, // P_RESULT_STRING 404
406 CVCRRP_SymbolModifier = 405, // P_RESULT_SYMBOL_MODIFIER 405
407 CVCRRP_Linkage = 406, // P_RESULT_LINKAGE 406
408 CVCRRP_Quality = 407, // P_RESULT_QUALITY 407
409 CVCRRP_DeltaTime = 410, // P_RESULT_DELTA_TIME 410
410 CVCRRP_TotalTime = 411, // P_RESULT_TOTAL_TIME 411
411 CVCRRP_SymbolTypeEx = 412, // P_RESULT_SYMBOL_TYPE_EX 412
412 CVCRRP_LocateTime = 413, // P_RESULT_LOCATE_TIME 413 // (not documented)
413 CVCRRP_DecodeTime = 414, // P_RESULT_DECODE_TIME 414 // (not documented)
414 CVCRRP_DecodeOutputFormat = 419, // P_RESULT_DECODE_OUTPUT_FORMAT 419 // (not documented)
415 CVCRRP_Status = 420, // P_RESULT_STATUS 420
416 CVCRRP_MiscProperty = 431, // P_RESULT_MISC_PROPERTY 431
417 CVCRRP_SymbPosIDString =
418 435, // P_RESULT_SYMB_POS_ID_STRING 435 /* Prefix string for P_OUTPUT_XYZ properties */
419 CVCRRP_SymbPosIDLength = 436, // P_RESULT_SYMB_POS_ID_LENGTH 436
420 CVCRRP_FormattedString = 437, // P_RESULT_FORMATTED_STRING 437 /* Prefix string + data (either
421 // original or parsed/formatted) */
422 CVCRRP_FormattedLength = 438 // P_RESULT_FORMATTED_LENGTH 438
423 };
424
425 enum CVCRResultProperties2D
426 {
427 CVCRRP2D_ECCError = 408, // P_RESULT_ECC_ERROR 408
428 CVCRRP2D_ECCErasure = 409, // P_RESULT_ECC_ERASURE 409
429 CVCRRP2D_SymbolHeightWidth = 433, // P_RESULT_SYMBOL_HEIGHT_WIDTH 433
430 CVCRRP2D_SymbolRowsColumns = 434 // P_RESULT_SYMBOL_ROWS_COLUMNS 434
431 };
432
433 enum CVCRResultPropertiesDataMatrix
434 {
435 // Attention: These result properties include results of DataMatrix AND QR codes.
436 CVCRRPDM_NumCodeWords = 421, // P_RESULT_NUM_CODEWORDS 421
437 CVCRRPDM_CodeWordsBeforeECC = 422, // P_RESULT_CODEWORDS_BEFORE_ECC 422
438 CVCRRPDM_CodeWordsAfterECC = 423, // P_RESULT_CODEWORDS_AFTER_ECC 423
439 CVCRRPDM_NumCodeWordsBlocks = 424, // P_RESULT_NUM_CODEWORDS_BLOCKS 424
440 CVCRRPDM_NumCodeWordsLongBlocks = 425, // P_RESULT_NUM_CODEWORDS_LONG_BLOCKS 425
441 CVCRRPDM_NumDataCodeWords = 426, // P_RESULT_NUM_DATA_CODEWORDS 426
442 CVCRRPDM_NumECCodeWords = 427 // P_RESULT_NUM_EC_CODEWORDS 427
443 };
444
445 enum CVCRResultPropertiesQR
446 {
447 // Attention: The following seven result properties include results of DataMatrix AND QR codes.
448 CVCRRPQR_NumCodeWords = 421, // P_RESULT_NUM_CODEWORDS 421
449 CVCRRPQR_CodeWordsBeforeECC = 422, // P_RESULT_CODEWORDS_BEFORE_ECC 422
450 CVCRRPQR_CodeWordsAfterECC = 423, // P_RESULT_CODEWORDS_AFTER_ECC 423
451 CVCRRPQR_NumCodeWordsBlocks = 424, // P_RESULT_NUM_CODEWORDS_BLOCKS 424
452 CVCRRPQR_NumCodeWordsLongBlocks = 425, // P_RESULT_NUM_CODEWORDS_LONG_BLOCKS 425
453 CVCRRPQR_NumDataCodeWords = 426, // P_RESULT_NUM_DATA_CODEWORDS 426
454 CVCRRPQR_NumECCodeWords = 427, // P_RESULT_NUM_EC_CODEWORDS 427
455 CVCRRPQR_StructAppendPosition = 428, // P_RESULT_STRUC_APPEND_POSITION 428
456 CVCRRPQR_StructAppendTotal = 429, // P_RESULT_STRUC_APPEND_TOTAL 429
457 CVCRRPQR_StructAppendParity = 430 // P_RESULT_STRUC_APPEND_PARITY 430
458 };
459#pragma endregion
460
461 typedef struct CVCRPoint
462 {
463 int x;
464 int y;
465 } CVCRPoint;
466
467 enum CVCRCompositeType
468 {
469 CVCRCT_None = 0,
470 CVCRCT_CCA = CVCRValueSymbology::CVCRVS_CCA,
471 CVCRCT_CCB = CVCRValueSymbology::CVCRVS_CCB,
472 CVCRCT_CCC = CVCRValueSymbology::CVCRVS_CCC,
473 };
474
475 enum CVCRResultPropertyInt
476 {
477 CVCRRPI_Symbology = 0,
478 CVCRRPI_IsExtendedSymbology,
479 CVCRRPI_DecodeStatus,
480 CVCRRPI_Rows,
481 CVCRRPI_Columns,
482 CVCRRPI_CompositeType,
483 CVCRRPI_Quality,
484 CVCRRPI_ErrorCorrectionCodewords,
485 CVCRRPI_ErrorCorrectionErasureCodewords
486 };
487
488 enum CVCRResultPropertyDouble
489 {
490 CVCRRPF_Width = 0,
491 CVCRRPF_Height
492 };
493
494 typedef void *CVCRDecoder;
495 typedef void *CVCRDecoderResult;
496
497 CVB_DEF_CAPI(cvbres_t, CVCRCreateDecoder, (CVCRDecoder &Decoder))
498
499 // set/get configuration properties
500 CVB_DEF_CAPI(cvbres_t, CVCRGetPropertyInt, (CVCRDecoder Decoder, int Property, int &Value))
501 CVB_DEF_CAPI(cvbres_t, CVCRSetPropertyInt, (CVCRDecoder Decoder, int Property, int Value))
502
503 CVB_DEF_CAPI(cvbres_t, CVCRDecodeMultiImageWithResultRect,
504 (CVCRDecoder Decoder, IMG Image, cvbdim_t PlaneIndex, cvbdim_t Left, cvbdim_t Top, cvbdim_t Right,
505 cvbdim_t Bottom, cvbint64_t Timeout, size_t NumSymbols, CVCRDecoderResult &DecoderResult))
506 CVB_DEF_CAPI(cvbres_t, CVCRDecodeMultiImageParallelizableRect, (CVCRDecoder Decoder, IMG Image, cvbdim_t PlaneIndex, cvbdim_t Left,
507 cvbdim_t Top, cvbdim_t Right, cvbdim_t Bottom, size_t NumSymbols,
508 CVCRDecoderResult &DecoderResult))
509
510 CVB_DEF_CAPI(cvbres_t, CVCRGetDecoderResultCount, (CVCRDecoderResult DecoderResult, size_t &NumDetectedCodes))
511 CVB_DEF_CAPI(cvbres_t, CVCRGetDecoderResultInt, (CVCRDecoderResult DecoderResult, size_t Index, enum CVCRResultPropertyInt Property,
512 int &Value))
513 CVB_DEF_CAPI(cvbres_t, CVCRGetDecoderResultDouble, (CVCRDecoderResult DecoderResult, size_t Index, enum CVCRResultPropertyDouble Property,
514 double &Value))
515 CVB_DEF_CAPI(cvbres_t, CVCRGetDecoderResultCenter, (CVCRDecoderResult DecoderResult, size_t Index, CVCRPoint &Value))
516 CVB_DEF_CAPI(cvbres_t, CVCRGetDecoderResultCorners, (CVCRDecoderResult DecoderResult, size_t Index, CVCRPoint Value[4]))
517
518 CVB_DEF_CAPI(cvbres_t, CVCRGetDecoderResultData, (CVCRDecoderResult DecoderResult, size_t Index, char *Buffer, size_t &Size))
519 CVB_DEF_CAPI(cvbres_t, CVCRGetDecoderResultDataW, (CVCRDecoderResult DecoderResult, size_t Index, wchar_t *Buffer, size_t &Size))
520 inline cvbres_t _ppCVCRGetDecoderResultDataTyped(CVCRDecoderResult DecoderResult, size_t Index, char *Buffer,
521 size_t &Size)
522 {
523 return CVCRGetDecoderResultData(DecoderResult, Index, Buffer, Size);
524 }
525 inline cvbres_t _ppCVCRGetDecoderResultDataTyped(CVCRDecoderResult DecoderResult, size_t Index, wchar_t *Buffer,
526 size_t &Size)
527 {
528 return CVCRGetDecoderResultDataW(DecoderResult, Index, Buffer, Size);
529 }
530
531
532 // get result properties
533 CVB_DEF_CAPI(cvbres_t, CVCRGetPropertyIntMulti, (CVCRDecoder Decoder, int Property, size_t Index, int &Value))
534 CVB_DEF_CAPI(cvbres_t, CVCRGetPropertyStringMulti, (CVCRDecoder Decoder, int Property, size_t Index, char *Buffer, size_t &Size))
535 CVB_DEF_CAPI(cvbres_t, CVCRGetPropertyIntsMulti, (CVCRDecoder Decoder, int Property, size_t Index, void *Buffer, size_t &Size))
536 CVB_DEF_CAPI(cvbres_t, CVCRGetPropertyStringMultiW, (CVCRDecoder Decoder, int Property, size_t Index, wchar_t *Buffer, size_t &Size))
537
538 inline cvbres_t _ppCVCRGetPropertyStringMultiTyped(CVCRDecoder Decoder, int Property, size_t Index, char *Buffer, size_t &Size)
539 {
540 return CVCRGetPropertyStringMulti(Decoder, Property, Index, Buffer, Size);
541 }
542 inline cvbres_t _ppCVCRGetPropertyStringMultiTyped(CVCRDecoder Decoder, int Property, size_t Index, wchar_t *Buffer, size_t &Size)
543 {
544 return CVCRGetPropertyStringMultiW(Decoder, Property, Index, Buffer, Size);
545 }
546
547 // decode
548 CVB_DEF_CAPI(cvbres_t, CVCRDecodeMultiImageRect, (CVCRDecoder Decoder, IMG Image, cvbdim_t PlaneIndex, cvbdim_t Left, cvbdim_t Top,
549 cvbdim_t Right, cvbdim_t Bottom, cvbint64_t Timeout, size_t NumSymbols,
550 size_t &NumSymbolsDetected))
551
552
553
554#pragma region not used yet
555 CVB_DEF_CAPI(cvbres_t, CVCRSetPropertyString, (CVCRDecoder Decoder, int Property, char *Buffer, size_t Size))
556 CVB_DEF_CAPI(cvbres_t, CVCRSetPropertyStringW, (CVCRDecoder Decoder, int Property, wchar_t *Buffer, size_t Size))
557 CVB_DEF_CAPI(cvbres_t, CVCRSetPropertyBuffer, (CVCRDecoder Decoder, int Property, void *Buffer, size_t Size))
558 CVB_DEF_CAPI(cvbres_t, CVCRGetPropertyString, (CVCRDecoder Decoder, int Property, char *Buffer, size_t &Size))
559 CVB_DEF_CAPI(cvbres_t, CVCRGetPropertyStringW, (CVCRDecoder Decoder, int Property, wchar_t *Buffer, size_t &Size))
560 CVB_DEF_CAPI(cvbres_t, CVCRGetPropertyBuffer, (CVCRDecoder Decoder, int Property, void *Buffer, size_t &Size))
561
562 inline cvbres_t _ppCVCRGetPropertyStringTyped(CVCRDecoder Decoder, int Property, char *Buffer, size_t &Size)
563 {
564 return CVCRGetPropertyString(Decoder, Property, Buffer, Size);
565 }
566
567 inline cvbres_t _ppCVCRGetPropertyStringTyped(CVCRDecoder Decoder, int Property, wchar_t *Buffer, size_t &Size)
568 {
569 return CVCRGetPropertyStringW(Decoder, Property, Buffer, Size);
570 }
571
572 inline cvbres_t _ppCVCRSetPropertyStringTyped(CVCRDecoder Decoder, int Property, char *Buffer, int Size)
573 {
574 return CVCRSetPropertyString(Decoder, Property, Buffer, Size);
575 }
576
577 inline cvbres_t _ppCVCRSetPropertyStringTyped(CVCRDecoder Decoder, int Property, wchar_t *Buffer, int Size)
578 {
579 return CVCRSetPropertyStringW(Decoder, Property, Buffer, Size);
580 }
581 #pragma endregion
582
583} /* namespace CExports */
584
585CVB_END_INLINE_NS
586
587} /* namespace Cvb */
588
589
590
591
592
Root namespace for the Image Manager interface.
Definition c_bayer_to_rgb.h:17
@ Timeout
A timeout occurred, no image buffer has been returned.
Definition global.hpp:400