How can I use Software Development Kit (SDK) in Matlab for image capture using USB camera?
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
elham sa
el 6 de Jul. de 2015
I have a canon EOS T4i camera, I would like to capture an image without using Image Acquisition Toolbox.
I have used "videoinput" and "getsnapshot" with my webcam before and I know this approach is pretty straight forward. But now I do not have Image Acquisition Toolbox anymore.
I implemented my image capture using the Canon SDK in MS visual studio. I made an exe file from that c++ implementation and used it in Matlab, which is not what I'm looking for. (same goes with mex files)
I want something purely in Matlab, using the functions coming with the SDK.
Is it even possible?
I tried: loadlibrary('EDSDK'); (the .h file and .lib files are in my working directory) but the error is
error using loaddefinedlibrary the specified module could not be found
My problem is that the SDK comes with several dlls and header files. I don't know how/when link/include them before using the functions. Also how can I directly use c++ functions in Matlab?
This is an example of creating a .NET API in Matlab.
I would like something similar with c++.
Any help or idea is appreciated.
EDIT: (for future references) Be careful with 32 bit libraries in 64 bit Matlab (you may want to use Matlab 32bit if you have 32 bit libraries)
0 comentarios
Respuesta aceptada
Guillaume
el 6 de Jul. de 2015
Editada: Guillaume
el 6 de Jul. de 2015
Possibly, some dlls used by your main dll are not found. This MSDN page gives you the search path and order for dlls. Note that the application directory is most likely matlab's own directory.
You can also use the dependency walker (which used to come with visuals studio) to see all the dlls that are required by your main dll.
edit: I've just noticed that you're talking about C++. Matlab can only use the C calling convention when talking to dlls. If the exports of your C++ dll are not wrapped in extern "C" then matlab won't be able to call them.
4 comentarios
Walter Roberson
el 20 de Jul. de 2015
dynamically loaded DLLs are usually loaded only upon need, by the operating system. The details differ between operating systems.
64 bit MATLAB can never use 32 bit libraries. That is an operating system restriction that has been true on ever 64 bit operating system I have looked at.
Más respuestas (0)
Ver también
Categorías
Más información sobre COM Component Integration en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!