forked from firepick1/FireSight
-
Notifications
You must be signed in to change notification settings - Fork 2
/
karl
executable file
·76 lines (64 loc) · 1.99 KB
/
karl
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
66
67
68
69
70
71
72
73
74
75
76
#! /bin/bash
IMAGE=img/10x10grid.png
IMAGE=img/10x10grid-400.png
IMAGE=img/cal-grid-h.png
IMAGE=img/cal-grid-v.png
IMAGE=img/cal-grid.png
LOG=-trace
LOG=-info
SCALE=-Dscale=[0.5,0.5]
SCALE=-Dscale=[0.6,0.6]
SCALE=-Dscale=[0.7,0.7]
SCALE=-Dscale=[0.8,0.8]
SCALE=-Dscale=[0.9,0.9]
SCALE=-Dscale=[1,1]
MATRIX=[1.0445959023283466,0.028944383623098691,-3.8930712768448785,0.025893276145872605,1.1004761893920103,-14.482340799022937,-1.3832325099618706e-5,0.00027923366870944382,1.0]
MATRIX=[1.0607967128675548,0.028493745902572951,-7.1703410533895173,0.026587775192913436,1.1255262314607453,-19.981908384664415,-1.3832327695678588e-5,0.00027923340765283015,1.0] MATRIX=[1.0433175655241242,0.029042587033057746,-3.871104820189478,0.024666005970333842,1.1005033089025147,-14.459315904252591,-1.744680578315489e-5,0.00027950694231146367,1.0]
MATRIX=[1.0401303504379928,0.025563571886125805,-2.8585180985681511,0.024776405671245158,1.0940406118149182,-13.882226248352481,-1.5476297243002712e-5,0.00026750783457050705,1.0]
MATRIX=[1.0405136564383939,0.026744906574870872,-2.943810346145538,0.024529984309304427,1.097007339310166,-14.050588819421538,-1.7780681696463529e-5,0.00027266213560320576,1.0]
MATRIX=[1,0,0,0,1,0,0,0,1]
OP=diamond
OP=tile4
OP=xyaxes
OP=cross
OP=quad0
OP=quad3
OP=quad1
OP=tile2
OP=ellipse
OP=corners
OP=tile3
OP=tile5
OP=quad2
OP=none
OP=perspective
OP=tile1
TIME=time
TIME=
JSON=json/warpPerspective.json
JSON=json/matchGrid.json
JSON=json/matchGrid-perspective.json
JSON=json/matchGrid-calibrate.json
OUTPUT=img/matchGrid-perspective.png
OUTPUT=~/Downloads/grid1.jpg
CORR=-Dcorr=0.8
CORR=
COLOR="-DcolorUndistort=[32,255,32] -DcolorMatch=[32,32,255]"
COLOR=
PERSPECTIVE="-p json/warpPerspective.json -Dmatrix=$MATRIX"
PERSPECTIVE=
make
if [ $? -eq 0 ]; then
target/firesight -i $IMAGE -o target/tmp.png $PERSPECTIVE
$TIME target/firesight \
-i target/tmp.png \
-p $JSON \
-o $OUTPUT \
-Dtemplate=img/cross32.png \
-Dcalibrate=$OP \
$CORR \
$SCALE \
$LOG \
$COLOR \
|& tee target/out
fi