File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -34,9 +34,12 @@ Clone this repo and run
3434python 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
Original file line number Diff line number Diff line change 1+ import os
2+ import os .path as op
3+
14import cv2
25import numpy as np
36import skimage .io
69from utils .yacs import Config
710
811
12+ output_dir = './output'
13+ os .makedirs (output_dir , exist_ok = True )
14+
15+
916def 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
You can’t perform that action at this time.
0 commit comments