Webcam cannot be disconnected

After the camera variable is defined and used as below;
camera = webcam;
picture = camera.snapshot;
I use;
clear camera
However deleting the structure of course doesn't disconnect the webcam.
How can I officially stop image acquisition and disconnect the webcam?

Risposte (1)

Star Strider
Star Strider il 15 Mag 2018
Try the function version:
clear('camera')
That is in the documentation as step 8 in: Acquire Webcam Images (link).

8 Commenti

I tried using clear('camera');
Unfortunately, the webcam light is still on and not possible to disconnect unless I close MatLab.
Contact MathWorks. Use the Contact Us link in the upper right corner of this page.
I am contacting to for support. Thank you for your suggestion.
My pleasure.
I never experienced that problem, and couldn’t reproduce it when I used my webcam.
I wonder if it is because camera drivers or another setting on pc. Maybe not a MatLab issue at all.
I have no idea.
Can you turn it on and off outside of MATLAB? That may be one way of isolating the problem.
Yes, I can turn it on and off with other software which reaches to webcam.
Then request help from MathWorks. Use the Contact Us link in the upper right corner of this page.
Run the ver command from your Command Window first. Then copy and paste the results to the appropriate window.

Accedi per commentare.

Categorie

Scopri di più su MATLAB Support Package for IP Cameras in Centro assistenza e File Exchange

Tag

Richiesto:

il 15 Mag 2018

Commentato:

il 23 Mag 2018

Community Treasure Hunt

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

Start Hunting!

Translated by