forked from by-sabbir/HeadPoseEstimation
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Visualize3DModel.py
72 lines (66 loc) · 3.21 KB
/
Visualize3DModel.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
66
67
68
69
70
71
72
import numpy as np
import matplotlib.pyplot as plt
from mpl_toolkits import mplot3d
Model3D = np.array([[-7.308957, 0.913869, 0.000000],
[-6.775290, -0.730814, -0.012799],
[-5.665918, -3.286078, 1.022951],
[-5.011779, -4.876396, 1.047961],
[-4.056931, -5.947019, 1.636229],
[-1.833492, -7.056977, 4.061275],
[0.000000, -7.415691, 4.070434],
[1.833492, -7.056977, 4.061275],
[4.056931, -5.947019, 1.636229],
[5.011779, -4.876396, 1.047961],
[5.665918, -3.286078, 1.022951],
[6.775290, -0.730814, -0.012799],
[7.308957, 0.913869, 0.000000],
[5.311432, 5.485328, 3.987654],
[4.461908, 6.189018, 5.594410],
[3.550622, 6.185143, 5.712299],
[2.542231, 5.862829, 4.687939],
[1.789930, 5.393625, 4.413414],
[2.693583, 5.018237, 5.072837],
[3.530191, 4.981603, 4.937805],
[4.490323, 5.186498, 4.694397],
[-5.311432, 5.485328, 3.987654],
[-4.461908, 6.189018, 5.594410],
[-3.550622, 6.185143, 5.712299],
[-2.542231, 5.862829, 4.687939],
[-1.789930, 5.393625, 4.413414],
[-2.693583, 5.018237, 5.072837],
[-3.530191, 4.981603, 4.937805],
[-4.490323, 5.186498, 4.694397],
[1.330353, 7.122144, 6.903745],
[2.533424, 7.878085, 7.451034],
[4.861131, 7.878672, 6.601275],
[6.137002, 7.271266, 5.200823],
[6.825897, 6.760612, 4.402142],
[-1.330353, 7.122144, 6.903745],
[-2.533424, 7.878085, 7.451034],
[-4.861131, 7.878672, 6.601275],
[-6.137002, 7.271266, 5.200823],
[-6.825897, 6.760612, 4.402142],
[-2.774015, -2.080775, 5.048531],
[-0.509714, -1.571179, 6.566167],
[0.000000, -1.646444, 6.704956],
[0.509714, -1.571179, 6.566167],
[2.774015, -2.080775, 5.048531],
[0.589441, -2.958597, 6.109526],
[0.000000, -3.116408, 6.097667],
[-0.589441, -2.958597, 6.109526],
[-0.981972, 4.554081, 6.301271],
[-0.973987, 1.916389, 7.654050],
[-2.005628, 1.409845, 6.165652],
[-1.930245, 0.424351, 5.914376],
[-0.746313, 0.348381, 6.263227],
[0.000000, 1.400000, 8.063430],
[0.746313, 0.348381, 6.263227],
[1.930245, 0.424351, 5.914376],
[2.005628, 1.409845, 6.165652],
[0.973987, 1.916389, 7.654050],
[0.981972, 4.554081, 6.301271]])
fig = plt.figure()
ax = plt.axes(projection="3d")
x, y, z = Model3D[:, 0], Model3D[:, 1], Model3D[:, 2]
ax.scatter3D(x, y, z)
plt.show()