View Source Evision.ORB (Evision v0.1.21)

Link to this section Summary

Types

t()

Type that represents an Evision.ORB struct.

Link to this section Types

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

Type that represents an Evision.ORB struct.

  • ref. reference()

    The underlying erlang resource variable.

Link to this section Functions

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.ORB.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.

    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.ORB.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.

    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() :: t() | {:error, String.t()}

The ORB constructor

Keyword Arguments
  • nfeatures: int.

    The maximum number of features to retain.

  • scaleFactor: float.

    Pyramid decimation ratio, greater than 1. scaleFactor==2 means the classical pyramid, where each next level has 4x less pixels than the previous, but such a big scale factor will degrade feature matching scores dramatically. On the other hand, too close to 1 scale factor will mean that to cover certain scale range you will need more pyramid levels and so the speed will suffer.

  • nlevels: int.

    The number of pyramid levels. The smallest level will have linear size equal to input_image_linear_size/pow(scaleFactor, nlevels - firstLevel).

  • edgeThreshold: int.

    This is size of the border where the features are not detected. It should roughly match the patchSize parameter.

  • firstLevel: int.

    The level of pyramid to put source image to. Previous layers are filled with upscaled source image.

  • wTA_K: int.

    The number of points that produce each element of the oriented BRIEF descriptor. The default value 2 means the BRIEF where we take a random point pair and compare their brightnesses, so we get 0/1 response. Other possible values are 3 and 4. For example, 3 means that we take 3 random points (of course, those point coordinates are random, but they are generated from the pre-defined seed, so each element of BRIEF descriptor is computed deterministically from the pixel rectangle), find point of maximum brightness and output index of the winner (0, 1 or 2). Such output will occupy 2 bits, and therefore it will need a special variant of Hamming distance, denoted as NORM_HAMMING2 (2 bits per bin). When WTA_K=4, we take 4 random points to compute each bin (that will also occupy 2 bits with possible values 0, 1, 2 or 3).

  • scoreType: ORB_ScoreType.

    The default HARRIS_SCORE means that Harris algorithm is used to rank features (the score is written to KeyPoint::score and is used to retain best nfeatures features); FAST_SCORE is alternative value of the parameter that produces slightly less stable keypoints, but it is a little faster to compute.

  • patchSize: int.

    size of the patch used by the oriented BRIEF descriptor. Of course, on smaller pyramid layers the perceived image area covered by a feature will be larger.

  • fastThreshold: int.

    the fast threshold

Return

Python prototype (for reference only):

create([, nfeatures[, scaleFactor[, nlevels[, edgeThreshold[, firstLevel[, WTA_K[, scoreType[, patchSize[, fastThreshold]]]]]]]]]) -> retval
@spec create([{atom(), term()}, ...] | nil) :: t() | {:error, String.t()}

The ORB constructor

Keyword Arguments
  • nfeatures: int.

    The maximum number of features to retain.

  • scaleFactor: float.

    Pyramid decimation ratio, greater than 1. scaleFactor==2 means the classical pyramid, where each next level has 4x less pixels than the previous, but such a big scale factor will degrade feature matching scores dramatically. On the other hand, too close to 1 scale factor will mean that to cover certain scale range you will need more pyramid levels and so the speed will suffer.

  • nlevels: int.

    The number of pyramid levels. The smallest level will have linear size equal to input_image_linear_size/pow(scaleFactor, nlevels - firstLevel).

  • edgeThreshold: int.

    This is size of the border where the features are not detected. It should roughly match the patchSize parameter.

  • firstLevel: int.

    The level of pyramid to put source image to. Previous layers are filled with upscaled source image.

  • wTA_K: int.

    The number of points that produce each element of the oriented BRIEF descriptor. The default value 2 means the BRIEF where we take a random point pair and compare their brightnesses, so we get 0/1 response. Other possible values are 3 and 4. For example, 3 means that we take 3 random points (of course, those point coordinates are random, but they are generated from the pre-defined seed, so each element of BRIEF descriptor is computed deterministically from the pixel rectangle), find point of maximum brightness and output index of the winner (0, 1 or 2). Such output will occupy 2 bits, and therefore it will need a special variant of Hamming distance, denoted as NORM_HAMMING2 (2 bits per bin). When WTA_K=4, we take 4 random points to compute each bin (that will also occupy 2 bits with possible values 0, 1, 2 or 3).

  • scoreType: ORB_ScoreType.

    The default HARRIS_SCORE means that Harris algorithm is used to rank features (the score is written to KeyPoint::score and is used to retain best nfeatures features); FAST_SCORE is alternative value of the parameter that produces slightly less stable keypoints, but it is a little faster to compute.

  • patchSize: int.

    size of the patch used by the oriented BRIEF descriptor. Of course, on smaller pyramid layers the perceived image area covered by a feature will be larger.

  • fastThreshold: int.

    the fast threshold

Return

Python prototype (for reference only):

create([, nfeatures[, scaleFactor[, nlevels[, edgeThreshold[, firstLevel[, WTA_K[, scoreType[, patchSize[, fastThreshold]]]]]]]]]) -> retval
@spec defaultNorm(t()) :: integer() | {:error, String.t()}

defaultNorm

Positional Arguments
  • self: Evision.ORB.t()
Return
  • retval: int

Python prototype (for reference only):

defaultNorm() -> retval
@spec descriptorSize(t()) :: integer() | {:error, String.t()}

descriptorSize

Positional Arguments
  • self: Evision.ORB.t()
Return
  • retval: int

Python prototype (for reference only):

descriptorSize() -> retval
@spec descriptorType(t()) :: integer() | {:error, String.t()}

descriptorType

Positional Arguments
  • self: Evision.ORB.t()
Return
  • retval: int

Python prototype (for reference only):

descriptorType() -> retval
@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.ORB.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()], [{atom(), term()}, ...] | nil) ::
  [[Evision.KeyPoint.t()]] | {:error, String.t()}
@spec detect(t(), Evision.Mat.maybe_mat_in(), [{atom(), term()}, ...] | nil) ::
  [Evision.KeyPoint.t()] | {:error, String.t()}

Variant 1:

detect

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

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

detectAndCompute

Positional Arguments
Keyword Arguments
  • useProvidedKeypoints: bool.
Return

Detects keypoints and computes the descriptors

Python prototype (for reference only):

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

empty

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

Python prototype (for reference only):

empty() -> retval
@spec getDefaultName(t()) :: binary() | {:error, String.t()}

getDefaultName

Positional Arguments
  • self: Evision.ORB.t()
Return

Python prototype (for reference only):

getDefaultName() -> retval
@spec getEdgeThreshold(t()) :: integer() | {:error, String.t()}

getEdgeThreshold

Positional Arguments
  • self: Evision.ORB.t()
Return
  • retval: int

Python prototype (for reference only):

getEdgeThreshold() -> retval
@spec getFastThreshold(t()) :: integer() | {:error, String.t()}

getFastThreshold

Positional Arguments
  • self: Evision.ORB.t()
Return
  • retval: int

Python prototype (for reference only):

getFastThreshold() -> retval
@spec getFirstLevel(t()) :: integer() | {:error, String.t()}

getFirstLevel

Positional Arguments
  • self: Evision.ORB.t()
Return
  • retval: int

Python prototype (for reference only):

getFirstLevel() -> retval
@spec getMaxFeatures(t()) :: integer() | {:error, String.t()}

getMaxFeatures

Positional Arguments
  • self: Evision.ORB.t()
Return
  • retval: int

Python prototype (for reference only):

getMaxFeatures() -> retval
@spec getNLevels(t()) :: integer() | {:error, String.t()}

getNLevels

Positional Arguments
  • self: Evision.ORB.t()
Return
  • retval: int

Python prototype (for reference only):

getNLevels() -> retval
@spec getPatchSize(t()) :: integer() | {:error, String.t()}

getPatchSize

Positional Arguments
  • self: Evision.ORB.t()
Return
  • retval: int

Python prototype (for reference only):

getPatchSize() -> retval
@spec getScaleFactor(t()) :: number() | {:error, String.t()}

getScaleFactor

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

Python prototype (for reference only):

getScaleFactor() -> retval
@spec getScoreType(t()) :: integer() | {:error, String.t()}

getScoreType

Positional Arguments
  • self: Evision.ORB.t()
Return
  • retval: ORB::ScoreType

Python prototype (for reference only):

getScoreType() -> retval
@spec getWTA_K(t()) :: integer() | {:error, String.t()}

getWTA_K

Positional Arguments
  • self: Evision.ORB.t()
Return
  • retval: int

Python prototype (for reference only):

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

Variant 1:

read

Positional Arguments

Python prototype (for reference only):

read(arg1) -> None

Variant 2:

read

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

Python prototype (for reference only):

read(fileName) -> None
Link to this function

setEdgeThreshold(self, edgeThreshold)

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

setEdgeThreshold

Positional Arguments
  • self: Evision.ORB.t()
  • edgeThreshold: int

Python prototype (for reference only):

setEdgeThreshold(edgeThreshold) -> None
Link to this function

setFastThreshold(self, fastThreshold)

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

setFastThreshold

Positional Arguments
  • self: Evision.ORB.t()
  • fastThreshold: int

Python prototype (for reference only):

setFastThreshold(fastThreshold) -> None
Link to this function

setFirstLevel(self, firstLevel)

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

setFirstLevel

Positional Arguments
  • self: Evision.ORB.t()
  • firstLevel: int

Python prototype (for reference only):

setFirstLevel(firstLevel) -> None
Link to this function

setMaxFeatures(self, maxFeatures)

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

setMaxFeatures

Positional Arguments
  • self: Evision.ORB.t()
  • maxFeatures: int

Python prototype (for reference only):

setMaxFeatures(maxFeatures) -> None
Link to this function

setNLevels(self, nlevels)

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

setNLevels

Positional Arguments
  • self: Evision.ORB.t()
  • nlevels: int

Python prototype (for reference only):

setNLevels(nlevels) -> None
Link to this function

setPatchSize(self, patchSize)

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

setPatchSize

Positional Arguments
  • self: Evision.ORB.t()
  • patchSize: int

Python prototype (for reference only):

setPatchSize(patchSize) -> None
Link to this function

setScaleFactor(self, scaleFactor)

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

setScaleFactor

Positional Arguments
  • self: Evision.ORB.t()
  • scaleFactor: double

Python prototype (for reference only):

setScaleFactor(scaleFactor) -> None
Link to this function

setScoreType(self, scoreType)

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

setScoreType

Positional Arguments
  • self: Evision.ORB.t()
  • scoreType: ORB_ScoreType

Python prototype (for reference only):

setScoreType(scoreType) -> None
@spec setWTA_K(t(), integer()) :: :ok | {:error, String.t()}

setWTA_K

Positional Arguments
  • self: Evision.ORB.t()
  • wta_k: int

Python prototype (for reference only):

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

Variant 1:

write

Positional Arguments
Keyword Arguments

Python prototype (for reference only):

write(fs[, name]) -> None

Variant 2:

write

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

Python prototype (for reference only):

write(fileName) -> None
@spec write(t(), Evision.FileStorage.t(), [{atom(), term()}, ...] | nil) ::
  :ok | {:error, String.t()}

write

Positional Arguments
Keyword Arguments

Python prototype (for reference only):

write(fs[, name]) -> None