View Source Evision.ImgHash (Evision v0.1.28)

Link to this section Summary

Types

t()

Type that represents an ImgHash struct.

Functions

Calculates img_hash::AverageHash in one call

Calculates img_hash::AverageHash in one call

Computes block mean hash of the input image

Computes block mean hash of the input image

Computes color moment hash of the input, the algorithm is come from the paper "Perceptual Hashing for Color Images Using Invariant Moments"

Computes color moment hash of the input, the algorithm is come from the paper "Perceptual Hashing for Color Images Using Invariant Moments"

Computes average hash value of the input image

Computes average hash value of the input image

Computes pHash value of the input image

Computes pHash value of the input image

Computes radial variance hash of the input image

Computes radial variance hash of the input image

Link to this section Types

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

Type that represents an ImgHash struct.

  • ref. reference()

    The underlying erlang resource variable.

Link to this section Functions

@spec averageHash(Evision.Mat.maybe_mat_in()) ::
  Evision.Mat.t() | {:error, String.t()}

Calculates img_hash::AverageHash in one call

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

    input image want to compute hash value, type should be CV_8UC4, CV_8UC3 or CV_8UC1.

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

    Hash value of input, it will contain 16 hex decimal number, return type is CV_8U

Python prototype (for reference only):

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

averageHash(inputArr, opts)

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

Calculates img_hash::AverageHash in one call

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

    input image want to compute hash value, type should be CV_8UC4, CV_8UC3 or CV_8UC1.

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

    Hash value of input, it will contain 16 hex decimal number, return type is CV_8U

Python prototype (for reference only):

averageHash(inputArr[, outputArr]) -> outputArr
@spec blockMeanHash(Evision.Mat.maybe_mat_in()) ::
  Evision.Mat.t() | {:error, String.t()}

Computes block mean hash of the input image

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

    input image want to compute hash value, type should be CV_8UC4, CV_8UC3 or CV_8UC1.

Keyword Arguments
  • mode: int.

    the mode

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

    Hash value of input, it will contain 16 hex decimal number, return type is CV_8U

Python prototype (for reference only):

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

blockMeanHash(inputArr, opts)

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

Computes block mean hash of the input image

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

    input image want to compute hash value, type should be CV_8UC4, CV_8UC3 or CV_8UC1.

Keyword Arguments
  • mode: int.

    the mode

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

    Hash value of input, it will contain 16 hex decimal number, return type is CV_8U

Python prototype (for reference only):

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

colorMomentHash(inputArr)

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

Computes color moment hash of the input, the algorithm is come from the paper "Perceptual Hashing for Color Images Using Invariant Moments"

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

    input image want to compute hash value, type should be CV_8UC4, CV_8UC3 or CV_8UC1.

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

    42 hash values with type CV_64F(double)

Python prototype (for reference only):

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

colorMomentHash(inputArr, opts)

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

Computes color moment hash of the input, the algorithm is come from the paper "Perceptual Hashing for Color Images Using Invariant Moments"

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

    input image want to compute hash value, type should be CV_8UC4, CV_8UC3 or CV_8UC1.

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

    42 hash values with type CV_64F(double)

Python prototype (for reference only):

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

marrHildrethHash(inputArr)

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

Computes average hash value of the input image

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

    input image want to compute hash value, type should be CV_8UC4, CV_8UC3, CV_8UC1.

Keyword Arguments
  • alpha: float.

    int scale factor for marr wavelet (default=2).

  • scale: float.

    int level of scale factor (default = 1)

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

    Hash value of input, it will contain 16 hex decimal number, return type is CV_8U

Python prototype (for reference only):

marrHildrethHash(inputArr[, outputArr[, alpha[, scale]]]) -> outputArr
Link to this function

marrHildrethHash(inputArr, opts)

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

Computes average hash value of the input image

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

    input image want to compute hash value, type should be CV_8UC4, CV_8UC3, CV_8UC1.

Keyword Arguments
  • alpha: float.

    int scale factor for marr wavelet (default=2).

  • scale: float.

    int level of scale factor (default = 1)

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

    Hash value of input, it will contain 16 hex decimal number, return type is CV_8U

Python prototype (for reference only):

marrHildrethHash(inputArr[, outputArr[, alpha[, scale]]]) -> outputArr
@spec pHash(Evision.Mat.maybe_mat_in()) :: Evision.Mat.t() | {:error, String.t()}

Computes pHash value of the input image

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

    input image want to compute hash value, type should be CV_8UC4, CV_8UC3, CV_8UC1.

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

    Hash value of input, it will contain 8 uchar value

Python prototype (for reference only):

pHash(inputArr[, outputArr]) -> outputArr
@spec pHash(Evision.Mat.maybe_mat_in(), [{atom(), term()}, ...] | nil) ::
  Evision.Mat.t() | {:error, String.t()}

Computes pHash value of the input image

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

    input image want to compute hash value, type should be CV_8UC4, CV_8UC3, CV_8UC1.

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

    Hash value of input, it will contain 8 uchar value

Python prototype (for reference only):

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

radialVarianceHash(inputArr)

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

Computes radial variance hash of the input image

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

    input image want to compute hash value, type should be CV_8UC4, CV_8UC3, CV_8UC1.

Keyword Arguments
  • sigma: double.

    Gaussian kernel standard deviation

  • numOfAngleLine: int.

    The number of angles to consider

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

    Hash value of input

Python prototype (for reference only):

radialVarianceHash(inputArr[, outputArr[, sigma[, numOfAngleLine]]]) -> outputArr
Link to this function

radialVarianceHash(inputArr, opts)

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

Computes radial variance hash of the input image

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

    input image want to compute hash value, type should be CV_8UC4, CV_8UC3, CV_8UC1.

Keyword Arguments
  • sigma: double.

    Gaussian kernel standard deviation

  • numOfAngleLine: int.

    The number of angles to consider

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

    Hash value of input

Python prototype (for reference only):

radialVarianceHash(inputArr[, outputArr[, sigma[, numOfAngleLine]]]) -> outputArr