
Object Detection using Raspberry pi and OpenCv
import numpy as np
import cv2
import io
import picamera
stream = io.BytesIO()
with picamera.PiCamera() as camera:
camera.resolution = (320, 240)
camera.capture(stream, format='jpeg')
buff = numpy.fromstring(stream.getvalue(), dtype=numpy.uint8)
img = cv2.imdecode(buff, 1)
face_cascade = cv2.CascadeClassifier('haarcascade_frontalface_default.xml')
eye_cascade = cv2.CascadeClassifier('haarcascade_eye.xml')
watch_cascade...