Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Can I write my own IMAQ Extract Buffer to use ippsMalloc?

I am using the Intel IPP library for fast image processing. I would like to avoid the need to copy the data obtained with IMAQ Extract Buffer into a new buffer created with ippsMalloc. Is it possible to write my own IMAQ Extract Buffer code that extracts into an ippsMalloc'ed buffer?

 

And a more general labview question: if I allocate an array externally in a dll how do I tell labview the size of the array? Right now I create a labview array of the right size, pass that to the C  code as a pointer and just replace the pointer in the C code. This works, but is extremely ugly of course and is a memory leak. Is there a better way to do that?

0 Kudos
Message 1 of 3
(3,641 Views)

Hi Dixie,

 

In the following link, you can find more info about allocating memory.

http://digital.ni.com/public.nsf/allkb/7253D2F0D91F68058625752F005AB672?OpenDocument

 

Regards,

Bas

0 Kudos
Message 2 of 3
(3,496 Views)

Long time ago I had a problem which looks similar to yours - in my case dealing with a framegrabber sdk which had separate functions for allocating image buffers and storing images, referencing to the buffer pointer. The bottom line was that I was indeed able to conceive a neat hack, but that relied on the undocumented API of labview, and ended up working only in labview 7.1. If relevant, the thread is this one.

Enrico

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