a dependency list: working towards a simpler install process
[dja/scandal.git] / architecture.txt
1 = How are things laid out? =
2
3 1 scan page contains 2 physical pages.
4 each physical page may contain either 2 or 1 logical pages
5 (future: or 4 slides!)
6
7 = What do we do? =
8
9 0. init, process args, etc.
10 1. determine page count
11 2. determine depth
12 3. determine dpi
13 4. foreach double-page-spread (scan page)
14         4.1. extract scan page from pdf, save as png
15
16 5. run ocropus's binarise over all the pngs
17
18 6. foreach binarised scan page
19         6.1. create a mask from the original (unbinarised) page
20         6.2. use the mask to trim the binarised page (cutting this off improves unpaper's accuracy)
21         6.3. run unpaper over the clean binarised page, creating 2 pages (physical page)
22         6.4. foreach physical page
23                 6.4.1. remask and retrim
24                 6.4.2. attempt to detect if a physical page contains 2 logical pages, 
25                         6.4.2.1. if so split with unpaper
26                 6.4.3. do any final processing (resize for bebook)
27 7. move all the final pictures into a final picture directory
28
29 = What options do we need? =
30 Anything we attempt to detect automatically should have the option to set manually
31  - depth
32  - dpi
33  - probably which pages we want to process
34  - how many logical pages a physical page has
35         * an option to set a default and certain exceptions would be ace.
36  - options for final output
37  - options to ignore partial products
38  - more debug options

UCC git Repository :: git.ucc.asn.au