How to call Matlab functions from Visual studio mfc project?

时光怂恿深爱的人放手 提交于 2019-12-12 01:38:47

问题


What I have done is following the guidline in this website

Now, I want to use some functions like rgb2gray() and imresize()... but I dont know how to use them, or I dont know which header file should I include in my project?

I have tried other way by creating a C++ shared-library in Matlab, then used it in VS 2012, but I could not add the DLL file to my project when I added new references. it is like that:

Please help me! thanks in advance.


回答1:


  • If you really want to call Matlab inside visual-studio, there are two ways:

    1. Distribute MATLAB into independent shared library: check out my blog-post on how to do this (with detail steps and example).

    2. Call MATLAB Engine directly: Refer to another blog of mine for more info.

  • On the other hand, it seems that you don't need to call Matlab to achieve your goal. OpenCV library will offer functions similar to rgb2gray() and imresize().



来源:https://stackoverflow.com/questions/19474835/how-to-call-matlab-functions-from-visual-studio-mfc-project

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!