Visit my blog or connect with me on Twitter
git init
or
Visit my blog or connect with me on Twitter
git init
or
| import cv2 | |
| import cv2.cv as cv | |
| def detect(img, cascade_fn='haarcascades/haarcascade_frontalface_alt.xml', | |
| scaleFactor=1.3, minNeighbors=4, minSize=(20, 20), | |
| flags=cv.CV_HAAR_SCALE_IMAGE): | |
| cascade = cv2.CascadeClassifier(cascade_fn) | |
| rects = cascade.detectMultiScale(img, scaleFactor=scaleFactor, |
| #!/usr/bin/python3 | |
| #required libraries | |
| import sys | |
| import ssl | |
| import paho.mqtt.client as mqtt | |
| #called while client tries to establish connection with the server | |
| def on_connect(mqttc, obj, flags, rc): | |
| if rc==0: |