This repository has been archived on 2024-12-30. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
2024CG-project-render/test/show_all.sh
2024-10-25 17:50:32 +02:00

22 lines
443 B
Bash

#!/usr/bin/env bash
set -e
# Directory paths
DATA_DIR='../data'
OUT_DIR='../out'
IMG_TYPES=('depth' 'rgb')
mkdir -p "${OUT_DIR}"
for json_file in "${DATA_DIR}"/*.json; do
base_name=$(basename "${json_file}" '.json')
echo "Generating ${base_name}..."
../cmake-build-release/raytracing "${json_file}" > /dev/null
for img_type in "${IMG_TYPES[@]}"; do
mv "${img_type}.png" "${OUT_DIR}/${base_name}-${img_type}.png"
done
done