View Source Evision.RGBD.RgbdPlane (Evision v0.1.28)

Link to this section Summary

Types

t()

Type that represents an RGBD.RgbdPlane struct.

Functions

Variant 1:

apply

Clears the algorithm state

Returns true if the Algorithm is empty (e.g. in the very beginning or after unsuccessful read

getBlockSize

getDefaultName

getMethod

getMinSize

getSensorErrorA

getSensorErrorB

getSensorErrorC

getThreshold

Reads algorithm parameters from a file storage

setSensorErrorA

setSensorErrorB

setSensorErrorC

Stores algorithm parameters in a file storage

Link to this section Types

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

Type that represents an RGBD.RgbdPlane struct.

  • ref. reference()

    The underlying erlang resource variable.

Link to this section Functions

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

apply

Positional Arguments
  • self: Evision.RGBD.RgbdPlane.t()

  • points3d: Evision.Mat.t().

    the 3d points organized like the depth image: rows x cols with 3 channels

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

    An image where each pixel is labeled with the plane it belongs to and 255 if it does not belong to any plane

  • plane_coefficients: Evision.Mat.t().

    the coefficients of the corresponding planes (a,b,c,d) such that ax+by+cz+d=0

Find The planes in a depth image but without doing a normal check, which is faster but less accurate

Python prototype (for reference only):

apply(points3d[, mask[, plane_coefficients]]) -> mask, plane_coefficients
Link to this function

apply(self, points3d, opts)

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

Variant 1:

apply

Positional Arguments
  • self: Evision.RGBD.RgbdPlane.t()

  • points3d: Evision.Mat.t().

    the 3d points organized like the depth image: rows x cols with 3 channels

  • normals: Evision.Mat.t().

    the normals for every point in the depth image

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

    An image where each pixel is labeled with the plane it belongs to and 255 if it does not belong to any plane

  • plane_coefficients: Evision.Mat.t().

    the coefficients of the corresponding planes (a,b,c,d) such that ax+by+cz+d=0, norm(a,b,c)=1 and c < 0 (so that the normal points towards the camera)

Find The planes in a depth image

Python prototype (for reference only):

apply(points3d, normals[, mask[, plane_coefficients]]) -> mask, plane_coefficients

Variant 2:

apply

Positional Arguments
  • self: Evision.RGBD.RgbdPlane.t()

  • points3d: Evision.Mat.t().

    the 3d points organized like the depth image: rows x cols with 3 channels

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

    An image where each pixel is labeled with the plane it belongs to and 255 if it does not belong to any plane

  • plane_coefficients: Evision.Mat.t().

    the coefficients of the corresponding planes (a,b,c,d) such that ax+by+cz+d=0

Find The planes in a depth image but without doing a normal check, which is faster but less accurate

Python prototype (for reference only):

apply(points3d[, mask[, plane_coefficients]]) -> mask, plane_coefficients
Link to this function

apply(self, points3d, normals, opts)

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

apply

Positional Arguments
  • self: Evision.RGBD.RgbdPlane.t()

  • points3d: Evision.Mat.t().

    the 3d points organized like the depth image: rows x cols with 3 channels

  • normals: Evision.Mat.t().

    the normals for every point in the depth image

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

    An image where each pixel is labeled with the plane it belongs to and 255 if it does not belong to any plane

  • plane_coefficients: Evision.Mat.t().

    the coefficients of the corresponding planes (a,b,c,d) such that ax+by+cz+d=0, norm(a,b,c)=1 and c < 0 (so that the normal points towards the camera)

Find The planes in a depth image

Python prototype (for reference only):

apply(points3d, normals[, mask[, plane_coefficients]]) -> mask, plane_coefficients
@spec clear(t()) :: t() | {:error, String.t()}

Clears the algorithm state

Positional Arguments
  • self: Evision.RGBD.RgbdPlane.t()

Python prototype (for reference only):

clear() -> None
Link to this function

create(method, block_size, min_size, threshold)

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

create

Positional Arguments
  • method: int.

    The method to use to compute the planes.

  • block_size: int.

    The size of the blocks to look at for a stable MSE

  • min_size: int.

    The minimum size of a cluster to be considered a plane

  • threshold: double.

    The maximum distance of a point from a plane to belong to it (in meters)

Keyword Arguments
  • sensor_error_a: double.

    coefficient of the sensor error. 0 by default, 0.0075 for a Kinect

  • sensor_error_b: double.

    coefficient of the sensor error. 0 by default

  • sensor_error_c: double.

    coefficient of the sensor error. 0 by default

Return
  • retval: RgbdPlane

Constructor

Python prototype (for reference only):

create(method, block_size, min_size, threshold[, sensor_error_a[, sensor_error_b[, sensor_error_c]]]) -> retval
Link to this function

create(method, block_size, min_size, threshold, opts)

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

create

Positional Arguments
  • method: int.

    The method to use to compute the planes.

  • block_size: int.

    The size of the blocks to look at for a stable MSE

  • min_size: int.

    The minimum size of a cluster to be considered a plane

  • threshold: double.

    The maximum distance of a point from a plane to belong to it (in meters)

Keyword Arguments
  • sensor_error_a: double.

    coefficient of the sensor error. 0 by default, 0.0075 for a Kinect

  • sensor_error_b: double.

    coefficient of the sensor error. 0 by default

  • sensor_error_c: double.

    coefficient of the sensor error. 0 by default

Return
  • retval: RgbdPlane

Constructor

Python prototype (for reference only):

create(method, block_size, min_size, threshold[, sensor_error_a[, sensor_error_b[, sensor_error_c]]]) -> retval
@spec empty(t()) :: boolean() | {:error, String.t()}

Returns true if the Algorithm is empty (e.g. in the very beginning or after unsuccessful read

Positional Arguments
  • self: Evision.RGBD.RgbdPlane.t()
Return
  • retval: bool

Python prototype (for reference only):

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

getBlockSize

Positional Arguments
  • self: Evision.RGBD.RgbdPlane.t()
Return
  • retval: int

Python prototype (for reference only):

getBlockSize() -> retval
@spec getDefaultName(t()) :: binary() | {:error, String.t()}

getDefaultName

Positional Arguments
  • self: Evision.RGBD.RgbdPlane.t()
Return

Returns the algorithm string identifier. This string is used as top level xml/yml node tag when the object is saved to a file or string.

Python prototype (for reference only):

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

getMethod

Positional Arguments
  • self: Evision.RGBD.RgbdPlane.t()
Return
  • retval: int

Python prototype (for reference only):

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

getMinSize

Positional Arguments
  • self: Evision.RGBD.RgbdPlane.t()
Return
  • retval: int

Python prototype (for reference only):

getMinSize() -> retval
@spec getSensorErrorA(t()) :: number() | {:error, String.t()}

getSensorErrorA

Positional Arguments
  • self: Evision.RGBD.RgbdPlane.t()
Return
  • retval: double

Python prototype (for reference only):

getSensorErrorA() -> retval
@spec getSensorErrorB(t()) :: number() | {:error, String.t()}

getSensorErrorB

Positional Arguments
  • self: Evision.RGBD.RgbdPlane.t()
Return
  • retval: double

Python prototype (for reference only):

getSensorErrorB() -> retval
@spec getSensorErrorC(t()) :: number() | {:error, String.t()}

getSensorErrorC

Positional Arguments
  • self: Evision.RGBD.RgbdPlane.t()
Return
  • retval: double

Python prototype (for reference only):

getSensorErrorC() -> retval
@spec getThreshold(t()) :: number() | {:error, String.t()}

getThreshold

Positional Arguments
  • self: Evision.RGBD.RgbdPlane.t()
Return
  • retval: double

Python prototype (for reference only):

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

Reads algorithm parameters from a file storage

Positional Arguments
  • self: Evision.RGBD.RgbdPlane.t()
  • fn_: Evision.FileNode.t()

Python prototype (for reference only):

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

save

Positional Arguments
  • self: Evision.RGBD.RgbdPlane.t()
  • filename: String

Saves the algorithm to a file. In order to make this method work, the derived class must implement Algorithm::write(FileStorage& fs).

Python prototype (for reference only):

save(filename) -> None
@spec setBlockSize(t(), integer()) :: t() | {:error, String.t()}

setBlockSize

Positional Arguments
  • self: Evision.RGBD.RgbdPlane.t()
  • val: int

Python prototype (for reference only):

setBlockSize(val) -> None
@spec setMethod(t(), integer()) :: t() | {:error, String.t()}

setMethod

Positional Arguments
  • self: Evision.RGBD.RgbdPlane.t()
  • val: int

Python prototype (for reference only):

setMethod(val) -> None
@spec setMinSize(t(), integer()) :: t() | {:error, String.t()}

setMinSize

Positional Arguments
  • self: Evision.RGBD.RgbdPlane.t()
  • val: int

Python prototype (for reference only):

setMinSize(val) -> None
Link to this function

setSensorErrorA(self, val)

View Source
@spec setSensorErrorA(t(), number()) :: t() | {:error, String.t()}

setSensorErrorA

Positional Arguments
  • self: Evision.RGBD.RgbdPlane.t()
  • val: double

Python prototype (for reference only):

setSensorErrorA(val) -> None
Link to this function

setSensorErrorB(self, val)

View Source
@spec setSensorErrorB(t(), number()) :: t() | {:error, String.t()}

setSensorErrorB

Positional Arguments
  • self: Evision.RGBD.RgbdPlane.t()
  • val: double

Python prototype (for reference only):

setSensorErrorB(val) -> None
Link to this function

setSensorErrorC(self, val)

View Source
@spec setSensorErrorC(t(), number()) :: t() | {:error, String.t()}

setSensorErrorC

Positional Arguments
  • self: Evision.RGBD.RgbdPlane.t()
  • val: double

Python prototype (for reference only):

setSensorErrorC(val) -> None
@spec setThreshold(t(), number()) :: t() | {:error, String.t()}

setThreshold

Positional Arguments
  • self: Evision.RGBD.RgbdPlane.t()
  • val: double

Python prototype (for reference only):

setThreshold(val) -> None
@spec write(t(), Evision.FileStorage.t()) :: t() | {:error, String.t()}

Stores algorithm parameters in a file storage

Positional Arguments
  • self: Evision.RGBD.RgbdPlane.t()
  • fs: Evision.FileStorage.t()

Python prototype (for reference only):

write(fs) -> None
@spec write(t(), Evision.FileStorage.t(), binary()) :: t() | {:error, String.t()}

write

Positional Arguments
  • self: Evision.RGBD.RgbdPlane.t()
  • fs: Evision.FileStorage.t()
  • name: String

Has overloading in C++

Python prototype (for reference only):

write(fs, name) -> None