# Polynomial

I am looking for a polynomial warping filter that takes coefficients a, b, as inputs, and can warp the image.

X=a0 +a1x+ a2y + a3xy + a4x^2 +a5y^2

Y=b0 + b1x + b2y + b3xy+ b4x^2 + b5y2

For example, this can be used for X ray pin cushion un distortion where camera parameters are unknown.

as an example, this can be done in MATLAB with

tform= fitgeotrans(points, distortedpoints,'polynomial', 2); % create 2 nd degree polynomial fit transformation ImgOut = imwarp(Img, tform);

I have looked at the opencv docs, but don't see the equivalent- recall that there is nothing known about the "camera" in this case.

Is there something in opencv to do this? I need to bring the code over to c++ and I dint want to re invent any wheels.

Thanks

Rick