def __init__(self, port): self.position = camera.setup(port) self.DEBUG = True # start servoblaster and mjpeg-streamer camera.startServoBlaster() camera.startMjpegStreamer()
def collectData(self, path, frames): # Stop the mjpg-streamer to free the camera camera.stopMjpegStreamer() # Take JPEG images of the new object camera.startRaspiStill(path, frames) # Now that we've taken the images, let's start the stream again camera.startMjpegStreamer()