I will interpret the three weeks of silence since I posted this question as meaning that The Mathworks has no workaround.
Stop a webcam preview without closing window
1 次查看(过去 30 天)
显示 更早的评论
I'm building a GUI using appdesigner (Matlab 2019a, Support Package for USB Webcams). I'd like to be able to preview my computer's webcam in one of the GUI's axes. I've been able to do it like this:
obj = webcam(1);
vidRes = strsplit(obj.Resolution, 'x');
hImage = image(app.UIAxes, zeros(str2double(vidRes(2)),str2double(vidRes(1)),3));
preview(obj, hImage)
However, I don't know how to stop the preview. Using closePreview(obj) closes the entire GUI window, which is not what I want.
The Image Acquisition Toolbox has a function stoppreview. Is there anything comparable -- or a workaround -- for the webcam support package?
Thanks,
Niraj
3 个评论
Walter Roberson
2019-6-29
We do not know if anyone who works for the Mathworks has read your question.
This is not an official support channel. This resource has questions answered by volunteers, most of whom do not work for Mathworks.
There are on the order of 4000 new questions asked every month (over 5000 per month in late winter as university years finish), so it is easy for any one question to be overlooked by an occasional volunteer who happens to know the answer. Most answers come from the 50 or so most active volunteers, about 90% of whom do not work for Mathworks. It happens that the most active non-Mathworks volunteers seldom use App Designer.
I could answer with respect to the older style preview() function, but I do not have experience with App Designer so I did not respond.
回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!