Development
Development corresponds to the second main step in Exposure Map post-processing.
The "Development" term is an echo to analog/film photography. Regarding digital photography, it is a software process coded into the camera that converts raw image (most of the time not given to user) and final/output image.
- Generic basic development directly implemented in the Speos Sensor System Exporter as described in the Generic Development section.
- Customizable development done from an external python script, as described in the External Development section.
Generic Development
- Demosaizing Method
- Linearization
- Orientation
- Color Saturation Correction
- Colorimetry
Demosaizing Method
If the Bayer Matrix Type sub-key of the EMVA data key is set to a value different from None, a Demosaizing step is performed to get raw R, G and B channels.
- bilinear
- Malvar2004
- Menon2007
- DDFAPD
For more information on the methods, refer to the Bayer CFA Demosaicing and Mosaicing API Reference.
The Demosaizing Method key must specify one of those methods.
Demosaizing Method: bilinear
Linearization
The Linearization key allows you to correct sensor non-linearity. If sensor is assumed to be linear, the Type sub-key must be set to None.
Linearization:
Type: None
- 1D lookup table (0 to max DN value)
- polynomial correction (DN_out = sum(Pi*(DN_in)**i))
Orientation
- 1 = The 0th row represents the visual top of the image, and the 0th column represents the visual left-hand side.
- 2 = The 0th row represents the visual top of the image, and the 0th column represents the visual right-hand side.
- 3 = The 0th row represents the visual bottom of the image, and the 0th column represents the visual right-hand side.
- 4 = The 0th row represents the visual bottom of the image, and the 0th column represents the visual left-hand side.
- 5 = The 0th row represents the visual left-hand side of the image, and the 0th column represents the visual top.
- 6 = The 0th row represents the visual right-hand side of the image, and the 0th column represents the visual top.
- 7 = The 0th row represents the visual right-hand side of the image, and the 0th column represents the visual bottom.
- 8 = The 0th row represents the visual left-hand side of the image, and the 0th column represents the visual bottom.
- 1 keeps the original image.
- 3 balances an optical 180° rotation.
Orientation: 3
Color Saturation Correction
- If True: an additional process corrects the color shifting due to pixel saturation.
- If False: Color Saturation Correction is not applied.
Color Saturation Correction: True
Colorimetry
- Shoot Illuminant
- Target Color Space
- Adaptation method
- Camera Neutral vector
- Color Calibration Matrix
- Shoot Illuminant
- Color Space
- Adaptation Method
- Configuration x
If colorimetric data have been previously calculated, an additional Configuration i (do not confuse it with Configuration x) is added to each combination of [Shoot Illuminant, Color Space, Adaptation method].
Shoot Illuminant
- The Type sub-key defines if the illuminant is predefined or comes from a Speos *.spectrum file.
- The Data sub-key sets the predefined illuminants (A, B, C D50, D55, D65, or D75) or the *.spectrum file to use.
Example: Predefined Illuminant
Shoot Illuminant:
Type: Predefined
Data: D50
Unit: NA
In case of a Predefined illuminant, Unit sub-key is always set to NA.
Example: From File
Shoot Illuminant:
Type: File
Data: c:/shoot.spectrum
Unit: Percentage #Percentage or '0 to 1'
Color Space
The Color Space key gives the color space in which the image will be targeted.
The available Color Space values are: sRGB, Adobe RGB (1998), Apple RGB, Best RGB, Beta RGB, Bruce RGB, CIE RGB, ColorMatch RGB, Don RGB 4, ECI RGB v2, Ekta Space PS5, NTSC RGB, PAL/SECAM RGB, ProPhoto RGB, SMPTE-C RGB, Wide Gamut RGB.
Color Space: Best RGB
Adaptation Method
The Adaptation Method key defines the adaptation method used to switch from one to another color space.
- XYZ Scaling
- Bradford
- Von Kries
Adaptation Method: Bradford
Configuration i
If colorimetric data have been previously calculated, an additional Configuration i (do not confuse it with Configuration x) is added to each combination of [Shoot Illuminant, Color Space, Adaptation method].
The Configuration i key contains data calculated during a previous post-process. As this calculation takes time, results are added to the file to allow you to reuse them.
Configuration x
The Configuration x key line should be present at the last line of the sensor file and kept as it is.
Configuration x: # please leave this line as it is.
External Development
How to call an external development
Instead of predefined development model, you can plug specific development algorithms called via a Python script.
To do that, the two following keys must be set in Development section:
Development:
Type: External Script #'Internal Generic' or 'External Script'
External Script: Development.py
Script requirements
Script must be written in Python version superior to 3.10.12.
- two arguments:
- Rawimages: the set of raw images generated by the Speos Sensor System Exporter
- Sensors: the set of sensor data
- one output: image data coded as a 3D numpy array (color channel, i, j)