-
Notifications
You must be signed in to change notification settings - Fork 1
/
test.py
40 lines (29 loc) · 646 Bytes
/
test.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
import time
import raw
import matplotlib.pyplot as plt
print(hex(id(raw)))
tic = time.time()
print(tic)
i = raw.Raw('/home/jcarrano/imgdata/DSC02866.ARW')
toc = time.time()
print('TIME:', toc-tic)
print('#1')
idata = i.imgdata
r = idata.rawdata.raw_image
h = idata.rawdata.sizes.raw_height
w = idata.rawdata.sizes.raw_width
print('#2')
print(r,h,w)
plt.imshow(r, cmap = 'gray', interpolation = 'none')
plt.show()
tic = time.time()
print(tic)
i.raw2image()
toc = time.time()
print('TIME:', toc-tic)
p = idata.image
print(p.shape)
plt.imshow(p[...,:3], interpolation = 'none')
plt.figure()
plt.plot(idata.color.curve[:2**12])
plt.show()