How to compile a GUI that uses adaptors from the imaq toolbox

3 次查看(过去 30 天)
Hello,
I am having trouble understanding how to compile a standalone executable version of my GUI that needs the winvideo adaptor that can be used by the Image Acquisition toolbox. Is there a way to include the image adaptors in the executable file so that it will immediately work on a machine that doesn't run MATLAB?
Right now, when I run the *.exe on the computer that has the adaptors installed, it throws the following warning in the command line.
Warning: No Image Acquisition adaptors found. Image acquisition
adaptors may be available as downoadable support packages. Open <a
href = "matlab: imaq.internal.Utility.supportPackageInstaller">Support
Package Installer </a> to install additional vendors.
I'm completely new to compiling executables this way.
Alternately, I am open to solutions that create a full application through Application Deployment. When I've tried using the Application Deployment tool, the *.exe file that is generated throws an index out of bounds error (related to varargin being null?) for the GUI at the else line:
if nargout
[varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
else
gui_mainfcn(gui_State, varargin{:});
end
I'm having trouble figuring out how to handle this error from code that guide auto-generated as the initialization code.
Solving either of these problems would help greatly.
Thank you for your help, Lisa

采纳的回答

Lisa Li
Lisa Li 2015-11-17
I was using Matlab 2014a but now I'm on Matlab 2015b.
I resolved the issue by using the Application building tool and by having a runMyGUI script that ran my program and passed an argument into the GUI code. Seems my problem came from having empty arguments in myGUI() instead of myGUI(1) when I was compiling it.
I chose to use the application builder also because we don't want our user to have to install anything on their end once they're using our program. The Application builder tool solved that by letting me add on the camera drivers I needed for my GUI.
Thanks everyone! Lisa
  1 个评论
Ricardo
Ricardo 2023-7-19
8 years later this remains to be an issue. This is deffenitely the workarround for this problem. Thank you very much for writing the answer, you helped me a lot!

请先登录,再进行评论。

更多回答(2 个)

Sudhanshu Bhatt
Sudhanshu Bhatt 2015-11-9
Hi Lisa Li,
Are you able to run the code inside MATLAB? Are the adaptors installed on the machine that execute just the MATLAB code?
If MATLAB code uses a toolbox with an installed support package, the DEPLOYTOOL app displays a Suggested Support Packages section.
More information on how to add Supported Packages needed by the application can be found in the Documentation Link below:
Please note that the drivers will not be installed using the above workflow. The drivers will need to be separately installed on the target machine.
Hope this helps!
If this still does not resolve your issue, you can create a Technical Support Request by clicking on the link below:
Thanks
Sudhanshu Bhatt
  1 个评论
Image Analyst
Image Analyst 2015-11-9
I install my camera drivers on my target machine, and it works fine, at least until R2015 came out. However, Lisa just wants to use the built in winvideo drivers, like for the target machine's built-in web cam or something, so what should or can she install?

请先登录,再进行评论。


Madhura Suresh
Madhura Suresh 2015-11-11
Lisa, Are you using R2015a or R2015b? Madhura

Community Treasure Hunt

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

Start Hunting!

Translated by