LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

getimagepixelptr dll

I wrote the Vc-dll like this:
 
void __declspec(dllexport) __stdcall imgGen(unsigned long *inimg, unsigned long* outimg[6],long LineWidthT,long imgWidth, long imgHeight)
{
   
  unsigned long * pt = inimg;
  long i;
  for (i=0; i<imgHeight; i++) {
   outimg[i] = pt;
   pt += LineWidthT;
  }
 
 
now I call it in Labview: the Input is a Image, through the "GetImagePixelPtr.vi", i get this "*inimg" as the parameter for cnl(call library node.vi),
the output is simply a array(unsigned long* outimg[6]), this array only shows the 6-rows of the image-pixels.
How do i make this VI, so that i can see this array of the image?
 
help me please!
0 Kudos
Message 1 of 4
(2,465 Views)
Hello haha,

you need the Vision Development Modul to transfer the array to an image.
With the Vision Development Modul you get the hoel libary in Labview for the imaq processing.

Kind regards,

Elmar
0 Kudos
Message 2 of 4
(2,450 Views)

Hi,Elmar

Thanks for the reply! But there is a misunderstanding cause my bad implementation. sorry.

So I made this just as a test. Actrurly i want to convert a Image( that i defined it in C++) to a Labview-Image with the tool-VIs cln and GetImagePixelPtr. But I have no Idear about this,  Maybe you have a good one?

 

0 Kudos
Message 3 of 4
(2,442 Views)
Hello Haha,

maybe i didnt understand you correctly. But i looked at your vi and i found out that your input in Labview is an array.
And you want convert it to an image in Labview. Its possible to use the Labview imaq  display function.
But you have to install the Vision Acquisition Software. And you need a function which convert the arry to an image before display it on the front panel.
And the function "array to image" is included in the Vision Development Modul.

Kind regards,

Elmar
0 Kudos
Message 4 of 4
(2,406 Views)