Perspective correction of UIImage from Points

前端 未结 4 2017
孤独总比滥情好
孤独总比滥情好 2020-12-23 10:30

I\'m working on a app where I\'ll let the user take a picture e.g of a business card or photograph.

The user will then mark the four corners of the object (which the

4条回答
  •  梦毁少年i
    2020-12-23 11:36

    I don't know exact solution of your case, but there is approach for trapezoid: http://www.comp.nus.edu.sg/~tants/tsm/TSM_recipe.html - the idea is to continuously build transformation matrix. Theoretically you can add transformation that converts your shape into trapecy.

    And there are many questions like this: https://math.stackexchange.com/questions/13404/mapping-irregular-quadrilateral-to-a-rectangle , but I didn't check solutions.

提交回复
热议问题