View Source Evision.Flann.Index (Evision v0.1.21)

Link to this section Summary

Types

t()

Type that represents an Evision.Flann.Index struct.

Link to this section Types

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

Type that represents an Evision.Flann.Index struct.

  • ref. reference()

    The underlying erlang resource variable.

Link to this section Functions

Link to this function

build(self, features, params)

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

build

Positional Arguments
  • self: Evision.Flann.Index.t()
  • features: Evision.Mat
  • params: IndexParams
Keyword Arguments
  • distType: cvflann_flann_distance_t.

Python prototype (for reference only):

build(features, params[, distType]) -> None
Link to this function

build(self, features, params, opts)

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

build

Positional Arguments
  • self: Evision.Flann.Index.t()
  • features: Evision.Mat
  • params: IndexParams
Keyword Arguments
  • distType: cvflann_flann_distance_t.

Python prototype (for reference only):

build(features, params[, distType]) -> None
@spec getAlgorithm(t()) :: integer() | {:error, String.t()}

getAlgorithm

Positional Arguments
  • self: Evision.Flann.Index.t()
Return
  • retval: cvflann::flann_algorithm_t

Python prototype (for reference only):

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

getDistance

Positional Arguments
  • self: Evision.Flann.Index.t()
Return
  • retval: cvflann::flann_distance_t

Python prototype (for reference only):

getDistance() -> retval
@spec index() :: t() | {:error, String.t()}

Index

Return

Python prototype (for reference only):

Index() -> <flann_Index object>
@spec index(Evision.Mat.maybe_mat_in(), map()) :: t() | {:error, String.t()}

Index

Positional Arguments
Keyword Arguments
  • distType: cvflann_flann_distance_t.
Return

Python prototype (for reference only):

Index(features, params[, distType]) -> <flann_Index object>
Link to this function

index(features, params, opts)

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

Index

Positional Arguments
Keyword Arguments
  • distType: cvflann_flann_distance_t.
Return

Python prototype (for reference only):

Index(features, params[, distType]) -> <flann_Index object>
Link to this function

knnSearch(self, query, knn)

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

knnSearch

Positional Arguments
  • self: Evision.Flann.Index.t()
  • query: Evision.Mat
  • knn: int
Keyword Arguments
  • params: SearchParams.
Return

Python prototype (for reference only):

knnSearch(query, knn[, indices[, dists[, params]]]) -> indices, dists
Link to this function

knnSearch(self, query, knn, opts)

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

knnSearch

Positional Arguments
  • self: Evision.Flann.Index.t()
  • query: Evision.Mat
  • knn: int
Keyword Arguments
  • params: SearchParams.
Return

Python prototype (for reference only):

knnSearch(query, knn[, indices[, dists[, params]]]) -> indices, dists
Link to this function

load(self, features, filename)

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

load

Positional Arguments
Return
  • retval: bool

Python prototype (for reference only):

load(features, filename) -> retval
Link to this function

radiusSearch(self, query, radius, maxResults)

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

radiusSearch

Positional Arguments
  • self: Evision.Flann.Index.t()
  • query: Evision.Mat
  • radius: double
  • maxResults: int
Keyword Arguments
  • params: SearchParams.
Return

Python prototype (for reference only):

radiusSearch(query, radius, maxResults[, indices[, dists[, params]]]) -> retval, indices, dists
Link to this function

radiusSearch(self, query, radius, maxResults, opts)

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

radiusSearch

Positional Arguments
  • self: Evision.Flann.Index.t()
  • query: Evision.Mat
  • radius: double
  • maxResults: int
Keyword Arguments
  • params: SearchParams.
Return

Python prototype (for reference only):

radiusSearch(query, radius, maxResults[, indices[, dists[, params]]]) -> retval, indices, dists
@spec release(t()) :: :ok | {:error, String.t()}

release

Positional Arguments
  • self: Evision.Flann.Index.t()

Python prototype (for reference only):

release() -> None
@spec save(t(), binary()) :: :ok | {:error, String.t()}

save

Positional Arguments
  • self: Evision.Flann.Index.t()
  • filename: String

Python prototype (for reference only):

save(filename) -> None