Estimating skew, orientation, translation. Added a moving average filter