View Source Evision.LineMod.Detector (Evision v0.2.9)
Summary
Functions
addSyntheticTemplate
classIds
Detector
Detector
getModalities
getTemplates
numClasses
numTemplates
numTemplates
pyramidLevels
read
readClasses
readClasses
writeClasses
writeClasses
Types
@type t() :: %Evision.LineMod.Detector{ref: reference()}
Type that represents an LineMod.Detector
struct.
ref.
reference()
The underlying erlang resource variable.
Functions
@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( 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
Detector
Return
- self:
Detector
\brief Empty constructor, initialize with read().
Python prototype (for reference only):
Detector() -> <linemod_Detector object>
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>
@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
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
@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(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
@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
@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
numTemplates
Positional Arguments
- self:
Evision.LineMod.Detector.t()
- class_id:
String
Return
- retval:
integer()
Python prototype (for reference only):
numTemplates(class_id) -> retval
@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(t(), Evision.FileNode.t()) :: t() | {:error, String.t()}
read
Positional Arguments
- self:
Evision.LineMod.Detector.t()
- func:
Evision.FileNode
Python prototype (for reference only):
read(fn) -> None
readClasses
Positional Arguments
- self:
Evision.LineMod.Detector.t()
- class_ids:
[String]
Keyword Arguments
- format:
String
.
Python prototype (for reference only):
readClasses(class_ids[, format]) -> None
readClasses
Positional Arguments
- self:
Evision.LineMod.Detector.t()
- class_ids:
[String]
Keyword Arguments
- format:
String
.
Python prototype (for reference only):
readClasses(class_ids[, format]) -> None
@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
- format:
String
.
Python prototype (for reference only):
writeClasses([, format]) -> None
writeClasses
Positional Arguments
- self:
Evision.LineMod.Detector.t()
Keyword Arguments
- format:
String
.
Python prototype (for reference only):
writeClasses([, format]) -> None