Skip to content

vintage-camera-pictures/imalign

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

Releases

No releases published

Packages

No packages published

Languages