View Single Post
Old 06-30-2021, 10:30 AM   #1
Rip8
Junior Member
Rip8 began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Jun 2021
Device: android
Page Size Equalizer-To single-page capture camera scan

A python script to:

Resize images to equalize the size of pages that were captured with a fixed camera, in different batches: Even and Odd.

Download:
pages_size_equalizer_online.zip

Github page



When scanning a book through photographs "one page at a time" with a fixed camera, it is known that the size of the first page in the image file will be different from the size of the last page.
This is due to the distance between the page and the fixed camera, which is different as the pages are turned.
The thicker the book, the greater the difference in size between the first and last page.

Generating the distortion below for a book with 350 pages.

Before :
Click image for larger version

Name:	before.gif
Views:	408
Size:	242.9 KB
ID:	187942

The proposed script seeks to correct these distortions for all pages of the book, from the input of the 4 different pages resolution:
- odd and even at the beginning of the book
- odd and even at the end of the book

Generating the following result:

After:
Click image for larger version

Name:	after.gif
Views:	405
Size:	254.1 KB
ID:	187943

---
Notes:
01 - The script is in its first version, there is ample room to improve it with a focus on making it more user-friendly, and how to achieve better image results.

02 - I dedicate the construction of this script to Tex2002ans, who gave me real classes on ebook production, expanding my frontier of what I thought was possible in terms of efficiency and quality.
This is just a small contribution (of many, I hope) to this community of ebook producers.
Rip8 is offline   Reply With Quote