Skip to content

Commit d48a6f6

Browse files
committed
visualize it!
1 parent 1373006 commit d48a6f6

File tree

4 files changed

+2437
-329989
lines changed

4 files changed

+2437
-329989
lines changed

.vscode/launch.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"console": "integratedTerminal",
2828
"cwd": "${workspaceFolder}/mrcal",
2929
"args": [
30-
"./camera-0.cameramodel", "--cbmax","10","--unset","key","--gridn","1","1"
30+
"./camera-0.cameramodel", "--cbmax","10","--unset","key","--gridn","60","40"
3131
],
3232
"justMyCode": false
3333
},

heatmap-gen.py

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import numpy as np
2+
import matplotlib.pyplot as plt
3+
4+
# Load CSV-like data
5+
data = np.loadtxt("out", delimiter=",")
6+
7+
x = data[:, 0]
8+
y = data[:, 1]
9+
z = data[:, 2]
10+
11+
plt.figure()
12+
plt.title("Projection Uncertainty (in pixels), looking out to infinity")
13+
14+
sc = plt.scatter(x, y, c=z)
15+
plt.colorbar(sc, label="z")
16+
17+
# force heat range to go from 0 to 10
18+
plt.clim(0, 10)
19+
20+
plt.xlabel("x")
21+
plt.ylabel("y")
22+
plt.axis("equal")
23+
plt.tight_layout()
24+
25+
plt.show()

0 commit comments

Comments
 (0)