Transform rectangular image into trapezoid

孤街浪徒 提交于 2019-12-11 07:39:28

问题


In .NET how can I transform an image into a trapezoid. The Matrix class supports rotation, shear, etc, but I can't see a trapezoidal transformation.

I'm using the usual System.Drawing.* API, but I'm flexible to other .NET solutions.


回答1:


I just found this: http://www.vcskicks.com/image-distortion.html

It works great




回答2:


You need a projective transformation which can be represented by a 3x3 matrix. I've explained how to obtain this transformation matrix in great detail in this SO solution.



来源:https://stackoverflow.com/questions/1730114/transform-rectangular-image-into-trapezoid

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!