View Source Evision.BOWImgDescriptorExtractor (Evision v0.2.9)

Summary

Types

t()

Type that represents an BOWImgDescriptorExtractor struct.

Functions

Returns an image descriptor size if the vocabulary is set. Otherwise, it returns 0.

Returns an image descriptor type.

Returns the set vocabulary.

Sets a visual vocabulary.

Types

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

Type that represents an BOWImgDescriptorExtractor struct.

  • ref. reference()

    The underlying erlang resource variable.

Functions

Link to this function

bowImgDescriptorExtractor(named_args)

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

bowImgDescriptorExtractor(dextractor, dmatcher)

View Source
@spec bowImgDescriptorExtractor(Evision.Feature2D.t(), Evision.DescriptorMatcher.t()) ::
  t() | {:error, String.t()}

The constructor.

Positional Arguments
  • dextractor: Evision.Feature2D.

    Descriptor extractor that is used to compute descriptors for an input image and its keypoints.

  • dmatcher: Evision.DescriptorMatcher.

    Descriptor matcher that is used to find the nearest word of the trained vocabulary for each keypoint descriptor of the image.

Return
  • self: Evision.BOWImgDescriptorExtractor.t()

Python prototype (for reference only):

BOWImgDescriptorExtractor(dextractor, dmatcher) -> <BOWImgDescriptorExtractor object>
@spec compute(Keyword.t()) :: any() | {:error, String.t()}
Link to this function

compute(self, image, keypoints)

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

compute

Positional Arguments
  • self: Evision.BOWImgDescriptorExtractor.t()
  • image: Evision.Mat
  • keypoints: [Evision.KeyPoint]
Return
  • imgDescriptor: Evision.Mat.t().

    Computed output image descriptor.

Has overloading in C++

Python prototype (for reference only):

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

compute(self, image, keypoints, opts)

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

compute

Positional Arguments
  • self: Evision.BOWImgDescriptorExtractor.t()
  • image: Evision.Mat
  • keypoints: [Evision.KeyPoint]
Return
  • imgDescriptor: Evision.Mat.t().

    Computed output image descriptor.

Has overloading in C++

Python prototype (for reference only):

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

descriptorSize(named_args)

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

Returns an image descriptor size if the vocabulary is set. Otherwise, it returns 0.

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

Returns an image descriptor type.

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

Python prototype (for reference only):

descriptorType() -> retval
Link to this function

getVocabulary(named_args)

View Source
@spec getVocabulary(Keyword.t()) :: any() | {:error, String.t()}
@spec getVocabulary(t()) :: Evision.Mat.t() | {:error, String.t()}

Returns the set vocabulary.

Positional Arguments
  • self: Evision.BOWImgDescriptorExtractor.t()
Return
  • retval: Evision.Mat.t()

Python prototype (for reference only):

getVocabulary() -> retval
Link to this function

setVocabulary(named_args)

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

setVocabulary(self, vocabulary)

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

Sets a visual vocabulary.

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

  • vocabulary: Evision.Mat.

    Vocabulary (can be trained using the inheritor of BOWTrainer ). Each row of the vocabulary is a visual word (cluster center).

Python prototype (for reference only):

setVocabulary(vocabulary) -> None