bug fixes
correctly pass images through and write them back to disk
contrast function, convolution, matlab helper functions