def draw(self, color=(255, 0, 0), autocolor=False): """ Call draw() on each feature in the FeatureSet. """ for f in self: if (autocolor): color = Color().getRandom() f.draw(color)
from SimpleCV import Camera, Display, Color import time #Initialize the camera cam = Camera() # Initialize the display display = Display() #take an initial picture img = cam.getImage() # Write a message on the image img.drawText("Left click to save a photo.", color=Color().getRandom()) # Show the image on the display img.save(display) time.sleep(5) counter = 0 while not display.isDone(): # Update the display with the latest image img = cam.getImage() img.save(display) if display.mouseLeft: #Save image to the current directory img.save('photobooth' + str(counter) + '.png') with Image(filename='photobooth' + str(count) + '.png') as OriginalImagen: