I’m doing a forward image warping with control points but as expected from any forward warping, target coordinates are non integers so it creates holes on the target image. Since the transform in warping is different for every pixel in the source image, i couldn’t find how can I calculate inverse transform for every pixel in the destination image to do this as a backward warping and use bilinear interpolation.
So in short my questions are:
1 – Is this possible to calculate inverse transform for each destination pixel to do this as a backward warping?
2 – If I am forced to do it as a forward warping how I can take care of the holes in target image. Simply using nearest integers creates holes, distributing the same color to neighboring pixels take care of the problem but with heavy aliasing so i believe there is a better way to do this.
Any help is appreciated. Thanks.
You need to do bilinear filtering two times. First one to distribute the transform to pixels around the target pixel when the the target coordinate during forward warping is non integer. Then using these distributed transforms as inverse you’ll do a backward warping and use bilinear interpolation again when sampling the pixels from the source