简体   繁体   中英

Data Transfer between matlab and c#.net

I have a matlab code which gets image from .mp4 video file ,compares this image with my Originalimage and gives result.I have only an image as output( for example 720x720x3).Matlab shows this image with imshow and this all happening in a while loop.Matlab takes image from my video , compares it with my originalImage then gives result then matlab takes next image to compare ... I want this result to be shown in my c# form interface so I want to create a dll while.But ı am not sure about how to optimize my matlab code.Which datatype should I use to assign matlab result in c#?what if I use a matris which has the same size with result?how to get this result from matlab to c#? Thank you

If your C# client is independent (runs separately) the easiest way would be to save the image into a file with the imwrite command and then load it somehow in the C# client.

If you want to call the MATLAB function, you should have a look to the following link. You can then return the matrix, which is basically just a 3 dimensional array of numbers. Out of that you could then create a bitmap and load that on a form.

http://ch.mathworks.com/help/matlab/matlab_external/call-matlab-function-from-c-client.html?refresh=true

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM