positif


Namepositif JSON
Version 0.0.3 PyPI version JSON
download
home_page
SummaryConvert colour film negatives digitised by a digital camera to positive images
upload_time2022-12-07 03:54:40
maintainer
docs_urlNone
author
requires_python>=3.11
license
keywords convert negatives film photography colour digital camera digitise
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Positif

Convert colour film negative digitised with DSLR to a positive image.

## Motivation

Colour film negatives can be digitised by taking an image of the negative placed on a light box with a digital camera.
Provided you have a camera with a proper lens, this technique is very inexpensive and fast compared to
scanning the negatives by a dedicated film scanner or having them digitised by a photographic lab.
The quality of the resulting digital capture is only limited by the specifications of your camera and lens.
Usually, they are on par or exceed those of the film scanners, including the professional machines used by the labs.

The main problem of the method is in converting the negative images to positives.
[Negative Lab Pro](https://www.negativelabpro.com/) is probably the best tool for the job. It is reasonably priced and
delivers excellent results. Unfortunately, Negative Lab Pro is a Lightroom plugin and requires a subscription to this product.
Not all film photographers use Lightroom. Some prefer [Darktable](https://www.darktable.org/),
[RawTherapee](https://www.rawtherapee.com/) and other free and open-source software. Both
Darktable and RawTherapee are capable of excellent results if you know how to use these tools.
The hardest part is achieving consistency between the frames shot on the same roll of film, different rolls shot on the same
film stock and between different films. At the end of the day, we are shooting film to get that special look that is almost
impossible to replicate digitally.

`Positif` is an experimental tool for converting RAW images of the film negatives taken by a digital camera to positive images.
The idea is to use transformation curves specific to the film, development process, the digital camera and the light source you use.

## Installation

`Positif` is a command-line tool that requires Python version 3.11 or above. It is installed from `PyPI` using `pip`:

```bash
pip install positif
```

## Usage

Run `positif -h` to get a full list of command line arguments. There are two major use scenarios. You can convert an
individual file, for example:

```bash
positif --raw="frame00000.ARW" --film=Ektar --output=frame00.tiff
```

Alternatively, you can process all RAW files in a directory and save the results in the destination directory, like that:

```bash
positif --raw="./capture" --format=ARW --film=Ektar --output="./results"
```

The `--format` parameter is required when converting all RAW files in a directory.

## Conversion Parameters

`positif` would normally create an output image which is a good starting point for further post-processing in your
favourite photo editing software. If you notice a consistent exposure offset, temperature bias or colour shift you can
use the conversion parameters described below to improve the resulting image.

| Parameter     | Description                                                                                                                                                                                                                                               |
| ------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| --mid-level   | Middle grey level relative to full scale. If this parameter is not specified it is determined automatically based on the histogram of the image.<br> Values below 0.5 result in darker output image and vice versa. The allowed range is from 0.1 to 0.9. |
| --red         | Red channel adjustment. Positive corrections add red. Valid range is from -0.5 to 0.5. <br>Typical values are within &plusmn;0.1.                                                                                                                         |
| --green       | Green channel adjustment.                                                                                                                                                                                                                                 |
| --blue        | Blue channel adjustment.                                                                                                                                                                                                                                  |
| --temperature | Colour temperature of the output image in Kelvin. Valid range is from 1000K (very red) to 40000K (very blue).<br> When not specified the correction is not applied.                                                                                       |
| --flip        | Use this flag to flip the image horizontally. This is useful if you photograph the negative with the emulsion side to the camera                                                                                                                          |

## Examples

Here are a few examples of using `positif`. The scene was shot on Kodak Ektar 100 developed at home using Tetenal Colortec C-41 kit. The first image is the negative, the second is the output of the script called with the default parameters.

![Negative](https://github.com/vintage-camera-pictures/positif/blob/main/examples/frame04-negative.jpg?raw=true "Negative")

![Default settings](https://github.com/vintage-camera-pictures/positif/blob/main/examples/frame04-default.jpg?raw=true "Default parameters")

There is a strong green cast and the reds are somewhat missing. Calling `positif` with the `--red=0.01 --green=-0.04` parameters results in the image below.

![Corrected](https://github.com/vintage-camera-pictures/positif/blob/main/examples/frame04-corrected.jpg?raw=true "corrected") 

For comparison, here is the same scene captured with a digital camera. No adjustments were made to the digital RAW image except applying the camera white balance.

![Digital capture](https://github.com/vintage-camera-pictures/positif/blob/main/examples/digital.jpg?raw=true "digital capture")

There is an obvious difference in the exposure between the image from the colour negative film and the direct digital capture. Apart from this, the corrected image is very close to the digital. More importantly, batch processing of the whole roll produces consistent output.

## How it works

Red, Green and Blue transform curves are applied to the corresponding channels of the RAW image of the film negative captured by a digital camera. The curves look like shown in the plot below.

![Curves](https://github.com/vintage-camera-pictures/positif/blob/main/examples/ektar.jpg?raw=true "film curves")

The input and output levels are normalised pixel values, 1.0 corresponds to the maximum channel level, 255 (8 bit) or 65535 (16 bit).

The transform curve can be determined by several methods. The most straightforward approach is to expose a roll of your favourite colour negative film and include several scenes with a wide dynamic range, like the one in the example. Have your film developed and scanned by a good professional lab. This is your reference. Digitise one or more frames from this roll using your digital camera and light source. You must use RAW image format. The transform curves for each channel can then be derived by comparing the lab scan (your reference) with the RAW image from your camera, pixel-by-pixel.

In the example above, the calibration curves were determined using a different roll of Kodak Ektar 100 shot with a different film camera on a different day in a different location. The reference film was developed by a professional lab using Fuji chemistry and scanned on a Noritsu scanner. The green colour cast in the first converted image could be caused by the camera lens, processing chemistry and development, or the digitising setup.

## Tips for Digitising Negatives

There are several simple rules that you need to follow when digitising your film negatives:

- **Reduce Flare.** Work in subdued light, use a lens hood and mask unused areas of your light source.
- **Calibrate White Balance.** Set custom white balance on your camera to the colour of your film base. Ideally, your want to do it for each roll of film. As a minimum, set custom white balance for each film stock you shoot. The gaps between the frames should be neutral grey as in the example below:

  ![Negative](https://github.com/vintage-camera-pictures/positif/blob/main/examples/negative.jpg?raw=true "white-balanced negative")

  There is no need to include the film borders and the gaps in the shot.
- **Use Manual Exposure.** Not strictly necessary, but more consistent results would be achieved if you use the same exposure settings for the whole roll. Use the aperture of around f11 and adjust the shutter speed such that the film base is around 1/3 of a stop below clipping (after the white balance has been applied). Check all three channels. Obviously, the film base is the brightest white in your negatives unless you choose to include perforations in your scans. If this is the case, you might want to decrease the shutter time accordingly to avoid clipping. Flare might be a problem especially with high-key images (dense negatives). Once you are happy with your exposure settings, fix them by switching to a manual exposure mode.
- **Scan Film Emulsion Side to the Lens**. It might not affect the final result, but simplifies your workflow.

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "positif",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.11",
    "maintainer_email": "",
    "keywords": "convert negatives film photography colour digital camera digitise",
    "author": "",
    "author_email": "Roman <roman@vintage-camera.pictures>",
    "download_url": "https://files.pythonhosted.org/packages/c6/61/df25cb8f2c3e6b88ab237dae15246054a2af18919aa10105e903934e67f8/positif-0.0.3.tar.gz",
    "platform": null,
    "description": "# Positif\r\n\r\nConvert colour film negative digitised with DSLR to a positive image.\r\n\r\n## Motivation\r\n\r\nColour film negatives can be digitised by taking an image of the negative placed on a light box with a digital camera.\r\nProvided you have a camera with a proper lens, this technique is very inexpensive and fast compared to\r\nscanning the negatives by a dedicated film scanner or having them digitised by a photographic lab.\r\nThe quality of the resulting digital capture is only limited by the specifications of your camera and lens.\r\nUsually, they are on par or exceed those of the film scanners, including the professional machines used by the labs.\r\n\r\nThe main problem of the method is in converting the negative images to positives.\r\n[Negative Lab Pro](https://www.negativelabpro.com/) is probably the best tool for the job. It is reasonably priced and\r\ndelivers excellent results. Unfortunately, Negative Lab Pro is a Lightroom plugin and requires a subscription to this product.\r\nNot all film photographers use Lightroom. Some prefer [Darktable](https://www.darktable.org/),\r\n[RawTherapee](https://www.rawtherapee.com/) and other free and open-source software. Both\r\nDarktable and RawTherapee are capable of excellent results if you know how to use these tools.\r\nThe hardest part is achieving consistency between the frames shot on the same roll of film, different rolls shot on the same\r\nfilm stock and between different films. At the end of the day, we are shooting film to get that special look that is almost\r\nimpossible to replicate digitally.\r\n\r\n`Positif` is an experimental tool for converting RAW images of the film negatives taken by a digital camera to positive images.\r\nThe idea is to use transformation curves specific to the film, development process, the digital camera and the light source you use.\r\n\r\n## Installation\r\n\r\n`Positif` is a command-line tool that requires Python version 3.11 or above. It is installed from `PyPI` using `pip`:\r\n\r\n```bash\r\npip install positif\r\n```\r\n\r\n## Usage\r\n\r\nRun `positif -h` to get a full list of command line arguments. There are two major use scenarios. You can convert an\r\nindividual file, for example:\r\n\r\n```bash\r\npositif --raw=\"frame00000.ARW\" --film=Ektar --output=frame00.tiff\r\n```\r\n\r\nAlternatively, you can process all RAW files in a directory and save the results in the destination directory, like that:\r\n\r\n```bash\r\npositif --raw=\"./capture\" --format=ARW --film=Ektar --output=\"./results\"\r\n```\r\n\r\nThe `--format` parameter is required when converting all RAW files in a directory.\r\n\r\n## Conversion Parameters\r\n\r\n`positif` would normally create an output image which is a good starting point for further post-processing in your\r\nfavourite photo editing software. If you notice a consistent exposure offset, temperature bias or colour shift you can\r\nuse the conversion parameters described below to improve the resulting image.\r\n\r\n| Parameter     | Description                                                                                                                                                                                                                                               |\r\n| ------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\r\n| --mid-level   | Middle grey level relative to full scale. If this parameter is not specified it is determined automatically based on the histogram of the image.<br> Values below 0.5 result in darker output image and vice versa. The allowed range is from 0.1 to 0.9. |\r\n| --red         | Red channel adjustment. Positive corrections add red. Valid range is from -0.5 to 0.5. <br>Typical values are within &plusmn;0.1.                                                                                                                         |\r\n| --green       | Green channel adjustment.                                                                                                                                                                                                                                 |\r\n| --blue        | Blue channel adjustment.                                                                                                                                                                                                                                  |\r\n| --temperature | Colour temperature of the output image in Kelvin. Valid range is from 1000K (very red) to 40000K (very blue).<br> When not specified the correction is not applied.                                                                                       |\r\n| --flip        | Use this flag to flip the image horizontally. This is useful if you photograph the negative with the emulsion side to the camera                                                                                                                          |\r\n\r\n## Examples\r\n\r\nHere are a few examples of using `positif`. The scene was shot on Kodak Ektar 100 developed at home using Tetenal Colortec C-41 kit. The first image is the negative, the second is the output of the script called with the default parameters.\r\n\r\n![Negative](https://github.com/vintage-camera-pictures/positif/blob/main/examples/frame04-negative.jpg?raw=true \"Negative\")\r\n\r\n![Default settings](https://github.com/vintage-camera-pictures/positif/blob/main/examples/frame04-default.jpg?raw=true \"Default parameters\")\r\n\r\nThere is a strong green cast and the reds are somewhat missing. Calling `positif` with the `--red=0.01 --green=-0.04` parameters results in the image below.\r\n\r\n![Corrected](https://github.com/vintage-camera-pictures/positif/blob/main/examples/frame04-corrected.jpg?raw=true \"corrected\") \r\n\r\nFor comparison, here is the same scene captured with a digital camera. No adjustments were made to the digital RAW image except applying the camera white balance.\r\n\r\n![Digital capture](https://github.com/vintage-camera-pictures/positif/blob/main/examples/digital.jpg?raw=true \"digital capture\")\r\n\r\nThere is an obvious difference in the exposure between the image from the colour negative film and the direct digital capture. Apart from this, the corrected image is very close to the digital. More importantly, batch processing of the whole roll produces consistent output.\r\n\r\n## How it works\r\n\r\nRed, Green and Blue transform curves are applied to the corresponding channels of the RAW image of the film negative captured by a digital camera. The curves look like shown in the plot below.\r\n\r\n![Curves](https://github.com/vintage-camera-pictures/positif/blob/main/examples/ektar.jpg?raw=true \"film curves\")\r\n\r\nThe input and output levels are normalised pixel values, 1.0 corresponds to the maximum channel level, 255 (8 bit) or 65535 (16 bit).\r\n\r\nThe transform curve can be determined by several methods. The most straightforward approach is to expose a roll of your favourite colour negative film and include several scenes with a wide dynamic range, like the one in the example. Have your film developed and scanned by a good professional lab. This is your reference. Digitise one or more frames from this roll using your digital camera and light source. You must use RAW image format. The transform curves for each channel can then be derived by comparing the lab scan (your reference) with the RAW image from your camera, pixel-by-pixel.\r\n\r\nIn the example above, the calibration curves were determined using a different roll of Kodak Ektar 100 shot with a different film camera on a different day in a different location. The reference film was developed by a professional lab using Fuji chemistry and scanned on a Noritsu scanner. The green colour cast in the first converted image could be caused by the camera lens, processing chemistry and development, or the digitising setup.\r\n\r\n## Tips for Digitising Negatives\r\n\r\nThere are several simple rules that you need to follow when digitising your film negatives:\r\n\r\n- **Reduce Flare.** Work in subdued light, use a lens hood and mask unused areas of your light source.\r\n- **Calibrate White Balance.** Set custom white balance on your camera to the colour of your film base. Ideally, your want to do it for each roll of film. As a minimum, set custom white balance for each film stock you shoot. The gaps between the frames should be neutral grey as in the example below:\r\n\r\n  ![Negative](https://github.com/vintage-camera-pictures/positif/blob/main/examples/negative.jpg?raw=true \"white-balanced negative\")\r\n\r\n  There is no need to include the film borders and the gaps in the shot.\r\n- **Use Manual Exposure.** Not strictly necessary, but more consistent results would be achieved if you use the same exposure settings for the whole roll. Use the aperture of around f11 and adjust the shutter speed such that the film base is around 1/3 of a stop below clipping (after the white balance has been applied). Check all three channels. Obviously, the film base is the brightest white in your negatives unless you choose to include perforations in your scans. If this is the case, you might want to decrease the shutter time accordingly to avoid clipping. Flare might be a problem especially with high-key images (dense negatives). Once you are happy with your exposure settings, fix them by switching to a manual exposure mode.\r\n- **Scan Film Emulsion Side to the Lens**. It might not affect the final result, but simplifies your workflow.\r\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "Convert colour film negatives digitised by a digital camera to positive images",
    "version": "0.0.3",
    "split_keywords": [
        "convert",
        "negatives",
        "film",
        "photography",
        "colour",
        "digital",
        "camera",
        "digitise"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "md5": "a2bf904812585cba2c8707bf6519213b",
                "sha256": "a1e6a2012e5cf33d2fa87392a6149fda60fc88258fb65d0b4ad7682d54f064c8"
            },
            "downloads": -1,
            "filename": "positif-0.0.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "a2bf904812585cba2c8707bf6519213b",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.11",
            "size": 21570,
            "upload_time": "2022-12-07T03:54:38",
            "upload_time_iso_8601": "2022-12-07T03:54:38.285015Z",
            "url": "https://files.pythonhosted.org/packages/df/b7/715228bc113446d5a9c70253422958c0250e9fdf46bdd0b14adabba204ac/positif-0.0.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "md5": "31c4585638f3c9c481289b99d99d3b39",
                "sha256": "23d0cc2663bfbb8eb5e4be294eff043372dc77bbc4e3ed93f48602f8da018db3"
            },
            "downloads": -1,
            "filename": "positif-0.0.3.tar.gz",
            "has_sig": false,
            "md5_digest": "31c4585638f3c9c481289b99d99d3b39",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.11",
            "size": 23896,
            "upload_time": "2022-12-07T03:54:40",
            "upload_time_iso_8601": "2022-12-07T03:54:40.014568Z",
            "url": "https://files.pythonhosted.org/packages/c6/61/df25cb8f2c3e6b88ab237dae15246054a2af18919aa10105e903934e67f8/positif-0.0.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2022-12-07 03:54:40",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "lcname": "positif"
}
        
Elapsed time: 0.01540s