View Source Evision.Quality.QualityPSNR (Evision v0.1.28)

Link to this section Summary

Types

t()

Type that represents an Quality.QualityPSNR struct.

Functions

Implements Algorithm::clear()

Compute the PSNR

static method for computing quality

static method for computing quality

Create an object which calculates quality

Create an object which calculates quality

Implements Algorithm::empty()

return the maximum pixel value used for PSNR computation

sets the maximum pixel value used for PSNR computation

Link to this section Types

@type t() :: %Evision.Quality.QualityPSNR{ref: reference()}

Type that represents an Quality.QualityPSNR struct.

  • ref. reference()

    The underlying erlang resource variable.

Link to this section Functions

@spec clear(t()) :: t() | {:error, String.t()}

Implements Algorithm::clear()

Positional Arguments
  • self: Evision.Quality.QualityPSNR.t()

Python prototype (for reference only):

clear() -> None
@spec compute(t(), Evision.Mat.maybe_mat_in()) ::
  {number()}
  | {number(), number()}
  | {number() | number() | number()}
  | {number(), number(), number(), number()}
  | {:error, String.t()}

Compute the PSNR

Positional Arguments
  • self: Evision.Quality.QualityPSNR.t()

  • cmp: Evision.Mat.t().

    Comparison image

Return
  • retval: cv::Scalar

@returns Per-channel PSNR value, or std::numeric_limits<double>::infinity() if the MSE between the two images == 0

Python prototype (for reference only):

compute(cmp) -> retval
@spec compute(t(), Evision.Mat.maybe_mat_in(), Evision.Mat.maybe_mat_in()) ::
  {{number()}
   | {number(), number()}
   | {number() | number() | number()}
   | {number(), number(), number(), number()}, Evision.Mat.t()}
  | {:error, String.t()}

static method for computing quality

Positional Arguments
  • self: Evision.Quality.QualityPSNR.t()

  • ref: Evision.Mat.t().

    reference image

  • cmp: Evision.Mat.t().

    comparison image

Keyword Arguments
  • maxPixelValue: double.

    maximum per-channel value for any individual pixel; eg 255 for uint8 image

Return
  • retval: cv::Scalar

  • qualityMap: Evision.Mat.t().

    output quality map, or cv::noArray()

@returns PSNR value, or std::numeric_limits<double>::infinity() if the MSE between the two images == 0

Python prototype (for reference only):

compute(ref, cmp[, qualityMap[, maxPixelValue]]) -> retval, qualityMap
Link to this function

compute(self, ref, cmp, opts)

View Source
@spec compute(
  t(),
  Evision.Mat.maybe_mat_in(),
  Evision.Mat.maybe_mat_in(),
  [{atom(), term()}, ...] | nil
) ::
  {{number()}
   | {number(), number()}
   | {number() | number() | number()}
   | {number(), number(), number(), number()}, Evision.Mat.t()}
  | {:error, String.t()}

static method for computing quality

Positional Arguments
  • self: Evision.Quality.QualityPSNR.t()

  • ref: Evision.Mat.t().

    reference image

  • cmp: Evision.Mat.t().

    comparison image

Keyword Arguments
  • maxPixelValue: double.

    maximum per-channel value for any individual pixel; eg 255 for uint8 image

Return
  • retval: cv::Scalar

  • qualityMap: Evision.Mat.t().

    output quality map, or cv::noArray()

@returns PSNR value, or std::numeric_limits<double>::infinity() if the MSE between the two images == 0

Python prototype (for reference only):

compute(ref, cmp[, qualityMap[, maxPixelValue]]) -> retval, qualityMap
@spec create(Evision.Mat.maybe_mat_in()) :: t() | {:error, String.t()}

Create an object which calculates quality

Positional Arguments
  • ref: Evision.Mat.t().

    input image to use as the source for comparison

Keyword Arguments
  • maxPixelValue: double.

    maximum per-channel value for any individual pixel; eg 255 for uint8 image

Return
  • retval: QualityPSNR

Python prototype (for reference only):

create(ref[, maxPixelValue]) -> retval
@spec create(Evision.Mat.maybe_mat_in(), [{atom(), term()}, ...] | nil) ::
  t() | {:error, String.t()}

Create an object which calculates quality

Positional Arguments
  • ref: Evision.Mat.t().

    input image to use as the source for comparison

Keyword Arguments
  • maxPixelValue: double.

    maximum per-channel value for any individual pixel; eg 255 for uint8 image

Return
  • retval: QualityPSNR

Python prototype (for reference only):

create(ref[, maxPixelValue]) -> retval
@spec empty(t()) :: boolean() | {:error, String.t()}

Implements Algorithm::empty()

Positional Arguments
  • self: Evision.Quality.QualityPSNR.t()
Return
  • retval: bool

Python prototype (for reference only):

empty() -> retval
@spec getMaxPixelValue(t()) :: number() | {:error, String.t()}

return the maximum pixel value used for PSNR computation

Positional Arguments
  • self: Evision.Quality.QualityPSNR.t()
Return
  • retval: double

Python prototype (for reference only):

getMaxPixelValue() -> retval
Link to this function

setMaxPixelValue(self, val)

View Source
@spec setMaxPixelValue(t(), number()) :: t() | {:error, String.t()}

sets the maximum pixel value used for PSNR computation

Positional Arguments
  • self: Evision.Quality.QualityPSNR.t()

  • val: double.

    Maximum pixel value

Python prototype (for reference only):

setMaxPixelValue(val) -> None