# Emulates the manual steps used to create the image strips
# before the process was automated

verbose 1
echo ----------------------------------------------------------------
echo Define a 360 x 600 image (width x height):
# Followed by a list of feature dimension names, and a list of class names
image bosImg = define 360 600 [ d1 d2 d3 d4 d5 d6 d7 d8 d9 d10 d11 d12 d13 d14 d15 d16 d17 d18 d19 d20 d21 d22 d23 d24 d25 d26 d27 d28 d29 d30 d31 d32 d33 d34 d35 d36 d37 d38 d39 d40 d41 ] [ unlab. miss beach ocean ice river road park resid indst ] 

timestamp
echo ----------------------------------------------------------------
echo Load the values and the labels separately
bosImg loadValues ..\Raw\bos_data.asc
timestamp
bosImg loadLabels ..\Raw\bos_gt.asc
timestamp
echo ----------------------------------------------------------------
echo First, normalize:
bosImg normalize
timestamp
echo ----------------------------------------------------------------
echo then, to obtain vertical strips with 
echo column-major ordering, start by  
echo flipping the image about its diagonal:
bosImg flip
timestamp
echo ----------------------------------------------------------------
echo and split it into four horizontal strips:
bosImg split H 4 Strip
timestamp
echo ----------------------------------------------------------------
echo Load full image strips and binarize
data b0 = load Strip0.txt
data b1 = load Strip1.txt
data b2 = load Strip2.txt
data b3 = load Strip3.txt
timestamp
b0 save Strip0.bin binary
b1 save Strip1.bin binary
b2 save Strip2.bin binary
b3 save Strip3.bin binary
timestamp
echo ----------------------------------------------------------------
echo Reduce to just pixels with ground truth
b0 deleteClass 0
b1 deleteClass 0
b2 deleteClass 0
b3 deleteClass 0
timestamp
echo ----------------------------------------------------------------
echo Sort ground truth samples by label index
b0 sortByLabel
b1 sortByLabel
b2 sortByLabel
b3 sortByLabel
timestamp
echo ----------------------------------------------------------------
echo Save as text files:
b0 save gt_s0.txt
b1 save gt_s1.txt
b2 save gt_s2.txt
b3 save gt_s3.txt
timestamp
echo ----------------------------------------------------------------
echo Save as binaries:
b0 save gt_s0.bin binary
b1 save gt_s1.bin binary
b2 save gt_s2.bin binary
b3 save gt_s3.bin binary
timestamp
