imalign


Nameimalign JSON
Version 0.0.5 PyPI version JSON
download
home_page
SummaryAlign a source image file with a reference image
upload_time2022-12-06 10:40:12
maintainer
docs_urlNone
author
requires_python>=3.7
license
keywords image align
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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:

```bash
pip install imalign
```

## Usage

Once installed, the `imalign` script should be available in your terminal. Run

```bash
imalign --help
```

to see the list of command line arguments.

## Examples

[Sample images](https://github.com/vintage-camera-pictures/imalign/tree/main/imalign/tests/samples) are included in the source repository. They include a processed [laboratory scan](https://github.com/vintage-camera-pictures/imalign/blob/main/imalign/tests/samples/lab.jpg) of a film negative and a [DSLR capture](https://github.com/vintage-camera-pictures/imalign/blob/main/imalign/tests/samples/dslr.jpg) of the same frame on the light table.

![Laboratory Scan](https://github.com/vintage-camera-pictures/imalign/blob/main/imalign/tests/samples/lab.jpg?raw=true "Processed Lab Scan")

![DSLR Capture](https://github.com/vintage-camera-pictures/imalign/blob/main/imalign/tests/samples/dslr.jpg?raw=true "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:

```bash
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](https://github.com/vintage-camera-pictures/imalign/blob/main/imalign/tests/samples/trimmed.jpg?raw=true "Trimmed Lab Scan")

![Aligned Image](https://github.com/vintage-camera-pictures/imalign/blob/main/imalign/tests/samples/aligned.jpg?raw=true "Aligned Image")

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

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "imalign",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "",
    "keywords": "image align",
    "author": "",
    "author_email": "Roman <roman@vintage-camera.pictures>",
    "download_url": "https://files.pythonhosted.org/packages/59/67/5020b9a4c84cabd47739b1ea06577c1dd49314c8a6723069e5d7e866ab8d/imalign-0.0.5.tar.gz",
    "platform": null,
    "description": "# IMage ALIGN\r\n\r\nAlign source image with a reference image using OpenCV SIFT algorithm.\r\n\r\n## Motivation\r\n\r\nThe 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.\r\n\r\n## Installation\r\n\r\nThe `imalign` package is available from PyPI and can be installed by pip:\r\n\r\n```bash\r\npip install imalign\r\n```\r\n\r\n## Usage\r\n\r\nOnce installed, the `imalign` script should be available in your terminal. Run\r\n\r\n```bash\r\nimalign --help\r\n```\r\n\r\nto see the list of command line arguments.\r\n\r\n## Examples\r\n\r\n[Sample images](https://github.com/vintage-camera-pictures/imalign/tree/main/imalign/tests/samples) are included in the source repository. They include a processed [laboratory scan](https://github.com/vintage-camera-pictures/imalign/blob/main/imalign/tests/samples/lab.jpg) of a film negative and a [DSLR capture](https://github.com/vintage-camera-pictures/imalign/blob/main/imalign/tests/samples/dslr.jpg) of the same frame on the light table.\r\n\r\n![Laboratory Scan](https://github.com/vintage-camera-pictures/imalign/blob/main/imalign/tests/samples/lab.jpg?raw=true \"Processed Lab Scan\")\r\n\r\n![DSLR Capture](https://github.com/vintage-camera-pictures/imalign/blob/main/imalign/tests/samples/dslr.jpg?raw=true \"DSLR Capture\")\r\n\r\nThe DSLR image is a horizontally flipped negative that includes frame borders, parts of the film holder and fragments of adjacent frames.\r\n\r\nRunning the command:\r\n\r\n```bash\r\nimalign --reference=tests/samples/lab.jpg\r\n--source=tests/samples/dslr.jpg\r\n--output=tests/samples/aligned.jpg\r\n--trimmed=tests/samples/trimmed.jpg\r\n--border=0.05\r\n--invert-source\r\n--flip\r\n```\r\n\r\nProduces these two images:\r\n\r\n![Trimmed Laboratory Scan](https://github.com/vintage-camera-pictures/imalign/blob/main/imalign/tests/samples/trimmed.jpg?raw=true \"Trimmed Lab Scan\")\r\n\r\n![Aligned Image](https://github.com/vintage-camera-pictures/imalign/blob/main/imalign/tests/samples/aligned.jpg?raw=true \"Aligned Image\")\r\n\r\nNote, that the aligned image is flipped but not converted to positive.\r\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "Align a source image file with a reference image",
    "version": "0.0.5",
    "split_keywords": [
        "image",
        "align"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "md5": "dd4143889c61da8e643f29db30109cbd",
                "sha256": "691d0925d3d73092891bec3039af90e2570876ccd4d80a02b9fc3f82a367ef0b"
            },
            "downloads": -1,
            "filename": "imalign-0.0.5-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "dd4143889c61da8e643f29db30109cbd",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 17183,
            "upload_time": "2022-12-06T10:40:10",
            "upload_time_iso_8601": "2022-12-06T10:40:10.271639Z",
            "url": "https://files.pythonhosted.org/packages/37/ff/d7d5b15f03410a02e32ebde067c9341aae34827638e989733c06c9d90457/imalign-0.0.5-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "md5": "79b9cb5da55b849f4726289a2e00f951",
                "sha256": "9104b9f96fbb1e29ebc67f50c5b9d4b478bf583253792e6cb5bfc723f5cd885b"
            },
            "downloads": -1,
            "filename": "imalign-0.0.5.tar.gz",
            "has_sig": false,
            "md5_digest": "79b9cb5da55b849f4726289a2e00f951",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 16643,
            "upload_time": "2022-12-06T10:40:12",
            "upload_time_iso_8601": "2022-12-06T10:40:12.010303Z",
            "url": "https://files.pythonhosted.org/packages/59/67/5020b9a4c84cabd47739b1ea06577c1dd49314c8a6723069e5d7e866ab8d/imalign-0.0.5.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2022-12-06 10:40:12",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "lcname": "imalign"
}
        
Elapsed time: 0.01814s