Class Volume
- Namespace
- OpenCvSharp
- Assembly
- OpenCvSharp.dll
Custom volume (TSDF, HashTSDF or ColorTSDF) for point cloud integration and raycasting.
public class Volume : CvObject, IDisposable
- Inheritance
-
Volume
- Implements
- Inherited Members
Constructors
Volume(VolumeType, VolumeSettings?)
Constructor of custom volume.
public Volume(VolumeType vtype = VolumeType.TSDF, VolumeSettings? settings = null)
Parameters
vtypeVolumeTypethe volume type [TSDF, HashTSDF, ColorTSDF].
settingsVolumeSettingsthe custom settings for volume. If null, a default VolumeSettings(TSDF) is used.
Methods
FetchNormals(InputArray, OutputArray)
Extracts the normals corresponding to the given existing points.
public void FetchNormals(InputArray points, OutputArray normals)
Parameters
pointsInputArraythe input existing points.
normalsOutputArraythe storage of normals (corresponding to input points).
FetchPointsNormals(OutputArray, OutputArray)
Extracts all points and corresponding normals from the volume.
public void FetchPointsNormals(OutputArray points, OutputArray normals)
Parameters
pointsOutputArraythe storage of all points.
normalsOutputArraythe storage of all normals, corresponding to points.
FetchPointsNormalsColors(OutputArray, OutputArray, OutputArray)
Extracts all points, normals and colors from the volume (only for ColorTSDF).
public void FetchPointsNormalsColors(OutputArray points, OutputArray normals, OutputArray colors)
Parameters
pointsOutputArraythe storage of all points.
normalsOutputArraythe storage of all normals, corresponding to points.
colorsOutputArraythe storage of all colors, corresponding to points (only for ColorTSDF).
GetBoundingBox(OutputArray, VolumeBoundingBoxPrecision)
Gets bounding box in volume coordinates with given precision.
public void GetBoundingBox(OutputArray bb, VolumeBoundingBoxPrecision precision)
Parameters
bbOutputArray6-float 1d array containing (min_x, min_y, min_z, max_x, max_y, max_z) in volume coordinates.
precisionVolumeBoundingBoxPrecisionbounding box calculation precision.
GetEnableGrowth()
Returns whether new volume units are allocated during integration (HashTSDF only).
public bool GetEnableGrowth()
Returns
GetTotalVolumeUnits()
Returns number of volume units in volume.
public long GetTotalVolumeUnits()
Returns
GetVisibleBlocks()
Returns visible blocks in volume.
public int GetVisibleBlocks()
Returns
Integrate(InputArray, InputArray)
Integrates the input data to the volume.
public void Integrate(InputArray depth, InputArray pose)
Parameters
depthInputArraythe depth image.
poseInputArraythe pose of camera in global coordinates.
IntegrateColor(InputArray, InputArray, InputArray)
Integrates the input data to the volume (only for ColorTSDF).
public void IntegrateColor(InputArray depth, InputArray image, InputArray pose)
Parameters
depthInputArraythe depth image.
imageInputArraythe color image (only for ColorTSDF).
poseInputArraythe pose of camera in global coordinates.
IntegrateFrame(OdometryFrame, InputArray)
Integrates the input data to the volume.
public void IntegrateFrame(OdometryFrame frame, InputArray pose)
Parameters
frameOdometryFramethe object from which to take depth and image data.
poseInputArraythe pose of camera in global coordinates.
Raycast(InputArray, OutputArray, OutputArray)
Renders the volume contents into an image.
public void Raycast(InputArray cameraPose, OutputArray points, OutputArray normals)
Parameters
cameraPoseInputArraythe pose of camera in global coordinates.
pointsOutputArrayimage to store rendered points.
normalsOutputArrayimage to store rendered normals corresponding to points.
RaycastColor(InputArray, OutputArray, OutputArray, OutputArray)
Renders the volume contents into an image, also outputting colors (only for ColorTSDF).
public void RaycastColor(InputArray cameraPose, OutputArray points, OutputArray normals, OutputArray colors)
Parameters
cameraPoseInputArraythe pose of camera in global coordinates.
pointsOutputArrayimage to store rendered points.
normalsOutputArrayimage to store rendered normals corresponding to points.
colorsOutputArrayimage to store rendered colors corresponding to points (only for ColorTSDF).
RaycastEx(InputArray, int, int, InputArray, OutputArray, OutputArray)
Renders the volume contents into an image of the given size with the given intrinsics.
public void RaycastEx(InputArray cameraPose, int height, int width, InputArray K, OutputArray points, OutputArray normals)
Parameters
cameraPoseInputArraythe pose of camera in global coordinates.
heightintthe height of result image.
widthintthe width of result image.
KInputArraycamera raycast intrinsics.
pointsOutputArrayimage to store rendered points.
normalsOutputArrayimage to store rendered normals corresponding to points.
RaycastExColor(InputArray, int, int, InputArray, OutputArray, OutputArray, OutputArray)
Renders the volume contents into an image of the given size with the given intrinsics, also outputting colors (only for ColorTSDF).
public void RaycastExColor(InputArray cameraPose, int height, int width, InputArray K, OutputArray points, OutputArray normals, OutputArray colors)
Parameters
cameraPoseInputArraythe pose of camera in global coordinates.
heightintthe height of result image.
widthintthe width of result image.
KInputArraycamera raycast intrinsics.
pointsOutputArrayimage to store rendered points.
normalsOutputArrayimage to store rendered normals corresponding to points.
colorsOutputArrayimage to store rendered colors corresponding to points (only for ColorTSDF).
Release()
Clean up any resources being used.
public void Release()
Reset()
Clears all data in volume.
public void Reset()
SetEnableGrowth(bool)
Enables or disables new volume unit allocation during integration (HashTSDF only).
public void SetEnableGrowth(bool v)
Parameters
vbool