In [54]:
import time
import numpy as np
import matplotlib.pyplot as plt
import data_io
import exiftool
import IPython
import maya
import context
import gopro_helper as gopro
%matplotlib notebook
%load_ext autoreload
%autoreload 2
In [2]:
IPython.display.display(IPython.display.HTML(data="""
<style>
div#notebook-container { width: 95%; }
div#menubar-container { width: 65%; }
div#maintoolbar-container { width: 99%; }
</style>
"""))
In [3]:
files = gopro.media.local_data_files()
In [61]:
m = gopro.media.metadata(files[:10])
In [62]:
m[0]
Out[62]:
In [64]:
dt = maya.parse(m[0].GPSDateTime)
In [65]:
dt.datetime()
Out[65]:
In [56]:
meta.GPSDateStamp
Out[56]:
In [38]:
d
Out[38]:
In [51]:
t = moment.date(2017, 7, 9, 0, 24)
In [53]:
t
In [20]:
f = files[100]
data = data_io.read(f)
meta = gopro.media.metadata(f)
In [21]:
AR = 3/4
W = 16
H = W/2*AR
fig, (ax1, ax2) = plt.subplots(ncols=2, figsize=(W, H))
bins = np.arange(0, 255, 2)
ax1.imshow(data)
ax2.hist(data[:, :, 0].flatten(), bins=bins, color='blue', alpha=0.5)
ax2.hist(data[:, :, 1].flatten(), bins=bins, color='green', alpha=0.5)
ax2.hist(data[:, :, 2].flatten(), bins=bins, color='red', alpha=0.5)
plt.tight_layout()
In [ ]:
In [ ]:
In [ ]:
In [ ]:
In [ ]:
In [ ]:
In [ ]:
In [ ]:
In [ ]:
In [ ]: