Pass an image to a function from C#

I'm preparing the C# portion of my project and am trying to set up an environment in C# which allows me to pass an image to a matlab function, let matlab do its job, and return a boolean or integer representation of the boolean. So in short, the return value isn't anything special and works fine, but the argument causes troubles. Now matlab functions happily take images and any other formats as arguments, but C# seems to only be able to pass strings or atomic values. So when I try to pass a bitmap as a parameter, I get:
"The file name or URL argument must be a string."
As an error message. And yes, it remains the same error message when I pass the path of the image. So it's not really the matlab side causing the problem. I'm using visual studio 2015 and matlab version 2015b, and they seem to cooperate nicely when I'm passing simple variables and returning simple variables. The function call is defined as this:
matlab.Feval("testFile", 2, out result, path);
If anyone has any idea your help would be greatly appreciated!

답변 (1개)

카테고리

도움말 센터File Exchange에서 MATLAB Mobile에 대해 자세히 알아보기

질문:

2015년 11월 5일

답변:

2015년 11월 9일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by