如何从Visual studio mfc项目调用Matlab函数? [英] How to call Matlab functions from Visual studio mfc project?

查看:335
本文介绍了如何从Visual studio mfc项目调用Matlab函数?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我所做的是遵循此
了解如何执行此操作(详细步骤和示例)。


  • 直接呼叫MATLAB Engine:请参阅



  • 另一方面,似乎你不需要调用Matlab来实现你的目标。 OpenCV 库将提供类似 rgb2gray() imresize()



  • 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.

    解决方案

    • 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().

    这篇关于如何从Visual studio mfc项目调用Matlab函数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

    查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆