Added utility functions to io.cpp for reading images into opencv matrices.
Changed makefile to fix compilation issues.