Skip to main content

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.

Laboratory Scan

DSLR Capture

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:

Trimmed Laboratory Scan

Aligned Image

Note, that the aligned image is flipped but not converted to positive.

Metadata

Release files for imalign 0.0.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for imalign 0.0.5
File Size Uploaded
imalign-0.0.5.tar.gz 16.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for imalign 0.0.5
File Interpreter ABI Platform
imalign-0.0.5-py3-none-any.whl Python 3 none any Details

Total release size: 33.8 kB

Release files / imalign-0.0.5.tar.gz

Download URL imalign-0.0.5.tar.gz
Size 16.6 kB
Tags Source
SHA-256 checksum
How to use checksums
9104b9f96fbb1e29ebc67f50c5b9d4b478bf583253792e6cb5bfc723f5cd885b
BLAKE2b-256 checksum
How to use checksums
59675020b9a4c84cabd47739b1ea06577c1dd49314c8a6723069e5d7e866ab8d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.7

Release files / imalign-0.0.5-py3-none-any.whl

Download URL imalign-0.0.5-py3-none-any.whl
Size 17.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
691d0925d3d73092891bec3039af90e2570876ccd4d80a02b9fc3f82a367ef0b
BLAKE2b-256 checksum
How to use checksums
37ffd7d5b15f03410a02e32ebde067c9341aae34827638e989733c06c9d90457
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.7

Release history Release notifications | RSS feed

This release

0.0.5 This release

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page