Saturday, 27 May 2017

Object Detection using Raspberry pi and OpenCv

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...

Face and Eye Detection using Raspberry pi and OpenCv

Face and Eye  Detection using Raspberry pi and OpenCv: import io import picamera import cv2 import numpy 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('/home/pi/opencvfolder/haarcascade_frontalface_alt.xml') eye_cascade...

Face Detection using Raspberry pi and OpenCv

Face Detection using Raspberry pi and OpenCv import io import picamera import cv2 import numpy 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) image = cv2.imdecode(buff, 1) face_cascade = cv2.CascadeClassifier('/usr/share/opencvfolder/haarcascade_frontalface_alt.xml') #Convert...