Specifications

sharpVISION™ Camera
sharpVISION VISION SDK
13
2.6. Asynchronous Streaming Data Grab
An asynchronous grab function is available: SvQueueOneFrame. Many frames can be
queued up at a time. The maximum number of frames that can be queued at a time is 100.
When an image arrives from the camera and a frame is complete, your application can
receive a callback. The completed frame is removed from the queue, and if available the next
frame takes its place.
Using SvQueueOneFrame has the following advantages over a synchronous grab:
Your thread is not blocked.
Queued frames are easily aborted (SvAbortGrab).
Software trigger only works with queued frames.
You can capture frames at full speed.
To capture frames at full speed, your application should be designed to keep at least two
frames queued.
Image processing should be done on a separate thread, not during the frame-done callback.
Process the image on your main thread, or pass the frame to a worker thread if necessary.
Most application programs will use the asynchronous SvQueueOneFrame rather than the
synchronous SvGrabOneFrame to capture frames. Applications with a GUI will likely choose
to control the camera and queue frames from their main GUI thread, and perform lengthy
processing on a worker thread.
If the camera is in double exposure mode, the acquisition must be done using the
asynchronous grab function.
2.7. Queue Camera Configuration
There is an asynchronous function used to change the camera state:
SvQueueCameraSettings. The settings are placed on the same queue as your frames
queued by SvQueueOneFrame. Actions are guaranteed to occur in the order they are
queued. If you want to clear the queue, call SvAbortGrab. As with SvQueueOneFrame, you
can receive a callback when the settings have been changed.