New algorithms for better corners refinment and paper rotation tracking