XiApiPlusOcv allows to process already captured images from camera those are stored in memory or loaded from disk.
Processing methods are implemented in xiAPIplus_ImageProcessing class from xiApiPlusOcv. All processing functions can be called independently to currently opened camera.
Offline processing converts transport formats or RAW8 formats into XI_RAW8, XI_RAW16, XI_RGB24, XI_RGB32. It supports unpacking, debayering, Crop and Shift image processing blocks. See image data flow
Source code for capturing 10 frames then processing 10 captured frames is available for download - xiApiPlusOcv_OfflineProc.cpp
There are the following 5 functions, which allow to control Offline Processing.
// Open processing instance
xiAPIplus_ImageProcessing processing;
// Set the parameter to processing
// Same parameters can be set like in SetParam.
// Example: XI_PRM_WB_KR for Red channel correction
processing.SetParam(const char* prm, void* val, DWORD size, XI_PRM_TYPE type);
// Set unprocessed image to processing chain
processing.PushImage(unsigned char* first_pixel);
// Get next processed image from processing chain
processing.PullImage();
processing.GetImage(xiAPIplus_Image* ret_image);
Functions can throw error codes of xiAPI (0..999) combined with specific codes of Processing (1000-1999).
List of specific Image Processing codes:
Result code | Meaning |
1001 | Invalid argument detected (out of range). |
1002 | Implementation is not yet done. |
1003 | This value is not supported. |
1004 | Using of unknown parameter |
1005 | Input buffer is not allocated |
1006 | Output buffer is not allocated |
1007 | Output buffer allocation error |
1008 | There are no processors in chain |
1009 | Some requirement is not met. |
1010 | Processors chain is full. |
1011 | Processor is not initialized yet. |
1012 | Processor generates error. |
1013 | Unknown data format. |
1014 | Unknown color filter array pattern type. |
Offline processing is available since release V4_01_76.