Answer the question
In order to leave comments, you need to log in
How to insert text on an image so that it lies on a plane given by coordinates?
Good evening.
I think the question from the title is not very clear, so I tried to depict it in the picture.
I apologize for its quality.
Here, the points P1, P2, P3, P4 set the plane under which the text must be deformed so that it lies on it.
Not necessarily in this way, the main thing is that it looks like what is in the picture.
I have a rather weak knowledge of geometry, please do not scold me for this.
Answer the question
In order to leave comments, you need to log in
Use cv2.getPerspectiveTransform to find the transformation matrix from 4 pairs of points (corners). And then cv2.warpPerspective for actually transforming the image.
You can also use Imagemagick instead of OpenCV.
You need affine transformations .
Here you can google them on the stack-overflow
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question