Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

How to write raw image(2D array) from grabber buffer to PC memory?

Solved!
Go to solution

Hello,

 

I am using C++ and NIImaq library to save raw 2-D image array to PC.

I have a PCI-1428 frame grabber.

Now, I am trying to write a 2-D array from frame grab buffer to PC memory that I allocated using virtualalloc.

Any way to do it?

 

Thanks,

Travis

0 Kudos
Message 1 of 4
(3,966 Views)

Hi Travis,

 

Have you gotten a chance to look at the C++ shipping examples for our frame grabbers?

 

C:\Documents and Settings\All Users\Documents\National Instruments\NI-IMAQ\Examples

 

In addition, for specific frame grabbing references you can also use the NI-IMAQ Function Reference Help located in the <root directory>\Program Files\National Instruments\NI-IMAQ\Docs folder.

 

Is there any specific reason why you want to manually pull the 2D array from the buffer to PC memory?

 

Cheers,

Jonah P.

Applications Engineer

 

 

Jonah Paul
Marketing Manager, NI Software
0 Kudos
Message 2 of 4
(3,941 Views)
Solution
Accepted by sunspotzsz

Hi Travis,

 

After further research, I found that you can use the imgSessionCopyBuffer function (see the NI-IMAQ Function Reference Help for more detailed information) to transfer your data from the Onboard memory to your designated PC buffer.

 

Also you can find more information about how to set this up in the Ring Acquisition developer zone article linked below (System Memory Versus Onboard Memory section talks about your specific question).

 

DevZone: Ring Acquisition

 

Hope that helps!

 

Cheers,

Jonah Paul
Marketing Manager, NI Software
0 Kudos
Message 3 of 4
(3,935 Views)
Thanks guys, problem solved.
0 Kudos
Message 4 of 4
(3,920 Views)