cpp image processing from ground up