Skip to content

Instantly share code, notes, and snippets.

@tjdahlke
Last active March 2, 2020 17:29
Show Gist options
  • Save tjdahlke/a04d4aaf2ee9efb948b46db1d0f89888 to your computer and use it in GitHub Desktop.
Save tjdahlke/a04d4aaf2ee9efb948b46db1d0f89888 to your computer and use it in GitHub Desktop.
runMe to launch a command line executable (COLMAP) with docker and cmd line parameters, with logging saved and output using filenames that correspond to the parameters used.
cwd=$(pwd)
start=$SECONDS
suffix=".ply"
foo=$1
filePrefix=${foo%"$suffix"}
output="meshed-$filePrefix-depth$2-trim$3.ply"
outputLog="meshed-$filePrefix-depth$2-trim$3.log"
cmd="docker run -w /working -v $cwd:/working colmap/colmap:latest colmap poisson_mesher --PoissonMeshing.depth $2 --PoissonMeshing.trim $3 --input_path $1 --output_path $output"
echo $cmd
echo ' '
echo "RUNNING Poisson Meshing ...."
$cmd > $outputLog
duration=$(( SECONDS - start ))
echo 'duration =' $duration seconds >> $outputLog
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment