-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathperform_analysis.sh
More file actions
67 lines (59 loc) · 1.64 KB
/
Copy pathperform_analysis.sh
File metadata and controls
67 lines (59 loc) · 1.64 KB
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
57
58
59
60
61
62
63
64
65
66
67
#!/bin/bash
mkdir -p temp/wip_images
# Run the analysis
python analysis.py
# Create the comparison figure
ORIGINALS=($(find temp/ -type f -name *_original*))
NUM_IMAGES=6
STEP=$((${#ORIGINALS[@]} / ($NUM_IMAGES - 1)))
ORIGINAL_NUMBERS=($(seq 0 $STEP ${#ORIGINALS[@]}))
ALPHABET=({b..z})
mkdir -p temp/comparison_images
for I in $(seq 0 $(($NUM_IMAGES - 1)));
do
convert ${ORIGINALS[${ORIGINAL_NUMBERS[$I]}]} \
-fill black \
-font Helvetica-bold \
-pointsize 20 \
-gravity east -extent 200x150 \
label:"(${ALPHABET[$I]})" \
-gravity northwest \
-geometry +10+12 \
-composite \
temp/comparison_images/${ALPHABET[$I]}
convert ${ORIGINALS[${ORIGINAL_NUMBERS[$I]}]/original/gpy} \
-fill black \
-font Helvetica-bold \
-pointsize 20 \
-gravity east -extent 200x150 \
label:"(${ALPHABET[$(($I + $NUM_IMAGES))]})" \
-gravity northwest \
-geometry +10+12 \
-composite \
temp/comparison_images/${ALPHABET[$(($I + $NUM_IMAGES))]}
done
montage $(find temp/comparison_images -type f | sort) \
-tile x2 \
-geometry +5+5 \
temp/multi.png
convert reference.jpg \
-resize x150 \
-fill black \
-font Helvetica-bold \
-pointsize 20 \
-gravity east -extent 200x150 \
label:"(a)" \
-gravity northwest \
-geometry +10+12 \
-composite \
temp/reference.png
mkdir figures
montage temp/reference.png temp/multi.png \
-gravity center \
-geometry +10+12 \
-tile x1 \
figures/comparison.png
# Run the R script to plot results
Rscript plot.R
# Clean everything up
# rm -rf temp/