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.Volume Class Reference

Public Member Functions

 Volume ()
 Constructor of custom volume.
 
 Volume (int vtype)
 Constructor of custom volume.
 
 Volume (int vtype, VolumeSettings settings)
 Constructor of custom volume.
 
void fetchNormals (Mat points, Mat normals)
 Extract the all data from volume.
 
void fetchPointsNormals (Mat points, Mat normals)
 Extract the all data from volume.
 
void fetchPointsNormalsColors (Mat points, Mat normals, Mat colors)
 Extract the all data from volume.
 
void getBoundingBox (Mat bb, int precision)
 Gets bounding box in volume coordinates with given precision: VOLUME_UNIT - up to volume unit VOXEL - up to voxel (currently not supported)
 
bool getEnableGrowth ()
 Returns if new volume units are allocated during integration or not. Makes sense for HashTSDF only.
 
IntPtr getNativeObjAddr ()
 
long getTotalVolumeUnits ()
 return number of volume units in volume.
 
int getVisibleBlocks ()
 return visible blocks in volume.
 
void integrate (Mat depth, Mat pose)
 Integrates the input data to the volume.
 
void integrateColor (Mat depth, Mat image, Mat pose)
 Integrates the input data to the volume.
 
void integrateFrame (OdometryFrame frame, Mat pose)
 Integrates the input data to the volume.
 
void raycast (Mat cameraPose, Mat points, Mat normals)
 Renders the volume contents into an image. The resulting points and normals are in camera's coordinate system.
 
void raycastColor (Mat cameraPose, Mat points, Mat normals, Mat colors)
 Renders the volume contents into an image. The resulting points and normals are in camera's coordinate system.
 
void raycastEx (Mat cameraPose, int height, int width, Mat K, Mat points, Mat normals)
 Renders the volume contents into an image. The resulting points and normals are in camera's coordinate system.
 
void raycastExColor (Mat cameraPose, int height, int width, Mat K, Mat points, Mat normals, Mat colors)
 Renders the volume contents into an image. The resulting points and normals are in camera's coordinate system.
 
void reset ()
 clear all data in volume.
 
void setEnableGrowth (bool v)
 Enables or disables new volume unit allocation during integration. Makes sense for HashTSDF only.
 
- 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 Volume __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.
 

Static Public Attributes

const int VOLUME_UNIT = 0
 C++: enum BoundingBoxPrecision (cv.Volume.BoundingBoxPrecision)
 
const int VOXEL = 1
 C++: enum BoundingBoxPrecision (cv.Volume.BoundingBoxPrecision)
 

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]
 

Constructor & Destructor Documentation

◆ Volume() [1/3]

OpenCVForUnity.PtcloudModule.Volume.Volume ( int vtype,
VolumeSettings settings )

Constructor of custom volume.

Parameters
vtypethe volume type [TSDF, HashTSDF, ColorTSDF].
settingsthe custom settings for volume.

◆ Volume() [2/3]

OpenCVForUnity.PtcloudModule.Volume.Volume ( int vtype)

Constructor of custom volume.

Parameters
vtypethe volume type [TSDF, HashTSDF, ColorTSDF].
settingsthe custom settings for volume.

◆ Volume() [3/3]

OpenCVForUnity.PtcloudModule.Volume.Volume ( )

Constructor of custom volume.

Parameters
vtypethe volume type [TSDF, HashTSDF, ColorTSDF].
settingsthe custom settings for volume.

Member Function Documentation

◆ __fromPtr__()

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

◆ Dispose()

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

◆ fetchNormals()

void OpenCVForUnity.PtcloudModule.Volume.fetchNormals ( Mat points,
Mat normals )

Extract the all data from volume.

Parameters
pointsthe input exist point.
normalsthe storage of normals (corresponding to input points) in the image.

◆ fetchPointsNormals()

void OpenCVForUnity.PtcloudModule.Volume.fetchPointsNormals ( Mat points,
Mat normals )

Extract the all data from volume.

Parameters
pointsthe storage of all points.
normalsthe storage of all normals, corresponding to points.

◆ fetchPointsNormalsColors()

void OpenCVForUnity.PtcloudModule.Volume.fetchPointsNormalsColors ( Mat points,
Mat normals,
Mat colors )

Extract the all data from volume.

Parameters
pointsthe storage of all points.
normalsthe storage of all normals, corresponding to points.
colorsthe storage of all colors, corresponding to points (only for ColorTSDF).

◆ getBoundingBox()

void OpenCVForUnity.PtcloudModule.Volume.getBoundingBox ( Mat bb,
int precision )

Gets bounding box in volume coordinates with given precision: VOLUME_UNIT - up to volume unit VOXEL - up to voxel (currently not supported)

Parameters
bb6-float 1d array containing (min_x, min_y, min_z, max_x, max_y, max_z) in volume coordinates
precisionbounding box calculation precision

◆ getEnableGrowth()

bool OpenCVForUnity.PtcloudModule.Volume.getEnableGrowth ( )

Returns if new volume units are allocated during integration or not. Makes sense for HashTSDF only.

◆ getNativeObjAddr()

IntPtr OpenCVForUnity.PtcloudModule.Volume.getNativeObjAddr ( )

◆ getTotalVolumeUnits()

long OpenCVForUnity.PtcloudModule.Volume.getTotalVolumeUnits ( )

return number of volume units in volume.

◆ getVisibleBlocks()

int OpenCVForUnity.PtcloudModule.Volume.getVisibleBlocks ( )

return visible blocks in volume.

◆ integrate()

void OpenCVForUnity.PtcloudModule.Volume.integrate ( Mat depth,
Mat pose )

Integrates the input data to the volume.

Camera intrinsics are taken from volume settings structure.

Parameters
depththe depth image.
posethe pose of camera in global coordinates.

◆ integrateColor()

void OpenCVForUnity.PtcloudModule.Volume.integrateColor ( Mat depth,
Mat image,
Mat pose )

Integrates the input data to the volume.

Camera intrinsics are taken from volume settings structure.

Parameters
depththe depth image.
imagethe color image (only for ColorTSDF). For color TSDF a depth data should be registered with color data, i.e. have the same intrinsics & camera pose. This can be done using function registerDepth() from 3d module.
posethe pose of camera in global coordinates.

◆ integrateFrame()

void OpenCVForUnity.PtcloudModule.Volume.integrateFrame ( OdometryFrame frame,
Mat pose )

Integrates the input data to the volume.

Camera intrinsics are taken from volume settings structure.

Parameters
framethe object from which to take depth and image data. For color TSDF a depth data should be registered with color data, i.e. have the same intrinsics & camera pose. This can be done using function registerDepth() from 3d module.
posethe pose of camera in global coordinates.

◆ raycast()

void OpenCVForUnity.PtcloudModule.Volume.raycast ( Mat cameraPose,
Mat points,
Mat normals )

Renders the volume contents into an image. The resulting points and normals are in camera's coordinate system.

Rendered image size and camera intrinsics are taken from volume settings structure.

Parameters
cameraPosethe pose of camera in global coordinates.
pointsimage to store rendered points.
normalsimage to store rendered normals corresponding to points.

◆ raycastColor()

void OpenCVForUnity.PtcloudModule.Volume.raycastColor ( Mat cameraPose,
Mat points,
Mat normals,
Mat colors )

Renders the volume contents into an image. The resulting points and normals are in camera's coordinate system.

Rendered image size and camera intrinsics are taken from volume settings structure.

Parameters
cameraPosethe pose of camera in global coordinates.
pointsimage to store rendered points.
normalsimage to store rendered normals corresponding to points.
colorsimage to store rendered colors corresponding to points (only for ColorTSDF).

◆ raycastEx()

void OpenCVForUnity.PtcloudModule.Volume.raycastEx ( Mat cameraPose,
int height,
int width,
Mat K,
Mat points,
Mat normals )

Renders the volume contents into an image. The resulting points and normals are in camera's coordinate system.

Rendered image size and camera intrinsics are taken from volume settings structure.

Parameters
cameraPosethe pose of camera in global coordinates.
heightthe height of result image
widththe width of result image
Kcamera raycast intrinsics
pointsimage to store rendered points.
normalsimage to store rendered normals corresponding to points.

◆ raycastExColor()

void OpenCVForUnity.PtcloudModule.Volume.raycastExColor ( Mat cameraPose,
int height,
int width,
Mat K,
Mat points,
Mat normals,
Mat colors )

Renders the volume contents into an image. The resulting points and normals are in camera's coordinate system.

Rendered image size and camera intrinsics are taken from volume settings structure.

Parameters
cameraPosethe pose of camera in global coordinates.
heightthe height of result image
widththe width of result image
Kcamera raycast intrinsics
pointsimage to store rendered points.
normalsimage to store rendered normals corresponding to points.
colorsimage to store rendered colors corresponding to points (only for ColorTSDF).

◆ reset()

void OpenCVForUnity.PtcloudModule.Volume.reset ( )

clear all data in volume.

◆ setEnableGrowth()

void OpenCVForUnity.PtcloudModule.Volume.setEnableGrowth ( bool v)

Enables or disables new volume unit allocation during integration. Makes sense for HashTSDF only.

Member Data Documentation

◆ VOLUME_UNIT

const int OpenCVForUnity.PtcloudModule.Volume.VOLUME_UNIT = 0
static

C++: enum BoundingBoxPrecision (cv.Volume.BoundingBoxPrecision)

◆ VOXEL

const int OpenCVForUnity.PtcloudModule.Volume.VOXEL = 1
static

C++: enum BoundingBoxPrecision (cv.Volume.BoundingBoxPrecision)


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