I'm learning OpenCV and I'm looking for a code in python that get an input coordinate of a small image and map it to the coordinate of a large image so that a small image insert to the large image and it can be transform like rotating. I want to use translation matrix as an input to do that. For example if the matrix is:
([75, 120][210,320],
[30, 90][190,305],
[56, 102][250,474],
[110, 98][330,520])
it means that pixel at (75, 120) in small image should map to pixel at (210, 320) in large image and pixel at (30, 90) in small image should map to pixel at (190, 305) in large image ... I searched a lot but I didn't get the proper answer to my problem. How can I solve this problem?
Inset small image in large one:
Resize and then insert:
Insert part of image:
Rotating sample:
Perspective transform sample:
And finally for mapping cordinates; I think you just need to fill _out: