Open previ opened 10 years ago
I can confirm that there is currently not a way to uninitiate the camera. It can be a very useful feature if you want to free up the camera for other purposes without shutting down the simplecv scripts.
The section responsible for opening the camera (in linux) is: import pygame.camera pygame.camera.init()
I propose that we can create a function: e.g. Camera - def stop() The function will disconnect the camera without getting rid of the camera instance. We can simply stop pygame.camera.
The pseudocode will look something like:
pygame API useful: http://www.pygame.org/docs/ref/camera.html#pygame.camera.Camera.stop
Can someone else confirm this?
There is no way of shutting down the Camera object, once initialized. There should be a way to reverse the initialization performed in cam = Camera()