Converting a matlab function to java

Hi all,
I am converting my matlab functions to java. In my matlab function there is a line
hmfr = video.MultimediaFileReader(path)
When i convert it in to java and when i run that method java gives a error
undefined variable "video" or class "video.MultimediaFileReader"
can you help me to solve this problem. Thank you.

 채택된 답변

Friedrich
Friedrich 2011년 7월 12일

0 개 추천

Hi,
What do you mean with converting to Java? Are you talking about MATLAB Builder JA? The error looks like a ML error and it looks like the class is not compiled into the java class. Maybe take a look at the generated mccExcludedfiles.log file for some information regarding that the function is excluded from compiling. If there aren't any information try to add
%#function video.MultimediaFileReader
in the top of your main MATLAB function. This will tell the compiler to explicit include this into the compiled java class.

댓글 수: 2

Anne Fernando
Anne Fernando 2011년 7월 12일
HI,
Thanks for the reply. Yes. i am talking about MATLAB Builder JA. i check the mccExcludedfiles.log file. MultimediaFileReader didn't appear there. so i added %#function video.MultimediaFileReader. But it didn't help either. What should i do next.
thanx.
Friedrich
Friedrich 2011년 7월 13일
Hi,
I have done a small test with 11a 64bit and compiled an exe. The video.MultimediaFileReader was included and it worked fine. I hadn't to add anything to get it working. Can you compile a small example like:
out = video.MultimediaFileReader('C:\Program Files\MATLAB\R2011a\toolbox\vision\visiondemos\vipmen.avi')
and run it successfully? Maybe start with an exe first and later go over to java.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Java Package Integration에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by