components.io.rawimagefilereader2

class RawImageFileReader2(config={}, **kwds)[source]

Bases: pyctools.core.base.Component

Read ‘raw’ still image file (CR2, NEF, etc.).

This component uses the rawpy Python package. See RawImageFileReader for a component that uses rawkit.

Note that the file is always read in 16-bit linear mode. You will need to convert the image to “gamma corrected” mode before displaying it or saving it to JPEG or similar. See gammacorrection for some useful components.

Some options add significantly to the processing time, particularly fbdd_noise_reduction and some of the demosaic_algorithm options.

Config

path

str

Path name of file to be read.

demosaic_algorithm

str

Set demosaicing method. Possible values: 'LINEAR', 'VNG', 'PPG', 'AHD', 'DCB', 'DHT', 'AAHD'.

four_color_rgb

bool

Use separate interpolation for 2 green channels.

dcb_iterations

int

Number of passes of DCB interpolation.

dcb_enhance

bool

Enhance colours of DCB interpolation.

fbdd_noise_reduction

str

Enable FBDD noise reduction before demosaicing. Possible values: 'Off', 'Light', 'Full'.

noise_thr

float

Set denoising threshold. Typically 100 to 1000.

median_filter_passes

int

Number of median filter passes after demosaicing.

use_camera_wb

bool

Use camera defined white balance.

use_auto_wb

bool

Automatic white balance.

user_wb

str

4 comma separated floats that set the gain of each channel.

output_color

str

Set colour space. Possible values: 'raw', 'sRGB', 'Adobe', 'Wide', 'ProPhoto', 'XYZ'.

bright

float

Brightness / white level scaling.

highlight_mode

str

Set highlight mode. Possible values: 'Clip', 'Ignore', 'Blend', 'ReconstructDefault', '3', '4', '6', '7', '8', '9'.

exp_shift

float

Exposure shift. Darken if < 1.0, lighten if > 1.0.

red_scale

float

Chromatic aberration correction red scale factor.

blue_scale

float

Chromatic aberration correction blue scale factor.

crop

bool

Auto crop image to dimensions in metadata.


Comments or questions? Please email jim@jim-easterbrook.me.uk.