Take a look at OpenCV's remap function. You are looking to do a geometric transform. You'll have to design the X,Y maps such that the pixels map in the way you have shown in your example.
Image Transformation Filter
-
12-07-2023 - |
Question
I would like to transform an image like below
input Image: http://1drv.ms/1hMYbjF
output Image: http://1drv.ms/1mVXSEr
Any help or hint regarding this filter would be highly appreciated.
PS: Sorry i do not know the exact name of this filter/transformation
Solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow