Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

IMAQ multi camera acquisition

I use IMAQ 1410 board. 1410 board has four camera channel.

 

I operate IMAQ 1410 board with Visual C++ 6.0.

 

 

So, with C code, I want to acquire camera image data from each channel.

 

For example, if I want acquire image data from  second channel, I want to acquire second channel image only.

 

I tried to acquire multi-camera image several times and different ways,

but I could get only one channel (default channel) image.

I couldn't get second channel image.

 

 

 

Some people suggest to use C code as follows.

 

 

 for (i = 0; i < NUM_RING_BUFFERS; i++)
 {
  errChk(imgCreateBuffer(Sid, FALSE, bufferSize, &buffers[i]));
  errChk(imgSetBufferElement(Bid, i, IMG_BUFF_ADDRESS, (uInt32)buffers[i]));
  errChk(imgSetBufferElement(Bid, i, IMG_BUFF_SIZE, bufferSize));
  bufferCommand = (i == (NUM_RING_BUFFERS - 1)) ? IMG_CMD_LOOP : IMG_CMD_NEXT;
  errChk(imgSetBufferElement(Bid, i, IMG_BUFF_COMMAND, bufferCommand));
  errChk(imgSetBufferElement(Bid, i, IMG_BUFF_CHANNEL, i));
 }

 

However, it couldn't get image data from specific channel that I want to acquire.

 

 

 

 

 

I coded programs like this which doesn't work:

 

 

    for (i = 0; i < NUM_RING_BUFFERS; i++)
 {
  errChk(imgCreateBuffer(Sid, FALSE, bufferSize, &buffers[i]));
  errChk(imgSetBufferElement(Bid, i, IMG_BUFF_ADDRESS, (uInt32)buffers[i]));
  errChk(imgSetBufferElement(Bid, i, IMG_BUFF_SIZE, bufferSize));
  bufferCommand = (i == (NUM_RING_BUFFERS - 1)) ? IMG_CMD_LOOP : IMG_CMD_NEXT;
  errChk(imgSetBufferElement(Bid, i, IMG_BUFF_COMMAND, bufferCommand));
  errChk(imgSetBufferElement(Bid, i, IMG_BUFF_CHANNEL, i));
 }


 errChk(imgMemLock(Bid));

 errChk(imgSessionConfigure(Sid, Bid));
 

.

.

.

errChk(imgSessionExamineBuffer(Sid, bufferIndex, &lastAcquiredBuffer, &bufferAddress));

.

.

.

errChk(imgSessionReleaseBuffer(Sid));

 

 

 

 

Pleas tell me C code programs to acquire image data for not only default channel but other channels.

 

I really need this code deperately. 

 

 

 

0 Kudos
Message 1 of 3
(3,369 Views)
You want to use labview and through which call ur c libs?
0 Kudos
Message 2 of 3
(3,359 Views)

I know that labview program has several labview example related to multi camera acquisition.

But, I have to use only ansi C code right now, it's long story.

 

"which call ur c libs?"

I don't understand your question


I use C code from Ansi C example of NI, LL Ring.

0 Kudos
Message 3 of 3
(3,355 Views)