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

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

Types

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

Type that represents an Quality.QualityPSNR struct.

  • ref. reference()

    The underlying erlang resource variable.

Functions

@spec clear(Keyword.t()) :: any() | {:error, String.t()}
@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(Keyword.t()) :: any() | {:error, String.t()}
@spec compute(t(), Evision.Mat.maybe_mat_in()) ::
  Evision.scalar() | {:error, String.t()}

Compute the PSNR

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

  • cmp: Evision.Mat.

    Comparison image

Return
  • retval: Evision.scalar().t()

@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

static method for computing quality

Positional Arguments
Keyword Arguments
  • maxPixelValue: double.

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

Return
  • retval: Evision.scalar().t()

  • 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(),
  [{:maxPixelValue, term()}] | nil
) :: {Evision.scalar(), Evision.Mat.t()} | {:error, String.t()}

static method for computing quality

Positional Arguments
Keyword Arguments
  • maxPixelValue: double.

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

Return
  • retval: Evision.scalar().t()

  • 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(Keyword.t()) :: any() | {:error, String.t()}
@spec create(Evision.Mat.maybe_mat_in()) :: t() | {:error, String.t()}

Create an object which calculates quality

Positional Arguments
  • ref: Evision.Mat.

    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(), [{:maxPixelValue, term()}] | nil) ::
  t() | {:error, String.t()}

Create an object which calculates quality

Positional Arguments
  • ref: Evision.Mat.

    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(Keyword.t()) :: any() | {:error, String.t()}
@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
Link to this function

getMaxPixelValue(named_args)

View Source
@spec getMaxPixelValue(Keyword.t()) :: any() | {:error, String.t()}
@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(named_args)

View Source
@spec setMaxPixelValue(Keyword.t()) :: any() | {:error, String.t()}
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