Why won't vision.Dep​loyableVid​eoPlayer work in MATLAB compiler deployed executable?

조회 수: 1 (최근 30일)
I am trying to deploy some code using the fast video display calling the Computer Vision Toolbox vision.DeployableVideoPlayer. This system object is supposedly supported with the MATLAB Compiler.
Here is some quick demo code:
%************
function TestVid()
% Quick test of MATLAB compiler on vision.DeployableVideoPlayer
vidp = vision.DeployableVideoPlayer;
for i=1:1000,
step(vidp,rand(2048,2048,3)),
end
release(vidp)
%*************
I compile with MATLAB compiler deploytool, and the weird thing is that it works fine on my PC (64-bit Windows 7 Pro), but will exit without giving an error if I install and try to execute on two other laptops (64-bit Windows 7 Pro & Windows 8)
I just upgraded to 2015b from 2015a hoping would fix, but did not. Seems like there is some file or .dll that is not getting installed, but I have no way of finding out what the issue is. There is no previous information I could find regarding this on the internet either.
  댓글 수: 2
Harsheel
Harsheel 2016년 1월 28일
to see what error you get, can you try running the exe file from the Windows DOS prompt?
Alexander Kuyper
Alexander Kuyper 2016년 1월 29일
thanks, good tip, also am saving a .log file
Creates the system object OK, but crashes on call to step function.
In a nutshell:
vision:System:toVideoDisplayStart Access Error ...
second process in stack trace is
tvdmask2hostlib.mex64
MATLAB exit with fatal error

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

채택된 답변

Alexander Kuyper
Alexander Kuyper 2016년 1월 29일
I think I figured it out. After inspecting the tovideodevice.dll with the Dependency Walker utility, one of the calls was to sdl2.dll. Or Simple Direct MediaLayer, https://www.libsdl.org/index.php
I packaged this with my applications and they all work now. A caveat is that I HAD tried this before with MATLAB 2015a and did not appear to fix, but seems OK with 2015b. Seems like the compiler is missing something in its bundling, and had found no documentation on this. Would need to include the library as well if using Coder for the library calls.
Hope this helps others that run across a similar issue.
  댓글 수: 4
Alexander Kuyper
Alexander Kuyper 2019년 1월 9일
Hi Sabina,
sdl2.dll (from https://www.libsdl.org/index.php ) needs to be packaged with the distribution, though if this doesn't work, manually copy it into the compiled executable directory.
Sabina
Sabina 2019년 1월 10일
Hi Alexander! Thank you very much! Everything worked out!

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

추가 답변 (1개)

Birju Patel
Birju Patel 2016년 1월 28일
Hi,
That's strange. What happens if you try to reduce the image size from 2048x2048x3 to something like 10x10x3? Does it still fail?
  댓글 수: 1
Alexander Kuyper
Alexander Kuyper 2016년 1월 29일
Still fails if do smaller (128x128x3 in this case). Something a little more revealing that before I was using -C option to create a .ctf file (another error I was getting with deploying), but only created the binary .exe this time.
Says: Error using DeployableVideoPlayer/step
Could not open library:tovideodevice.dll
The library is on the computer and even if I copy to the same directory still fails.

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

카테고리

Help CenterFile Exchange에서 Computer Vision Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by