I'm using webcam() to acquire few images. I managed to get it working and export images in png format. However after the usage I can't reuse the webcam. (both internal and external to matlab) Either I have to restart matlab or reconnect the usb to get this fixed. I tried clear all, delete(mycam) options still the problem persists.
mycam = webcam;
preview(mycam)
closePreview(mycam)
img = snapshot(mycam);
imagesc(img)
delete(mycam)
clear all
I'm using matlab 2014b on win7. Is there another command to release/reset the webcam.

댓글 수: 3

Rashmil Dahanayake
Rashmil Dahanayake 2014년 10월 12일
Update: As per mathworks technical support team, this is a bug.
Star Strider
Star Strider 2014년 10월 12일
Noted.
I deleted my Answer.
Ramin Mammadzada
Ramin Mammadzada 2017년 10월 14일
I have also encountered this kind of problem today. Just write "clear". It will delete all instances of the camera too, so the problem will be solved.

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

답변 (0개)

제품

질문:

2014년 10월 6일

댓글:

2017년 10월 14일

Community Treasure Hunt

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

Start Hunting!

Translated by