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

Link to this section Summary

Types

t()

Type that represents an RGBD.Odometry struct.

Functions

Clears the algorithm state

DEFAULT_MAX_DEPTH

DEFAULT_MAX_DEPTH_DIFF

DEFAULT_MAX_POINTS_PART

DEFAULT_MAX_ROTATION

DEFAULT_MAX_TRANSLATION

DEFAULT_MIN_DEPTH

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

getCameraMatrix

getDefaultName

getTransformType

Reads algorithm parameters from a file storage

setCameraMatrix

setTransformType

Stores algorithm parameters in a file storage

Link to this section Types

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

Type that represents an RGBD.Odometry struct.

  • ref. reference()

    The underlying erlang resource variable.

Link to this section Functions

@spec clear(t()) :: t() | {:error, String.t()}

Clears the algorithm state

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

Python prototype (for reference only):

clear() -> None
Link to this function

compute2(self, srcFrame, dstFrame)

View Source
@spec compute2(t(), Evision.RGBD.OdometryFrame.t(), Evision.RGBD.OdometryFrame.t()) ::
  Evision.Mat.t() | false | {:error, String.t()}

compute2

Positional Arguments
  • self: Evision.RGBD.Odometry.t()
  • srcFrame: OdometryFrame
  • dstFrame: OdometryFrame
Keyword Arguments
  • initRt: Evision.Mat.t().
Return
  • retval: bool
  • rt: Evision.Mat.t().

One more method to compute a transformation from the source frame to the destination one. It is designed to save on computing the frame data (image pyramids, normals, etc.).

Python prototype (for reference only):

compute2(srcFrame, dstFrame[, Rt[, initRt]]) -> retval, Rt
Link to this function

compute2(self, srcFrame, dstFrame, opts)

View Source
@spec compute2(
  t(),
  Evision.RGBD.OdometryFrame.t(),
  Evision.RGBD.OdometryFrame.t(),
  [{atom(), term()}, ...] | nil
) :: Evision.Mat.t() | false | {:error, String.t()}

compute2

Positional Arguments
  • self: Evision.RGBD.Odometry.t()
  • srcFrame: OdometryFrame
  • dstFrame: OdometryFrame
Keyword Arguments
  • initRt: Evision.Mat.t().
Return
  • retval: bool
  • rt: Evision.Mat.t().

One more method to compute a transformation from the source frame to the destination one. It is designed to save on computing the frame data (image pyramids, normals, etc.).

Python prototype (for reference only):

compute2(srcFrame, dstFrame[, Rt[, initRt]]) -> retval, Rt
Link to this function

compute(self, srcImage, srcDepth, srcMask, dstImage, dstDepth, dstMask)

View Source

compute

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

  • srcImage: Evision.Mat.t().

    Image data of the source frame (CV_8UC1)

  • srcDepth: Evision.Mat.t().

    Depth data of the source frame (CV_32FC1, in meters)

  • srcMask: Evision.Mat.t().

    Mask that sets which pixels have to be used from the source frame (CV_8UC1)

  • dstImage: Evision.Mat.t().

    Image data of the destination frame (CV_8UC1)

  • dstDepth: Evision.Mat.t().

    Depth data of the destination frame (CV_32FC1, in meters)

  • dstMask: Evision.Mat.t().

    Mask that sets which pixels have to be used from the destination frame (CV_8UC1)

Keyword Arguments
  • initRt: Evision.Mat.t().

    Initial transformation from the source frame to the destination one (optional)

Return
  • retval: bool

  • rt: Evision.Mat.t().

    Resulting transformation from the source frame to the destination one (rigid body motion): dst_p = Rt * src_p, where dst_p is a homogeneous point in the destination frame and src_p is homogeneous point in the source frame, Rt is 4x4 matrix of CV_64FC1 type.

Method to compute a transformation from the source frame to the destination one. Some odometry algorithms do not used some data of frames (eg. ICP does not use images). In such case corresponding arguments can be set as empty Mat. The method returns true if all internal computations were possible (e.g. there were enough correspondences, system of equations has a solution, etc) and resulting transformation satisfies some test if it's provided by the Odometry inheritor implementation (e.g. thresholds for maximum translation and rotation).

Python prototype (for reference only):

compute(srcImage, srcDepth, srcMask, dstImage, dstDepth, dstMask[, Rt[, initRt]]) -> retval, Rt
Link to this function

compute(self, srcImage, srcDepth, srcMask, dstImage, dstDepth, dstMask, opts)

View Source

compute

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

  • srcImage: Evision.Mat.t().

    Image data of the source frame (CV_8UC1)

  • srcDepth: Evision.Mat.t().

    Depth data of the source frame (CV_32FC1, in meters)

  • srcMask: Evision.Mat.t().

    Mask that sets which pixels have to be used from the source frame (CV_8UC1)

  • dstImage: Evision.Mat.t().

    Image data of the destination frame (CV_8UC1)

  • dstDepth: Evision.Mat.t().

    Depth data of the destination frame (CV_32FC1, in meters)

  • dstMask: Evision.Mat.t().

    Mask that sets which pixels have to be used from the destination frame (CV_8UC1)

Keyword Arguments
  • initRt: Evision.Mat.t().

    Initial transformation from the source frame to the destination one (optional)

Return
  • retval: bool

  • rt: Evision.Mat.t().

    Resulting transformation from the source frame to the destination one (rigid body motion): dst_p = Rt * src_p, where dst_p is a homogeneous point in the destination frame and src_p is homogeneous point in the source frame, Rt is 4x4 matrix of CV_64FC1 type.

Method to compute a transformation from the source frame to the destination one. Some odometry algorithms do not used some data of frames (eg. ICP does not use images). In such case corresponding arguments can be set as empty Mat. The method returns true if all internal computations were possible (e.g. there were enough correspondences, system of equations has a solution, etc) and resulting transformation satisfies some test if it's provided by the Odometry inheritor implementation (e.g. thresholds for maximum translation and rotation).

Python prototype (for reference only):

compute(srcImage, srcDepth, srcMask, dstImage, dstDepth, dstMask[, Rt[, initRt]]) -> retval, Rt
@spec create(binary()) :: t() | {:error, String.t()}

create

Positional Arguments
Return
  • retval: Odometry

Python prototype (for reference only):

create(odometryType) -> retval
@spec default_max_depth(t()) :: number() | {:error, String.t()}

DEFAULT_MAX_DEPTH

Positional Arguments
  • self: Evision.RGBD.Odometry.t()
Return
  • retval: float

Python prototype (for reference only):

DEFAULT_MAX_DEPTH() -> retval
Link to this function

default_max_depth_diff(self)

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

DEFAULT_MAX_DEPTH_DIFF

Positional Arguments
  • self: Evision.RGBD.Odometry.t()
Return
  • retval: float

Python prototype (for reference only):

DEFAULT_MAX_DEPTH_DIFF() -> retval
Link to this function

default_max_points_part(self)

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

DEFAULT_MAX_POINTS_PART

Positional Arguments
  • self: Evision.RGBD.Odometry.t()
Return
  • retval: float

Python prototype (for reference only):

DEFAULT_MAX_POINTS_PART() -> retval
Link to this function

default_max_rotation(self)

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

DEFAULT_MAX_ROTATION

Positional Arguments
  • self: Evision.RGBD.Odometry.t()
Return
  • retval: float

Python prototype (for reference only):

DEFAULT_MAX_ROTATION() -> retval
Link to this function

default_max_translation(self)

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

DEFAULT_MAX_TRANSLATION

Positional Arguments
  • self: Evision.RGBD.Odometry.t()
Return
  • retval: float

Python prototype (for reference only):

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

DEFAULT_MIN_DEPTH

Positional Arguments
  • self: Evision.RGBD.Odometry.t()
Return
  • retval: float

Python prototype (for reference only):

DEFAULT_MIN_DEPTH() -> 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.Odometry.t()
Return
  • retval: bool

Python prototype (for reference only):

empty() -> retval
@spec getCameraMatrix(t()) :: Evision.Mat.t() | {:error, String.t()}

getCameraMatrix

Positional Arguments
  • self: Evision.RGBD.Odometry.t()
Return
  • retval: Evision.Mat.t()

@see setCameraMatrix/2

Python prototype (for reference only):

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

getDefaultName

Positional Arguments
  • self: Evision.RGBD.Odometry.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 getTransformType(t()) :: integer() | {:error, String.t()}

getTransformType

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

@see setTransformType/2

Python prototype (for reference only):

getTransformType() -> retval
Link to this function

prepareFrameCache(self, frame, cacheType)

View Source
@spec prepareFrameCache(t(), Evision.RGBD.OdometryFrame.t(), integer()) ::
  {number(), number()} | {:error, String.t()}

prepareFrameCache

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

  • frame: OdometryFrame.

    The odometry which will process the frame.

  • cacheType: int.

    The cache type: CACHE_SRC, CACHE_DST or CACHE_ALL.

Return
  • retval: Size

Prepare a cache for the frame. The function checks the precomputed/passed data (throws the error if this data does not satisfy) and computes all remaining cache data needed for the frame. Returned size is a resolution of the prepared frame.

Python prototype (for reference only):

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

Reads algorithm parameters from a file storage

Positional Arguments
  • self: Evision.RGBD.Odometry.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.Odometry.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
Link to this function

setCameraMatrix(self, val)

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

setCameraMatrix

Positional Arguments
  • self: Evision.RGBD.Odometry.t()
  • val: Evision.Mat.t()

@see getCameraMatrix/1

Python prototype (for reference only):

setCameraMatrix(val) -> None
Link to this function

setTransformType(self, val)

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

setTransformType

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

@see getTransformType/1

Python prototype (for reference only):

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

Stores algorithm parameters in a file storage

Positional Arguments
  • self: Evision.RGBD.Odometry.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.Odometry.t()
  • fs: Evision.FileStorage.t()
  • name: String

Has overloading in C++

Python prototype (for reference only):

write(fs, name) -> None