Skip to content

Commit 3ac6203

Browse files
committed
routine refactors
1 parent 85cf440 commit 3ac6203

2 files changed

Lines changed: 14 additions & 4 deletions

File tree

README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,12 @@ Clone this repo and run
3434
python demo.py
3535
```
3636

37-
The ISP outputs will be saved to `./raw` directory.
37+
The ISP outputs will be saved to `./output` directory.
38+
39+
The only required package for pipeline execution is `numpy`.
40+
41+
`opencv-python` and `scikit-image` are required for data IO.
3842

39-
The only required package for pipeline execution is `Numpy`. `opencv-python` and `scikit-image` are required for data IO.
4043

4144
# Algorithms
4245

demo.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
import os
2+
import os.path as op
3+
14
import cv2
25
import numpy as np
36
import skimage.io
@@ -6,6 +9,10 @@
69
from utils.yacs import Config
710

811

12+
output_dir = './output'
13+
os.makedirs(output_dir, exist_ok=True)
14+
15+
916
def demo_test_raw():
1017
print('Processing test raw started')
1118

@@ -18,7 +25,7 @@ def demo_test_raw():
1825

1926
data, _ = pipeline.execute(bayer)
2027

21-
output_path = raw_path.replace('.RAW', '.png')
28+
output_path = op.join(output_dir, 'test.png')
2229
output = cv2.cvtColor(data['output'], cv2.COLOR_RGB2BGR)
2330
cv2.imwrite(output_path, output)
2431

@@ -34,7 +41,7 @@ def demo_nikon_d3x():
3441

3542
data, _ = pipeline.execute(bayer)
3643

37-
output_path = pgm_path.replace('.pgm', '.png')
44+
output_path = op.join(output_dir, 'color_checker.png')
3845
output = cv2.cvtColor(data['output'], cv2.COLOR_RGB2BGR)
3946
cv2.imwrite(output_path, output)
4047

0 commit comments

Comments
 (0)