View Source Evision.ImgHash.ImgHashBase (Evision v0.2.9)
Summary
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
Returns true if the Algorithm is empty (e.g. in the very beginning or after unsuccessful read
getDefaultName
Reads algorithm parameters from a file storage
save
Stores algorithm parameters in a file storage
write
Types
@type t() :: %Evision.ImgHash.ImgHashBase{ref: reference()}
Type that represents an ImgHash.ImgHashBase
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.ImgHashBase.t()
Python prototype (for reference only):
clear() -> None
@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.ImgHashBase.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(t(), Evision.Mat.maybe_mat_in()) :: Evision.Mat.t() | {:error, String.t()}
Computes hash of the input image
Positional Arguments
self:
Evision.ImgHash.ImgHashBase.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 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.ImgHashBase.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 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.ImgHashBase.t()
Return
- retval:
bool
Python prototype (for reference only):
empty() -> retval
@spec getDefaultName(Keyword.t()) :: any() | {:error, String.t()}
@spec getDefaultName(t()) :: binary() | {:error, String.t()}
getDefaultName
Positional Arguments
- self:
Evision.ImgHash.ImgHashBase.t()
Return
- retval:
String
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
@spec read(t(), Evision.FileNode.t()) :: t() | {:error, String.t()}
Reads algorithm parameters from a file storage
Positional Arguments
- self:
Evision.ImgHash.ImgHashBase.t()
- func:
Evision.FileNode
Python prototype (for reference only):
read(fn) -> None
save
Positional Arguments
- self:
Evision.ImgHash.ImgHashBase.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
@spec write(t(), Evision.FileStorage.t()) :: t() | {:error, String.t()}
Stores algorithm parameters in a file storage
Positional Arguments
- self:
Evision.ImgHash.ImgHashBase.t()
- fs:
Evision.FileStorage
Python prototype (for reference only):
write(fs) -> None
@spec write(t(), Evision.FileStorage.t(), binary()) :: t() | {:error, String.t()}
write
Positional Arguments
- self:
Evision.ImgHash.ImgHashBase.t()
- fs:
Evision.FileStorage
- name:
String
Has overloading in C++
Python prototype (for reference only):
write(fs, name) -> None