1. A method of processing an image, the method comprising: receiving, by a processor, a distorted image captured with a lens that generates distortion in the image; generating, with the processor, a corrected image by applying a distortion correction algorithm to correct for distortion in the distorted image; storing, in a computer-readable medium operatively coupled to the processor, a segmented rendered distortion image (SRDI) representing how the distortion in the distorted image is generated, wherein the SRDI is generated by recursively subdividing the SRDI into segments until a distortion function for each of the segments has an approximate inverse function that can be readily calculated; and thereafter, generating, with the processor, a re-distorted image using the SRDI to re-distort the corrected image.