📄 nivision.h
字号:
//============================================================================
// When in Borland, some functions must be mapped to different names.
// This accomplishes said task.
//============================================================================
#if defined(__BORLANDC__) || (defined(_CVI_) && defined(_NI_BC_))
#define imaqMakePoint imaqMakePoint_BC
#define imaqMakePointFloat imaqMakePointFloat_BC
#endif
//============================================================================
// When in Watcom, some functions must be mapped to different names.
// This accomplishes said task.
//============================================================================
#if defined(__WATCOMC__) || (defined(_CVI_) && defined(_NI_WC_))
#define imaqMakePoint imaqMakePoint_BC
#define imaqMakePointFloat imaqMakePointFloat_BC
#endif
//============================================================================
// If using Visual C++, force startup & shutdown code to run.
//============================================================================
#if defined(_MSC_VER) && !defined(_CVI_) && !defined(__BORLANDC__)
#pragma comment(linker, "/INCLUDE:_nivision_startup_shutdown")
#pragma comment(linker, "/DEFAULTLIB:nivision.lib")
#endif
//============================================================================
// Error Codes
//============================================================================
#define ERR_SUCCESS 0 // No error.
#define ERR_SYSTEM_ERROR -1074396160 // System error.
#define ERR_OUT_OF_MEMORY -1074396159 // Not enough memory for requested operation.
#define ERR_MEMORY_ERROR -1074396158 // Memory error.
#define ERR_UNREGISTERED -1074396157 // Unlicensed copy of NI Vision.
#define ERR_NEED_FULL_VERSION -1074396156 // The function requires an NI Vision 5.0 Advanced license.
#define ERR_UNINIT -1074396155 // NI Vision did not initialize properly.
#define ERR_IMAGE_TOO_SMALL -1074396154 // The image is not large enough for the operation.
#define ERR_BARCODE_CODABAR -1074396153 // The barcode is not a valid Codabar barcode.
#define ERR_BARCODE_CODE39 -1074396152 // The barcode is not a valid Code 3 of 9 barcode.
#define ERR_BARCODE_CODE93 -1074396151 // The barcode is not a valid Code93 barcode.
#define ERR_BARCODE_CODE128 -1074396150 // The barcode is not a valid Code128 barcode.
#define ERR_BARCODE_EAN8 -1074396149 // The barcode is not a valid EAN8 barcode.
#define ERR_BARCODE_EAN13 -1074396148 // The barcode is not a valid EAN13 barcode.
#define ERR_BARCODE_I25 -1074396147 // The barcode is not a valid Interleaved 2 of 5 barcode.
#define ERR_BARCODE_MSI -1074396146 // The barcode is not a valid MSI barcode.
#define ERR_BARCODE_UPCA -1074396145 // The barcode is not a valid UPCA barcode.
#define ERR_BARCODE_CODE93_SHIFT -1074396144 // The Code93 barcode contains invalid shift encoding.
#define ERR_BARCODE_TYPE -1074396143 // The barcode type is invalid.
#define ERR_BARCODE_INVALID -1074396142 // The image does not represent a valid linear barcode.
#define ERR_BARCODE_CODE128_FNC -1074396141 // The FNC value in the Code128 barcode is not located before the first data value.
#define ERR_BARCODE_CODE128_SET -1074396140 // The starting code set in the Code128 barcode is not valid.
#define ERR_ROLLBACK_RESOURCE_OUT_OF_MEMORY -1074396139 // Not enough reserved memory in the timed environment for the requested operation.
#define ERR_ROLLBACK_NOT_SUPPORTED -1074396138 // The function is not supported when a time limit is active.
#define ERR_DIRECTX_DLL_NOT_FOUND -1074396137 // Quartz.dll not found. Install DirectX 8.1 or later.
#define ERR_DIRECTX_INVALID_FILTER_QUALITY -1074396136 // The filter quality you provided is invalid. Valid quality values range from -1 to 1000.
#define ERR_INVALID_BUTTON_LABEL -1074396135 // Invalid button label.
#define ERR_THREAD_INITIALIZING -1074396134 // Could not execute the function in the separate thread because the thread has not completed initialization.
#define ERR_THREAD_COULD_NOT_INITIALIZE -1074396133 // Could not execute the function in the separate thread because the thread could not initialize.
#define ERR_MASK_NOT_TEMPLATE_SIZE -1074396132 // The mask must be the same size as the template.
#define ERR_NOT_RECT_OR_ROTATED_RECT -1074396130 // The ROI must only have either a single Rectangle contour or a single Rotated Rectangle contour.
#define ERR_ROLLBACK_UNBOUNDED_INTERFACE -1074396129 // During timed execution, you must use the preallocated version of this operation.
#define ERR_ROLLBACK_RESOURCE_CONFLICT_3 -1074396128 // An image being modified by one process cannot be requested by another process while a time limit is active.
#define ERR_ROLLBACK_RESOURCE_CONFLICT_2 -1074396127 // An image with pattern matching, calibration, or overlay information cannot be manipulated while a time limit is active.
#define ERR_ROLLBACK_RESOURCE_CONFLICT_1 -1074396126 // An image created before a time limit is started cannot be resized while a time limit is active.
#define ERR_INVALID_CONTRAST_THRESHOLD -1074396125 // Invalid contrast threshold. The threshold value must be greater than 0.
#define ERR_INVALID_CALIBRATION_ROI_MODE -1074396124 // NI Vision does not support the calibration ROI mode you supplied.
#define ERR_INVALID_CALIBRATION_MODE -1074396123 // NI Vision does not support the calibration mode you supplied.
#define ERR_DRAWTEXT_COLOR_MUST_BE_GRAYSCALE -1074396122 // Set the foreground and background text colors to grayscale to draw on a U8 image.
#define ERR_SATURATION_THRESHOLD_OUT_OF_RANGE -1074396121 // The value of the saturation threshold must be from 0 to 255.
#define ERR_NOT_IMAGE -1074396120 // Not an image.
#define ERR_CUSTOMDATA_INVALID_KEY -1074396119 // 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.
#define ERR_INVALID_STEP_SIZE -1074396118 // Step size must be greater than zero.
#define ERR_MATRIX_SIZE -1074396117 // Invalid matrix size in the structuring element.
#define ERR_CALIBRATION_INSF_POINTS -1074396116 // Insufficient number of calibration feature points.
#define ERR_CALIBRATION_IMAGE_CORRECTED -1074396115 // The operation is invalid in a corrected image.
#define ERR_CALIBRATION_INVALID_ROI -1074396114 // The ROI contains an invalid contour type or is not contained in the ROI learned for calibration.
#define ERR_CALIBRATION_IMAGE_UNCALIBRATED -1074396113 // The source/input image has not been calibrated.
#define ERR_INCOMP_MATRIX_SIZE -1074396112 // The number of pixel and real-world coordinates must be equal.
#define ERR_CALIBRATION_FAILED_TO_FIND_GRID -1074396111 // Unable to automatically detect grid because the image is too distorted.
#define ERR_CALIBRATION_INFO_VERSION -1074396110 // Invalid calibration information version.
#define ERR_CALIBRATION_INVALID_SCALING_FACTOR -1074396109 // Invalid calibration scaling factor.
#define ERR_CALIBRATION_ERRORMAP -1074396108 // The calibration error map cannot be computed.
#define ERR_CALIBRATION_INFO_1 -1074396107 // Invalid calibration template image.
#define ERR_CALIBRATION_INFO_2 -1074396106 // Invalid calibration template image.
#define ERR_CALIBRATION_INFO_3 -1074396105 // Invalid calibration template image.
#define ERR_CALIBRATION_INFO_4 -1074396104 // Invalid calibration template image.
#define ERR_CALIBRATION_INFO_5 -1074396103 // Invalid calibration template image.
#define ERR_CALIBRATION_INFO_6 -1074396102 // Invalid calibration template image.
#define ERR_CALIBRATION_INFO_MICRO_PLANE -1074396101 // Invalid calibration template image.
#define ERR_CALIBRATION_INFO_PERSPECTIVE_PROJECTION -1074396100 // Invalid calibration template image.
#define ERR_CALIBRATION_INFO_SIMPLE_TRANSFORM -1074396099 // Invalid calibration template image.
#define ERR_RESERVED_MUST_BE_NULL -1074396098 // You must pass NULL for the reserved parameter.
#define ERR_INVALID_PARTICLE_PARAMETER_VALUE -1074396097 // You entered an invalid selection in the particle parameter.
#define ERR_NOT_AN_OBJECT -1074396096 // Not an object.
#define ERR_CALIBRATION_DUPLICATE_REFERENCE_POINT -1074396095 // The reference points passed are inconsistent. At least two similar pixel coordinates correspond to different real-world coordinates.
#define ERR_ROLLBACK_RESOURCE_CANNOT_UNLOCK -1074396094 // A resource conflict occurred in the timed environment. Two processes cannot manage the same resource and be time bounded.
#define ERR_ROLLBACK_RESOURCE_LOCKED -1074396093 // A resource conflict occurred in the timed environment. Two processes cannot access the same resource and be time bounded.
#define ERR_ROLLBACK_RESOURCE_NON_EMPTY_INITIALIZE -1074396092 // Multiple timed environments are not supported.
#define ERR_ROLLBACK_RESOURCE_UNINITIALIZED_ENABLE -1074396091 // A time limit cannot be started until the timed environment is initialized.
#define ERR_ROLLBACK_RESOURCE_ENABLED -1074396090 // Multiple timed environments are not supported.
#define ERR_ROLLBACK_RESOURCE_REINITIALIZE -1074396089 // The timed environment is already initialized.
#define ERR_ROLLBACK_RESIZE -1074396088 // The results of the operation exceeded the size limits on the output data arrays.
#define ERR_ROLLBACK_STOP_TIMER -1074396087 // No time limit is available to stop.
#define ERR_ROLLBACK_START_TIMER -1074396086 // A time limit could not be set.
#define ERR_ROLLBACK_INIT_TIMER -1074396085 // The timed environment could not be initialized.
#define ERR_ROLLBACK_DELETE_TIMER -1074396084 // No initialized timed environment is available to close.
#define ERR_ROLLBACK_TIMEOUT -1074396083 // The time limit has expired.
#define ERR_PALETTE_NOT_SUPPORTED -1074396082 // 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.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -