Iot4beginners.com
import numpy as npimport cv2import ioimport picamera#creating a streamstream = io.BytesIO()#enabling picam to capturewith picamera.PiCamera()as camera: camera.capture(stream,format='jpeg')#to use in opencv convert to arraynumparray = numpy.fromstring(stream.getvalue(),dtype=numpy.uint8)image = cv2.imdecode(numparray,1)#create a variable for the cascade classifierfaceDetectset= cv2.CascadeClassifier('haarcascade_frontalface_default.xml');#convert to gray scalegray = cv2.cvtColor(img,cv2.COLOR_BGR2GRAY)#now we can look for facesfaces = faceDetectset.detectMultiScale(gray,1.3,5);#scaling factors can be variedfor (x,y,w,h) in faces: #draw box on original cv2.rectangle(img,(x,y),(x+w,y+h),(0,0,0),2)#show the output in windowcv2.imshow("Detected",img)if cv2.waitKey()==ord('e'): break;stream.truncate(0)cv2.destroyAllWindows() ................
................
In order to avoid copyright disputes, this page is only a partial summary.
To fulfill the demand for quickly locating and searching documents.
It is intelligent file search solution for home and business.
Related searches
- getroman com reviews
- acurafinancialservices.com account management
- acurafinancialservices.com account ma
- getroman.com tv
- http cashier.95516.com bing
- http cashier.95516.com bingprivacy notice.pdf
- connected mcgraw hill com lausd
- education.com games play
- rushmorelm.com one time payment
- autotrader.com used cars
- b com 2nd year syllabus
- gmail.com sign in