Separated homography calculation and scene transformation to two functions calcHomographyAndTransformScene are now calculateHomography and transformScene