Skip to content

Commit 15644de

Browse files
committed
thermal data visualization
1 parent d3686a0 commit 15644de

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import matplotlib.pyplot as plt
2+
import pandas as pd
3+
import numpy as np
4+
import os
5+
from config import *
6+
7+
# plt.interactive(False)
8+
9+
thermal_images_path = '../AndroidAppData/'
10+
filenames = os.listdir(thermal_images_path)
11+
12+
for filenum, filename in enumerate(filenames):
13+
try:
14+
thermal_data = pd.read_csv(thermal_images_path + filename, header=None, sep=';').values
15+
# thermal_data.astype(float)
16+
thermal_data = thermal_data.T
17+
18+
# plt.close()
19+
plt.close()
20+
fig, ax = plt.subplots()
21+
ax.imshow(thermal_data, vmax=40, vmin=30, cmap='Blues')
22+
fig.show()
23+
fig.savefig(f'{pic_folder}thermal_image_{filenum}.png')
24+
except:
25+
print(f'Can\'t read {filename}')
26+
27+
28+

0 commit comments

Comments
 (0)