This repo contains the source code of Night Photography Rendering Challenge.
To work with code it is recommended to use Python 3.7+.
The required packages are listed in requirements.txt and can be installed by calling:
pip install -r requirements.txtModule raw_prc_pipeline contains the source code of various methods and functions that can be used for processing raw images, including:
- Parsing metadata (see
raw_prc_pipeline/exif_*.pyfiles) - Demosaicing, white_balancing (Gray World, White Patch, Shades of Gray, Improved White Patch), tone mapping and other methods (see
raw_prc_pipeline/pipeline_utils.py) - Implemtations of demo classes of raw image processing pipeline and image processing pipeline executor (see
raw_prc_pipeline/pipeline.py)
Directory data conatins example of challenge data:
- PNG file with raw image data (see
data/IMG_2304.png) and - Corresponding JSON file (see
data/IMG_2304.json) with necessary metadata including:black_level,white_level,cfa_pattern,color_matrix_*and etc. Metadata was extracted usingraw_prc_pipelinemodule.
Directory demo contains demonstration script for processing PNG raw images with JSON metadata using implemented classes and finctions from raw_prc_pipeline.
To process PNG images with corresponding metadata from data directory call the following command:
python -m demo.process_pngs -p data -ie gw -tm FlashTo see other arguments of the script call python -m demo.process_pngs -h from the root directory.
Also you can use more reproducible way via Docker:
sudo docker build -t nightimaging .
sudo docker run --rm -u $(id -u):$(id -g) -v $(pwd)/data:/data nightimaging ./run.shAlso the visualizations of different stages of implemented demo raw image processing pipeline can be found in the demo/process_img.ipynb file, which one can .