Code Monkey home page Code Monkey logo

color-neg-resources's Introduction

Color Neg Resources

Luts and scripts for processing color negative film scans in photoshop.

These files can be used with the process described in my post Scanning Color Negative Film

A TLDR

Details on the process are in the post linked above.

To process a color negative scan you will need:

The main steps to the process are:

  • White balance
    • Compensate for: backlight, film base color, and lighting of individual film frames.
    • Works by multiplying linear raw rgb values.
  • Density balance
    • Compensate for differences in measured dye density between the channels.
    • Works by multiplying density, or a power function on the linear values.
  • Invert
    • Invert colors by dividing
    • positive_value = constant / negative_value

Density balance script

density balance.js is a photoshop script that calculates density balance and automates the creation of adjustment layers from two gray color samples. It can be used with a film photo of a color checker.

To use the script and create an action:

  • Use the eye dropper tool with sample size set to an average
  • Set the foreground color to the darker gray patch, lower density (light) negative
  • Set the background color to the lighter gray patch, higher density (dark) negative
  • (to set up) Start recording a new action
  • Run density balance.js script with: File > Scripts > Browse
  • Create a Color Lookup adjustment layer with inverse_01.cube
  • Stop action

Negative to positive 3d lut

The process can be baked into a 3d lut that can be used directly in acr/lightroom.

The python script neglut.py will generate a 3d lut cube file that will:

  • convert prophoto rgb to linear acescg
  • apply density balance and invert
  • apply a tone curve (optional)
  • convert colors back to prophoto

The lut is limited in what it can do, but can be very useful for quickly getting a finished image or flat positive for editing. The only adjustments that can be used are Exposure and White Balance. Changing any other setting would disrupt the linearity of the negative.

To use the script

After you have decided on values to use for density balance in the ACEScg color space, Open the python file in a text editor.

  • set the values of redScale, greenScale, and blueScale to your density balance values.
  • change savename to the film name or filename you want to use.
  • set paper to True or False, for whether or not you want to use the paper curve.
# values for density balance in ACEScg
redScale = 1.0
greenScale = 0.807
blueScale = 0.579

savename = "ektar" # film name

paper = False # True / False: use paper lut

Run the script and it will write the .cube file.

To make a profile in Adobe Camera Raw or Lightroom:

  • set white balance to As Shot
  • select the linear camera profile
  • option/alt click the new preset button
  • change the profile name
  • select the Color Lookup Table checkbox
  • choose the new cube file
  • set Space to ProPhoto RGB
  • set Amount Min and Max to 100

create profile dialog

LUTs

file lut function input output input range
inverse_01.cube inverse $\frac{0.01}{x}$ linear(negative) linear 0-1
density.cube transmittance to density $\log_{10}(\frac{1}{x})$ linear(negative) density 0-1
10^x.01_4.cube density to luminance $10^{x}\cdot 0.01$ density linear 0-4
inv_density.cube inverse density $\frac{1}{10^{x}}$ density linear(negative) 0-4
paper_a.cube paper print curve density linear 0-3
paper_invert.cube paper print curve linear(negative) linear 0-1
Paper Print LUTs

A lut to simulate the response curve of photographic paper.
Use an exposure adjustment layer before this lut to adjust exposure and contrast.

paper_a: use in place of 'density to luminance'. offset controls exposure, exposure controls contrast
paper_invert: use in place of 'inverse'. exposure controls exposure, gamma controls contrast

color-neg-resources's People

Contributors

abpy avatar

Stargazers

 avatar Jean-Pascal Lavigne avatar Roman Dahm avatar  avatar  avatar  avatar Jens Martensson avatar Moritz Reiber avatar  avatar

Watchers

 avatar  avatar

Forkers

vonj

color-neg-resources's Issues

DSLR scanning has resulted in some color deviations. Please help analyze this.

Using the Nikon Z7 and a 5000K film light for DSLR scanning, I attempted with Kodak Ektar100 120 film:
Pasted Graphic 2

The first step involves using a linear profile modified from Adobe Standard: modified as per your method on GitHub, which I've uploaded there.
linear-profile.txt

  1. After opening in Photoshop ACR, I select the profile, setting white balance to the film base area and choosing the ACESsg g10 color space.
Pasted Graphic 3
  1. I select black and white for color picking.
Pasted Graphic 4
  1. Then, I run the density balance.js script.
Pasted Graphic 5
  1. I add a color lookup layer, inverse_01.cube.
Pasted Graphic 6
  1. I add a levels layer to adjust Shadows, Midtones, Highlights to achieve appropriate contrast in the image.
Pasted Graphic 7
  1. After adding a levels layer, I select neutral gray for correction.
Pasted Graphic 8

My problem is:

  1. Following this process, it seems that the blue of the sky differs significantly from the actual scene. The location was a high plateau area with a very blue sky, but the result shows a blue-green tint. Is there a problem with the processing steps, or am I missing something?
Pasted Graphic 10
  1. Regarding papaer_a.cube, I understand from the original article that it simulates Kodak RA4 printing. How should I use this? After adding the layer, it appears black.
Pasted Graphic 9

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.