-
Notifications
You must be signed in to change notification settings - Fork 1
/
simplecam.py
65 lines (38 loc) · 912 Bytes
/
simplecam.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# -*- coding: utf-8 -*-
"""
Created on Wed Feb 08 16:59:26 2012
@author: rafik
"""
import time
import cv2
import plugins.inpSimpleFrameGrabber as inpSFG
import plugins.inpAveragingFrameGrabber as inpAFG
import plugins.wrkNull as wrkNull
import plugins.wrkInvert as wrkInv
import plugins.wrkEdgeFit as wrkEdge
import plugins.outSimpleDisplay as outSD
import plugins.outHistogram as outHG
inp = inpAFG.inpAveragingFrameGrabber()
#wrk0 = wrkNull.wrkNull()
#wrk1 = wrkInv.wrkInvert()
wrk2 = wrkEdge.wrkEdgeFit()
out0 = outSD.outSimpleDisplay()
inp.setup()
#wrk0.setup([0,1])
#wrk1.setup([1])
wrk2.setup([1])
out0.setup([0,1])
#out1.setup([0,2])
inp.config(0)
#inp1.config('bin/demo.avi', 3)
#wrk0.config()
#wrk1.config()
wrk2.config()
#out0.config()
out0.config()
for i in range(50):
data = []
data.extend(inp())
data.extend(wrk2(data))
out0(data)
cv2.waitKey()