I have an image that has lens distortion on it (barrel or pincushion). This image is used as the background image. I want to get another image, scale it down, layer it on top of the first image, and then have it slide across the screen automatically. Assume this second image has no lens distortion.
In order to make it look very accurate, I need to stretch the image out as it moves from edge to edge. For example, if the background image had barrel distortion, then any two arbitrary reference points on the foreground image should be wider apart in the middle of the image, but closer together on the edges.
I know how to stretch images, but how do I do this on a continuous basis? Where every part of the foreground image is stretched depending on where it is in the background. I use After Effects.
Btw I cannot use lens distortion remover software. It has to be manually done in editing for other specific reasons.