MATLAB Answers

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

조회 수: 64(최근 30일)
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 16 Sep 2016
I have met the same problem,did you fix it?
Jahid Hassan
Jahid Hassan 23 Mar 2019
faceing same problem

댓글을 달려면 로그인하십시오.

채택된 답변

Hassan Mehmood Khan
Hassan Mehmood Khan 9 May 2017
편집: Walter Roberson 23 Mar 2019
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

표시 이전 댓글 수: 1
Árvid Keszthelyi
Árvid Keszthelyi 13 Nov 2018
U r the boss Hassan!
Short answer:
objects = imaqfind
delete(objects)
Ahmer Shahid
Ahmer Shahid 17 Nov 2018
its not working in app designer Kindly help Thanks.
Danial Babar
Danial Babar 9 Feb 2019
Thanks Hassan Mehmood Khan , its working

댓글을 달려면 로그인하십시오.

추가 답변(1개)

Image Analyst
Image Analyst 7 May 2016
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.

  댓글 수: 0

댓글을 달려면 로그인하십시오.

Community Treasure Hunt

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

Start Hunting!

Translated by