Commit b33b105b authored by zet's avatar zet

first commit

parents
from flask import Flask, render_template
import telegram
def st():
bot = telegram.Bot(token='315389443:AAET9R-zPL-0fMT3RhuAhg8jIfnvHOOI8wI')
updates = bot.getUpdates()
bot.sendMessage(chat_id="267708557", text="face fond")
app = Flask(__name__)
@app.route("/")
def hello():
return render_template('index.html')
if __name__ == "__main__":
app.run("0.0.0.0")
from SimpleCV import Camera, Display, JpegStreamCamera
from time import sleep
import telegram
chat_id="267708557"
stream = "http://192.168.78.136:8080/?action=stream"
bot = telegram.Bot(token='315389443:AAET9R-zPL-0fMT3RhuAhg8jIfnvHOOI8wI')
updates = bot.getUpdates()
#myCamera = Camera(prop_set={'width':320,'height':240})
myCamera = JpegStreamCamera(stream)
print ".....start"
while True:
frame = myCamera.getImage()
faces = frame.findHaarFeatures('facetrack-training.xml')
if faces:
for face in faces:
print "Face at: " + str(face.coordinates())
bot.sendMessage(chat_id=chat_id, text="fond face")
frame.save("face.jpg")
bot.sendPhoto(chat_id=chat_id, photo=open('face.jpg', 'rb'))
else:
None
sleep(.5)
This source diff could not be displayed because it is too large. You can view the blob instead.
#!/bin/bash -e
source $(pwd)/venv/bin/activate
exec /usr/bin/env python2.7 $(pwd)/app.py
<h1>tetet</h1>
<img alt="" src="http://192.168.78.136:8080/?action=stream" width="640" height="480" />
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment