R
runcyclexcski
I have written an image processing app in Matlab which works fine
when
I analyse images one at a time, but is very slow when I have to
analyze thousands of images in a row. So I re-wrote the image
analysis
routine in C++, compiled in .NET. The C++ code runs about 20 times
faster than Matlab. Being a layman in programming, I am now wondering
how to make matlab talk to C++.
The C++ code is a .cpp file and an .h file. The .cpp file contains ~5
functions that talk to each other, and the main() produces the final
result. From what I understand to make a .dll I can export functions
one at a time - is that so? If yes, how can I make main () .dll talk
to the .dlls with the seconday functions and then report to matlab?
Or
do I have to bundle all functionalities into the main()?
I forgot to add that the arguments to be passed from matlab to the C+
+
code are two matrices of data type short, about 512 by 512 (two
pointers in C++ notation), and the data returned are also two
matrices of data type float or double.
when
I analyse images one at a time, but is very slow when I have to
analyze thousands of images in a row. So I re-wrote the image
analysis
routine in C++, compiled in .NET. The C++ code runs about 20 times
faster than Matlab. Being a layman in programming, I am now wondering
how to make matlab talk to C++.
The C++ code is a .cpp file and an .h file. The .cpp file contains ~5
functions that talk to each other, and the main() produces the final
result. From what I understand to make a .dll I can export functions
one at a time - is that so? If yes, how can I make main () .dll talk
to the .dlls with the seconday functions and then report to matlab?
Or
do I have to bundle all functionalities into the main()?
I forgot to add that the arguments to be passed from matlab to the C+
+
code are two matrices of data type short, about 512 by 512 (two
pointers in C++ notation), and the data returned are also two
matrices of data type float or double.