Webcam Device ID 1 is in use , how to solve it?

33 ビュー (過去 30 日間)
x y
x y 2016 年 5 月 7 日
編集済み: Walter Roberson 2019 年 3 月 23 日
But I get error:
Error using videoinput (line 391) winvideo: The device associated with device ID 1 is already in use. A new videoinput object cannot be created for this device while it is in use.
Error in trck_movng_obj (line 2) vid = videoinput('winvideo',1,'YUY2_160X120');
Can somebody tell me how to solve it ? please
  2 件のコメント
Stella SU
Stella SU 2016 年 9 月 16 日
I have met the same problem,did you fix it?
Jahid Hassan
Jahid Hassan 2019 年 3 月 23 日
faceing same problem

サインインしてコメントする。

採用された回答

Hassan Mehmood Khan
Hassan Mehmood Khan 2017 年 5 月 9 日
編集済み: Walter Roberson 2019 年 3 月 23 日
I was having the same problem. but i was able to solve it. Used the following code:
clc; clear;
close all; objects = imaqfind %find video input objects in memory
delete(objects) %delete a video input object from memory
vid=videoinput('winvideo',2,'MJPG_1280x720'); preview(vid)
now whenever i run the code, it will detect the winvideo input and show the preview.
  4 件のコメント
Ahmer Shahid
Ahmer Shahid 2018 年 11 月 17 日
its not working in app designer Kindly help Thanks.
Danial Babar
Danial Babar 2019 年 2 月 9 日
Thanks Hassan Mehmood Khan , its working

サインインしてコメントする。

その他の回答 (1 件)

Image Analyst
Image Analyst 2016 年 5 月 7 日
Make sure nothing else is using it. I'm not sure how to tell what else is using it if you don't already know, like you have your webcam manufacturer's app running, or webex running or whatever.

Community Treasure Hunt

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

Start Hunting!

Translated by