+ functions script (not done)

+ partially finished R script, in which I attempted to divide the
pipeline into functions
// maybe I need to learn so image processing packages (TUT)