Implementation of an image rectification algorithm