-
Notifications
You must be signed in to change notification settings - Fork 1
/
app.py
49 lines (33 loc) · 905 Bytes
/
app.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
from flask import Flask, render_template, url_for, request, redirect,Response,send_file
# from flask_sqlalchemy import SQLAlchemy
from datetime import datetime
import cv2
from cam_shift import *
from mean_shift import *
from mouse_click_event import *
app = Flask(__name__)
from time import time
inde = 0
@app.route('/')
def index():
return render_template('index.html',choice=1)
@app.route('/onspot')
def onspot():
return render_template('index.html',choice=2)
@app.route('/click')
def click():
func1()
return render_template('index.html',choice=2)
@app.route('/mean')
def mean():
func2()
return render_template('index.html',choice=2)
@app.route('/crop')
def crop():
return send_file('roi.jpg', mimetype='image/gif')
@app.route('/cam')
def cam():
func3()
return render_template('index.html',choice=2)
if __name__ == "__main__":
app.run(debug=True)