Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

third party dll linking (specific for image processing)

Respected sir/madam,

I have a little problem to the implementation of dll files in Labview and I wish to get some assistance for the same to implement some of third party dll files.

Brief description of the problem:

As I see that to create a dll file generally VC++ is used in Lab view, But most of the times it is tedious to create complex applications in VC++ to create dll files, so I’ve used Matlab (version used 6.5) as a medium since it also uses the same C/C++ classes to compile programs and they are much simpler to use compared to VC++ to code, so I have created some dll files and generated C++ files as well with Matlab.
I have attached the same with this mail.

Please help me how do I link this dll file with Labview.

Brief description of the program:

AIM: To find the phase correlation between two images.

1. Read the two images.
2. Get the sizes (width *height) from the images say w1, h1, w2, h2 are the resulting values.
3. Let max be the maximum value among w1, h1, w2, h2.
4. Divide max by 2 (i.e. max/2).
5. Round off the resulting value to next integer.
6. Multiply by 2, let the final value be “size”.

EX: max=213
Max/2=106.5
Round off to next integer=107 multiply by 2=214
7. Compute the 2D FFT of size “size” from step 3.
8. formula used :
{fft1*conj (fft2)} / | {fft1*conj (fft2)} | = ARRAY
9. Get the maximum value from the array.

Note: parameters passed to Matlab as an array
Ex: imag1=’image1.ext’
Imag2=’image2.ext’
0 Kudos
Message 1 of 4
(3,758 Views)
Sundar,

The method used to call a dll from LabVIEW is a "call library node". This function allows you to select the dll from the block diagram, establish the parameters, then wire it to the rest of your code.

Using External Code in LabVIEW

Hope this helps,
Brett
0 Kudos
Message 2 of 4
(3,712 Views)
hai,

iam familiar with the one you are refering to
but i would like to know if we could the dll` files
built on MATLAB since they are built on C like structures

i am facing a problem of linking these dll files
that i have attached with the message,

is it that we can only link dll files
built only on VC++.

sundar,
0 Kudos
Message 3 of 4
(3,702 Views)
Hey Sundar,

You can use a DLL from virtually any language...including Matlab. See tutorial below.

http://zone.ni.com/devzone/conceptd.nsf/webmain/196c59b70896492686256af0005280c0?OpenDocument

This link is for a paper on creating Matlab DLLs for LabVIEW....see if this one is better.

-Brett
0 Kudos
Message 4 of 4
(3,662 Views)