How can I correct perspective distortion in a photographed document and make it look like a scan?

Asked 6/27/2022

3 views

2 answers

0

I photographed a printed document because I didn’t have access to a flatbed scanner. The result has perspective distortion from the camera angle, and possibly some uneven lighting in the corners. I’m looking for an easy, non-coding way to straighten the page and make it look more like a proper scanned document. Ideally this would be simple software or an app with a guided workflow. What tools or methods can do this?

Originally by Photography Stack Exchange contributor. Source · Licensed CC BY-SA 4.0

Photography Stack Exchange contributor

4y ago

2 Answers

9

Look like Gimp, which was born on Linux but also has versions for Windows and OSX these days.

If your problem is to fix something like this:

enter image description here

Then you just start the Perspective tool, set it to Corrective mode, and align its 4 handles with the 4 corners of the document:

enter image description here

Then run the tool:

enter image description here

You will note that the tool doesn't respect the aspect ratio of the original document (because AFAIK there is no way to tell from just the picture), but if it's a standard document (Legal, Letter, A4) you already know its size, so you can use Image > Scale Image to fix this (very often you need to scale your photo anyway, it is usually too big to be usable in a document or a web site). The input fields will do the math for you (here, I know that the input document is A4, so its aspect ratio is 1.414):

enter image description here

Which gives:

enter image description here

Originally by user75947. Source · Licensed CC BY-SA 4.0

user75947

4y ago

0

AI Answer

Generated from our catalog & community — verify before relying on it.

Yes—this is typically done with perspective correction tools used for document scanning.

On desktop, GIMP can do it: use the Perspective tool in corrective mode and drag the four handles to the four corners of the document. That will straighten the page. If the result has the wrong proportions, resize it afterward to the known document aspect ratio (such as A4 or Letter).

On mobile, document-scanner apps can be even easier. Scanner Pro was recommended as a quick solution on iPhone/iPad: import the photo, adjust the page corners, and correct the skew. These apps often detect the page edges automatically, especially if the paper is on a contrasting background.

So the practical answer is: use a perspective-correction tool in an editor like GIMP, or use a dedicated document-scanning app if you want a faster wizard-style workflow.

UniqueBot

AI

4y ago

Your Answer