update scaler and RAM
This commit is contained in:
BIN
Demosaic/sim/transform/im.tif
Normal file
BIN
Demosaic/sim/transform/im.tif
Normal file
Binary file not shown.
19
Demosaic/sim/transform/raw_cut.py
Normal file
19
Demosaic/sim/transform/raw_cut.py
Normal file
@@ -0,0 +1,19 @@
|
||||
import imageio
|
||||
import numpy as np
|
||||
|
||||
cut_width = 512
|
||||
cut_height = 256
|
||||
|
||||
if __name__ == '__main__':
|
||||
txt = open('./test.dat', 'w')
|
||||
image = imageio.imread_v2('./im.tif')
|
||||
print(image.shape)
|
||||
cut = image[0:cut_height, 0:cut_width]
|
||||
print(cut.shape)
|
||||
cut = np.array(cut, dtype=np.int16)
|
||||
|
||||
for data in list(cut.flatten()):
|
||||
txt.write('%02x\n%02x\n' % (data & 0x00ff, (data & 0xff00) >> 4))
|
||||
txt.close()
|
||||
|
||||
imageio.imsave('./test.tif', cut)
|
||||
10
Demosaic/sim/transform/raw_to_image.py
Normal file
10
Demosaic/sim/transform/raw_to_image.py
Normal file
@@ -0,0 +1,10 @@
|
||||
import imageio
|
||||
import numpy as np
|
||||
|
||||
im_width = 1936
|
||||
im_height = 1088
|
||||
|
||||
if __name__ == '__main__':
|
||||
raw = np.fromfile('./test.raw', dtype=np.int8)
|
||||
image = raw.reshape((im_height, im_width))
|
||||
imageio.imsave("./test.tif", image)
|
||||
262144
Demosaic/sim/transform/test.dat
Normal file
262144
Demosaic/sim/transform/test.dat
Normal file
File diff suppressed because it is too large
Load Diff
BIN
Demosaic/sim/transform/test.tif
Normal file
BIN
Demosaic/sim/transform/test.tif
Normal file
Binary file not shown.
Reference in New Issue
Block a user