Home > C: Programming > Function Descriptions > History back  Previous chapter  Next chapter  Print  

is_InitImageQueue

uEye Camera Manual Version 3.80

is_InitImageQueue

Windows_Logo

Linux_Logo

USB 2.0

GigE

USB 2.0

GigE

Syntax

INT is_InitImageQueue (HIDS hCam, INT nMode)

Description

is_InitImageQueue() enables the queue mode for existing image memory sequences. New images will be added to the end of the queue on  arrival (FIFO principle). The image memory sequence has to be created with is_AddToSequence() prior to calling is_InitImageQueue().

With is_WaitForNextImage() you can query the pointer and sequence ID of the last (i.e. oldest) image in the sequence.

Hinweis

Image memory sequences can also be used without queue mode. In this case the current image memory has to be queried with is_GetActSeqBuf() on every FRAME event. Disadvantage of this proceeding is that at very high frame rates it may happen that additional images arrive between the FRAME event and accessing/locking the memory. The images arriving in this period will be skipped when you query the current image.

When the queue mode is used, however, you can be sure to always receive the last image which has not yet been queried. In addition, image memories are automatically locked immediately after receiving the image. This prevents images from being overwritten when very high frame rates and few image memories are used.

Input Parameters

hCam

Camera handle

nMode

Queue mode. Currently only nMode = 0 is supported.

Return Values

IS_SUCCESS

Function executed successfully

IS_NO_SUCCESS

General error message

Related Functions

is_ExitImageQueue()
is_WaitForNextImage()
is_AddToSequence()

Example


// A previously initialized camera continuously captures images

// until a timeout or transfer error occurs.

// Note: image memories have to be allocated before this

 

is_InitImageQueue (m_hCam, 0);

INT nMemID = 0;

char *pBuffer = NULL;

 

while (IS_SUCCESS == is_WaitForNextImage(m_hCam, 1000, &pBuffer, &nMemID))

{

is_SaveImageMem (m_hCam, "image.bmp", pBuffer, nMemID);

is_UnlockSeqBuf (m_hCam, nMemID, pBuffer);

}

is_ExitImageQueue (m_hCam);


Suggestion for improvement? Send us your short Feedback on this chapter. Thank you very much!


© 2010 IDS Imaging Development Systems GmbH
http://www.ids-imaging.com