Matt McWilliams 3d286cfd4d | ||
---|---|---|
.. | ||
notes | ||
registrationMark | ||
.gitignore | ||
README.md | ||
apply_image.py | ||
apply_svg.py | ||
calibrate.py | ||
common.py | ||
guide.py | ||
normalize.py | ||
requirements.txt | ||
template.py | ||
template_ratio.sh | ||
white_fourcell.sh |
README.md
Four Cell Scripts
Analysis Steps
- Locate positions of 6 hole punches - normalize.py
- Orient to square position - normalize.py
- Find all 4 fiducials
- Calculate their position relative to the hole punches
- Create a template
- Use the template-filling script to recreate calibration page as a proof to be checked on a lightbox
Page Hole Punch Order
human zero-index
_______________ _______________
| | | |
| 1 3 | | 0 2 |
| | | |
| | | |
| | | |
| 2 4 | | 1 3 |
| | | |
| | | |
| | | |
| 5 6 | | 4 5 |
| | | |
--------------- ---------------
Calibration Layout Order
_______________ _______________
| | | |
| 1 2 3 0 | | |
| | | 1 2 |
| | | |
| 0 3 2 1 | | |
| | | |
| 1 2 3 0 | | |
| | | |
| | | 0 3 |
| 0 3 2 1 | | |
| | | |
--------------- ---------------
normalize.py
Normalize a scanned hole punch image.
usage: normalize.py [-h] input output
positional arguments:
input Scan to normalize
output Normalized file to output
calibrate.py
Create a calibration file, apply to a scanned page, or scale image to desired DPI.
usage: calibrate.py [-h] [--dpi DPI] [--input INPUT] [--output OUTPUT] [--calibration CALIBRATION] {generate,calibrate,scale}
positional arguments:
{generate,calibrate,scale}
The action to perform
options:
-h, --help show this help message and exit
--dpi DPI, -d DPI DPI to generate
--input INPUT, -i INPUT
Input file
--output OUTPUT, -o OUTPUT
Output file
--calibration CALIBRATION, -c CALIBRATION
Calibration file
template.py
Create a template from normalized scan file.
usage: template.py [-h] normalized [registration]
positional arguments:
normalized Normalized scan to build template from.
registration Registration mark to use.
apply_image.py
Create a printable rasterized image that can be hole punched and animated.
usage: apply_image.py [-h] name destination template ...
positional arguments:
name Name of project
destination File to output image to
template Template file to use
images Images to place as cells