0

我需要在我的程序中加载图像数据,就像 matlab 在加载图像时所做的那样并将其存储在矩阵中,然后我将对这个矩阵进行一些操作并在之后查看它。所以我需要一些帮助,我如何使用 matlab 函数来加载图像并从 Visual Studio 2010 显示它们

非常感谢

4

2 回答 2

0

我觉得这个链接很有用 http://internetexception.com/post/2013/01/20/Using-with-Matlab-from-C-sharp-application.aspx

write this code inside any c# function

        var activationContext = Type.GetTypeFromProgID("matlab.application.single");
               var matlab =(MLApp.MLApp)Activator.CreateInstance(activationContext);
            matlab.Execute("cd 'C:\\Program Files\\MATLAB';");
            matlab.PutWorkspaceData("y", "base", simArray);
then any code you used in matlab can written in 
matlab.Execute("");
于 2015-04-15T19:34:38.020 回答
0

类似于我在这里提出的答案,有两种方法可以在visual-studio中调用Matlab:

  1. 将 MATLAB 分发到独立的共享库中:查看我的博客文章,了解如何执行此操作(包含详细步骤和示例)。

  2. 直接调用 MATLAB 引擎:有关详细信息,请参阅我的另一个博客

于 2013-12-28T10:07:33.183 回答