View Source Evision.LineMod.Detector (Evision v0.2.9)

Summary

Types

t()

Type that represents an LineMod.Detector struct.

Types

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

Type that represents an LineMod.Detector struct.

  • ref. reference()

    The underlying erlang resource variable.

Functions

Link to this function

addSyntheticTemplate(named_args)

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

addSyntheticTemplate(self, templates, class_id)

View Source
@spec addSyntheticTemplate(t(), [Evision.LineMod.Template.t()], binary()) ::
  integer() | {:error, String.t()}

addSyntheticTemplate

Positional Arguments
  • self: Evision.LineMod.Detector.t()
  • templates: [Evision.LineMod.Template]
  • class_id: String
Return
  • retval: integer()

\brief Add a new object template computed by external means.

Python prototype (for reference only):

addSyntheticTemplate(templates, class_id) -> retval
@spec addTemplate(Keyword.t()) :: any() | {:error, String.t()}
Link to this function

addTemplate(self, sources, class_id, object_mask)

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

addTemplate

Positional Arguments
  • self: Evision.LineMod.Detector.t()
  • sources: [Evision.Mat]
  • class_id: String
  • object_mask: Evision.Mat
Return
  • retval: integer()
  • bounding_box: Rect*

\brief Add new object template. \param sources Source images, one for each modality. \param class_id Object class ID. \param object_mask Mask separating object from background. \param[out] bounding_box Optionally return bounding box of the extracted features. \return Template ID, or -1 if failed to extract a valid template.

Python prototype (for reference only):

addTemplate(sources, class_id, object_mask) -> retval, bounding_box
@spec classIds(Keyword.t()) :: any() | {:error, String.t()}
@spec classIds(t()) :: [binary()] | {:error, String.t()}

classIds

Positional Arguments
  • self: Evision.LineMod.Detector.t()
Return
  • retval: [String]

Python prototype (for reference only):

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

Detector

Return
  • self: Detector

\brief Empty constructor, initialize with read().

Python prototype (for reference only):

Detector() -> <linemod_Detector object>
@spec detector(Keyword.t()) :: any() | {:error, String.t()}
Link to this function

detector(modalities, t_pyramid)

View Source
@spec detector([Evision.LineMod.Ptr_Modality.t()], [integer()]) ::
  t() | {:error, String.t()}

Detector

Positional Arguments
  • modalities: [Ptr_Modality]
  • t_pyramid: [integer()]
Return
  • self: Detector

\brief Constructor. \param modalities Modalities to use (color gradients, depth normals, ...). \param T_pyramid Value of the sampling step T at each pyramid level. The

                     number of pyramid levels is T_pyramid.size().

Python prototype (for reference only):

Detector(modalities, T_pyramid) -> <linemod_Detector object>
Link to this function

getModalities(named_args)

View Source
@spec getModalities(Keyword.t()) :: any() | {:error, String.t()}
@spec getModalities(t()) :: [Evision.LineMod.Modality.t()] | {:error, String.t()}

getModalities

Positional Arguments
  • self: Evision.LineMod.Detector.t()
Return
  • retval: [Modality]

\brief Get the modalities used by this detector. You are not permitted to add/remove modalities, but you may dynamic_cast them to tweak parameters.

Python prototype (for reference only):

getModalities() -> retval
@spec getT(Keyword.t()) :: any() | {:error, String.t()}
Link to this function

getT(self, pyramid_level)

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

getT

Positional Arguments
  • self: Evision.LineMod.Detector.t()
  • pyramid_level: integer()
Return
  • retval: integer()

\brief Get sampling step T at pyramid_level.

Python prototype (for reference only):

getT(pyramid_level) -> retval
Link to this function

getTemplates(named_args)

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

getTemplates(self, class_id, template_id)

View Source
@spec getTemplates(t(), binary(), integer()) ::
  [Evision.LineMod.Template.t()] | {:error, String.t()}

getTemplates

Positional Arguments
  • self: Evision.LineMod.Detector.t()
  • class_id: String
  • template_id: integer()
Return
  • retval: [Evision.LineMod.Template]

\brief Get the template pyramid identified by template_id. For example, with 2 modalities (Gradient, Normal) and two pyramid levels (L0, L1), the order is (GradientL0, NormalL0, GradientL1, NormalL1).

Python prototype (for reference only):

getTemplates(class_id, template_id) -> retval
@spec match(Keyword.t()) :: any() | {:error, String.t()}
Link to this function

match(self, sources, threshold)

View Source
@spec match(t(), [Evision.Mat.maybe_mat_in()], number()) ::
  {[Evision.LineMod.Match.t()], [Evision.Mat.t()]} | {:error, String.t()}

match

Positional Arguments
  • self: Evision.LineMod.Detector.t()
  • sources: [Evision.Mat]
  • threshold: float
Keyword Arguments
  • class_ids: [String].
  • masks: [Evision.Mat].
Return
  • matches: [Match]
  • quantized_images: [Evision.Mat].

\brief Detect objects by template matching. Matches globally at the lowest pyramid level, then refines locally stepping up the pyramid. \param sources Source images, one for each modality. \param threshold Similarity threshold, a percentage between 0 and 100. \param[out] matches Template matches, sorted by similarity score. \param class_ids If non-empty, only search for the desired object classes. \param[out] quantized_images Optionally return vector<Mat> of quantized images. \param masks The masks for consideration during matching. The masks should be CV_8UC1

                   where 255 represents a valid pixel.  If non-empty, the vector must be
                   the same size as sources.  Each element must be
                   empty or the same size as its corresponding source.

Python prototype (for reference only):

match(sources, threshold[, class_ids[, quantized_images[, masks]]]) -> matches, quantized_images
Link to this function

match(self, sources, threshold, opts)

View Source
@spec match(
  t(),
  [Evision.Mat.maybe_mat_in()],
  number(),
  [class_ids: term(), masks: term()] | nil
) ::
  {[Evision.LineMod.Match.t()], [Evision.Mat.t()]} | {:error, String.t()}

match

Positional Arguments
  • self: Evision.LineMod.Detector.t()
  • sources: [Evision.Mat]
  • threshold: float
Keyword Arguments
  • class_ids: [String].
  • masks: [Evision.Mat].
Return
  • matches: [Match]
  • quantized_images: [Evision.Mat].

\brief Detect objects by template matching. Matches globally at the lowest pyramid level, then refines locally stepping up the pyramid. \param sources Source images, one for each modality. \param threshold Similarity threshold, a percentage between 0 and 100. \param[out] matches Template matches, sorted by similarity score. \param class_ids If non-empty, only search for the desired object classes. \param[out] quantized_images Optionally return vector<Mat> of quantized images. \param masks The masks for consideration during matching. The masks should be CV_8UC1

                   where 255 represents a valid pixel.  If non-empty, the vector must be
                   the same size as sources.  Each element must be
                   empty or the same size as its corresponding source.

Python prototype (for reference only):

match(sources, threshold[, class_ids[, quantized_images[, masks]]]) -> matches, quantized_images
@spec numClasses(Keyword.t()) :: any() | {:error, String.t()}
@spec numClasses(t()) :: integer() | {:error, String.t()}

numClasses

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

Python prototype (for reference only):

numClasses() -> retval
Link to this function

numTemplates(named_args)

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

numTemplates

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

Python prototype (for reference only):

numTemplates() -> retval
Link to this function

numTemplates(self, class_id)

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

numTemplates

Positional Arguments
  • self: Evision.LineMod.Detector.t()
  • class_id: String
Return
  • retval: integer()

Python prototype (for reference only):

numTemplates(class_id) -> retval
Link to this function

pyramidLevels(named_args)

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

pyramidLevels

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

\brief Get number of pyramid levels used by this detector.

Python prototype (for reference only):

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

read

Positional Arguments

Python prototype (for reference only):

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

readClasses(self, class_ids)

View Source
@spec readClasses(t(), [binary()]) :: t() | {:error, String.t()}

readClasses

Positional Arguments
  • self: Evision.LineMod.Detector.t()
  • class_ids: [String]
Keyword Arguments

Python prototype (for reference only):

readClasses(class_ids[, format]) -> None
Link to this function

readClasses(self, class_ids, opts)

View Source
@spec readClasses(t(), [binary()], [{:format, term()}] | nil) ::
  t() | {:error, String.t()}

readClasses

Positional Arguments
  • self: Evision.LineMod.Detector.t()
  • class_ids: [String]
Keyword Arguments

Python prototype (for reference only):

readClasses(class_ids[, format]) -> None
Link to this function

writeClasses(named_args)

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

writeClasses

Positional Arguments
  • self: Evision.LineMod.Detector.t()
Keyword Arguments

Python prototype (for reference only):

writeClasses([, format]) -> None
Link to this function

writeClasses(self, opts)

View Source
@spec writeClasses(t(), [{:format, term()}] | nil) :: t() | {:error, String.t()}

writeClasses

Positional Arguments
  • self: Evision.LineMod.Detector.t()
Keyword Arguments

Python prototype (for reference only):

writeClasses([, format]) -> None