Python, Camera calibration and undistortion, Color and Gradient threshold, Warping and unwarping functions