We want to straighten a document placed diagonally. The technology to transform the image is amazing

MLBoy
1 min readFeb 27, 2022

--

It is a method of performing image transformation like a document scanner.

We want to cut out the documents straight we put.

If you place documents on your desk and shoot at an angle, it will move to a trapezoid.
To make this a straight rectangle, you need to deform the image.

DDPerspectiveTransform can be used

With the library, we can use a UI that allows you to easily format images manually.

How to use

Put the DDPerspectiveTransform in your project and display the UI.

It doesn’t have a crop button, so add a button and add a cropAction of the DDPerspectiveTransformViewController.
The formatted image can be received by the delegate.

The angle of the characters is also neatly shaped.

🐣

I’m a freelance engineer.
Work consultation
Please feel free to contact us with a brief development description.
rockyshikoku@gmail.com

I am making an app that uses Core ML and ARKit.
We send machine learning / AR related information.

GitHub

Twitter
Medium

--

--

MLBoy
MLBoy

No responses yet