Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

explaination of the function imgCreateBuffer

Hi,
Can someone explain the function imgCreateBuffer to me.  How does this function set the buffer size?
 
Thanks,
Torrence
0 Kudos
Message 1 of 3
(3,097 Views)
Hello Torrence,

The imgCreateBuffer function creates a buffer of image space that you can then be set into the Buffer List.  There is a parameter for imgCreateBuffer called "uInt32 bufferSize" that you can use to set the size of your buffer.  The buffer size needs to be atleast = [ROI height] x [rowPixels] x [number of bytes per pixel].  This basically allocates memory so images can use DMA to transfer directly into kernal level memory.  You can find out the description for the IMAQ function calls by going to: Program Files >> National Instruments >> Vision >> Documentation and then choosing "NI IMAQ Function Reference".  We also have examples that are shipped with NI IMAQ that can be found by opening up a windows explorer menu and going to the following destination: "<root>:\Program Files\National Instruments\NI-IMAQ\Sample".  In here a good example to look at that uses imgCreateBuffer is "LL Ring".  I hope this information helps.  Thanks and have a great day.

Regards,
Mark T
Applications Engineer
National Instruments
0 Kudos
Message 2 of 3
(3,087 Views)
Thank You. This does help me.
 
Torrence
0 Kudos
Message 3 of 3
(3,078 Views)