Align a source image file with a reference image
Project description
IMage ALIGN
Align source image with a reference image using OpenCV SIFT algorithm.
Motivation
The task of aligning an image obtained by digitising a negative or slide with a direct digital capture of the same scene is often encountered in hybrid film/digital photography workflow. The applications include calibration of negative inversion algorithms or characterising film materials. Generally, the reference and source images have different resolution, aspect ratios, angle of view and can have a slight tilt. A script was needed that can perform this aligning task automatically.
Installation
The imalign
package is available from PyPI and can be installed by pip:
pip install imalign
Usage
Once installed, the imalign
script should be available in your terminal. Run
imalign --help
to see the list of command line arguments.
Examples
Sample images are included in the source repository. They include a processed laboratory scan of a film negative and a DSLR capture of the same frame on the light table.
The DSLR image is a horizontally flipped negative that includes frame borders, parts of the film holder and fragments of adjacent frames.
Running the command:
imalign --reference=tests/samples/lab.jpg
--source=tests/samples/dslr.jpg
--output=tests/samples/aligned.jpg
--trimmed=tests/samples/trimmed.jpg
--border=0.05
--invert-source
--flip
Produces these two images:
Note, that the aligned image is flipped but not converted to positive.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file imalign-0.0.3.tar.gz
.
File metadata
- Download URL: imalign-0.0.3.tar.gz
- Upload date:
- Size: 16.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f868ef2a54f13ad7442f74e7cb504e0872f4875affe6094c842a5c70d8727912 |
|
MD5 | e74215e6c2f073c91336438ff93b5896 |
|
BLAKE2b-256 | 67a7ef3b929d2f90adcda675be9e600cf8657b9c18eede9e33fdb9aaf25e5baa |
File details
Details for the file imalign-0.0.3-py3-none-any.whl
.
File metadata
- Download URL: imalign-0.0.3-py3-none-any.whl
- Upload date:
- Size: 17.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5746b2166e8cbaf8cd099e8afa2a627f00b02b7f5848832ab2a01b2a5a28cdb1 |
|
MD5 | 6568945a1a7b8d5317ab66d8fd55b726 |
|
BLAKE2b-256 | a3664bf6ea868f3746bfa064977a1428052a83babc018d70f353b61ca4441aee |