MATLAB: How to add a live image to UIAxes in App Designer for MATLAB R2016b

app designerlive imageMATLABpreviewr2016bvideowebcam

I am using MATLAB R2016b on a Mac. I have tried the following which results in a black box with the specified dimensions (640×480) showing up in the UIAxes:
vid = videoinput('macvideo', 1);
hImage = image(app.UIAxes1, zeros(640,480,3));
preview(vid, hImage);
I get this error message:
Error using imaqdevice/preview (line 176)
There is no ALimMode property on the UIAxes class.
Is preview not supported in App Designer yet?

Best Answer

The Image Acquisition Toolbox PREVIEW function does not support UIAXES in R2016b yet, but the toolbox team is aware of the customer need.