001/*----------------------------------------------------------------------------*/ 002/* Copyright (c) FIRST 2008-2012. All Rights Reserved. */ 003/* Open Source Software - may be modified and shared by FRC teams. The code */ 004/* must be accompanied by the FIRST BSD license file in the root directory of */ 005/* the project. */ 006/*----------------------------------------------------------------------------*/ 007 008package edu.wpi.first.wpilibj.image; 009 010/** 011 * Exception class which looks up nivision error codes 012 * @author dtjones 013 */ 014public class NIVisionException extends Exception { 015 016 /** 017 * Create a new NIVisionException. 018 * @param msg The message to pass with the exception describing what caused it. 019 */ 020 public NIVisionException(String msg) { 021 super(msg); 022 } 023 024 /** 025 * Create a new vision exception 026 * @param errorCode the bad status code 027 */ 028 public NIVisionException(int errorCode) { 029 super(lookUpCode(errorCode)); 030 } 031 private static String lookUpCode(int errorCode) { 032 033 switch (errorCode) { 034 case 0: 035 return "No error."; 036 case -1074396160: 037 return "System error."; 038 case -1074396159: 039 return "Not enough memory for requested operation."; 040 case -1074396158: 041 return "Memory error."; 042 case -1074396157: 043 return "Unlicensed copy of NI Vision."; 044 case -1074396156: 045 return "The function requires an NI Vision 5.0 Advanced license."; 046 case -1074396155: 047 return "NI Vision did not initialize properly."; 048 case -1074396154: 049 return "The image is not large enough for the operation."; 050 case -1074396153: 051 return "The barcode is not a valid Codabar barcode."; 052 case -1074396152: 053 return "The barcode is not a valid Code 3 of 9 barcode."; 054 case -1074396151: 055 return "The barcode is not a valid Code93 barcode."; 056 case -1074396150: 057 return "The barcode is not a valid Code128 barcode."; 058 case -1074396149: 059 return "The barcode is not a valid EAN8 barcode."; 060 case -1074396148: 061 return "The barcode is not a valid EAN13 barcode."; 062 case -1074396147: 063 return "The barcode is not a valid Interleaved 2 of 5 barcode."; 064 case -1074396146: 065 return "The barcode is not a valid MSI barcode."; 066 case -1074396145: 067 return "The barcode is not a valid UPCA barcode."; 068 case -1074396144: 069 return "The Code93 barcode contains invalid shift encoding."; 070 case -1074396143: 071 return "The barcode type is invalid."; 072 case -1074396142: 073 return "The image does not represent a valid linear barcode."; 074 case -1074396141: 075 return "The FNC value in the Code128 barcode is not located before the first data value."; 076 case -1074396140: 077 return "The starting code set in the Code128 barcode is not valid."; 078 case -1074396139: 079 return "Not enough reserved memory in the timed environment for the requested operation."; 080 case -1074396138: 081 return "The function is not supported when a time limit is active."; 082 case -1074396137: 083 return "Quartz.dll not found. Install DirectX 8.1 or later."; 084 case -1074396136: 085 return "The filter quality you provided is invalid. Valid quality values range from -1 to 1000."; 086 case -1074396135: 087 return "Invalid button label."; 088 case -1074396134: 089 return "Could not execute the function in the separate thread because the thread has not completed initialization."; 090 case -1074396133: 091 return "Could not execute the function in the separate thread because the thread could not initialize."; 092 case -1074396132: 093 return "The mask must be the same size as the template."; 094 case -1074396130: 095 return "The ROI must only have either a single Rectangle contour or a single Rotated Rectangle contour."; 096 case -1074396129: 097 return "During timed execution, you must use the preallocated version of this operation."; 098 case -1074396128: 099 return "An image being modified by one process cannot be requested by another process while a time limit is active."; 100 case -1074396127: 101 return "An image with pattern matching, calibration, or overlay information cannot be manipulated while a time limit is active."; 102 case -1074396126: 103 return "An image created before a time limit is started cannot be resized while a time limit is active."; 104 case -1074396125: 105 return "Invalid contrast threshold. The threshold value must be greater than 0. "; 106 case -1074396124: 107 return "NI Vision does not support the calibration ROI mode you supplied."; 108 case -1074396123: 109 return "NI Vision does not support the calibration mode you supplied."; 110 case -1074396122: 111 return "Set the foreground and background text colors to grayscale to draw on a U8 image."; 112 case -1074396121: 113 return "The value of the saturation threshold must be from 0 to 255."; 114 case -1074396120: 115 return "Not an image."; 116 case -1074396119: 117 return "They custom data key you supplied is invalid. The only valid character values are decimal 32-126 and 161-255. There must also be no repeated, leading, or trailing spaces."; 118 case -1074396118: 119 return "Step size must be greater than zero."; 120 case -1074396117: 121 return "Invalid matrix size in the structuring element."; 122 case -1074396116: 123 return "Insufficient number of calibration feature points."; 124 case -1074396115: 125 return "The operation is invalid in a corrected image."; 126 case -1074396114: 127 return "The ROI contains an invalid contour type or is not contained in the ROI learned for calibration."; 128 case -1074396113: 129 return "The source/input image has not been calibrated."; 130 case -1074396112: 131 return "The number of pixel and real-world coordinates must be equal."; 132 case -1074396111: 133 return "Unable to automatically detect grid because the image is too distorted."; 134 case -1074396110: 135 return "Invalid calibration information version."; 136 case -1074396109: 137 return "Invalid calibration scaling factor."; 138 case -1074396108: 139 return "The calibration error map cannot be computed."; 140 case -1074396107: 141 return "Invalid calibration template image."; 142 case -1074396106: 143 return "Invalid calibration template image."; 144 case -1074396105: 145 return "Invalid calibration template image."; 146 case -1074396104: 147 return "Invalid calibration template image."; 148 case -1074396103: 149 return "Invalid calibration template image."; 150 case -1074396102: 151 return "Invalid calibration template image."; 152 case -1074396101: 153 return "Invalid calibration template image."; 154 case -1074396100: 155 return "Invalid calibration template image."; 156 case -1074396099: 157 return "Invalid calibration template image."; 158 case -1074396098: 159 return "You must pass NULL for the reserved parameter."; 160 case -1074396097: 161 return "You entered an invalid selection in the particle parameter."; 162 case -1074396096: 163 return "Not an object."; 164 case -1074396095: 165 return "The reference points passed are inconsistent. At least two similar pixel coordinates correspond to different real-world coordinates."; 166 case -1074396094: 167 return "A resource conflict occurred in the timed environment. Two processes cannot manage the same resource and be time bounded."; 168 case -1074396093: 169 return "A resource conflict occurred in the timed environment. Two processes cannot access the same resource and be time bounded."; 170 case -1074396092: 171 return "Multiple timed environments are not supported."; 172 case -1074396091: 173 return "A time limit cannot be started until the timed environment is initialized."; 174 case -1074396090: 175 return "Multiple timed environments are not supported."; 176 case -1074396089: 177 return "The timed environment is already initialized."; 178 case -1074396088: 179 return "The results of the operation exceeded the size limits on the output data arrays."; 180 case -1074396087: 181 return "No time limit is available to stop."; 182 case -1074396086: 183 return "A time limit could not be set."; 184 case -1074396085: 185 return "The timed environment could not be initialized."; 186 case -1074396084: 187 return "No initialized timed environment is available to close."; 188 case -1074396083: 189 return "The time limit has expired."; 190 case -1074396082: 191 return "Only 8-bit images support the use of palettes. Either do not use a palette, or convert your image to an 8-bit image before using a palette."; 192 case -1074396081: 193 return "Incorrect password."; 194 case -1074396080: 195 return "Invalid image type."; 196 case -1074396079: 197 return "Invalid metafile handle."; 198 case -1074396077: 199 return "Incompatible image type."; 200 case -1074396076: 201 return "Unable to fit a line for the primary axis."; 202 case -1074396075: 203 return "Unable to fit a line for the secondary axis."; 204 case -1074396074: 205 return "Incompatible image size."; 206 case -1074396073: 207 return "When the mask's offset was applied, the mask was entirely outside of the image."; 208 case -1074396072: 209 return "Invalid image border."; 210 case -1074396071: 211 return "Invalid scan direction."; 212 case -1074396070: 213 return "Unsupported function."; 214 case -1074396069: 215 return "NI Vision does not support the color mode you specified."; 216 case -1074396068: 217 return "The function does not support the requested action."; 218 case -1074396067: 219 return "The source image and destination image must be different."; 220 case -1074396066: 221 return "Invalid point symbol."; 222 case -1074396065: 223 return "Cannot resize an image in an acquisition buffer."; 224 case -1074396064: 225 return "This operation is not supported for images in an acquisition buffer."; 226 case -1074396063: 227 return "The external buffer must be aligned on a 4-byte boundary. The line width and border pixels must be 4-byte aligned, as well."; 228 case -1074396062: 229 return "The tolerance parameter must be greater than or equal to 0."; 230 case -1074396061: 231 return "The size of each dimension of the window must be greater than 2 and less than or equal to the size of the image in the corresponding dimension."; 232 case -1074396060: 233 return "Lossless compression cannot be used with the floating point wavelet transform mode. Either set the wavelet transform mode to integer, or use lossy compression."; 234 case -1074396059: 235 return "Invalid maximum number of iterations. Maximum number of iterations must be greater than zero."; 236 case -1074396058: 237 return "Invalid rotation mode."; 238 case -1074396057: 239 return "Invalid search vector width. The width must be an odd number greater than zero."; 240 case -1074396056: 241 return "Invalid matrix mirror mode."; 242 case -1074396055: 243 return "Invalid aspect ratio. Valid aspect ratios must be greater than or equal to zero."; 244 case -1074396054: 245 return "Invalid cell fill type."; 246 case -1074396053: 247 return "Invalid border integrity. Valid values range from 0 to 100."; 248 case -1074396052: 249 return "Invalid demodulation mode."; 250 case -1074396051: 251 return "Invalid cell filter mode."; 252 case -1074396050: 253 return "Invalid ECC type."; 254 case -1074396049: 255 return "Invalid matrix polarity."; 256 case -1074396048: 257 return "Invalid cell sample size."; 258 case -1074396047: 259 return "Invalid linear average mode."; 260 case -1074396046: 261 return "When using a region of interest that is not a rectangle, you must specify the contrast mode of the barcode as either black on white or white on black."; 262 case -1074396045: 263 return "Invalid 2-D barcode Data Matrix subtype."; 264 case -1074396044: 265 return "Invalid 2-D barcode shape."; 266 case -1074396043: 267 return "Invalid 2-D barcode cell shape."; 268 case -1074396042: 269 return "Invalid 2-D barcode contrast."; 270 case -1074396041: 271 return "Invalid 2-D barcode type."; 272 case -1074396040: 273 return "Cannot access NI-IMAQ driver."; 274 case -1074396039: 275 return "I/O error."; 276 case -1074396038: 277 return "When searching for a coordinate system, the number of lines to fit must be 1."; 278 case -1074396037: 279 return "Trigger timeout."; 280 case -1074396036: 281 return "The Skeleton mode you specified is invalid."; 282 case -1074396035: 283 return "The template image does not contain enough information for learning the aggressive search strategy."; 284 case -1074396034: 285 return "The template image does not contain enough edge information for the sample size(s) requested."; 286 case -1074396033: 287 return "Invalid template descriptor."; 288 case -1074396032: 289 return "The template descriptor does not contain data required for the requested search strategy in rotation-invariant matching."; 290 case -1074396026: 291 return "Invalid process type for edge detection."; 292 case -1074396025: 293 return "Angle range value should be equal to or greater than zero."; 294 case -1074396024: 295 return "Minimum coverage value should be greater than zero."; 296 case -1074396023: 297 return "The angle tolerance should be equal to or greater than 0.001."; 298 case -1074396022: 299 return "Invalid search mode for detecting straight edges"; 300 case -1074396021: 301 return "Invalid kernel size for edge detection. The minimum kernel size is 3, the maximum kernel size is 1073741823 and the kernel size must be odd."; 302 case -1074396020: 303 return "Invalid grading mode."; 304 case -1074396019: 305 return "Invalid threshold percentage. Valid values range from 0 to 100."; 306 case -1074396018: 307 return "Invalid edge polarity search mode."; 308 case -1074396017: 309 return "The AIM grading data attached to the image you tried to open was created with a newer version of NI Vision. Upgrade to the latest version of NI Vision to read this file."; 310 case -1074396016: 311 return "No video driver is installed."; 312 case -1074396015: 313 return "Unable to establish network connection with remote system."; 314 case -1074396014: 315 return "RT Video Out does not support displaying the supplied image type at the selected color depth."; 316 case -1074396013: 317 return "Invalid video mode."; 318 case -1074396012: 319 return "Unable to display remote image on network connection."; 320 case -1074396011: 321 return "Unable to establish network connection."; 322 case -1074396010: 323 return "Invalid frame number."; 324 case -1074396009: 325 return "An internal DirectX error has occurred. Try upgrading to the latest version of DirectX."; 326 case -1074396008: 327 return "An appropriate DirectX filter to process this file could not be found. Install the filter that was used to create this AVI. Upgrading to the latest version of DirectX may correct this error. NI Vision requires DirectX 8.1 or higher."; 328 case -1074396007: 329 return "Incompatible compression filter."; 330 case -1074396006: 331 return "Unknown compression filter."; 332 case -1074396005: 333 return "Invalid AVI session."; 334 case -1074396004: 335 return "A software key is restricting the use of this compression filter."; 336 case -1074396003: 337 return "The data for this frame exceeds the data buffer size specified when creating the AVI file."; 338 case -1074396002: 339 return "Invalid line gauge method."; 340 case -1074396001: 341 return "There are too many AVI sessions open. You must close a session before you can open another one."; 342 case -1074396000: 343 return "Invalid file header."; 344 case -1074395999: 345 return "Invalid file type."; 346 case -1074395998: 347 return "Invalid color table."; 348 case -1074395997: 349 return "Invalid parameter."; 350 case -1074395996: 351 return "File is already open for writing."; 352 case -1074395995: 353 return "File not found."; 354 case -1074395994: 355 return "Too many files open."; 356 case -1074395993: 357 return "File I/O error."; 358 case -1074395992: 359 return "File access denied."; 360 case -1074395991: 361 return "NI Vision does not support the file type you specified."; 362 case -1074395990: 363 return "Could not read Vision info from file."; 364 case -1074395989: 365 return "Unable to read data."; 366 case -1074395988: 367 return "Unable to write data."; 368 case -1074395987: 369 return "Premature end of file."; 370 case -1074395986: 371 return "Invalid file format."; 372 case -1074395985: 373 return "Invalid file operation."; 374 case -1074395984: 375 return "NI Vision does not support the file data type you specified."; 376 case -1074395983: 377 return "Disk full."; 378 case -1074395982: 379 return "The frames per second in an AVI must be greater than zero."; 380 case -1074395981: 381 return "The buffer that was passed in is not big enough to hold all of the data."; 382 case -1074395980: 383 return "Error initializing COM."; 384 case -1074395979: 385 return "The image has invalid particle information. Call imaqCountParticles on the image to create particle information."; 386 case -1074395978: 387 return "Invalid particle number."; 388 case -1074395977: 389 return "The AVI file was created in a newer version of NI Vision. Upgrade to the latest version of NI Vision to read this AVI file."; 390 case -1074395976: 391 return "The color palette must have exactly 0 or 256 entries."; 392 case -1074395975: 393 return "DirectX has timed out reading or writing the AVI file. When closing an AVI file, try adding an additional delay. When reading an AVI file, try reducing CPU and disk load."; 394 case -1074395974: 395 return "NI Vision does not support reading JPEG2000 files with this colorspace method."; 396 case -1074395973: 397 return "NI Vision does not support reading JPEG2000 files with more than one layer."; 398 case -1074395972: 399 return "DirectX is unable to enumerate the compression filters. This is caused by a third-party compression filter that is either improperly installed or is preventing itself from being enumerated. Remove any recently installed compression filters and try again."; 400 case -1074395971: 401 return "The offset you specified must be size 2."; 402 case -1074395960: 403 return "Initialization error."; 404 case -1074395959: 405 return "Unable to create window."; 406 case -1074395958: 407 return "Invalid window ID."; 408 case -1074395957: 409 return "The array sizes are not compatible."; 410 case -1074395956: 411 return "The quality you provided is invalid. Valid quality values range from -1 to 1000."; 412 case -1074395955: 413 return "Invalid maximum wavelet transform level. Valid values range from 0 to 255."; 414 case -1074395954: 415 return "The quantization step size must be greater than or equal to 0."; 416 case -1074395953: 417 return "Invalid wavelet transform mode."; 418 case -1074395920: 419 return "Invalid number of classes."; 420 case -1074395880: 421 return "Invalid particle."; 422 case -1074395879: 423 return "Invalid measure number."; 424 case -1074395878: 425 return "The ImageBase Display control does not support writing this property node."; 426 case -1074395877: 427 return "The specified color mode requires the use of imaqChangeColorSpace2."; 428 case -1074395876: 429 return "This function does not currently support the color mode you specified."; 430 case -1074395875: 431 return "The barcode is not a valid Pharmacode symbol"; 432 case -1074395840: 433 return "Invalid handle table index."; 434 case -1074395837: 435 return "The compression ratio must be greater than or equal to 1."; 436 case -1074395801: 437 return "The ROI contains too many contours."; 438 case -1074395800: 439 return "Protection error."; 440 case -1074395799: 441 return "Internal error."; 442 case -1074395798: 443 return "The size of the feature vector in the custom sample must match the size of those you have already added."; 444 case -1074395797: 445 return "Not a valid classifier session."; 446 case -1074395796: 447 return "You requested an invalid Nearest Neighbor classifier method."; 448 case -1074395795: 449 return "The k parameter must be greater than two."; 450 case -1074395794: 451 return "The k parameter must be <= the number of samples in each class."; 452 case -1074395793: 453 return "This classifier session is compact. Only the Classify and Dispose functions may be called on a compact classifier session."; 454 case -1074395792: 455 return "This classifier session is not trained. You may only call this function on a trained classifier session."; 456 case -1074395791: 457 return "This classifier function cannot be called on this type of classifier session."; 458 case -1074395790: 459 return "You requested an invalid distance metric."; 460 case -1074395789: 461 return "The classifier session you tried to open was created with a newer version of NI Vision. Upgrade to the latest version of NI Vision to read this file."; 462 case -1074395788: 463 return "This operation cannot be performed because you have not added any samples."; 464 case -1074395787: 465 return "You requested an invalid classifier type."; 466 case -1074395786: 467 return "The sum of Scale Dependence and Symmetry Dependence must be less than 1000."; 468 case -1074395785: 469 return "The image yielded no particles."; 470 case -1074395784: 471 return "The limits you supplied are not valid."; 472 case -1074395783: 473 return "The Sample Index fell outside the range of Samples."; 474 case -1074395782: 475 return "The description must be <= 255 characters."; 476 case -1074395781: 477 return "The engine for this classifier session does not support this operation."; 478 case -1074395780: 479 return "You requested an invalid particle type."; 480 case -1074395779: 481 return "You may only save a session in compact form if it is trained."; 482 case -1074395778: 483 return "The Kernel size must be smaller than the image size."; 484 case -1074395777: 485 return "The session you read from file must be the same type as the session you passed in."; 486 case -1074395776: 487 return "You can not use a compact classification file with read options other than Read All."; 488 case -1074395775: 489 return "The ROI you passed in may only contain closed contours."; 490 case -1074395774: 491 return "You must pass in a label."; 492 case -1074395773: 493 return "You must provide a destination image."; 494 case -1074395772: 495 return "You provided an invalid registration method."; 496 case -1074395771: 497 return "The golden template you tried to open was created with a newer version of NI Vision. Upgrade to the latest version of NI Vision to read this file."; 498 case -1074395770: 499 return "Invalid golden template."; 500 case -1074395769: 501 return "Edge Thickness to Ignore must be greater than zero."; 502 case -1074395768: 503 return "Scale must be greater than zero."; 504 case -1074395767: 505 return "The supplied scale is invalid for your template."; 506 case -1074395766: 507 return "This backwards-compatibility function can not be used with this session. Use newer, supported functions instead."; 508 case -1074395763: 509 return "You must provide a valid normalization method."; 510 case -1074395762: 511 return "The deviation factor for Niblack local threshold must be between 0 and 1."; 512 case -1074395760: 513 return "Board not found."; 514 case -1074395758: 515 return "Board not opened."; 516 case -1074395757: 517 return "DLL not found."; 518 case -1074395756: 519 return "DLL function not found."; 520 case -1074395754: 521 return "Trigger timeout."; 522 case -1074395728: 523 return "NI Vision does not support the search mode you provided."; 524 case -1074395727: 525 return "NI Vision does not support the search mode you provided for the type of 2D barcode for which you are searching."; 526 case -1074395726: 527 return "matchFactor has been obsoleted. Instead, set the initialMatchListLength and matchListReductionFactor in the MatchPatternAdvancedOptions structure."; 528 case -1074395725: 529 return "The data was stored with a newer version of NI Vision. Upgrade to the latest version of NI Vision to read this data."; 530 case -1074395724: 531 return "The size you specified is out of the valid range."; 532 case -1074395723: 533 return "The key you specified cannot be found in the image."; 534 case -1074395722: 535 return "Custom classifier sessions only classify feature vectors. They do not support classifying images."; 536 case -1074395721: 537 return "NI Vision does not support the bit depth you supplied for the image you supplied."; 538 case -1074395720: 539 return "Invalid ROI."; 540 case -1074395719: 541 return "Invalid ROI global rectangle."; 542 case -1074395718: 543 return "The version of LabVIEW or BridgeVIEW you are running does not support this operation."; 544 case -1074395717: 545 return "The range you supplied is invalid."; 546 case -1074395716: 547 return "NI Vision does not support the scaling method you provided."; 548 case -1074395715: 549 return "NI Vision does not support the calibration unit you supplied."; 550 case -1074395714: 551 return "NI Vision does not support the axis orientation you supplied."; 552 case -1074395713: 553 return "Value not in enumeration."; 554 case -1074395712: 555 return "You selected a region that is not of the right type."; 556 case -1074395711: 557 return "You specified a viewer that does not contain enough regions."; 558 case -1074395710: 559 return "The image has too many particles for this process."; 560 case -1074395709: 561 return "The AVI session has not been opened."; 562 case -1074395708: 563 return "The AVI session is a write session, but this operation requires a read session."; 564 case -1074395707: 565 return "The AVI session is a read session, but this operation requires a write session."; 566 case -1074395706: 567 return "This AVI session is already open. You must close it before calling the Create or Open functions."; 568 case -1074395705: 569 return "The data is corrupted and cannot be read."; 570 case -1074395704: 571 return "Invalid compression type."; 572 case -1074395703: 573 return "Invalid type of flatten."; 574 case -1074395702: 575 return "The length of the edge detection line must be greater than zero."; 576 case -1074395701: 577 return "The maximum Data Matrix barcode size must be equal to or greater than the minimum Data Matrix barcode size."; 578 case -1074395700: 579 return "The function requires the operating system to be Microsoft Windows 2000 or newer."; 580 case -1074395656: 581 return "You must specify the same value for the smooth contours advanced match option for all templates you want to match."; 582 case -1074395655: 583 return "You must specify the same value for the enable calibration support advanced match option for all templates you want to match."; 584 case -1074395654: 585 return "The source image does not contain grading information. You must prepare the source image for grading when reading the Data Matrix, and you cannot change the contents of the source image between reading and grading the Data Matrix."; 586 case -1074395653: 587 return "The multiple geometric matching template you tried to open was created with a newer version of NI Vision. Upgrade to the latest version of NI Vision to read this file."; 588 case -1074395652: 589 return "The geometric matching template you tried to open was created with a newer version of NI Vision. Upgrade to the latest version of NI Vision to read this file."; 590 case -1074395651: 591 return "You must specify the same edge filter size for all the templates you want to match."; 592 case -1074395650: 593 return "You must specify the same curve extraction mode for all the templates you want to match."; 594 case -1074395649: 595 return "The geometric feature type specified is invalid."; 596 case -1074395648: 597 return "You supplied a template that was not learned."; 598 case -1074395647: 599 return "Invalid multiple geometric template."; 600 case -1074395646: 601 return "Need at least one template to learn."; 602 case -1074395645: 603 return "You supplied an invalid number of labels."; 604 case -1074395644: 605 return "Labels must be <= 255 characters."; 606 case -1074395643: 607 return "You supplied an invalid number of match options."; 608 case -1074395642: 609 return "Cannot find a label that matches the one you specified."; 610 case -1074395641: 611 return "Duplicate labels are not allowed."; 612 case -1074395640: 613 return "The number of zones found exceeded the capacity of the algorithm."; 614 case -1074395639: 615 return "The hatch style for the window background is invalid."; 616 case -1074395638: 617 return "The fill style for the window background is invalid."; 618 case -1074395637: 619 return "Your hardware is not supported by DirectX and cannot be put into NonTearing mode."; 620 case -1074395636: 621 return "DirectX is required for this feature. Please install the latest version.."; 622 case -1074395635: 623 return "The passed shape descriptor is invalid."; 624 case -1074395634: 625 return "Invalid max match overlap. Values must be between -1 and 100."; 626 case -1074395633: 627 return "Invalid minimum match separation scale. Values must be greater than or equal to -1."; 628 case -1074395632: 629 return "Invalid minimum match separation angle. Values must be between -1 and 360."; 630 case -1074395631: 631 return "Invalid minimum match separation distance. Values must be greater than or equal to -1."; 632 case -1074395630: 633 return "Invalid maximum number of features learn. Values must be integers greater than zero."; 634 case -1074395629: 635 return "Invalid maximum pixel distance from line. Values must be positive real numbers."; 636 case -1074395628: 637 return "Invalid geometric matching template image."; 638 case -1074395627: 639 return "The template does not contain enough features for geometric matching."; 640 case -1074395626: 641 return "The template does not contain enough features for geometric matching."; 642 case -1074395625: 643 return "You specified an invalid value for the match constraint value of the range settings."; 644 case -1074395624: 645 return "Invalid occlusion range. Valid values for the bounds range from 0 to 100 and the upper bound must be greater than or equal to the lower bound."; 646 case -1074395623: 647 return "Invalid scale range. Values for the lower bound must be a positive real numbers and the upper bound must be greater than or equal to the lower bound."; 648 case -1074395622: 649 return "Invalid match geometric pattern setup data."; 650 case -1074395621: 651 return "Invalid learn geometric pattern setup data."; 652 case -1074395620: 653 return "Invalid curve extraction mode."; 654 case -1074395619: 655 return "You can specify only one occlusion range."; 656 case -1074395618: 657 return "You can specify only one scale range."; 658 case -1074395617: 659 return "The minimum number of features must be less than or equal to the maximum number of features."; 660 case -1074395616: 661 return "Invalid edge filter size."; 662 case -1074395615: 663 return "Invalid minimum strength for features. Values must be positive real numbers."; 664 case -1074395614: 665 return "Invalid aspect ratio for rectangular features. Values must be positive real numbers in the range 0.01 to 1.0."; 666 case -1074395613: 667 return "Invalid minimum length for linear features. Values must be integers greater than 0."; 668 case -1074395612: 669 return "Invalid minimum radius for circular features. Values must be integers greater than 0."; 670 case -1074395611: 671 return "Invalid minimum rectangle dimension. Values must be integers greater than 0."; 672 case -1074395610: 673 return "Invalid initial match list length. Values must be integers greater than 5."; 674 case -1074395609: 675 return "Invalid subpixel tolerance. Values must be positive real numbers."; 676 case -1074395608: 677 return "Invalid number of subpixel iterations. Values must be integers greater 10."; 678 case -1074395607: 679 return "Invalid maximum number of features used per match. Values must be integers greater than or equal to zero."; 680 case -1074395606: 681 return "Invalid minimum number of features used for matching. Values must be integers greater than zero."; 682 case -1074395605: 683 return "Invalid maximum end point gap. Valid values range from 0 to 32767."; 684 case -1074395604: 685 return "Invalid column step. Valid range is 1 to 255."; 686 case -1074395603: 687 return "Invalid row step. Valid range is 1 to 255."; 688 case -1074395602: 689 return "Invalid minimum length. Valid values must be greater than or equal to zero."; 690 case -1074395601: 691 return "Invalid edge threshold. Valid values range from 1 to 360."; 692 case -1074395600: 693 return "You must provide information about the subimage within the browser."; 694 case -1074395598: 695 return "The acceptance level is outside the valid range of 0 to 1000."; 696 case -1074395597: 697 return "Not a valid OCR session."; 698 case -1074395596: 699 return "Invalid character size. Character size must be >= 1."; 700 case -1074395595: 701 return "Invalid threshold mode value."; 702 case -1074395594: 703 return "Invalid substitution character. Valid substitution characters are ASCII values that range from 1 to 254."; 704 case -1074395593: 705 return "Invalid number of blocks. Number of blocks must be >= 4 and <= 50."; 706 case -1074395592: 707 return "Invalid read strategy."; 708 case -1074395591: 709 return "Invalid character index."; 710 case -1074395590: 711 return "Invalid number of character positions. Valid values range from 0 to 255."; 712 case -1074395589: 713 return "Invalid low threshold value. Valid threshold values range from 0 to 255."; 714 case -1074395588: 715 return "Invalid high threshold value. Valid threshold values range from 0 to 255."; 716 case -1074395587: 717 return "The low threshold must be less than the high threshold."; 718 case -1074395586: 719 return "Invalid lower threshold limit. Valid lower threshold limits range from 0 to 255."; 720 case -1074395585: 721 return "Invalid upper threshold limit. Valid upper threshold limits range from 0 to 255."; 722 case -1074395584: 723 return "The lower threshold limit must be less than the upper threshold limit."; 724 case -1074395583: 725 return "Invalid minimum character spacing value. Character spacing must be >= 0 pixels."; 726 case -1074395582: 727 return "Invalid maximum horizontal element spacing value. Maximum horizontal element spacing must be >= 0."; 728 case -1074395581: 729 return "Invalid maximum vertical element spacing value. Maximum vertical element spacing must be >= 0."; 730 case -1074395580: 731 return "Invalid minimum bounding rectangle width. Minimum bounding rectangle width must be >= 1."; 732 case -1074395579: 733 return "Invalid aspect ratio value. The aspect ratio must be zero or >= 100."; 734 case -1074395578: 735 return "Invalid or corrupt character set file."; 736 case -1074395577: 737 return "The character value must not be an empty string."; 738 case -1074395576: 739 return "Character values must be <=255 characters."; 740 case -1074395575: 741 return "Invalid number of erosions. The number of erosions must be >= 0."; 742 case -1074395574: 743 return "The character set description must be <=255 characters."; 744 case -1074395573: 745 return "The character set file was created by a newer version of NI Vision. Upgrade to the latest version of NI Vision to read the character set file."; 746 case -1074395572: 747 return "You must specify characters for a string. A string cannot contain integers."; 748 case -1074395571: 749 return "This attribute is read-only."; 750 case -1074395570: 751 return "This attribute requires a Boolean value."; 752 case -1074395569: 753 return "Invalid attribute."; 754 case -1074395568: 755 return "This attribute requires integer values."; 756 case -1074395567: 757 return "String values are invalid for this attribute. Enter a boolean value."; 758 case -1074395566: 759 return "Boolean values are not valid for this attribute. Enter an integer value."; 760 case -1074395565: 761 return "Requires a single-character string."; 762 case -1074395564: 763 return "Invalid predefined character value."; 764 case -1074395563: 765 return "This copy of NI OCR is unlicensed."; 766 case -1074395562: 767 return "String values are not valid for this attribute. Enter a Boolean value."; 768 case -1074395561: 769 return "The number of characters in the character value must match the number of objects in the image."; 770 case -1074395560: 771 return "Invalid object index."; 772 case -1074395559: 773 return "Invalid read option."; 774 case -1074395558: 775 return "The minimum character size must be less than the maximum character size."; 776 case -1074395557: 777 return "The minimum character bounding rectangle width must be less than the maximum character bounding rectangle width."; 778 case -1074395556: 779 return "The minimum character bounding rectangle height must be less than the maximum character bounding rectangle height."; 780 case -1074395555: 781 return "The maximum horizontal element spacing value must not exceed the minimum character spacing value."; 782 case -1074395554: 783 return "Invalid read resolution."; 784 case -1074395553: 785 return "Invalid minimum bounding rectangle height. The minimum bounding rectangle height must be >= 1."; 786 case -1074395552: 787 return "Not a valid character set."; 788 case -1074395551: 789 return "A trained OCR character cannot be renamed while it is a reference character."; 790 case -1074395550: 791 return "A character cannot have an ASCII value of 255."; 792 case -1074395549: 793 return "The number of objects found does not match the number of expected characters or patterns to verify."; 794 case -1074395410: 795 return "NI Vision does not support less than one icon per line."; 796 case -1074395409: 797 return "Invalid subpixel divisions."; 798 case -1074395408: 799 return "Invalid detection mode."; 800 case -1074395407: 801 return "Invalid contrast value. Valid contrast values range from 0 to 255."; 802 case -1074395406: 803 return "The coordinate system could not be found on this image."; 804 case -1074395405: 805 return "NI Vision does not support the text orientation value you supplied."; 806 case -1074395404: 807 return "UnwrapImage does not support the interpolation method value you supplied. Valid interpolation methods are zero order and bilinear. "; 808 case -1074395403: 809 return "The image was created in a newer version of NI Vision. Upgrade to the latest version of NI Vision to use this image."; 810 case -1074395402: 811 return "The function does not support the maximum number of points that you specified."; 812 case -1074395401: 813 return "The function does not support the matchFactor that you specified."; 814 case -1074395400: 815 return "The operation you have given Multicore Options is invalid. Please see the available enumeration values for Multicore Operation."; 816 case -1074395399: 817 return "You have given Multicore Options an invalid argument."; 818 case -1074395397: 819 return "A complex image is required."; 820 case -1074395395: 821 return "The input image must be a color image."; 822 case -1074395394: 823 return "The color mask removes too much color information."; 824 case -1074395393: 825 return "The color template image is too small."; 826 case -1074395392: 827 return "The color template image is too large."; 828 case -1074395391: 829 return "The contrast in the hue plane of the image is too low for learning shape features."; 830 case -1074395390: 831 return "The contrast in the luminance plane of the image is too low to learn shape features."; 832 case -1074395389: 833 return "Invalid color learn setup data."; 834 case -1074395388: 835 return "Invalid color learn setup data."; 836 case -1074395387: 837 return "Invalid color match setup data."; 838 case -1074395386: 839 return "Invalid color match setup data."; 840 case -1074395385: 841 return "Rotation-invariant color pattern matching requires a feature mode including shape."; 842 case -1074395384: 843 return "Invalid color template image."; 844 case -1074395383: 845 return "Invalid color template image."; 846 case -1074395382: 847 return "Invalid color template image."; 848 case -1074395381: 849 return "Invalid color template image."; 850 case -1074395380: 851 return "Invalid color template image."; 852 case -1074395379: 853 return "Invalid color template image."; 854 case -1074395378: 855 return "Invalid color template image."; 856 case -1074395377: 857 return "Invalid color template image."; 858 case -1074395376: 859 return "The color template image does not contain data required for shift-invariant color matching."; 860 case -1074395375: 861 return "Invalid color template image."; 862 case -1074395374: 863 return "Invalid color template image."; 864 case -1074395373: 865 return "Invalid color template image."; 866 case -1074395372: 867 return "The color template image does not contain data required for rotation-invariant color matching."; 868 case -1074395371: 869 return "Invalid color template image."; 870 case -1074395370: 871 return "Invalid color template image."; 872 case -1074395369: 873 return "Invalid color template image."; 874 case -1074395368: 875 return "Invalid color template image."; 876 case -1074395367: 877 return "Invalid color template image."; 878 case -1074395366: 879 return "The color template image does not contain data required for color matching in shape feature mode."; 880 case -1074395365: 881 return "The color template image does not contain data required for color matching in color feature mode."; 882 case -1074395364: 883 return "The ignore color spectra array is invalid."; 884 case -1074395363: 885 return "Invalid subsampling ratio."; 886 case -1074395362: 887 return "Invalid pixel width."; 888 case -1074395361: 889 return "Invalid steepness."; 890 case -1074395360: 891 return "Invalid complex plane."; 892 case -1074395357: 893 return "Invalid color ignore mode."; 894 case -1074395356: 895 return "Invalid minimum match score. Acceptable values range from 0 to 1000."; 896 case -1074395355: 897 return "Invalid number of matches requested. You must request a minimum of one match."; 898 case -1074395354: 899 return "Invalid color weight. Acceptable values range from 0 to 1000."; 900 case -1074395353: 901 return "Invalid search strategy."; 902 case -1074395352: 903 return "Invalid feature mode."; 904 case -1074395351: 905 return "NI Vision does not support rectangles with negative widths or negative heights."; 906 case -1074395350: 907 return "NI Vision does not support the vision information type you supplied."; 908 case -1074395349: 909 return "NI Vision does not support the SkeletonMethod value you supplied."; 910 case -1074395348: 911 return "NI Vision does not support the 3DPlane value you supplied."; 912 case -1074395347: 913 return "NI Vision does not support the 3DDirection value you supplied."; 914 case -1074395346: 915 return "imaqRotate does not support the InterpolationMethod value you supplied."; 916 case -1074395345: 917 return "NI Vision does not support the axis of symmetry you supplied."; 918 case -1074395343: 919 return "You must pass a valid file name. Do not pass in NULL."; 920 case -1074395340: 921 return "NI Vision does not support the SizeType value you supplied."; 922 case -1074395336: 923 return "You specified the dispatch status of an unknown algorithm."; 924 case -1074395335: 925 return "You are attempting to set the same algorithm to dispatch and to not dispatch. Remove one of the conflicting settings."; 926 case -1074395334: 927 return "NI Vision does not support the Conversion Method value you supplied."; 928 case -1074395333: 929 return "NI Vision does not support the VerticalTextAlignment value you supplied."; 930 case -1074395332: 931 return "NI Vision does not support the CompareFunction value you supplied."; 932 case -1074395331: 933 return "NI Vision does not support the BorderMethod value you supplied."; 934 case -1074395330: 935 return "Invalid border size. Acceptable values range from 0 to 50."; 936 case -1074395329: 937 return "NI Vision does not support the OutlineMethod value you supplied."; 938 case -1074395328: 939 return "NI Vision does not support the InterpolationMethod value you supplied."; 940 case -1074395327: 941 return "NI Vision does not support the ScalingMode value you supplied."; 942 case -1074395326: 943 return "imaqDrawLineOnImage does not support the DrawMode value you supplied."; 944 case -1074395325: 945 return "NI Vision does not support the DrawMode value you supplied."; 946 case -1074395324: 947 return "NI Vision does not support the ShapeMode value you supplied."; 948 case -1074395323: 949 return "NI Vision does not support the FontColor value you supplied."; 950 case -1074395322: 951 return "NI Vision does not support the TextAlignment value you supplied."; 952 case -1074395321: 953 return "NI Vision does not support the MorphologyMethod value you supplied."; 954 case -1074395320: 955 return "The template image is empty."; 956 case -1074395319: 957 return "NI Vision does not support the interpolation type you supplied."; 958 case -1074395318: 959 return "You supplied an insufficient number of points to perform this operation."; 960 case -1074395317: 961 return "You specified a point that lies outside the image."; 962 case -1074395316: 963 return "Invalid kernel code."; 964 case -1074395313: 965 return "Writing files is not supported on this device."; 966 case -1074395312: 967 return "The input image does not seem to be a valid LCD or LED calibration image."; 968 case -1074395311: 969 return "The color spectrum array you provided does not contain enough elements or contains an element set to not-a-number (NaN)."; 970 case -1074395310: 971 return "NI Vision does not support the PaletteType value you supplied."; 972 case -1074395309: 973 return "NI Vision does not support the WindowThreadPolicy value you supplied."; 974 case -1074395308: 975 return "NI Vision does not support the ColorSensitivity value you supplied."; 976 case -1074395307: 977 return "The precision parameter must be greater than 0."; 978 case -1074395306: 979 return "NI Vision does not support the Tool value you supplied."; 980 case -1074395305: 981 return "NI Vision does not support the ReferenceMode value you supplied."; 982 case -1074395304: 983 return "NI Vision does not support the MathTransformMethod value you supplied."; 984 case -1074395303: 985 return "Invalid number of classes for auto threshold. Acceptable values range from 2 to 256."; 986 case -1074395302: 987 return "NI Vision does not support the threshold method value you supplied."; 988 case -1074395301: 989 return "The ROI you passed into imaqGetMeterArc must consist of two lines."; 990 case -1074395300: 991 return "NI Vision does not support the MeterArcMode value you supplied."; 992 case -1074395299: 993 return "NI Vision does not support the ComplexPlane value you supplied."; 994 case -1074395298: 995 return "You can perform this operation on a real or an imaginary ComplexPlane only."; 996 case -1074395297: 997 return "NI Vision does not support the ParticleInfoMode value you supplied."; 998 case -1074395296: 999 return "NI Vision does not support the BarcodeType value you supplied."; 1000 case -1074395295: 1001 return "imaqInterpolatePoints does not support the InterpolationMethod value you supplied."; 1002 case -1074395294: 1003 return "The contour index you supplied is larger than the number of contours in the ROI."; 1004 case -1074395293: 1005 return "The supplied ContourID did not correlate to a contour inside the ROI."; 1006 case -1074395292: 1007 return "Do not supply collinear points for this operation."; 1008 case -1074395291: 1009 return "Shape Match requires the image to contain only pixel values of 0 or 1."; 1010 case -1074395290: 1011 return "The template you supplied for ShapeMatch contains no shape information."; 1012 case -1074395287: 1013 return "The line you provided contains two identical points, or one of the coordinate locations for the line is not a number (NaN)."; 1014 case -1074395286: 1015 return "Invalid concentric rake direction."; 1016 case -1074395285: 1017 return "Invalid spoke direction."; 1018 case -1074395284: 1019 return "Invalid edge process."; 1020 case -1074395283: 1021 return "Invalid rake direction."; 1022 case -1074395282: 1023 return "Unable to draw to viewer. You must have the latest version of the control."; 1024 case -1074395281: 1025 return "Your image must be larger than its border size for this operation."; 1026 case -1074395280: 1027 return "The ROI must only have a single Rectangle contour."; 1028 case -1074395279: 1029 return "ROI is not a polygon."; 1030 case -1074395278: 1031 return "LCD image is not a number."; 1032 case -1074395277: 1033 return "The decoded barcode information did not pass the checksum test."; 1034 case -1074395276: 1035 return "You specified parallel lines for the meter ROI."; 1036 case -1074395275: 1037 return "Invalid browser image."; 1038 case -1074395270: 1039 return "Cannot divide by zero."; 1040 case -1074395269: 1041 return "Null pointer."; 1042 case -1074395268: 1043 return "The linear equations are not independent."; 1044 case -1074395267: 1045 return "The roots of the equation are complex."; 1046 case -1074395265: 1047 return "The barcode does not match the type you specified."; 1048 case -1074395263: 1049 return "No lit segment."; 1050 case -1074395262: 1051 return "The LCD does not form a known digit."; 1052 case -1074395261: 1053 return "An internal error occurred while attempting to access an invalid coordinate on an image."; 1054 case -1074395260: 1055 return "An internal memory error occurred."; 1056 case -1074395258: 1057 return "The filter width must be odd for the Canny operator."; 1058 case -1074395257: 1059 return "You supplied an invalid edge direction in the Canny operator."; 1060 case -1074395256: 1061 return "The window size must be odd for the Canny operator. "; 1062 case -1074395253: 1063 return "Invalid learn mode."; 1064 case -1074395252: 1065 return "Invalid learn setup data."; 1066 case -1074395251: 1067 return "Invalid match mode."; 1068 case -1074395250: 1069 return "Invalid match setup data."; 1070 case -1074395249: 1071 return "At least one range in the array of rotation angle ranges exceeds 360 degrees."; 1072 case -1074395248: 1073 return "The array of rotation angle ranges contains too many ranges."; 1074 case -1074395247: 1075 return "Invalid template descriptor."; 1076 case -1074395246: 1077 return "Invalid template descriptor."; 1078 case -1074395245: 1079 return "Invalid template descriptor."; 1080 case -1074395244: 1081 return "Invalid template descriptor."; 1082 case -1074395243: 1083 return "The template descriptor was created with a newer version of NI Vision. Upgrade to the latest version of NI Vision to use this template."; 1084 case -1074395242: 1085 return "Invalid template descriptor."; 1086 case -1074395241: 1087 return "The template descriptor does not contain data required for rotation-invariant matching."; 1088 case -1074395240: 1089 return "Invalid template descriptor."; 1090 case -1074395239: 1091 return "Invalid template descriptor."; 1092 case -1074395238: 1093 return "The template descriptor does not contain data required for shift-invariant matching."; 1094 case -1074395237: 1095 return "Invalid template descriptor."; 1096 case -1074395235: 1097 return "The template image does not contain enough contrast."; 1098 case -1074395234: 1099 return "The template image is too small."; 1100 case -1074395233: 1101 return "The template image is too large."; 1102 case -1074395212: 1103 return "The size of the template string must match the size of the string you are trying to correct."; 1104 case -1074395211: 1105 return "The supplied text template contains nonstandard characters that cannot be generated by OCR."; 1106 case -1074395210: 1107 return "At least one character in the text template was of a lexical class that did not match the supplied character reports."; 1108 case -1074395203: 1109 return "The OCR library cannot be initialized correctly."; 1110 case -1074395201: 1111 return "There was a failure when loading one of the internal OCR engine or LabView libraries."; 1112 case -1074395200: 1113 return "One of the parameters supplied to the OCR function that generated this error is invalid."; 1114 case -1074395179: 1115 return "The OCR engine failed during the preprocessing stage."; 1116 case -1074395178: 1117 return "The OCR engine failed during the recognition stage."; 1118 case -1074395175: 1119 return "The provided filename is not valid user dictionary filename."; 1120 case -1074395174: 1121 return "NI Vision does not support the AutoOrientMode value you supplied."; 1122 case -1074395173: 1123 return "NI Vision does not support the Language value you supplied."; 1124 case -1074395172: 1125 return "NI Vision does not support the CharacterSet value you supplied."; 1126 case -1074395171: 1127 return "The system could not locate the initialization file required for OCR initialization."; 1128 case -1074395170: 1129 return "NI Vision does not support the CharacterType value you supplied."; 1130 case -1074395169: 1131 return "NI Vision does not support the RecognitionMode value you supplied."; 1132 case -1074395168: 1133 return "NI Vision does not support the AutoCorrectionMode value you supplied."; 1134 case -1074395167: 1135 return "NI Vision does not support the OutputDelimiter value you supplied."; 1136 case -1074395166: 1137 return "The system could not locate the OCR binary directory required for OCR initialization."; 1138 case -1074395165: 1139 return "The system could not locate the OCR weights directory required for OCR initialization."; 1140 case -1074395164: 1141 return "The supplied word could not be added to the user dictionary."; 1142 case -1074395163: 1143 return "NI Vision does not support the CharacterPreference value you supplied."; 1144 case -1074395162: 1145 return "NI Vision does not support the CorrectionMethod value you supplied."; 1146 case -1074395161: 1147 return "NI Vision does not support the CorrectionLevel value you supplied."; 1148 case -1074395160: 1149 return "NI Vision does not support the maximum point size you supplied. Valid values range from 4 to 72."; 1150 case -1074395159: 1151 return "NI Vision does not support the tolerance value you supplied. Valid values are non-negative."; 1152 case -1074395158: 1153 return "NI Vision does not support the ContrastMode value you supplied."; 1154 case -1074395156: 1155 return "The OCR attempted to detected the text skew and failed."; 1156 case -1074395155: 1157 return "The OCR attempted to detected the text orientation and failed."; 1158 case -1074395153: 1159 return "Invalid font file format."; 1160 case -1074395152: 1161 return "Font file not found."; 1162 case -1074395151: 1163 return "The OCR engine failed during the correction stage."; 1164 case -1074395150: 1165 return "NI Vision does not support the RoundingMode value you supplied."; 1166 case -1074395149: 1167 return "Found a duplicate transform type in the properties array. Each properties array may only contain one behavior for each transform type."; 1168 case -1074395148: 1169 return "Overlay Group Not Found."; 1170 case -1074395147: 1171 return "The barcode is not a valid RSS Limited symbol"; 1172 case -1074395146: 1173 return "Couldn't determine the correct version of the QR code."; 1174 case -1074395145: 1175 return "Invalid read of the QR code."; 1176 case -1074395144: 1177 return "The barcode that was read contains invalid parameters."; 1178 case -1074395143: 1179 return "The data stream that was demodulated could not be read because the mode was not detected."; 1180 case -1074395142: 1181 return "Couldn't determine the correct model of the QR code."; 1182 case -1074395141: 1183 return "The OCR engine could not find any text in the supplied region."; 1184 case -1074395140: 1185 return "One of the character reports is no longer usable by the system."; 1186 case -1074395139: 1187 return "Invalid Dimensions."; 1188 case -1074395138: 1189 return "The OCR region provided was too small to have contained any characters."; 1190 default: 1191 return "Error code not found"; 1192 } 1193 } 1194}