xiAPI.NET allows to process already captured images from camera those are stored in memory or loaded from disk.
Application creates xiProc class and uses processing functions which are implemented in API .NET library.
All processing functions can be called independently to currently opened camera.
Source code for capturing 10 frames then processing 10 captured frames is available for download - program.cs
These are the functions, which allow to control Offline Processing.
// Open processing instance
void ProcOpen();
// Set the parameter to processing
// Same parameters can be set like in SetParam xiCam class.
void ProcSetParam(string prm, string val);
void ProcSetParamInt(string prm, int val);
void ProcSetParamFloat(string prm, float val);
// Get the parameter from processing
// Same parameters can be get like in GetParam xiCam class.
string ProcGetParam(string prm);
int ProcGetParamInt(string prm);
float ProcGetParamFloat(string prm);
// Set unprocessed image to processing chain
void ProcPushXiImg(XI_IMG image);
void ProcPushImage(XI_IMG image);
// Gets next processed image from processing chain
void ProcPullImageInternal(out XI_IMG img, int timeout)
void ProcPullImage(out Bitmap image, int timeout)
void ProcPullImage(out BitmapSource image, int timeout)
void ProcPullImage(out WriteableBitmap image, int timeout)
void ProcPullImage(out byte[] img_arr, int timeout)
// Closes instance for Image Processing entity
void ProcClose();
Functions can throw instances of xiExc class that contains error code
and message. Error codes are combined from xiAPI.NET (0..999) and
xiProc (1000-1999). List of specific offline 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_13_10.