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 008 package edu.wpi.first.wpilibj.image; 009 010 /** 011 * Exception class which looks up nivision error codes 012 * @author dtjones 013 */ 014 public 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: return "No error."; 035 case -1074396160: return "System error."; 036 case -1074396159: return "Not enough memory for requested operation."; 037 case -1074396158: return "Memory error."; 038 case -1074396157: return "Unlicensed copy of NI Vision."; 039 case -1074396156: return "The function requires an NI Vision 5.0 Advanced license."; 040 case -1074396155: return "NI Vision did not initialize properly."; 041 case -1074396154: return "The image is not large enough for the operation."; 042 case -1074396153: return "The barcode is not a valid Codabar barcode."; 043 case -1074396152: return "The barcode is not a valid Code 3 of 9 barcode."; 044 case -1074396151: return "The barcode is not a valid Code93 barcode."; 045 case -1074396150: return "The barcode is not a valid Code128 barcode."; 046 case -1074396149: return "The barcode is not a valid EAN8 barcode."; 047 case -1074396148: return "The barcode is not a valid EAN13 barcode."; 048 case -1074396147: return "The barcode is not a valid Interleaved 2 of 5 barcode."; 049 case -1074396146: return "The barcode is not a valid MSI barcode."; 050 case -1074396145: return "The barcode is not a valid UPCA barcode."; 051 case -1074396144: return "The Code93 barcode contains invalid shift encoding."; 052 case -1074396143: return "The barcode type is invalid."; 053 case -1074396142: return "The image does not represent a valid linear barcode."; 054 case -1074396141: return "The FNC value in the Code128 barcode is not located before the first data value."; 055 case -1074396140: return "The starting code set in the Code128 barcode is not valid."; 056 case -1074396139: return "Not enough reserved memory in the timed environment for the requested operation."; 057 case -1074396138: return "The function is not supported when a time limit is active."; 058 case -1074396137: return "Quartz.dll not found. Install DirectX 8.1 or later."; 059 case -1074396136: return "The filter quality you provided is invalid. Valid quality values range from -1 to 1000."; 060 case -1074396135: return "Invalid button label."; 061 case -1074396134: return "Could not execute the function in the separate thread because the thread has not completed initialization."; 062 case -1074396133: return "Could not execute the function in the separate thread because the thread could not initialize."; 063 case -1074396132: return "The mask must be the same size as the template."; 064 case -1074396130: return "The ROI must only have either a single Rectangle contour or a single Rotated Rectangle contour."; 065 case -1074396129: return "During timed execution, you must use the preallocated version of this operation."; 066 case -1074396128: return "An image being modified by one process cannot be requested by another process while a time limit is active."; 067 case -1074396127: return "An image with pattern matching, calibration, or overlay information cannot be manipulated while a time limit is active."; 068 case -1074396126: return "An image created before a time limit is started cannot be resized while a time limit is active."; 069 case -1074396125: return "Invalid contrast threshold. The threshold value must be greater than 0. "; 070 case -1074396124: return "NI Vision does not support the calibration ROI mode you supplied."; 071 case -1074396123: return "NI Vision does not support the calibration mode you supplied."; 072 case -1074396122: return "Set the foreground and background text colors to grayscale to draw on a U8 image."; 073 case -1074396121: return "The value of the saturation threshold must be from 0 to 255."; 074 case -1074396120: return "Not an image."; 075 case -1074396119: 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."; 076 case -1074396118: return "Step size must be greater than zero."; 077 case -1074396117: return "Invalid matrix size in the structuring element."; 078 case -1074396116: return "Insufficient number of calibration feature points."; 079 case -1074396115: return "The operation is invalid in a corrected image."; 080 case -1074396114: return "The ROI contains an invalid contour type or is not contained in the ROI learned for calibration."; 081 case -1074396113: return "The source/input image has not been calibrated."; 082 case -1074396112: return "The number of pixel and real-world coordinates must be equal."; 083 case -1074396111: return "Unable to automatically detect grid because the image is too distorted."; 084 case -1074396110: return "Invalid calibration information version."; 085 case -1074396109: return "Invalid calibration scaling factor."; 086 case -1074396108: return "The calibration error map cannot be computed."; 087 case -1074396107: return "Invalid calibration template image."; 088 case -1074396106: return "Invalid calibration template image."; 089 case -1074396105: return "Invalid calibration template image."; 090 case -1074396104: return "Invalid calibration template image."; 091 case -1074396103: return "Invalid calibration template image."; 092 case -1074396102: return "Invalid calibration template image."; 093 case -1074396101: return "Invalid calibration template image."; 094 case -1074396100: return "Invalid calibration template image."; 095 case -1074396099: return "Invalid calibration template image."; 096 case -1074396098: return "You must pass NULL for the reserved parameter."; 097 case -1074396097: return "You entered an invalid selection in the particle parameter."; 098 case -1074396096: return "Not an object."; 099 case -1074396095: return "The reference points passed are inconsistent. At least two similar pixel coordinates correspond to different real-world coordinates."; 100 case -1074396094: return "A resource conflict occurred in the timed environment. Two processes cannot manage the same resource and be time bounded."; 101 case -1074396093: return "A resource conflict occurred in the timed environment. Two processes cannot access the same resource and be time bounded."; 102 case -1074396092: return "Multiple timed environments are not supported."; 103 case -1074396091: return "A time limit cannot be started until the timed environment is initialized."; 104 case -1074396090: return "Multiple timed environments are not supported."; 105 case -1074396089: return "The timed environment is already initialized."; 106 case -1074396088: return "The results of the operation exceeded the size limits on the output data arrays."; 107 case -1074396087: return "No time limit is available to stop."; 108 case -1074396086: return "A time limit could not be set."; 109 case -1074396085: return "The timed environment could not be initialized."; 110 case -1074396084: return "No initialized timed environment is available to close."; 111 case -1074396083: return "The time limit has expired."; 112 case -1074396082: 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."; 113 case -1074396081: return "Incorrect password."; 114 case -1074396080: return "Invalid image type."; 115 case -1074396079: return "Invalid metafile handle."; 116 case -1074396077: return "Incompatible image type."; 117 case -1074396076: return "Unable to fit a line for the primary axis."; 118 case -1074396075: return "Unable to fit a line for the secondary axis."; 119 case -1074396074: return "Incompatible image size."; 120 case -1074396073: return "When the mask's offset was applied, the mask was entirely outside of the image."; 121 case -1074396072: return "Invalid image border."; 122 case -1074396071: return "Invalid scan direction."; 123 case -1074396070: return "Unsupported function."; 124 case -1074396069: return "NI Vision does not support the color mode you specified."; 125 case -1074396068: return "The function does not support the requested action."; 126 case -1074396067: return "The source image and destination image must be different."; 127 case -1074396066: return "Invalid point symbol."; 128 case -1074396065: return "Cannot resize an image in an acquisition buffer."; 129 case -1074396064: return "This operation is not supported for images in an acquisition buffer."; 130 case -1074396063: 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."; 131 case -1074396062: return "The tolerance parameter must be greater than or equal to 0."; 132 case -1074396061: 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."; 133 case -1074396060: 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."; 134 case -1074396059: return "Invalid maximum number of iterations. Maximum number of iterations must be greater than zero."; 135 case -1074396058: return "Invalid rotation mode."; 136 case -1074396057: return "Invalid search vector width. The width must be an odd number greater than zero."; 137 case -1074396056: return "Invalid matrix mirror mode."; 138 case -1074396055: return "Invalid aspect ratio. Valid aspect ratios must be greater than or equal to zero."; 139 case -1074396054: return "Invalid cell fill type."; 140 case -1074396053: return "Invalid border integrity. Valid values range from 0 to 100."; 141 case -1074396052: return "Invalid demodulation mode."; 142 case -1074396051: return "Invalid cell filter mode."; 143 case -1074396050: return "Invalid ECC type."; 144 case -1074396049: return "Invalid matrix polarity."; 145 case -1074396048: return "Invalid cell sample size."; 146 case -1074396047: return "Invalid linear average mode."; 147 case -1074396046: 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."; 148 case -1074396045: return "Invalid 2-D barcode Data Matrix subtype."; 149 case -1074396044: return "Invalid 2-D barcode shape."; 150 case -1074396043: return "Invalid 2-D barcode cell shape."; 151 case -1074396042: return "Invalid 2-D barcode contrast."; 152 case -1074396041: return "Invalid 2-D barcode type."; 153 case -1074396040: return "Cannot access NI-IMAQ driver."; 154 case -1074396039: return "I/O error."; 155 case -1074396038: return "When searching for a coordinate system, the number of lines to fit must be 1."; 156 case -1074396037: return "Trigger timeout."; 157 case -1074396036: return "The Skeleton mode you specified is invalid."; 158 case -1074396035: return "The template image does not contain enough information for learning the aggressive search strategy."; 159 case -1074396034: return "The template image does not contain enough edge information for the sample size(s) requested."; 160 case -1074396033: return "Invalid template descriptor."; 161 case -1074396032: return "The template descriptor does not contain data required for the requested search strategy in rotation-invariant matching."; 162 case -1074396026: return "Invalid process type for edge detection."; 163 case -1074396025: return "Angle range value should be equal to or greater than zero."; 164 case -1074396024: return "Minimum coverage value should be greater than zero."; 165 case -1074396023: return "The angle tolerance should be equal to or greater than 0.001."; 166 case -1074396022: return "Invalid search mode for detecting straight edges"; 167 case -1074396021: 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."; 168 case -1074396020: return "Invalid grading mode."; 169 case -1074396019: return "Invalid threshold percentage. Valid values range from 0 to 100."; 170 case -1074396018: return "Invalid edge polarity search mode."; 171 case -1074396017: 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."; 172 case -1074396016: return "No video driver is installed."; 173 case -1074396015: return "Unable to establish network connection with remote system."; 174 case -1074396014: return "RT Video Out does not support displaying the supplied image type at the selected color depth."; 175 case -1074396013: return "Invalid video mode."; 176 case -1074396012: return "Unable to display remote image on network connection."; 177 case -1074396011: return "Unable to establish network connection."; 178 case -1074396010: return "Invalid frame number."; 179 case -1074396009: return "An internal DirectX error has occurred. Try upgrading to the latest version of DirectX."; 180 case -1074396008: 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."; 181 case -1074396007: return "Incompatible compression filter."; 182 case -1074396006: return "Unknown compression filter."; 183 case -1074396005: return "Invalid AVI session."; 184 case -1074396004: return "A software key is restricting the use of this compression filter."; 185 case -1074396003: return "The data for this frame exceeds the data buffer size specified when creating the AVI file."; 186 case -1074396002: return "Invalid line gauge method."; 187 case -1074396001: return "There are too many AVI sessions open. You must close a session before you can open another one."; 188 case -1074396000: return "Invalid file header."; 189 case -1074395999: return "Invalid file type."; 190 case -1074395998: return "Invalid color table."; 191 case -1074395997: return "Invalid parameter."; 192 case -1074395996: return "File is already open for writing."; 193 case -1074395995: return "File not found."; 194 case -1074395994: return "Too many files open."; 195 case -1074395993: return "File I/O error."; 196 case -1074395992: return "File access denied."; 197 case -1074395991: return "NI Vision does not support the file type you specified."; 198 case -1074395990: return "Could not read Vision info from file."; 199 case -1074395989: return "Unable to read data."; 200 case -1074395988: return "Unable to write data."; 201 case -1074395987: return "Premature end of file."; 202 case -1074395986: return "Invalid file format."; 203 case -1074395985: return "Invalid file operation."; 204 case -1074395984: return "NI Vision does not support the file data type you specified."; 205 case -1074395983: return "Disk full."; 206 case -1074395982: return "The frames per second in an AVI must be greater than zero."; 207 case -1074395981: return "The buffer that was passed in is not big enough to hold all of the data."; 208 case -1074395980: return "Error initializing COM."; 209 case -1074395979: return "The image has invalid particle information. Call imaqCountParticles on the image to create particle information."; 210 case -1074395978: return "Invalid particle number."; 211 case -1074395977: 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."; 212 case -1074395976: return "The color palette must have exactly 0 or 256 entries."; 213 case -1074395975: 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."; 214 case -1074395974: return "NI Vision does not support reading JPEG2000 files with this colorspace method."; 215 case -1074395973: return "NI Vision does not support reading JPEG2000 files with more than one layer."; 216 case -1074395972: 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."; 217 case -1074395971: return "The offset you specified must be size 2."; 218 case -1074395960: return "Initialization error."; 219 case -1074395959: return "Unable to create window."; 220 case -1074395958: return "Invalid window ID."; 221 case -1074395957: return "The array sizes are not compatible."; 222 case -1074395956: return "The quality you provided is invalid. Valid quality values range from -1 to 1000."; 223 case -1074395955: return "Invalid maximum wavelet transform level. Valid values range from 0 to 255."; 224 case -1074395954: return "The quantization step size must be greater than or equal to 0."; 225 case -1074395953: return "Invalid wavelet transform mode."; 226 case -1074395920: return "Invalid number of classes."; 227 case -1074395880: return "Invalid particle."; 228 case -1074395879: return "Invalid measure number."; 229 case -1074395878: return "The Image Display control does not support writing this property node."; 230 case -1074395877: return "The specified color mode requires the use of imaqChangeColorSpace2."; 231 case -1074395876: return "This function does not currently support the color mode you specified."; 232 case -1074395875: return "The barcode is not a valid Pharmacode symbol"; 233 case -1074395840: return "Invalid handle table index."; 234 case -1074395837: return "The compression ratio must be greater than or equal to 1."; 235 case -1074395801: return "The ROI contains too many contours."; 236 case -1074395800: return "Protection error."; 237 case -1074395799: return "Internal error."; 238 case -1074395798: return "The size of the feature vector in the custom sample must match the size of those you have already added."; 239 case -1074395797: return "Not a valid classifier session."; 240 case -1074395796: return "You requested an invalid Nearest Neighbor classifier method."; 241 case -1074395795: return "The k parameter must be greater than two."; 242 case -1074395794: return "The k parameter must be <= the number of samples in each class."; 243 case -1074395793: return "This classifier session is compact. Only the Classify and Dispose functions may be called on a compact classifier session."; 244 case -1074395792: return "This classifier session is not trained. You may only call this function on a trained classifier session."; 245 case -1074395791: return "This classifier function cannot be called on this type of classifier session."; 246 case -1074395790: return "You requested an invalid distance metric."; 247 case -1074395789: 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."; 248 case -1074395788: return "This operation cannot be performed because you have not added any samples."; 249 case -1074395787: return "You requested an invalid classifier type."; 250 case -1074395786: return "The sum of Scale Dependence and Symmetry Dependence must be less than 1000."; 251 case -1074395785: return "The image yielded no particles."; 252 case -1074395784: return "The limits you supplied are not valid."; 253 case -1074395783: return "The Sample Index fell outside the range of Samples."; 254 case -1074395782: return "The description must be <= 255 characters."; 255 case -1074395781: return "The engine for this classifier session does not support this operation."; 256 case -1074395780: return "You requested an invalid particle type."; 257 case -1074395779: return "You may only save a session in compact form if it is trained."; 258 case -1074395778: return "The Kernel size must be smaller than the image size."; 259 case -1074395777: return "The session you read from file must be the same type as the session you passed in."; 260 case -1074395776: return "You can not use a compact classification file with read options other than Read All."; 261 case -1074395775: return "The ROI you passed in may only contain closed contours."; 262 case -1074395774: return "You must pass in a label."; 263 case -1074395773: return "You must provide a destination image."; 264 case -1074395772: return "You provided an invalid registration method."; 265 case -1074395771: 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."; 266 case -1074395770: return "Invalid golden template."; 267 case -1074395769: return "Edge Thickness to Ignore must be greater than zero."; 268 case -1074395768: return "Scale must be greater than zero."; 269 case -1074395767: return "The supplied scale is invalid for your template."; 270 case -1074395766: return "This backwards-compatibility function can not be used with this session. Use newer, supported functions instead."; 271 case -1074395763: return "You must provide a valid normalization method."; 272 case -1074395762: return "The deviation factor for Niblack local threshold must be between 0 and 1."; 273 case -1074395760: return "Board not found."; 274 case -1074395758: return "Board not opened."; 275 case -1074395757: return "DLL not found."; 276 case -1074395756: return "DLL function not found."; 277 case -1074395754: return "Trigger timeout."; 278 case -1074395728: return "NI Vision does not support the search mode you provided."; 279 case -1074395727: return "NI Vision does not support the search mode you provided for the type of 2D barcode for which you are searching."; 280 case -1074395726: return "matchFactor has been obsoleted. Instead, set the initialMatchListLength and matchListReductionFactor in the MatchPatternAdvancedOptions structure."; 281 case -1074395725: return "The data was stored with a newer version of NI Vision. Upgrade to the latest version of NI Vision to read this data."; 282 case -1074395724: return "The size you specified is out of the valid range."; 283 case -1074395723: return "The key you specified cannot be found in the image."; 284 case -1074395722: return "Custom classifier sessions only classify feature vectors. They do not support classifying images."; 285 case -1074395721: return "NI Vision does not support the bit depth you supplied for the image you supplied."; 286 case -1074395720: return "Invalid ROI."; 287 case -1074395719: return "Invalid ROI global rectangle."; 288 case -1074395718: return "The version of LabVIEW or BridgeVIEW you are running does not support this operation."; 289 case -1074395717: return "The range you supplied is invalid."; 290 case -1074395716: return "NI Vision does not support the scaling method you provided."; 291 case -1074395715: return "NI Vision does not support the calibration unit you supplied."; 292 case -1074395714: return "NI Vision does not support the axis orientation you supplied."; 293 case -1074395713: return "Value not in enumeration."; 294 case -1074395712: return "You selected a region that is not of the right type."; 295 case -1074395711: return "You specified a viewer that does not contain enough regions."; 296 case -1074395710: return "The image has too many particles for this process."; 297 case -1074395709: return "The AVI session has not been opened."; 298 case -1074395708: return "The AVI session is a write session, but this operation requires a read session."; 299 case -1074395707: return "The AVI session is a read session, but this operation requires a write session."; 300 case -1074395706: return "This AVI session is already open. You must close it before calling the Create or Open functions."; 301 case -1074395705: return "The data is corrupted and cannot be read."; 302 case -1074395704: return "Invalid compression type."; 303 case -1074395703: return "Invalid type of flatten."; 304 case -1074395702: return "The length of the edge detection line must be greater than zero."; 305 case -1074395701: return "The maximum Data Matrix barcode size must be equal to or greater than the minimum Data Matrix barcode size."; 306 case -1074395700: return "The function requires the operating system to be Microsoft Windows 2000 or newer."; 307 case -1074395656: return "You must specify the same value for the smooth contours advanced match option for all templates you want to match."; 308 case -1074395655: return "You must specify the same value for the enable calibration support advanced match option for all templates you want to match."; 309 case -1074395654: 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."; 310 case -1074395653: 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."; 311 case -1074395652: 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."; 312 case -1074395651: return "You must specify the same edge filter size for all the templates you want to match."; 313 case -1074395650: return "You must specify the same curve extraction mode for all the templates you want to match."; 314 case -1074395649: return "The geometric feature type specified is invalid."; 315 case -1074395648: return "You supplied a template that was not learned."; 316 case -1074395647: return "Invalid multiple geometric template."; 317 case -1074395646: return "Need at least one template to learn."; 318 case -1074395645: return "You supplied an invalid number of labels."; 319 case -1074395644: return "Labels must be <= 255 characters."; 320 case -1074395643: return "You supplied an invalid number of match options."; 321 case -1074395642: return "Cannot find a label that matches the one you specified."; 322 case -1074395641: return "Duplicate labels are not allowed."; 323 case -1074395640: return "The number of zones found exceeded the capacity of the algorithm."; 324 case -1074395639: return "The hatch style for the window background is invalid."; 325 case -1074395638: return "The fill style for the window background is invalid."; 326 case -1074395637: return "Your hardware is not supported by DirectX and cannot be put into NonTearing mode."; 327 case -1074395636: return "DirectX is required for this feature. Please install the latest version.."; 328 case -1074395635: return "The passed shape descriptor is invalid."; 329 case -1074395634: return "Invalid max match overlap. Values must be between -1 and 100."; 330 case -1074395633: return "Invalid minimum match separation scale. Values must be greater than or equal to -1."; 331 case -1074395632: return "Invalid minimum match separation angle. Values must be between -1 and 360."; 332 case -1074395631: return "Invalid minimum match separation distance. Values must be greater than or equal to -1."; 333 case -1074395630: return "Invalid maximum number of features learn. Values must be integers greater than zero."; 334 case -1074395629: return "Invalid maximum pixel distance from line. Values must be positive real numbers."; 335 case -1074395628: return "Invalid geometric matching template image."; 336 case -1074395627: return "The template does not contain enough features for geometric matching."; 337 case -1074395626: return "The template does not contain enough features for geometric matching."; 338 case -1074395625: return "You specified an invalid value for the match constraint value of the range settings."; 339 case -1074395624: 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."; 340 case -1074395623: 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."; 341 case -1074395622: return "Invalid match geometric pattern setup data."; 342 case -1074395621: return "Invalid learn geometric pattern setup data."; 343 case -1074395620: return "Invalid curve extraction mode."; 344 case -1074395619: return "You can specify only one occlusion range."; 345 case -1074395618: return "You can specify only one scale range."; 346 case -1074395617: return "The minimum number of features must be less than or equal to the maximum number of features."; 347 case -1074395616: return "Invalid edge filter size."; 348 case -1074395615: return "Invalid minimum strength for features. Values must be positive real numbers."; 349 case -1074395614: return "Invalid aspect ratio for rectangular features. Values must be positive real numbers in the range 0.01 to 1.0."; 350 case -1074395613: return "Invalid minimum length for linear features. Values must be integers greater than 0."; 351 case -1074395612: return "Invalid minimum radius for circular features. Values must be integers greater than 0."; 352 case -1074395611: return "Invalid minimum rectangle dimension. Values must be integers greater than 0."; 353 case -1074395610: return "Invalid initial match list length. Values must be integers greater than 5."; 354 case -1074395609: return "Invalid subpixel tolerance. Values must be positive real numbers."; 355 case -1074395608: return "Invalid number of subpixel iterations. Values must be integers greater 10."; 356 case -1074395607: return "Invalid maximum number of features used per match. Values must be integers greater than or equal to zero."; 357 case -1074395606: return "Invalid minimum number of features used for matching. Values must be integers greater than zero."; 358 case -1074395605: return "Invalid maximum end point gap. Valid values range from 0 to 32767."; 359 case -1074395604: return "Invalid column step. Valid range is 1 to 255."; 360 case -1074395603: return "Invalid row step. Valid range is 1 to 255."; 361 case -1074395602: return "Invalid minimum length. Valid values must be greater than or equal to zero."; 362 case -1074395601: return "Invalid edge threshold. Valid values range from 1 to 360."; 363 case -1074395600: return "You must provide information about the subimage within the browser."; 364 case -1074395598: return "The acceptance level is outside the valid range of 0 to 1000."; 365 case -1074395597: return "Not a valid OCR session."; 366 case -1074395596: return "Invalid character size. Character size must be >= 1."; 367 case -1074395595: return "Invalid threshold mode value."; 368 case -1074395594: return "Invalid substitution character. Valid substitution characters are ASCII values that range from 1 to 254."; 369 case -1074395593: return "Invalid number of blocks. Number of blocks must be >= 4 and <= 50."; 370 case -1074395592: return "Invalid read strategy."; 371 case -1074395591: return "Invalid character index."; 372 case -1074395590: return "Invalid number of character positions. Valid values range from 0 to 255."; 373 case -1074395589: return "Invalid low threshold value. Valid threshold values range from 0 to 255."; 374 case -1074395588: return "Invalid high threshold value. Valid threshold values range from 0 to 255."; 375 case -1074395587: return "The low threshold must be less than the high threshold."; 376 case -1074395586: return "Invalid lower threshold limit. Valid lower threshold limits range from 0 to 255."; 377 case -1074395585: return "Invalid upper threshold limit. Valid upper threshold limits range from 0 to 255."; 378 case -1074395584: return "The lower threshold limit must be less than the upper threshold limit."; 379 case -1074395583: return "Invalid minimum character spacing value. Character spacing must be >= 0 pixels."; 380 case -1074395582: return "Invalid maximum horizontal element spacing value. Maximum horizontal element spacing must be >= 0."; 381 case -1074395581: return "Invalid maximum vertical element spacing value. Maximum vertical element spacing must be >= 0."; 382 case -1074395580: return "Invalid minimum bounding rectangle width. Minimum bounding rectangle width must be >= 1."; 383 case -1074395579: return "Invalid aspect ratio value. The aspect ratio must be zero or >= 100."; 384 case -1074395578: return "Invalid or corrupt character set file."; 385 case -1074395577: return "The character value must not be an empty string."; 386 case -1074395576: return "Character values must be <=255 characters."; 387 case -1074395575: return "Invalid number of erosions. The number of erosions must be >= 0."; 388 case -1074395574: return "The character set description must be <=255 characters."; 389 case -1074395573: 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."; 390 case -1074395572: return "You must specify characters for a string. A string cannot contain integers."; 391 case -1074395571: return "This attribute is read-only."; 392 case -1074395570: return "This attribute requires a Boolean value."; 393 case -1074395569: return "Invalid attribute."; 394 case -1074395568: return "This attribute requires integer values."; 395 case -1074395567: return "String values are invalid for this attribute. Enter a boolean value."; 396 case -1074395566: return "Boolean values are not valid for this attribute. Enter an integer value."; 397 case -1074395565: return "Requires a single-character string."; 398 case -1074395564: return "Invalid predefined character value."; 399 case -1074395563: return "This copy of NI OCR is unlicensed."; 400 case -1074395562: return "String values are not valid for this attribute. Enter a Boolean value."; 401 case -1074395561: return "The number of characters in the character value must match the number of objects in the image."; 402 case -1074395560: return "Invalid object index."; 403 case -1074395559: return "Invalid read option."; 404 case -1074395558: return "The minimum character size must be less than the maximum character size."; 405 case -1074395557: return "The minimum character bounding rectangle width must be less than the maximum character bounding rectangle width."; 406 case -1074395556: return "The minimum character bounding rectangle height must be less than the maximum character bounding rectangle height."; 407 case -1074395555: return "The maximum horizontal element spacing value must not exceed the minimum character spacing value."; 408 case -1074395554: return "Invalid read resolution."; 409 case -1074395553: return "Invalid minimum bounding rectangle height. The minimum bounding rectangle height must be >= 1."; 410 case -1074395552: return "Not a valid character set."; 411 case -1074395551: return "A trained OCR character cannot be renamed while it is a reference character."; 412 case -1074395550: return "A character cannot have an ASCII value of 255."; 413 case -1074395549: return "The number of objects found does not match the number of expected characters or patterns to verify."; 414 case -1074395410: return "NI Vision does not support less than one icon per line."; 415 case -1074395409: return "Invalid subpixel divisions."; 416 case -1074395408: return "Invalid detection mode."; 417 case -1074395407: return "Invalid contrast value. Valid contrast values range from 0 to 255."; 418 case -1074395406: return "The coordinate system could not be found on this image."; 419 case -1074395405: return "NI Vision does not support the text orientation value you supplied."; 420 case -1074395404: return "UnwrapImage does not support the interpolation method value you supplied. Valid interpolation methods are zero order and bilinear. "; 421 case -1074395403: return "The image was created in a newer version of NI Vision. Upgrade to the latest version of NI Vision to use this image."; 422 case -1074395402: return "The function does not support the maximum number of points that you specified."; 423 case -1074395401: return "The function does not support the matchFactor that you specified."; 424 case -1074395400: return "The operation you have given Multicore Options is invalid. Please see the available enumeration values for Multicore Operation."; 425 case -1074395399: return "You have given Multicore Options an invalid argument."; 426 case -1074395397: return "A complex image is required."; 427 case -1074395395: return "The input image must be a color image."; 428 case -1074395394: return "The color mask removes too much color information."; 429 case -1074395393: return "The color template image is too small."; 430 case -1074395392: return "The color template image is too large."; 431 case -1074395391: return "The contrast in the hue plane of the image is too low for learning shape features."; 432 case -1074395390: return "The contrast in the luminance plane of the image is too low to learn shape features."; 433 case -1074395389: return "Invalid color learn setup data."; 434 case -1074395388: return "Invalid color learn setup data."; 435 case -1074395387: return "Invalid color match setup data."; 436 case -1074395386: return "Invalid color match setup data."; 437 case -1074395385: return "Rotation-invariant color pattern matching requires a feature mode including shape."; 438 case -1074395384: return "Invalid color template image."; 439 case -1074395383: return "Invalid color template image."; 440 case -1074395382: return "Invalid color template image."; 441 case -1074395381: return "Invalid color template image."; 442 case -1074395380: return "Invalid color template image."; 443 case -1074395379: return "Invalid color template image."; 444 case -1074395378: return "Invalid color template image."; 445 case -1074395377: return "Invalid color template image."; 446 case -1074395376: return "The color template image does not contain data required for shift-invariant color matching."; 447 case -1074395375: return "Invalid color template image."; 448 case -1074395374: return "Invalid color template image."; 449 case -1074395373: return "Invalid color template image."; 450 case -1074395372: return "The color template image does not contain data required for rotation-invariant color matching."; 451 case -1074395371: return "Invalid color template image."; 452 case -1074395370: return "Invalid color template image."; 453 case -1074395369: return "Invalid color template image."; 454 case -1074395368: return "Invalid color template image."; 455 case -1074395367: return "Invalid color template image."; 456 case -1074395366: return "The color template image does not contain data required for color matching in shape feature mode."; 457 case -1074395365: return "The color template image does not contain data required for color matching in color feature mode."; 458 case -1074395364: return "The ignore color spectra array is invalid."; 459 case -1074395363: return "Invalid subsampling ratio."; 460 case -1074395362: return "Invalid pixel width."; 461 case -1074395361: return "Invalid steepness."; 462 case -1074395360: return "Invalid complex plane."; 463 case -1074395357: return "Invalid color ignore mode."; 464 case -1074395356: return "Invalid minimum match score. Acceptable values range from 0 to 1000."; 465 case -1074395355: return "Invalid number of matches requested. You must request a minimum of one match."; 466 case -1074395354: return "Invalid color weight. Acceptable values range from 0 to 1000."; 467 case -1074395353: return "Invalid search strategy."; 468 case -1074395352: return "Invalid feature mode."; 469 case -1074395351: return "NI Vision does not support rectangles with negative widths or negative heights."; 470 case -1074395350: return "NI Vision does not support the vision information type you supplied."; 471 case -1074395349: return "NI Vision does not support the SkeletonMethod value you supplied."; 472 case -1074395348: return "NI Vision does not support the 3DPlane value you supplied."; 473 case -1074395347: return "NI Vision does not support the 3DDirection value you supplied."; 474 case -1074395346: return "imaqRotate does not support the InterpolationMethod value you supplied."; 475 case -1074395345: return "NI Vision does not support the axis of symmetry you supplied."; 476 case -1074395343: return "You must pass a valid file name. Do not pass in NULL."; 477 case -1074395340: return "NI Vision does not support the SizeType value you supplied."; 478 case -1074395336: return "You specified the dispatch status of an unknown algorithm."; 479 case -1074395335: return "You are attempting to set the same algorithm to dispatch and to not dispatch. Remove one of the conflicting settings."; 480 case -1074395334: return "NI Vision does not support the Conversion Method value you supplied."; 481 case -1074395333: return "NI Vision does not support the VerticalTextAlignment value you supplied."; 482 case -1074395332: return "NI Vision does not support the CompareFunction value you supplied."; 483 case -1074395331: return "NI Vision does not support the BorderMethod value you supplied."; 484 case -1074395330: return "Invalid border size. Acceptable values range from 0 to 50."; 485 case -1074395329: return "NI Vision does not support the OutlineMethod value you supplied."; 486 case -1074395328: return "NI Vision does not support the InterpolationMethod value you supplied."; 487 case -1074395327: return "NI Vision does not support the ScalingMode value you supplied."; 488 case -1074395326: return "imaqDrawLineOnImage does not support the DrawMode value you supplied."; 489 case -1074395325: return "NI Vision does not support the DrawMode value you supplied."; 490 case -1074395324: return "NI Vision does not support the ShapeMode value you supplied."; 491 case -1074395323: return "NI Vision does not support the FontColor value you supplied."; 492 case -1074395322: return "NI Vision does not support the TextAlignment value you supplied."; 493 case -1074395321: return "NI Vision does not support the MorphologyMethod value you supplied."; 494 case -1074395320: return "The template image is empty."; 495 case -1074395319: return "NI Vision does not support the interpolation type you supplied."; 496 case -1074395318: return "You supplied an insufficient number of points to perform this operation."; 497 case -1074395317: return "You specified a point that lies outside the image."; 498 case -1074395316: return "Invalid kernel code."; 499 case -1074395313: return "Writing files is not supported on this device."; 500 case -1074395312: return "The input image does not seem to be a valid LCD or LED calibration image."; 501 case -1074395311: return "The color spectrum array you provided does not contain enough elements or contains an element set to not-a-number (NaN)."; 502 case -1074395310: return "NI Vision does not support the PaletteType value you supplied."; 503 case -1074395309: return "NI Vision does not support the WindowThreadPolicy value you supplied."; 504 case -1074395308: return "NI Vision does not support the ColorSensitivity value you supplied."; 505 case -1074395307: return "The precision parameter must be greater than 0."; 506 case -1074395306: return "NI Vision does not support the Tool value you supplied."; 507 case -1074395305: return "NI Vision does not support the ReferenceMode value you supplied."; 508 case -1074395304: return "NI Vision does not support the MathTransformMethod value you supplied."; 509 case -1074395303: return "Invalid number of classes for auto threshold. Acceptable values range from 2 to 256."; 510 case -1074395302: return "NI Vision does not support the threshold method value you supplied."; 511 case -1074395301: return "The ROI you passed into imaqGetMeterArc must consist of two lines."; 512 case -1074395300: return "NI Vision does not support the MeterArcMode value you supplied."; 513 case -1074395299: return "NI Vision does not support the ComplexPlane value you supplied."; 514 case -1074395298: return "You can perform this operation on a real or an imaginary ComplexPlane only."; 515 case -1074395297: return "NI Vision does not support the ParticleInfoMode value you supplied."; 516 case -1074395296: return "NI Vision does not support the BarcodeType value you supplied."; 517 case -1074395295: return "imaqInterpolatePoints does not support the InterpolationMethod value you supplied."; 518 case -1074395294: return "The contour index you supplied is larger than the number of contours in the ROI."; 519 case -1074395293: return "The supplied ContourID did not correlate to a contour inside the ROI."; 520 case -1074395292: return "Do not supply collinear points for this operation."; 521 case -1074395291: return "Shape Match requires the image to contain only pixel values of 0 or 1."; 522 case -1074395290: return "The template you supplied for ShapeMatch contains no shape information."; 523 case -1074395287: return "The line you provided contains two identical points, or one of the coordinate locations for the line is not a number (NaN)."; 524 case -1074395286: return "Invalid concentric rake direction."; 525 case -1074395285: return "Invalid spoke direction."; 526 case -1074395284: return "Invalid edge process."; 527 case -1074395283: return "Invalid rake direction."; 528 case -1074395282: return "Unable to draw to viewer. You must have the latest version of the control."; 529 case -1074395281: return "Your image must be larger than its border size for this operation."; 530 case -1074395280: return "The ROI must only have a single Rectangle contour."; 531 case -1074395279: return "ROI is not a polygon."; 532 case -1074395278: return "LCD image is not a number."; 533 case -1074395277: return "The decoded barcode information did not pass the checksum test."; 534 case -1074395276: return "You specified parallel lines for the meter ROI."; 535 case -1074395275: return "Invalid browser image."; 536 case -1074395270: return "Cannot divide by zero."; 537 case -1074395269: return "Null pointer."; 538 case -1074395268: return "The linear equations are not independent."; 539 case -1074395267: return "The roots of the equation are complex."; 540 case -1074395265: return "The barcode does not match the type you specified."; 541 case -1074395263: return "No lit segment."; 542 case -1074395262: return "The LCD does not form a known digit."; 543 case -1074395261: return "An internal error occurred while attempting to access an invalid coordinate on an image."; 544 case -1074395260: return "An internal memory error occurred."; 545 case -1074395258: return "The filter width must be odd for the Canny operator."; 546 case -1074395257: return "You supplied an invalid edge direction in the Canny operator."; 547 case -1074395256: return "The window size must be odd for the Canny operator. "; 548 case -1074395253: return "Invalid learn mode."; 549 case -1074395252: return "Invalid learn setup data."; 550 case -1074395251: return "Invalid match mode."; 551 case -1074395250: return "Invalid match setup data."; 552 case -1074395249: return "At least one range in the array of rotation angle ranges exceeds 360 degrees."; 553 case -1074395248: return "The array of rotation angle ranges contains too many ranges."; 554 case -1074395247: return "Invalid template descriptor."; 555 case -1074395246: return "Invalid template descriptor."; 556 case -1074395245: return "Invalid template descriptor."; 557 case -1074395244: return "Invalid template descriptor."; 558 case -1074395243: 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."; 559 case -1074395242: return "Invalid template descriptor."; 560 case -1074395241: return "The template descriptor does not contain data required for rotation-invariant matching."; 561 case -1074395240: return "Invalid template descriptor."; 562 case -1074395239: return "Invalid template descriptor."; 563 case -1074395238: return "The template descriptor does not contain data required for shift-invariant matching."; 564 case -1074395237: return "Invalid template descriptor."; 565 case -1074395235: return "The template image does not contain enough contrast."; 566 case -1074395234: return "The template image is too small."; 567 case -1074395233: return "The template image is too large."; 568 case -1074395212: return "The size of the template string must match the size of the string you are trying to correct."; 569 case -1074395211: return "The supplied text template contains nonstandard characters that cannot be generated by OCR."; 570 case -1074395210: return "At least one character in the text template was of a lexical class that did not match the supplied character reports."; 571 case -1074395203: return "The OCR library cannot be initialized correctly."; 572 case -1074395201: return "There was a failure when loading one of the internal OCR engine or LabView libraries."; 573 case -1074395200: return "One of the parameters supplied to the OCR function that generated this error is invalid."; 574 case -1074395179: return "The OCR engine failed during the preprocessing stage."; 575 case -1074395178: return "The OCR engine failed during the recognition stage."; 576 case -1074395175: return "The provided filename is not valid user dictionary filename."; 577 case -1074395174: return "NI Vision does not support the AutoOrientMode value you supplied."; 578 case -1074395173: return "NI Vision does not support the Language value you supplied."; 579 case -1074395172: return "NI Vision does not support the CharacterSet value you supplied."; 580 case -1074395171: return "The system could not locate the initialization file required for OCR initialization."; 581 case -1074395170: return "NI Vision does not support the CharacterType value you supplied."; 582 case -1074395169: return "NI Vision does not support the RecognitionMode value you supplied."; 583 case -1074395168: return "NI Vision does not support the AutoCorrectionMode value you supplied."; 584 case -1074395167: return "NI Vision does not support the OutputDelimiter value you supplied."; 585 case -1074395166: return "The system could not locate the OCR binary directory required for OCR initialization."; 586 case -1074395165: return "The system could not locate the OCR weights directory required for OCR initialization."; 587 case -1074395164: return "The supplied word could not be added to the user dictionary."; 588 case -1074395163: return "NI Vision does not support the CharacterPreference value you supplied."; 589 case -1074395162: return "NI Vision does not support the CorrectionMethod value you supplied."; 590 case -1074395161: return "NI Vision does not support the CorrectionLevel value you supplied."; 591 case -1074395160: return "NI Vision does not support the maximum point size you supplied. Valid values range from 4 to 72."; 592 case -1074395159: return "NI Vision does not support the tolerance value you supplied. Valid values are non-negative."; 593 case -1074395158: return "NI Vision does not support the ContrastMode value you supplied."; 594 case -1074395156: return "The OCR attempted to detected the text skew and failed."; 595 case -1074395155: return "The OCR attempted to detected the text orientation and failed."; 596 case -1074395153: return "Invalid font file format."; 597 case -1074395152: return "Font file not found."; 598 case -1074395151: return "The OCR engine failed during the correction stage."; 599 case -1074395150: return "NI Vision does not support the RoundingMode value you supplied."; 600 case -1074395149: return "Found a duplicate transform type in the properties array. Each properties array may only contain one behavior for each transform type."; 601 case -1074395148: return "Overlay Group Not Found."; 602 case -1074395147: return "The barcode is not a valid RSS Limited symbol"; 603 case -1074395146: return "Couldn't determine the correct version of the QR code."; 604 case -1074395145: return "Invalid read of the QR code."; 605 case -1074395144: return "The barcode that was read contains invalid parameters."; 606 case -1074395143: return "The data stream that was demodulated could not be read because the mode was not detected."; 607 case -1074395142: return "Couldn't determine the correct model of the QR code."; 608 case -1074395141: return "The OCR engine could not find any text in the supplied region."; 609 case -1074395140: return "One of the character reports is no longer usable by the system."; 610 case -1074395139: return "Invalid Dimensions."; 611 case -1074395138: return "The OCR region provided was too small to have contained any characters."; 612 default: return "Error code not found"; 613 } 614 } 615 }