Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

a question about the low-level function:imgSessionCopyBuffer

Hi everybody:
 
I'm using a line-scan camera-link CCD and PCI-e 1429 frame grabber.
And I want to  snap a frame via VC  using low-level function,
I create a buffer list with one element using imgCreateBufList  for imgSessionAcquire function while the IMG_BUFF_COMMAND attribute is setted to be IMG_CMD_STOP. Also I malloc a buffer named MyBuffer to copy the frame data. Next I call imgSessionAcquire(Sid, FALSE, NULL) to acquire. Then function imgSessionCopyBuffer(Sid, 0, MyBuffer, TRUE) is called to copy the frame data to MyBuffer. At last, I use fwrite to save the data pointed by MyBuffer to a  file.
But the file I obtained is filled by unreadable codes. I'm sure the fwrite is correctly used.
I hope someone can help me! (I'm a freshman in programing...........)
 
Thank you!
 
Best Regrads!
0 Kudos
Message 1 of 2
(3,004 Views)
~~~~~~~~~~~~~  No reply?
I will wait for the reply on-line.
Thanks
0 Kudos
Message 2 of 2
(2,988 Views)