Esempio n. 1
0
from SimpleCV import Camera, ImageSet
import time
cam = Camera()
camImages = ImageSet()
# Set to a maximum of 10 images saved
# Feel free to increase, but bewared running out of space
maxImages = 10
for counter in range(maxImages):
    # Capture a new image and add to set
    img = cam.getImage()
    camImages.append(img)
    # Show the image and wait before capturing another
    img.show()
    time.sleep(6)
camImages.save(verbose=True)
Esempio n. 2
0
import os
from time import sleep

from SimpleCV import ImageSet

from utils import PreparedCamera


# Settings
cam_size = {'width': 640, 'height': 480}
gif_interval = 0.5 # Seconds between frames
gif_length = 10 # Length in seconds
file_name = os.path.join('pictures', 'ani.gif')

cam = PreparedCamera(0, cam_size, debug=True)

print("Recording images")
img_set = ImageSet()
for frame in range(0, int(gif_length * gif_interval)):
    img = cam.getImage()
    img_set.append(img)
    sleep(1.0/gif_interval)
img_set.save(destination=file_name, dt=gif_interval)
Esempio n. 3
0
from SimpleCV import Camera, ImageSet
import time

cam = Camera()

camImages = ImageSet()

maxImages = 10

for i in range(maxImages):
    # Capture a new image
    img = cam.getImage()

    # Add image to set
    camImages.append(img)

    # Show the image and wait before capturing another
    img.show()
    time.sleep(1)

camImages.save(destination="./images/imagesets/")

from SimpleCV import Camera, ImageSet
import time
cam = Camera()
camImages = ImageSet()
# Set to a maximum of 10 images saved
# Feel free to increase, but beware of running out of space
maxImages = 5
for counter in range(maxImages):
  # Capture a new image and add to set
  img = cam.getImage()
  camImages.append(img)
  # Show the image and wait before capturing another
  img.show()
  time.sleep(2)
camImages.save(destination='imageset1', verbose=True)