-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathmain.py
More file actions
44 lines (33 loc) · 797 Bytes
/
main.py
File metadata and controls
44 lines (33 loc) · 797 Bytes
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
'''
Created 13 August, 2014
@author : iHub Research
'''
# load required libraries
import image_processing
import numpy as np
from flask import Flask
import links
import json
import scipy as sp
# create flask web server
#app = Flask(__name__)
# create HTTP endpoint
#@app.route('/ImPro/<road>')
# main function
# def get_route(road):
# initialize route class
road = 'sarit'
traffic = image_processing.route(road)
# setup working directory
traffic.set_dir()
# get image from traffic camera
traffic.capture_images()
# load image stack
x = traffic.load()
# differential imaging
y = traffic.diffImg(x['img_a.jpg'],x['img_b.jpg'],x['img_c.jpg'])
# calculate optical flow
z = traffic.opticalFlow(x['img_a.jpg'],x['img_b.jpg'],x['img_c.jpg'])
print (z)
#if __name__ == "__main__":
#app.run()