OpenCV for Unity 3.0.4
Enox Software / Please refer to OpenCV official document ( http://docs.opencv.org/5.0/index.html ) for the details of the argument of the method.
Loading...
Searching...
No Matches
OpenCVForUnity.PtcloudModule.OdometryFrame Class Reference

An object that keeps per-frame data for Odometry algorithms from user-provided images to algorithm-specific precalculated data. When not empty, it contains a depth image, a mask of valid pixels and a set of pyramids generated from that data. A BGR/Gray image and normals are optional. OdometryFrame is made to be used together with Odometry class to reuse precalculated data between Rt data calculations. A correct way to do that is to call Odometry.prepareFrames() on prev and next frames and then pass them to Odometry.compute() method. More...

Public Member Functions

 OdometryFrame ()
 Construct a new OdometryFrame object. All non-empty images should have the same size.
 
 OdometryFrame (Mat depth)
 Construct a new OdometryFrame object. All non-empty images should have the same size.
 
 OdometryFrame (Mat depth, Mat image)
 Construct a new OdometryFrame object. All non-empty images should have the same size.
 
 OdometryFrame (Mat depth, Mat image, Mat mask)
 Construct a new OdometryFrame object. All non-empty images should have the same size.
 
 OdometryFrame (Mat depth, Mat image, Mat mask, Mat normals)
 Construct a new OdometryFrame object. All non-empty images should have the same size.
 
void getDepth (Mat depth)
 Get the original user-provided depth image.
 
void getGrayImage (Mat image)
 Get the gray image generated from the user-provided BGR/Gray image.
 
void getImage (Mat image)
 Get the original user-provided BGR/Gray image.
 
void getMask (Mat mask)
 Get the valid pixels mask generated for the ICP calculations intersected with the user-provided mask.
 
IntPtr getNativeObjAddr ()
 
void getNormals (Mat normals)
 Get the normals image either generated for the ICP calculations or user-provided.
 
void getProcessedDepth (Mat depth)
 Get the depth image generated from the user-provided one after conversion, rescale or filtering for ICP algorithm needs.
 
void getPyramidAt (Mat img, int pyrType, long level)
 Get the image generated for the ICP calculations from one of the pyramids specified by pyrType. Returns empty image if the pyramid is empty or there's no such pyramid level.
 
int getPyramidLevels ()
 Get the amount of levels in pyramids (all of them if not empty should have the same number of levels) or 0 if no pyramids were prepared yet.
 
- Public Member Functions inherited from OpenCVForUnity.DisposableObject
void Dispose ()
 Releases resources used by this object.
 
void ThrowIfDisposed ()
 Throws ObjectDisposedException if this object has been disposed.
 

Static Public Member Functions

static OdometryFrame __fromPtr__ (IntPtr addr)
 
- Static Public Member Functions inherited from OpenCVForUnity.DisposableObject
static IntPtr ThrowIfNullIntPtr (IntPtr ptr)
 Returns the native pointer, or throws CoreModule.CvException if it is zero.
 

Protected Member Functions

override void Dispose (bool disposing)
 
- Protected Member Functions inherited from OpenCVForUnity.DisposableOpenCVObject
 DisposableOpenCVObject ()
 Initializes a new instance with a zero native pointer and dispose enabled.
 
 DisposableOpenCVObject (bool isEnabledDispose)
 Initializes a new instance with a zero native pointer.
 
 DisposableOpenCVObject (IntPtr ptr)
 Initializes a new instance with the specified native pointer and dispose enabled.
 
 DisposableOpenCVObject (IntPtr ptr, bool isEnabledDispose)
 Initializes a new instance with the specified native pointer.
 
- Protected Member Functions inherited from OpenCVForUnity.DisposableObject
 DisposableObject ()
 Initializes a new instance with dispose enabled.
 
 DisposableObject (bool isEnabledDispose)
 Initializes a new instance.
 

Additional Inherited Members

- Package Attributes inherited from OpenCVForUnity.DisposableOpenCVObject
- Properties inherited from OpenCVForUnity.DisposableObject
bool IsDisposed [get, protected set]
 
bool IsEnabledDispose [get, set]
 

Detailed Description

An object that keeps per-frame data for Odometry algorithms from user-provided images to algorithm-specific precalculated data. When not empty, it contains a depth image, a mask of valid pixels and a set of pyramids generated from that data. A BGR/Gray image and normals are optional. OdometryFrame is made to be used together with Odometry class to reuse precalculated data between Rt data calculations. A correct way to do that is to call Odometry.prepareFrames() on prev and next frames and then pass them to Odometry.compute() method.

Constructor & Destructor Documentation

◆ OdometryFrame() [1/5]

OpenCVForUnity.PtcloudModule.OdometryFrame.OdometryFrame ( Mat depth,
Mat image,
Mat mask,
Mat normals )

Construct a new OdometryFrame object. All non-empty images should have the same size.

Parameters
depthA depth image, should be CV_8UC1
imageAn BGR or grayscale image (or noArray() if it's not required for used ICP algorithm). Should be CV_8UC3 or CV_8C4 if it's BGR image or CV_8UC1 if it's grayscale. If it's BGR then it's converted to grayscale image automatically.
maskA user-provided mask of valid pixels, should be CV_8UC1
normalsA user-provided normals to the depth surface, should be CV_32FC4

◆ OdometryFrame() [2/5]

OpenCVForUnity.PtcloudModule.OdometryFrame.OdometryFrame ( Mat depth,
Mat image,
Mat mask )

Construct a new OdometryFrame object. All non-empty images should have the same size.

Parameters
depthA depth image, should be CV_8UC1
imageAn BGR or grayscale image (or noArray() if it's not required for used ICP algorithm). Should be CV_8UC3 or CV_8C4 if it's BGR image or CV_8UC1 if it's grayscale. If it's BGR then it's converted to grayscale image automatically.
maskA user-provided mask of valid pixels, should be CV_8UC1
normalsA user-provided normals to the depth surface, should be CV_32FC4

◆ OdometryFrame() [3/5]

OpenCVForUnity.PtcloudModule.OdometryFrame.OdometryFrame ( Mat depth,
Mat image )

Construct a new OdometryFrame object. All non-empty images should have the same size.

Parameters
depthA depth image, should be CV_8UC1
imageAn BGR or grayscale image (or noArray() if it's not required for used ICP algorithm). Should be CV_8UC3 or CV_8C4 if it's BGR image or CV_8UC1 if it's grayscale. If it's BGR then it's converted to grayscale image automatically.
maskA user-provided mask of valid pixels, should be CV_8UC1
normalsA user-provided normals to the depth surface, should be CV_32FC4

◆ OdometryFrame() [4/5]

OpenCVForUnity.PtcloudModule.OdometryFrame.OdometryFrame ( Mat depth)

Construct a new OdometryFrame object. All non-empty images should have the same size.

Parameters
depthA depth image, should be CV_8UC1
imageAn BGR or grayscale image (or noArray() if it's not required for used ICP algorithm). Should be CV_8UC3 or CV_8C4 if it's BGR image or CV_8UC1 if it's grayscale. If it's BGR then it's converted to grayscale image automatically.
maskA user-provided mask of valid pixels, should be CV_8UC1
normalsA user-provided normals to the depth surface, should be CV_32FC4

◆ OdometryFrame() [5/5]

OpenCVForUnity.PtcloudModule.OdometryFrame.OdometryFrame ( )

Construct a new OdometryFrame object. All non-empty images should have the same size.

Parameters
depthA depth image, should be CV_8UC1
imageAn BGR or grayscale image (or noArray() if it's not required for used ICP algorithm). Should be CV_8UC3 or CV_8C4 if it's BGR image or CV_8UC1 if it's grayscale. If it's BGR then it's converted to grayscale image automatically.
maskA user-provided mask of valid pixels, should be CV_8UC1
normalsA user-provided normals to the depth surface, should be CV_32FC4

Member Function Documentation

◆ __fromPtr__()

static OdometryFrame OpenCVForUnity.PtcloudModule.OdometryFrame.__fromPtr__ ( IntPtr addr)
static

◆ Dispose()

override void OpenCVForUnity.PtcloudModule.OdometryFrame.Dispose ( bool disposing)
protectedvirtual

◆ getDepth()

void OpenCVForUnity.PtcloudModule.OdometryFrame.getDepth ( Mat depth)

Get the original user-provided depth image.

Parameters
depthOutput image

◆ getGrayImage()

void OpenCVForUnity.PtcloudModule.OdometryFrame.getGrayImage ( Mat image)

Get the gray image generated from the user-provided BGR/Gray image.

Parameters
imageOutput image

◆ getImage()

void OpenCVForUnity.PtcloudModule.OdometryFrame.getImage ( Mat image)

Get the original user-provided BGR/Gray image.

Parameters
imageOutput image

◆ getMask()

void OpenCVForUnity.PtcloudModule.OdometryFrame.getMask ( Mat mask)

Get the valid pixels mask generated for the ICP calculations intersected with the user-provided mask.

Parameters
maskOutput image

◆ getNativeObjAddr()

IntPtr OpenCVForUnity.PtcloudModule.OdometryFrame.getNativeObjAddr ( )

◆ getNormals()

void OpenCVForUnity.PtcloudModule.OdometryFrame.getNormals ( Mat normals)

Get the normals image either generated for the ICP calculations or user-provided.

Parameters
normalsOutput image

◆ getProcessedDepth()

void OpenCVForUnity.PtcloudModule.OdometryFrame.getProcessedDepth ( Mat depth)

Get the depth image generated from the user-provided one after conversion, rescale or filtering for ICP algorithm needs.

Parameters
depthOutput image

◆ getPyramidAt()

void OpenCVForUnity.PtcloudModule.OdometryFrame.getPyramidAt ( Mat img,
int pyrType,
long level )

Get the image generated for the ICP calculations from one of the pyramids specified by pyrType. Returns empty image if the pyramid is empty or there's no such pyramid level.

Parameters
imgOutput image
pyrTypeType of pyramid
levelLevel in the pyramid

◆ getPyramidLevels()

int OpenCVForUnity.PtcloudModule.OdometryFrame.getPyramidLevels ( )

Get the amount of levels in pyramids (all of them if not empty should have the same number of levels) or 0 if no pyramids were prepared yet.


The documentation for this class was generated from the following file: