UW-Madison 24Fall
-
Install Docker on your local machine (MacOS/Windows/Linux).
-
Git clone the repo in local dicretory:
git clone git@github.com:starFalll/ECE759.git -
Build Dockerfile:
docker build -t ece759 .
We can always use the same docker image without building the docker again.
-
Run Docker container's interactive shell in the ECE759 dicretory:
docker container run -it -v "$(pwd)/source:/workspace/source" -v "$(pwd)/photos:/workspace/photos" -v "$(pwd)/results:/workspace/results" ece759-vwill mount your local machine's directory to the container's /workspace/* directory. -
Add new CPP
.hand.cppfiles belowsourcedirectory, implementing your logic here. In your code, save the photo results to the directory that belowphotos(Pleasemkdiryour own directory belowphotos). -
Compile source code in Docker container, for example, compile
stitch_image:In
build.sh, we can choose to generate debug or release version:Debug=0 # 0:release, 1:debugThe default is release version, then we run commond:
root@xxx:/workspace/source# sh build.sh Compilation with O2 optimization. Compilation successful. Run ./stitch_image to execute the program. root@xxx:/workspace/source# ./stitch_image
-
Review the results in
photos/data/stitched_mountain.png, and debug the issues: -
Exit the Docker:
root@xxx:/workspace# exit -
Git add, commit and push to your own branch, ask @Ethan to review and merge.
-
Run Docker container's interactive shell in the ECE759 dicretory:
docker container run -it -v "$(pwd)/source:/workspace/source" -v "$(pwd)/photos:/workspace/photos" -v "$(pwd)/results:/workspace/results" ece759-vwill mount your local machine's directory to the container's /workspace/* directory. -
Run benchmark test script:
# Usage: benchmark.sh <schedule_type>(static|dynamic|guided) <max_thread_num> root@xxx:/workspace/source# bash benchmark.sh guided 8 -
We can see the results from the
resultsdirectory. -
Draw pictures on your own machine rather than docker container:
python plot.py -
All the pictures are stored in the
resultsdirectory.
- Supplymentary Jidong's comments: In the blendImagePair.cpp and backwardWarpImg.cpp files, there are tips for how to compile these two files, and you can also check the input and output data format with the attached commented example main function.