Apply quadratic function to an image
Hello.
I have a quadratic function I would like to apply to my image. The transformation has the following form:
- x' = A + Bx + Cy + Dxx + Exy + Fyy
- y' = G + Hx + Iy + Jxx + Kxy + Lyy
For a linear transformation:
- x' = A + Bx + Cy
- y' = D + Ex + Fy
it was easy because I could use WarpAffine by putting the coefficients in a 3x2 matrix. Moreother, is it easy to get the value of rotation angle and scale ?
Again, with the linear transformation, rotation angle is easily computed with atan2(B, C). Scale is (sqrt(BB + CC) and shifts are A and D.
@LBerger provided a sample code in this post ( don't forget to upvote the question and the answer if you find it useful)
It's not the same...the question is about a quadratic deformation of the image, the answer you linked creates a quadratic brightness function...