#!/bin/sh


IMAGE=../../data/barbara.pan

clear


# ----------------------------------------------------------------------
#     Dictionary specifications: two transforms for this example.

echo
echo "   FCT transform (natural smooth part)"
#echo "   For UDWT, specify a QMF"
#echo "   ../../bin/qmf symmlet 6 qmf.col"
#../../bin/qmf symmlet 6 qmf.col
echo "   Make first transform of the dictionary"
echo "   ../../bin/dictionary FCT 7 16 0 dict_barb.col dict_barb.col"
../../bin/dictionary FCT 7 16 0 dict_barb.col dict_barb.col

echo
echo "   LDCTIV transform (textured part)"
echo "   Make second transform of the dictionary"
echo "   ../../bin/dictionary LDCTIV 32 0.25 0 dict_barb.col dict_barb.col"
../../bin/dictionary LDCTIV 32 0.25 0 dict_barb.col dict_barb.col


for IMASK in ../../data/mask_512x512_random80.pan
do
 echo
 echo "----------------------------------------------------------------------"
 echo "  Simulate masking."
 IMASKED=../../data/`basename $IMAGE .pan`_`basename $IMASK .pan`.pan
 pmask $IMAGE $IMASK $IMASKED
 echo "  Inpainting: ECM with varying lambda (MCA)."
 IMINPAINTED=`basename $IMAGE .pan`_`basename $IMASK .pan`_inpainted.pan
 echo "  ../../bin/eminpaint 300 1E-6 0 1 1 2 dict_barb.col $IMASKED $IMASK $IMINPAINTED"
 ../../bin/eminpaint 300 1E-6 0 1 1 2 dict_barb.col $IMASKED $IMASK $IMINPAINTED
done


# ----------------------------------------------------------------------
#     Clean up temporary storage.

echo
echo "   Clean up."
rm dict_barb.col

echo

