0

I need in my program to load an image data like what matlab does when it loads images and store it in a matrix, and then I will do some operations on this matrix and view it after that. so I need some help, how can i use matlab functions with loading images and displaying them from visual studio 2010

Thanks a lot

herohuyongtao
  • 49,413
  • 29
  • 133
  • 174
Ruba
  • 885
  • 4
  • 18
  • 29

2 Answers2

0

Similar to the answer I posed here, there are two ways to call Matlab inside visual-studio:

  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.

Community
  • 1
  • 1
herohuyongtao
  • 49,413
  • 29
  • 133
  • 174
0

i tink this link is useful 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("");