View Source Evision.DISK (Evision v1.0.0-rc.0)

Summary

Types

t()

Type that represents an DISK struct.

Types

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

Type that represents an DISK 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.DISK.t()

Python prototype (for reference only):

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

compute(self, images, keypoints)

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

Variant 1:

compute

Positional Arguments
  • self: Evision.DISK.t()

  • images: [Evision.Mat].

    Image set.

Return
  • keypoints: [[Evision.KeyPoint]].

    Input collection of keypoints. Keypoints for which a descriptor cannot be computed are removed. Sometimes new keypoints can be added, for example: SIFT duplicates keypoint with several dominant orientations (for each orientation).

  • descriptors: [Evision.Mat].

    Computed descriptors. In the second variant of the method descriptors[i] are descriptors computed for a keypoints[i]. Row j is the keypoints (or keypoints[i]) is the descriptor for keypoint j-th keypoint.

Has overloading in C++

Python prototype (for reference only):

compute(images, keypoints[, descriptors]) -> keypoints, descriptors

Variant 2:

Computes the descriptors for a set of keypoints detected in an image (first variant) or image set (second variant).

Positional Arguments
Return
  • keypoints: [Evision.KeyPoint].

    Input collection of keypoints. Keypoints for which a descriptor cannot be computed are removed. Sometimes new keypoints can be added, for example: SIFT duplicates keypoint with several dominant orientations (for each orientation).

  • descriptors: Evision.Mat.t().

    Computed descriptors. In the second variant of the method descriptors[i] are descriptors computed for a keypoints[i]. Row j is the keypoints (or keypoints[i]) is the descriptor for keypoint j-th keypoint.

Python prototype (for reference only):

compute(image, keypoints[, descriptors]) -> keypoints, descriptors
Link to this function

compute(self, images, keypoints, opts)

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

Variant 1:

compute

Positional Arguments
  • self: Evision.DISK.t()

  • images: [Evision.Mat].

    Image set.

Return
  • keypoints: [[Evision.KeyPoint]].

    Input collection of keypoints. Keypoints for which a descriptor cannot be computed are removed. Sometimes new keypoints can be added, for example: SIFT duplicates keypoint with several dominant orientations (for each orientation).

  • descriptors: [Evision.Mat].

    Computed descriptors. In the second variant of the method descriptors[i] are descriptors computed for a keypoints[i]. Row j is the keypoints (or keypoints[i]) is the descriptor for keypoint j-th keypoint.

Has overloading in C++

Python prototype (for reference only):

compute(images, keypoints[, descriptors]) -> keypoints, descriptors

Variant 2:

Computes the descriptors for a set of keypoints detected in an image (first variant) or image set (second variant).

Positional Arguments
Return
  • keypoints: [Evision.KeyPoint].

    Input collection of keypoints. Keypoints for which a descriptor cannot be computed are removed. Sometimes new keypoints can be added, for example: SIFT duplicates keypoint with several dominant orientations (for each orientation).

  • descriptors: Evision.Mat.t().

    Computed descriptors. In the second variant of the method descriptors[i] are descriptors computed for a keypoints[i]. Row j is the keypoints (or keypoints[i]) is the descriptor for keypoint j-th keypoint.

Python prototype (for reference only):

compute(image, keypoints[, descriptors]) -> keypoints, descriptors
@spec create(Keyword.t()) :: any() | {:error, String.t()}
@spec create(binary()) :: t() | {:error, String.t()}

Creates a DISK detector.

Positional Arguments
  • modelPath: String.

    Path to the DISK ONNX model.

Keyword Arguments
  • maxKeypoints: integer().

    Maximum number of keypoints to return per image. The strongest responses (by network score) are kept; -1 keeps all detections.

  • scoreThreshold: float.

    Discard keypoints with network score strictly below this value.

  • imageSize: Size.

    Target input size (width, height) fed to the network. Use Size() (the default) to fall back to the network's expected fixed input shape of 1024x1024. When overriding, both dimensions must be positive multiples of 16, since DISK downsamples by a factor of 16.

  • backendId: integer().

    DNN backend identifier (see cv::dnn::Backend); 0 = DNN_BACKEND_DEFAULT.

  • targetId: integer().

    DNN target identifier (see cv::dnn::Target); 0 = DNN_TARGET_CPU.

Return
  • retval: Evision.DISK.t()

Python prototype (for reference only):

create(modelPath[, maxKeypoints[, scoreThreshold[, imageSize[, backendId[, targetId]]]]]) -> retval
@spec create(
  binary(),
  [
    backendId: term(),
    imageSize: term(),
    maxKeypoints: term(),
    scoreThreshold: term(),
    targetId: term()
  ]
  | nil
) :: t() | {:error, String.t()}

Creates a DISK detector.

Positional Arguments
  • modelPath: String.

    Path to the DISK ONNX model.

Keyword Arguments
  • maxKeypoints: integer().

    Maximum number of keypoints to return per image. The strongest responses (by network score) are kept; -1 keeps all detections.

  • scoreThreshold: float.

    Discard keypoints with network score strictly below this value.

  • imageSize: Size.

    Target input size (width, height) fed to the network. Use Size() (the default) to fall back to the network's expected fixed input shape of 1024x1024. When overriding, both dimensions must be positive multiples of 16, since DISK downsamples by a factor of 16.

  • backendId: integer().

    DNN backend identifier (see cv::dnn::Backend); 0 = DNN_BACKEND_DEFAULT.

  • targetId: integer().

    DNN target identifier (see cv::dnn::Target); 0 = DNN_TARGET_CPU.

Return
  • retval: Evision.DISK.t()

Python prototype (for reference only):

create(modelPath[, maxKeypoints[, scoreThreshold[, imageSize[, backendId[, targetId]]]]]) -> retval
Link to this function

createFromMemory(named_args)

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

Creates a DISK detector from an in-memory model buffer.

Positional Arguments
  • bufferModel: [uchar].

    A buffer containing the contents of the DISK ONNX model.

Keyword Arguments
  • maxKeypoints: integer().

    Maximum number of keypoints to return per image. The strongest responses (by network score) are kept; -1 keeps all detections.

  • scoreThreshold: float.

    Discard keypoints with network score strictly below this value.

  • imageSize: Size.

    Target input size (width, height) fed to the network. Use Size() (the default) to fall back to the network's expected fixed input shape of 1024x1024. When overriding, both dimensions must be positive multiples of 16, since DISK downsamples by a factor of 16.

  • backendId: integer().

    DNN backend identifier (see cv::dnn::Backend); 0 = DNN_BACKEND_DEFAULT.

  • targetId: integer().

    DNN target identifier (see cv::dnn::Target); 0 = DNN_TARGET_CPU.

Return
  • retval: Evision.DISK.t()

This overload loads the DISK ONNX model from a buffer instead of a file on disk. It is intended for cases where the model is read from application resources (for example Android assets) and is not available as a path on the filesystem.

Note: In C++ this is an overload of @ref create. The Python/Java/Objective-C bindings expose it as createFromMemory, because Objective-C selectors are not disambiguated by argument type and would otherwise clash with the file-path @ref create.

Python prototype (for reference only):

createFromMemory(bufferModel[, maxKeypoints[, scoreThreshold[, imageSize[, backendId[, targetId]]]]]) -> retval
Link to this function

createFromMemory(bufferModel, opts)

View Source
@spec createFromMemory(
  binary(),
  [
    backendId: term(),
    imageSize: term(),
    maxKeypoints: term(),
    scoreThreshold: term(),
    targetId: term()
  ]
  | nil
) :: t() | {:error, String.t()}

Creates a DISK detector from an in-memory model buffer.

Positional Arguments
  • bufferModel: [uchar].

    A buffer containing the contents of the DISK ONNX model.

Keyword Arguments
  • maxKeypoints: integer().

    Maximum number of keypoints to return per image. The strongest responses (by network score) are kept; -1 keeps all detections.

  • scoreThreshold: float.

    Discard keypoints with network score strictly below this value.

  • imageSize: Size.

    Target input size (width, height) fed to the network. Use Size() (the default) to fall back to the network's expected fixed input shape of 1024x1024. When overriding, both dimensions must be positive multiples of 16, since DISK downsamples by a factor of 16.

  • backendId: integer().

    DNN backend identifier (see cv::dnn::Backend); 0 = DNN_BACKEND_DEFAULT.

  • targetId: integer().

    DNN target identifier (see cv::dnn::Target); 0 = DNN_TARGET_CPU.

Return
  • retval: Evision.DISK.t()

This overload loads the DISK ONNX model from a buffer instead of a file on disk. It is intended for cases where the model is read from application resources (for example Android assets) and is not available as a path on the filesystem.

Note: In C++ this is an overload of @ref create. The Python/Java/Objective-C bindings expose it as createFromMemory, because Objective-C selectors are not disambiguated by argument type and would otherwise clash with the file-path @ref create.

Python prototype (for reference only):

createFromMemory(bufferModel[, maxKeypoints[, scoreThreshold[, imageSize[, backendId[, targetId]]]]]) -> retval
@spec defaultNorm(Keyword.t()) :: any() | {:error, String.t()}
@spec defaultNorm(t()) :: integer() | {:error, String.t()}

defaultNorm

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

Python prototype (for reference only):

defaultNorm() -> retval
Link to this function

descriptorSize(named_args)

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

descriptorSize

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

Python prototype (for reference only):

descriptorSize() -> retval
Link to this function

descriptorType(named_args)

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

descriptorType

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

Python prototype (for reference only):

descriptorType() -> retval
@spec detect(Keyword.t()) :: any() | {:error, String.t()}
@spec detect(t(), [Evision.Mat.maybe_mat_in()]) ::
  [[Evision.KeyPoint.t()]] | {:error, String.t()}
@spec detect(t(), Evision.Mat.maybe_mat_in()) ::
  [Evision.KeyPoint.t()] | {:error, String.t()}

Variant 1:

detect

Positional Arguments
  • self: Evision.DISK.t()

  • images: [Evision.Mat].

    Image set.

Keyword Arguments
  • masks: [Evision.Mat].

    Masks for each input image specifying where to look for keypoints (optional). masks[i] is a mask for images[i].

Return
  • keypoints: [[Evision.KeyPoint]].

    The detected keypoints. In the second variant of the method keypoints[i] is a set of keypoints detected in images[i] .

Has overloading in C++

Python prototype (for reference only):

detect(images[, masks]) -> keypoints

Variant 2:

Detects keypoints in an image (first variant) or image set (second variant).

Positional Arguments
Keyword Arguments
  • mask: Evision.Mat.

    Mask specifying where to look for keypoints (optional). It must be a 8-bit integer matrix with non-zero values in the region of interest.

Return
  • keypoints: [Evision.KeyPoint].

    The detected keypoints. In the second variant of the method keypoints[i] is a set of keypoints detected in images[i] .

Python prototype (for reference only):

detect(image[, mask]) -> keypoints
Link to this function

detect(self, images, opts)

View Source
@spec detect(t(), [Evision.Mat.maybe_mat_in()], [{:masks, term()}] | nil) ::
  [[Evision.KeyPoint.t()]] | {:error, String.t()}
@spec detect(t(), Evision.Mat.maybe_mat_in(), [{:mask, term()}] | nil) ::
  [Evision.KeyPoint.t()] | {:error, String.t()}

Variant 1:

detect

Positional Arguments
  • self: Evision.DISK.t()

  • images: [Evision.Mat].

    Image set.

Keyword Arguments
  • masks: [Evision.Mat].

    Masks for each input image specifying where to look for keypoints (optional). masks[i] is a mask for images[i].

Return
  • keypoints: [[Evision.KeyPoint]].

    The detected keypoints. In the second variant of the method keypoints[i] is a set of keypoints detected in images[i] .

Has overloading in C++

Python prototype (for reference only):

detect(images[, masks]) -> keypoints

Variant 2:

Detects keypoints in an image (first variant) or image set (second variant).

Positional Arguments
Keyword Arguments
  • mask: Evision.Mat.

    Mask specifying where to look for keypoints (optional). It must be a 8-bit integer matrix with non-zero values in the region of interest.

Return
  • keypoints: [Evision.KeyPoint].

    The detected keypoints. In the second variant of the method keypoints[i] is a set of keypoints detected in images[i] .

Python prototype (for reference only):

detect(image[, mask]) -> keypoints
Link to this function

detectAndCompute(named_args)

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

detectAndCompute(self, image, mask)

View Source
@spec detectAndCompute(t(), Evision.Mat.maybe_mat_in(), Evision.Mat.maybe_mat_in()) ::
  {[Evision.KeyPoint.t()], Evision.Mat.t()} | {:error, String.t()}

detectAndCompute

Positional Arguments
Keyword Arguments
  • useProvidedKeypoints: bool.
Return
  • keypoints: [Evision.KeyPoint]
  • descriptors: Evision.Mat.t().

Detects keypoints and computes the descriptors

Python prototype (for reference only):

detectAndCompute(image, mask[, descriptors[, useProvidedKeypoints]]) -> keypoints, descriptors
Link to this function

detectAndCompute(self, image, mask, opts)

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

detectAndCompute

Positional Arguments
Keyword Arguments
  • useProvidedKeypoints: bool.
Return
  • keypoints: [Evision.KeyPoint]
  • descriptors: Evision.Mat.t().

Detects keypoints and computes the descriptors

Python prototype (for reference only):

detectAndCompute(image, mask[, descriptors[, useProvidedKeypoints]]) -> keypoints, descriptors
@spec empty(Keyword.t()) :: any() | {:error, String.t()}
@spec empty(t()) :: boolean() | {:error, String.t()}

empty

Positional Arguments
  • self: Evision.DISK.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.DISK.t()
Return

Python prototype (for reference only):

getDefaultName() -> retval
Link to this function

getImageSize(named_args)

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

getImageSize

Positional Arguments
  • self: Evision.DISK.t()
Return
  • retval: Size

Python prototype (for reference only):

getImageSize() -> retval
Link to this function

getMaxKeypoints(named_args)

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

getMaxKeypoints

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

Python prototype (for reference only):

getMaxKeypoints() -> retval
Link to this function

getScoreThreshold(named_args)

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

getScoreThreshold

Positional Arguments
  • self: Evision.DISK.t()
Return
  • retval: float

Python prototype (for reference only):

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

Variant 1:

read

Positional Arguments

Python prototype (for reference only):

read(arg1) -> None

Variant 2:

read

Positional Arguments
  • self: Evision.DISK.t()
  • fileName: String

Python prototype (for reference only):

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

save

Positional Arguments
  • self: Evision.DISK.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

setImageSize(named_args)

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

setImageSize(self, size)

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

setImageSize

Positional Arguments
  • self: Evision.DISK.t()
  • size: Size

Python prototype (for reference only):

setImageSize(size) -> None
Link to this function

setMaxKeypoints(named_args)

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

setMaxKeypoints(self, maxKeypoints)

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

setMaxKeypoints

Positional Arguments
  • self: Evision.DISK.t()
  • maxKeypoints: integer()

Python prototype (for reference only):

setMaxKeypoints(maxKeypoints) -> None
Link to this function

setScoreThreshold(named_args)

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

setScoreThreshold(self, threshold)

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

setScoreThreshold

Positional Arguments
  • self: Evision.DISK.t()
  • threshold: float

Python prototype (for reference only):

setScoreThreshold(threshold) -> None
@spec write(Keyword.t()) :: any() | {:error, String.t()}
@spec write(t(), binary()) :: t() | {:error, String.t()}

write

Positional Arguments
  • self: Evision.DISK.t()
  • fileName: String

Python prototype (for reference only):

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

write

Positional Arguments

Python prototype (for reference only):

write(fs, name) -> None