Params class

class rawpy.Params(self, demosaic_algorithm=None, half_size=False, four_color_rgb=False, dcb_iterations=0, dcb_enhance=False, fbdd_noise_reduction=FBDDNoiseReductionMode.Off, noise_thr=None, median_filter_passes=0, use_camera_wb=False, use_auto_wb=False, user_wb=None, output_color=ColorSpace.sRGB, output_bps=8, user_flip=None, user_black=None, user_sat=None, no_auto_bright=False, auto_bright_thr=None, adjust_maximum_thr=0.75, bright=1.0, highlight_mode=HighlightMode.Clip, exp_shift=None, exp_preserve_highlights=0.0, no_auto_scale=False, gamma=None, chromatic_aberration=None, bad_pixels_path=None)

A class that handles postprocessing parameters.

If use_camera_wb and use_auto_wb are False and user_wb is None, then daylight white balance correction is used. If both use_camera_wb and use_auto_wb are True, then use_auto_wb has priority.

Parameters
  • demosaic_algorithm (rawpy.DemosaicAlgorithm) – default is AHD

  • half_size (bool) – outputs image in half size by reducing each 2x2 block to one pixel instead of interpolating

  • four_color_rgb (bool) – whether to use separate interpolations for two green channels

  • dcb_iterations (int) – number of DCB correction passes, requires DCB demosaicing algorithm

  • dcb_enhance (bool) – DCB interpolation with enhanced interpolated colors

  • fbdd_noise_reduction (rawpy.FBDDNoiseReductionMode) – controls FBDD noise reduction before demosaicing

  • noise_thr (float) – threshold for wavelet denoising (default disabled)

  • median_filter_passes (int) – number of median filter passes after demosaicing to reduce color artifacts

  • use_camera_wb (bool) – whether to use the as-shot white balance values

  • use_auto_wb (bool) – whether to try automatically calculating the white balance

  • user_wb (list) – list of length 4 with white balance multipliers for each color

  • output_color (rawpy.ColorSpace) – output color space

  • output_bps (int) – 8 or 16

  • user_flip (int) – 0=none, 3=180, 5=90CCW, 6=90CW, default is to use image orientation from the RAW image if available

  • user_black (int) – custom black level

  • user_sat (int) – saturation adjustment (custom white level)

  • no_auto_scale (bool) – Whether to disable pixel value scaling

  • no_auto_bright (bool) – whether to disable automatic increase of brightness

  • auto_bright_thr (float) – ratio of clipped pixels when automatic brighness increase is used (see no_auto_bright). Default is 0.01 (1%).

  • adjust_maximum_thr (float) – see libraw docs

  • bright (float) – brightness scaling

  • highlight_mode (rawpy.HighlightMode | int) – highlight mode

  • exp_shift (float) – exposure shift in linear scale. Usable range from 0.25 (2-stop darken) to 8.0 (3-stop lighter).

  • exp_preserve_highlights (float) – preserve highlights when lightening the image with exp_shift. From 0.0 to 1.0 (full preservation).

  • gamma (tuple) – pair (power,slope), default is (2.222, 4.5) for rec. BT.709

  • chromatic_aberration (tuple) – pair (red_scale, blue_scale), default is (1,1), corrects chromatic aberration by scaling the red and blue channels

  • bad_pixels_path (str) – path to dcraw bad pixels file. Each bad pixel will be corrected using the mean of the neighbor pixels. See the rawpy.enhance module for alternative repair algorithms, e.g. using the median.