Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

How to get pointer to image from VB CWIMAQImage structure to pass to 'C' DLL processing function?

I would like to call a DLL image processing function written in 'C' from VisualBasic. The function arguments are a pointer to the image data (unsigned char *) and the width and height of the image. How do I get a pointer from a variable declared as CWIMAQImage in my VisualBasic program?

Thank you.
Message 1 of 2
(3,141 Views)
Why don't you use the function CWIMAQImage.ImageToArray which will give you a pixel array of the image and that you can use in VB or C. Call it like any other datatype, CWIMAQInage is a activeX control which would be hairy to pass around.

Hope it helps.
Message 2 of 2
(3,141 Views)