View Source Evision.ColoredKinFu.ColoredKinFu (Evision v0.2.9)

Summary

Types

t()

Type that represents an ColoredKinFu.ColoredKinFu struct.

Functions

Gets points, normals and colors of current 3d mesh

Gets points, normals and colors of current 3d mesh

Calculates normals for given points

Calculates normals for given points

Gets points of current 3d mesh

Gets points of current 3d mesh

Renders a volume into an image

Variant 1:

Renders a volume into an image

Renders a volume into an image

Resets the algorithm

Process next depth frame

Types

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

Type that represents an ColoredKinFu.ColoredKinFu struct.

  • ref. reference()

    The underlying erlang resource variable.

Functions

@spec create(Keyword.t()) :: any() | {:error, String.t()}
@spec create(Evision.ColoredKinFu.Params.t()) ::
  Evision.ColoredKinFu.t() | {:error, String.t()}

create

Positional Arguments
  • params: Params
Return
  • retval: Evision.ColoredKinFu.t()

Python prototype (for reference only):

create(_params) -> retval
@spec getCloud(Keyword.t()) :: any() | {:error, String.t()}
@spec getCloud(Evision.ColoredKinFu.t()) ::
  {Evision.Mat.t(), Evision.Mat.t(), Evision.Mat.t()} | {:error, String.t()}

Gets points, normals and colors of current 3d mesh

Positional Arguments
  • self: Evision.ColoredKinFu.ColoredKinFu.t()
Return
  • points: Evision.Mat.t().

    vector of points which are 4-float vectors

  • normals: Evision.Mat.t().

    vector of normals which are 4-float vectors

  • colors: Evision.Mat.t().

    vector of colors which are 4-float vectors

The order of normals corresponds to order of points. The order of points is undefined.

Python prototype (for reference only):

getCloud([, points[, normals[, colors]]]) -> points, normals, colors
@spec getCloud(Evision.ColoredKinFu.t(), [{atom(), term()}, ...] | nil) ::
  {Evision.Mat.t(), Evision.Mat.t(), Evision.Mat.t()} | {:error, String.t()}

Gets points, normals and colors of current 3d mesh

Positional Arguments
  • self: Evision.ColoredKinFu.ColoredKinFu.t()
Return
  • points: Evision.Mat.t().

    vector of points which are 4-float vectors

  • normals: Evision.Mat.t().

    vector of normals which are 4-float vectors

  • colors: Evision.Mat.t().

    vector of colors which are 4-float vectors

The order of normals corresponds to order of points. The order of points is undefined.

Python prototype (for reference only):

getCloud([, points[, normals[, colors]]]) -> points, normals, colors
@spec getNormals(Keyword.t()) :: any() | {:error, String.t()}
Link to this function

getNormals(self, points)

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

Calculates normals for given points

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

  • points: Evision.Mat.

    input vector of points which are 4-float vectors

Return
  • normals: Evision.Mat.t().

    output vector of corresponding normals which are 4-float vectors

Python prototype (for reference only):

getNormals(points[, normals]) -> normals
Link to this function

getNormals(self, points, opts)

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

Calculates normals for given points

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

  • points: Evision.Mat.

    input vector of points which are 4-float vectors

Return
  • normals: Evision.Mat.t().

    output vector of corresponding normals which are 4-float vectors

Python prototype (for reference only):

getNormals(points[, normals]) -> normals
@spec getPoints(Keyword.t()) :: any() | {:error, String.t()}
@spec getPoints(Evision.ColoredKinFu.t()) :: Evision.Mat.t() | {:error, String.t()}

Gets points of current 3d mesh

Positional Arguments
  • self: Evision.ColoredKinFu.ColoredKinFu.t()
Return
  • points: Evision.Mat.t().

    vector of points which are 4-float vectors

The order of points is undefined.

Python prototype (for reference only):

getPoints([, points]) -> points
@spec getPoints(Evision.ColoredKinFu.t(), [{atom(), term()}, ...] | nil) ::
  Evision.Mat.t() | {:error, String.t()}

Gets points of current 3d mesh

Positional Arguments
  • self: Evision.ColoredKinFu.ColoredKinFu.t()
Return
  • points: Evision.Mat.t().

    vector of points which are 4-float vectors

The order of points is undefined.

Python prototype (for reference only):

getPoints([, points]) -> points
@spec render(Keyword.t()) :: any() | {:error, String.t()}
@spec render(Evision.ColoredKinFu.t()) :: Evision.Mat.t() | {:error, String.t()}

Renders a volume into an image

Positional Arguments
  • self: Evision.ColoredKinFu.ColoredKinFu.t()
Return
  • image: Evision.Mat.t().

    resulting image

Renders a 0-surface of TSDF using Phong shading into a CV_8UC4 Mat. Light pose is fixed in KinFu params.

Python prototype (for reference only):

render([, image]) -> image
@spec render(Evision.ColoredKinFu.t(), [{atom(), term()}, ...] | nil) ::
  Evision.Mat.t() | {:error, String.t()}
@spec render(Evision.ColoredKinFu.t(), Evision.Mat.t()) ::
  Evision.Mat.t() | {:error, String.t()}

Variant 1:

Renders a volume into an image

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

  • cameraPose: Evision.Mat.

    pose of camera to render from. If empty then render from current pose which is a last frame camera pose.

Return
  • image: Evision.Mat.t().

    resulting image

Renders a 0-surface of TSDF using Phong shading into a CV_8UC4 Mat. Light pose is fixed in KinFu params.

Python prototype (for reference only):

render(cameraPose[, image]) -> image

Variant 2:

Renders a volume into an image

Positional Arguments
  • self: Evision.ColoredKinFu.ColoredKinFu.t()
Return
  • image: Evision.Mat.t().

    resulting image

Renders a 0-surface of TSDF using Phong shading into a CV_8UC4 Mat. Light pose is fixed in KinFu params.

Python prototype (for reference only):

render([, image]) -> image
Link to this function

render(self, cameraPose, opts)

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

Renders a volume into an image

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

  • cameraPose: Evision.Mat.

    pose of camera to render from. If empty then render from current pose which is a last frame camera pose.

Return
  • image: Evision.Mat.t().

    resulting image

Renders a 0-surface of TSDF using Phong shading into a CV_8UC4 Mat. Light pose is fixed in KinFu params.

Python prototype (for reference only):

render(cameraPose[, image]) -> image
@spec reset(Keyword.t()) :: any() | {:error, String.t()}
@spec reset(Evision.ColoredKinFu.t()) ::
  Evision.ColoredKinFu.t() | {:error, String.t()}

Resets the algorithm

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

Clears current model and resets a pose.

Python prototype (for reference only):

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

update(self, depth, rgb)

View Source

Process next depth frame

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

  • depth: Evision.Mat.

    input Mat of depth frame

  • rgb: Evision.Mat.

    input Mat of rgb (colored) frame

Return
  • retval: bool

@return true if succeeded to align new frame with current scene, false if opposite

Python prototype (for reference only):

update(depth, rgb) -> retval