Jump to content

allocating buffer and getting the pointer


Recommended Posts

Hi there!

Im trying to use LabView with Halcon. Therefore I would need a buffer for pics and the pointer to the allocated memory (array --> width*height*bit). Also there should be some way to deallocate the buffer at the end.

Also it should be possible to create different buffers for different pics (like it´s done in Vison).

This done I could store pics in the allocated memory and cut out the memorymanager included in Halcon (which is giving me some hard time).

Is there anybody out there, who can help me on this one??

thx

Link to comment

QUOTE (one734 @ Jun 12 2008, 04:39 AM)

Hi there!

Im trying to use LabView with Halcon. Therefore I would need a buffer for pics and the pointer to the allocated memory (array --> width*height*bit). Also there should be some way to deallocate the buffer at the end.

Also it should be possible to create different buffers for different pics (like it´s done in Vison).

This done I could store pics in the allocated memory and cut out the memorymanager included in Halcon (which is giving me some hard time).

Is there anybody out there, who can help me on this one??

thx

There is enough discussion about this. All in all this is a very clear case where trying to do everything in LabVIEW is a masochistic exercise at best. Go and write a wrapper DLL that wraps the HALCON DLL API and provides a more LabVIEW freindly interface. If you want to pass in LabVIEW native data like string or array handles you can use the LabVIEW memory manager functions as described in the External Code Reference Manual to prepare, resize, allocate, deallocate, etc. the memory blocks necessary.

And by the way some good C programming basis is not only beneficial but in fact an absolute requirement to get a result that would be usuable in a real application. That is even more true so if you would want to try to avoid the wrapper DLL since you will have to deal with things in LabVIEW that are normally taken care of by the C compiler.

Rolf Kalbermatter

Link to comment
Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.