Android Question Document scanning

Erel

B4X founder
Staff member
Licensed User
Longtime User
Upvote 0

JDS

Active Member
Licensed User
Longtime User
I don't need necessary the text of the document. I just need a scan from the document. If it is slanted then it should adjust and send it like a PDF.
The last step (sending) is the easiest.
 
Upvote 0

JordiCP

Expert
Licensed User
Longtime User
If you want to transform the document so it will be straight then you should learn about OpenCV: https://www.b4x.com/android/forum/threads/opencv320-for-b4a-v1-0-released.79816/#content

If the picture is not only XY-rotated but also taken from an angle that is not perpendicular to the document planar surface, there will also be some perspective deformation.
As Erel said, Opencv can be used to detect the contours, then the edges, and 'undo' this XY-rotation and perspective using homography.

Some programming is involved, and reliability will depend on image quality (homogeneus background, avoiding other objects in the picture,...among others)
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…