I apologize that I don't have any experience in python but this board will certainly motivate me to learn more. I've already made some animations that I am really excited about. My main goal in using this device is to make experimental graphics and animations. Glitch is great in my world. Anyways, I tried a few things but it only ends up drawing a single rectangle. If you don't mind can you take a look and give me a few more tips. If you can give me a little help I will study it and take it from there.
Code: Select all
import sensor, time, image
# Reset sensor
# Sensor settings
# HQVGA and GRAYSCALE are the best for face tracking.
# Load Haar Cascade
# By default this will use all stages, lower satges is faster but less accurate.
face_cascade = image.HaarCascade("frontalface", stages=25)
# FPS clock
clock = time.clock()
# Capture snapshot
img = sensor.snapshot()
# Find objects.
# Note: Lower scale factor scales-down the image more and detects smaller objects.
# Higher threshold results in a higher detection rate, with more false positives.
objects = img.find_features(face_cascade, threshold=0.75, scale_factor=1.25)
rect = 
# Draw objects
for r in objects:
rect.append(r) # thought this might add to rect array
rect +=[r] # tried this too to add to rect array still no dice
for i in rect:
# rect.append(i) # this caused a memory overload error