View Source Evision.ImgHash.RadialVarianceHash (Evision v0.2.9)

Summary

Types

t()

Type that represents an ImgHash.RadialVarianceHash struct.

Functions

Clears the algorithm state

Compare the hash value between inOne and inTwo

Computes hash of the input image

Computes hash of the input image

create

Returns true if the Algorithm is empty (e.g. in the very beginning or after unsuccessful read

getNumOfAngleLine

Reads algorithm parameters from a file storage

setNumOfAngleLine

Stores algorithm parameters in a file storage

Types

@type t() :: %Evision.ImgHash.RadialVarianceHash{ref: reference()}

Type that represents an ImgHash.RadialVarianceHash struct.

  • ref. reference()

    The underlying erlang resource variable.

Functions

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

Clears the algorithm state

Positional Arguments
  • self: Evision.ImgHash.RadialVarianceHash.t()

Python prototype (for reference only):

clear() -> None
@spec compare(Keyword.t()) :: any() | {:error, String.t()}
Link to this function

compare(self, hashOne, hashTwo)

View Source
@spec compare(t(), Evision.Mat.maybe_mat_in(), Evision.Mat.maybe_mat_in()) ::
  number() | {:error, String.t()}

Compare the hash value between inOne and inTwo

Positional Arguments
  • self: Evision.ImgHash.RadialVarianceHash.t()

  • hashOne: Evision.Mat.

    Hash value one

  • hashTwo: Evision.Mat.

    Hash value two

Return
  • retval: double

@return value indicate similarity between inOne and inTwo, the meaning of the value vary from algorithms to algorithms

Python prototype (for reference only):

compare(hashOne, hashTwo) -> retval
@spec compute(Keyword.t()) :: any() | {:error, String.t()}
@spec compute(t(), Evision.Mat.maybe_mat_in()) ::
  Evision.Mat.t() | {:error, String.t()}

Computes hash of the input image

Positional Arguments
  • self: Evision.ImgHash.RadialVarianceHash.t()

  • inputArr: Evision.Mat.

    input image want to compute hash value

Return
  • outputArr: Evision.Mat.t().

    hash of the image

Python prototype (for reference only):

compute(inputArr[, outputArr]) -> outputArr
Link to this function

compute(self, inputArr, opts)

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

Computes hash of the input image

Positional Arguments
  • self: Evision.ImgHash.RadialVarianceHash.t()

  • inputArr: Evision.Mat.

    input image want to compute hash value

Return
  • outputArr: Evision.Mat.t().

    hash of the image

Python prototype (for reference only):

compute(inputArr[, outputArr]) -> outputArr
@spec create() :: t() | {:error, String.t()}

create

Keyword Arguments
  • sigma: double.
  • numOfAngleLine: integer().
Return
  • retval: Evision.ImgHash.RadialVarianceHash.t()

Python prototype (for reference only):

create([, sigma[, numOfAngleLine]]) -> retval
@spec create(Keyword.t()) :: any() | {:error, String.t()}
@spec create([numOfAngleLine: term(), sigma: term()] | nil) ::
  t() | {:error, String.t()}

create

Keyword Arguments
  • sigma: double.
  • numOfAngleLine: integer().
Return
  • retval: Evision.ImgHash.RadialVarianceHash.t()

Python prototype (for reference only):

create([, sigma[, numOfAngleLine]]) -> retval
@spec empty(Keyword.t()) :: any() | {:error, String.t()}
@spec empty(t()) :: boolean() | {:error, String.t()}

Returns true if the Algorithm is empty (e.g. in the very beginning or after unsuccessful read

Positional Arguments
  • self: Evision.ImgHash.RadialVarianceHash.t()
Return
  • retval: bool

Python prototype (for reference only):

empty() -> retval
Link to this function

getDefaultName(named_args)

View Source
@spec getDefaultName(Keyword.t()) :: any() | {:error, String.t()}
@spec getDefaultName(t()) :: binary() | {:error, String.t()}

getDefaultName

Positional Arguments
  • self: Evision.ImgHash.RadialVarianceHash.t()
Return

Returns the algorithm string identifier. This string is used as top level xml/yml node tag when the object is saved to a file or string.

Python prototype (for reference only):

getDefaultName() -> retval
Link to this function

getNumOfAngleLine(named_args)

View Source
@spec getNumOfAngleLine(Keyword.t()) :: any() | {:error, String.t()}
@spec getNumOfAngleLine(t()) :: integer() | {:error, String.t()}

getNumOfAngleLine

Positional Arguments
  • self: Evision.ImgHash.RadialVarianceHash.t()
Return
  • retval: integer()

Python prototype (for reference only):

getNumOfAngleLine() -> retval
@spec getSigma(Keyword.t()) :: any() | {:error, String.t()}
@spec getSigma(t()) :: number() | {:error, String.t()}

getSigma

Positional Arguments
  • self: Evision.ImgHash.RadialVarianceHash.t()
Return
  • retval: double

Python prototype (for reference only):

getSigma() -> retval
@spec read(Keyword.t()) :: any() | {:error, String.t()}
@spec read(t(), Evision.FileNode.t()) :: t() | {:error, String.t()}

Reads algorithm parameters from a file storage

Positional Arguments

Python prototype (for reference only):

read(fn) -> None
@spec save(Keyword.t()) :: any() | {:error, String.t()}
@spec save(t(), binary()) :: t() | {:error, String.t()}

save

Positional Arguments
  • self: Evision.ImgHash.RadialVarianceHash.t()
  • filename: String

Saves the algorithm to a file. In order to make this method work, the derived class must implement Algorithm::write(FileStorage& fs).

Python prototype (for reference only):

save(filename) -> None
Link to this function

setNumOfAngleLine(named_args)

View Source
@spec setNumOfAngleLine(Keyword.t()) :: any() | {:error, String.t()}
Link to this function

setNumOfAngleLine(self, value)

View Source
@spec setNumOfAngleLine(t(), integer()) :: t() | {:error, String.t()}

setNumOfAngleLine

Positional Arguments
  • self: Evision.ImgHash.RadialVarianceHash.t()
  • value: integer()

Python prototype (for reference only):

setNumOfAngleLine(value) -> None
@spec setSigma(Keyword.t()) :: any() | {:error, String.t()}
@spec setSigma(t(), number()) :: t() | {:error, String.t()}

setSigma

Positional Arguments
  • self: Evision.ImgHash.RadialVarianceHash.t()
  • value: double

Python prototype (for reference only):

setSigma(value) -> None
@spec write(Keyword.t()) :: any() | {:error, String.t()}
@spec write(t(), Evision.FileStorage.t()) :: t() | {:error, String.t()}

Stores algorithm parameters in a file storage

Positional Arguments

Python prototype (for reference only):

write(fs) -> None
@spec write(t(), Evision.FileStorage.t(), binary()) :: t() | {:error, String.t()}

write

Positional Arguments

Has overloading in C++

Python prototype (for reference only):

write(fs, name) -> None