1. A method of image processing comprising: receiving a plurality of first input empirical images of a scene from an image capture device in real-time; at a processor, calculating a 2D or higher dimensional reconstruction of the scene from the first input images, reconstruction being based at least in part on a real-time frame alignment engine; forming training data from the reconstruction of the scene and the first input images; using the training data to learn at least one parameter of a function for transforming an image; receiving a second input image; and transforming the second input image using the function and the at least one parameter, wherein forming the training data comprises rendering images from the reconstruction of the scene according to specified poses of an image capture apparatus used to capture the empirical first images.