1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
|
#!/bin/bash
## CONFIGURATION
# URL to download toolboxen from
TOOLBOX_URL=https://github.com/timseries/dtcwt_matlab/archive/master.zip
# Path to dtcwt toolbox
DTCWT_TOOLBOX=$HOME/Downloads/dtcwt_toolbox4_3
# Path to dtcwt keypoints toolbox
DTCWT_KEYPOINTS=$HOME/Downloads/DTCWTkeypoints
# Path to dtcwt 3D toolbox
DTCWT_3D=$HOME/Downloads/DTCWT_3D
# Path to MATLAB
MATLAB=/opt/MATLAB/R2013b/bin/matlab
## END OF CONFIGURATION
# Change to this directory
cd "`dirname "${BASH_SOURCE[0]}"`"
# Download toolboxes if necessary
if [ ! -f toolboxes.zip ]; then
echo "Downloading toolboxes..."
wget -O toolboxes.zip $TOOLBOX_URL
fi
# Unzip toolboxes if necessary
if [ ! -d toolboxes ]; then
echo "Excracting toolboxes..."
mkdir toolboxes
cd toolboxes
unzip ../toolboxes.zip
cd ..
fi
if [ -f verification.mat ]; then
rm verification.mat
fi
echo "Generating verification data in MATLAB..."
"$MATLAB" -nosplash -nodesktop -r "gen_verif; quit"
if [ ! -f verification.mat ]; then
echo "error: no output from MATLAB"
exit 1
fi
echo "Converting to NumPy format..."
python verif_m_to_npz.py
echo "Done"
|