OpenViBE forum

The OpenViBE community
It is currently Mon Aug 20, 2018 3:22 am

All times are UTC

Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Fri Jun 30, 2017 2:04 pm 

Joined: Tue Apr 11, 2017 10:44 am
Posts: 27
hi , I'm trying to make the matlab box work to show me a graphic interface.I have windows 10 64bit / matlab 2011a 32 bit

1. my matlab.exe path is "A:/Program Files (x86)/MATLAB/R2011a/bin/matlab.exe" and I set "Path to Matlab executables " in the properties of the box to it .

2. my function is in the path "C:\Users\kiyarash\Desktop\project" so I set "Matlab working directory" to it .

my whole scenario is the single matlab box . but when I run it OV gives the error

"[ ERROR ] At time 0.000 sec <Box algorithm::(0x000068b5, 0x00002500) aka Matlab Scripting> First call to the MATLAB engine failed.
To use this box you must have MATLAB (32 bits version) installed on your computer.
[ ERROR ] At time 0.000 sec <Box algorithm::(0x000068b5, 0x00002500) aka Matlab Scripting> Could not open the Matlab engine.
The matlab binary path was reasoned to be 'A:\Program Files (x86)\MATLAB\R2011a\bin\'.
[WARNING] Box algorithm <Matlab Scripting> has been deactivated because initialize() function returned error

I have read the "Tutorial – Level 2 – Using Matlab with OpenViBE" at some part it says :

Compiling the ‘plugins/processing/matlab’ project

A valid installation of MATLAB includes all the libraries and exe required to compile and use the boxes.

To be precise, CMake looks for the following libraries when compiling OpenViBE:

On Windows : libmex.lib, libmx.lib, libeng.lib under ${Matlab_ROOT}/extern/lib/win32/microsoft/
On Linux : mex, mx, eng, under ${Matlab_ROOT}/bin/glnx86 or ${Matlab_ROOT}/bin/glnxa64

so I have checked the "${Matlab_ROOT}/extern/lib/win32/microsoft/" directory and all the three .lib files are there .

but i have not given the box the path to my matlab root wich is "A:/Program Files (x86)/MATLAB/R2011a" only the path to matlab.exe is this the problem ? what am I doing wrong ?

Reply with quote  
PostPosted: Thu Jul 06, 2017 7:54 am 

Joined: Tue Dec 04, 2012 3:53 pm
Posts: 733
Location: INRIA Rennes, FRANCE
Hi Kiyarash,

the Matlab init issues are always tricky to solve because the function from mathworks returns no diagnostics
information. We're basically doing a blackbox call, either it works or it doesn't. But we don't know why it
fails when it does (if anybody knows some way to get it to tell what went wrong, I'd be happy to know).

That said, you can try to use a tool like Process Explorer, Filemon or such to find out what files its
trying to access. Sometimes you can notice it failing to find some specific file and that might turn
out to be the reason. However, in case of matlab it might as well be just an internal issue, like
failure to get a license.

Also remember in OV all paths should be specified as '/', the '\' has a different meaning. But I doubt
that could be the reason.

In any case, please let us know if you get it to work what solved it.


Reply with quote  
PostPosted: Mon Jul 10, 2017 6:02 pm 

Joined: Tue Apr 11, 2017 10:44 am
Posts: 27
thanks for the reply with a friend's help I managed to solve the problem.

1. as you stated above the addresses used in OV should use '/' instead of '\' which is the default way of separating an address in windows (I really don't get the reason behind that; because it can potentially cause a lot of unnecessary problems and editing when copy pasting an address ! ) this was actually my problem when I was trying to read a prerecorded session .

2. the default address for the "matlab executable" property when you first drag and drop the box in a scenario is "{matlab-directory}/R2011b/bin/matlab.exe" while what you should really write is "{matlab-directory}/R2011a/bin/win32/MATLAB.exe" .

meaning there are two matlab.exe in the bin folder first one directly inside the bin folder and the second one in the win32 subfolder. you must use the second one!

besides the tutorial on how to fill this property says
Path to Matlab executables (Windows) / Matlab launch command (Linux): tells OpenViBE how to execute the Matlab engine. Set it to the directory where is matlab.exe on Windows or type the command you use to launch Matlab on Linux.

which does not exactly help only in the examples (if you are a keen observer) you can see that it is also using the exe in the win32 subfolder.

Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC

Who is online

Users browsing this forum: No registered users and 1 guest

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group
Americanized by Maël Soucaze.