Question

I'm trying to learn SimpleCV using Python 2.7 in IDLE.

Once the camera form SimpleCV is initialized the camera become unavailable to other programs like native webcam application or skype etc.

from SimpleCV import *
camera = Camera()

After restarting the pc or logoff and logon the webcam becomes to those applications. It seems that even closing out from python IDLE, it doesn't close the camera stream. Is there any way to stop the camera stream of simplecv?

Was it helpful?

Solution

I couldn't replicate your issue, but if the webcam is still running even after your program terminates/you close IDLE, you can end the camera by going into task manager and killing all running Python processes.

After some experimenting, I found that if you want to accomplish the same thing directly inside the code, you could try simply deleting the reference altogether:

>>> import SimpleCV as scv
>>> cam = scv.Camera()
>>> del cam

Calling del cam caused the webcam indicator light on my laptop to turn off. Granted, this appears to be an undocumented (??) solution, so I'm not sure how robust it is. I would probably try testing this on several different laptops/webcams first, to make sure it works reliably and consistently.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top