How can I insert live video into a MATLAB GUI using Image Acquisition Toolbox?

Technical Source
2 min readDec 29, 2021

I am making a Graphical User Interface, and I would like to insert live video from my camera into an axis in my GUI using Image Acquisition Toolbox. Essentially, I would like to have the functionality of the PREVIEW function within my GUI.

NOTE:-

Matlabsolutions.com provide latest MatLab Homework Help,MatLab Assignment Help for students, engineers and researchers in Multiple Branches like ECE, EEE, CSE, Mechanical, Civil with 100% output.Matlab Code for B.E, B.Tech,M.E,M.Tech, Ph.D. Scholars with 100% privacy guaranteed. Get MATLAB projects with source code for your learning and research.

The PREVIEW function has a second input argument which allows you to specify a handle graphics image object where the video will be displayed.

More information on how to set this up is available in the documentation:

Previewing Data :: Introduction (Image Acquisition Toolbox)

If you are using a previous version, read the following:

Here is an example of a GUI that offers the ability to use Image Acquisition Toolbox functions interactively.

For this example, three buttons will be used to toggle between turning the camera on and off, capture a snapshot image, and acquire video data. The GUI can be closed at any time by pressing the figure’s Close button.

There are two steps in creating this GUI.

Step One. Create the Visual Implementation of the GUI

1. Start GUIDE by typing the following at the MATLAB command prompt:

guide

2. In the GUIDE Quick Start dialog, under GUIDE templates, select Blank GUI (Default) and press OK. This will open a blank GUI figure

3. Change the following properties of the figure. (You can double-click anywhere in the blank, gray figure area to open the Property Browser)

a.  Name - Change to 'MyCameraGUI'
b. Tag - Change to 'MyCameraGUI'
c. Units - Change to 'pixels'
d. Position, Width - Change to 400
e. Position, Height - Change to 420

4. Click the button to the right of ‘CloseRequestFcn’ to auto-generate a callback function when the GUI is closed.

SEE COMPLETE ANSWER CLICK THE LINK

--

--

Technical Source

Simple! That is me, a simple person. I am passionate about knowledge and reading. That’s why I have decided to write and share a bit of my life and thoughts to.