quality.bd_wrapper

class BDWrapper(method: str = 'akima', interpolator: bool = False, require_matching_points: bool = False, min_overlap: float = 0.0)[source]

Bases: object

Parameters:
  • method (str)

  • interpolator (bool)

  • require_matching_points (bool)

  • min_overlap (float)

method: str = 'akima'
interpolator: bool = False
require_matching_points: bool = False
min_overlap: float = 0.0
compute_bd_rate(anchor, test)[source]

Computes the BD-Rate between two RD curves.

Parameters:
  • anchor (RDCurve) – Anchor RD curve

  • test (RDCurve) – Test RD curve

Returns:

BD-Rate value as percentage

Return type:

float

compute_bd_distortion(anchor, test)[source]

Computes the BD-Distortion between two RD curves.

Parameters:
  • anchor (RDCurve) – Anchor RD curve

  • test (RDCurve) – Test RD curve

Returns:

BD-Distortion value

Return type:

float

create_json_report(anchor, rd_curves, lightfield, rd_plot_config, configuration_reader)[source]

Creates JSON report with BD rates, maintaining lightfield order from configuration.

Parameters:
  • anchor (Any) – Anchor RD curve view

  • rd_curves (List[Any]) – List of RD curve views to compare

  • lightfield (LightField) – Light field data

  • rd_plot_config (Dict[str, Any]) – RD plot configuration

  • configuration_reader (ConfigurationReader) – Configuration reader instance

Returns:

Path to the created JSON report file

Return type:

Path

static create_bd_rate_tables(configuration_reader)[source]

Generates BD-rate tables from JSON report files.

Parameters:

configuration_reader (ConfigurationReader) – Configuration reader instance

Returns:

None

Return type:

None