The version in this directory allows to prototype new ideas quickly, analyze intermediate results or better understand the code. It contains the four algorithms that are compared in the paper:
- PDRT 2
- PDRT 32
- PS DRT
- MDD DRT
Within your python environment, run:
pip install -r requirements.txtIf you do not pass any flag, the program will compute the images contained in ../examples. The results will be in ./out.
python main.pyAlternatively, you can pass the flag --path to specify a different directory containing a set of images.
python main.py --path <CUSTOM_PATH>By using the -a, --use-halide flag, you can use the Halide/C++ implementation which gives much faster execution times.
For this, you need to have generated the library within the C++/Halide project (../cpp). For this, first see ../cpp/README.md: Building the dynamic library.
Once generated, you can simply call the python program like this:
python main.py -aFor a quick demonstration, you can use the webcam as an input of the algorithm. Again, for this you'll need to have generated the dynamic library. Note that although the algorithm runs with an input of 1024x1024, the OpenCV VideoCapture is returning images of 640x480, that are then cropped and resized to 1024x1024.
python camera.py