main- initial committask1- sequential grayscale bitmap convolutiontask2- parallel convolution, kernel composition, benchmarks, CSV tables, SVG plots
- JDK
23 - Gradle wrapper
8.10 - Kotlin
2.1.10 - OpenCV for JVM:
org.openpnp:opencv:4.9.0-0 - For plots in
task2: Python 3,numpy,matplotlib
identity3box3gaussian3sharpen3
Input images are read as grayscale through OpenCV. .bmp is the intended format for the task.
Switch to the branch:
git checkout task1Run tests:
./gradlew testRun sequential convolution:
./gradlew run --args="image.bmp output/result.bmp gaussian3"
./gradlew run --args="image.bmp output/sharpen.bmp sharpen3"Switch to the branch:
git checkout task2Run tests:
./gradlew testRun sequential mode:
./gradlew run --args="image.bmp output/sequential.bmp gaussian3 --mode=sequential"Run parallel mode:
./gradlew run --args="image.bmp output/rows.bmp gaussian3 --strategy=rows --threads=8"
./gradlew run --args="image.bmp output/columns.bmp gaussian3 --strategy=columns --threads=8"
./gradlew run --args="image.bmp output/pixels.bmp gaussian3 --strategy=pixels --threads=8"
./gradlew run --args="image.bmp output/grid.bmp gaussian3 --strategy=grid --grid=4x4 --threads=8"
./gradlew run --args="image.bmp output/tile.bmp gaussian3 --strategy=grid --tile=64x64 --threads=8"Run a filter pipeline:
./gradlew run --args="image.bmp output/pipeline.bmp gaussian3,sharpen3"Run mathematical kernel composition:
./gradlew run --args="image.bmp output/composed-kernel.bmp gaussian3,sharpen3 --compose-kernels=true"Install Python dependencies once:
python3 -m pip install numpy matplotlibRun the full benchmark:
./scripts/run_experiment.sh image.bmpOr run benchmark and plotting separately:
./gradlew benchmarkConvolution --args="image.bmp benchmark-results/results.csv"
python3 scripts/plot_benchmarks.py benchmark-results/results.csv plots/Benchmark results are written as a CSV table. The main time and throughput columns are:
avg_msmin_msmax_msstddev_msci95_low_msci95_high_msthroughput_mp_sthroughput_ci95_low_mp_sthroughput_ci95_high_mp_s
The plotting script generates SVG graphs for each kernel pipeline:
<kernel-set>-avg-ms.svg<kernel-set>-throughput.svg