LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

getimagepixelptr and VC dll for Image

I want to write a dll in VC-code,the Input is a Image, after some processing, the output should be several images, they are stored in an array. (a Image to a gaussian pyramid)
But I don't konw, how to write this. I'v tried to make a example:
 

extern "C" _declspec (dllexport) void im2pyr(unsigned long *img,long LineWidthT,long imgWidth, long imgHeight)
{
       
     FVLImage src;
    
  unsigned long * pt = img;
        long i,j;
  for (i=0; i<imgHeight; i++)
    for (j=0; j<imgWidth; j++)
  {
   src.WritePixel(pt[j],i,j);
   pt += LineWidthT;   
  }
        int levels = 3;
        FVLPyramid dest;     
        dest.New (levels, src.Width (), src.Height (), src.Stride (), src.PixelFormat (), src.Pixels ());
        dest.Reduce3x3 ();
   for(int l=0; l<levels;l++)
  {
      dest.Pixels(l);
  }
}

 
I don't know, wheather this is right or not, there are no any infomations by compiling and i got the ".dll" and the ".lib" files.
 
Now i want to call it with cln(call library node) in Labview, how could I set the parameters, that i can get the right results?
 
(the nessecary fvl.lib and fvl.h for "FVLImage" and "FVLpyramid"are in attachment).
 
(Or, can anyone make a little example, tell me how can i do, so that i can arrive this goal.)
 
Thanks
  
0 Kudos
Message 1 of 2
(2,562 Views)
Hi haha1234567,

Are you asking about implementation code or calling VC++ code in LabVIEW?

Take a look at how to call one vc++ dll inLabview?

Best Regards

Benjamin
0 Kudos
Message 2 of 2
(2,520 Views)