final code

all the files of final task, except images from database. They are
precomputed in Z_im.mat