| OpenCV 5.0.0alpha Open Source Computer Vision

Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
cv::Volume Class Reference

`#include <opencv2/3d/volume.hpp>`

Collaboration diagram for cv::Volume:

## Public Types
enum | BoundingBoxPrecision { VOLUME_UNIT = 0 , VOXEL = 1 }

## Public Member Functions
| Volume (VolumeType vtype=VolumeType::TSDF, const VolumeSettings &settings=VolumeSettings(VolumeType::TSDF))
| Constructor of custom volume.
| ~Volume ()
void | fetchNormals (InputArray points, OutputArray normals) const
| Extract the all data from volume.
void | fetchPointsNormals (OutputArray points, OutputArray normals) const
| Extract the all data from volume.
void | fetchPointsNormalsColors (OutputArray points, OutputArray normals, OutputArray colors) const
| Extract the all data from volume.
void | getBoundingBox (OutputArray bb, int precision) const
| Gets bounding box in volume coordinates with given precision: VOLUME_UNIT - up to volume unit VOXEL - up to voxel (currently not supported)
bool | getEnableGrowth () const
| Returns if new volume units are allocated during integration or not. Makes sense for HashTSDF only.
size_t | getTotalVolumeUnits () const
| return number of volume units in volume.
int | getVisibleBlocks () const
| return visible blocks in volume.
void | integrate (const OdometryFrame &frame, InputArray pose)
| Integrates the input data to the volume.
void | integrate (InputArray depth, InputArray image, InputArray pose)
| Integrates the input data to the volume.
void | integrate (InputArray depth, InputArray pose)
| Integrates the input data to the volume.
void | raycast (InputArray cameraPose, int height, int width, InputArray K, OutputArray points, OutputArray normals) const
| Renders the volume contents into an image. The resulting points and normals are in camera's coordinate system.
void | raycast (InputArray cameraPose, int height, int width, InputArray K, OutputArray points, OutputArray normals, OutputArray colors) const
| Renders the volume contents into an image. The resulting points and normals are in camera's coordinate system.
void | raycast (InputArray cameraPose, OutputArray points, OutputArray normals) const
| Renders the volume contents into an image. The resulting points and normals are in camera's coordinate system.
void | raycast (InputArray cameraPose, OutputArray points, OutputArray normals, OutputArray colors) const
| 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.

## Member Enumeration Documentation

## ◆ BoundingBoxPrecision

enum cv::Volume::BoundingBoxPrecision

Enumerator
VOLUME_UNIT |
VOXEL |

## Constructor & Destructor Documentation

## ◆ Volume()

cv::Volume::Volume | ( | VolumeType | vtype = VolumeType::TSDF,
|  | const VolumeSettings & | settings = VolumeSettings(VolumeType::TSDF) )
| explicit

Python:
| cv.Volume( | [, vtype[, settings]] | ) -> | <Volume object>

Constructor of custom volume.

Parameters

  vtype | the volume type [TSDF, HashTSDF, ColorTSDF].
  settings | the custom settings for volume.

## ◆ ~Volume()

cv::Volume::~Volume | ( |  | ) |

## Member Function Documentation

## ◆ fetchNormals()

void cv::Volume::fetchNormals | ( | InputArray | points,
|  | OutputArray | normals ) const

Python:
| cv.Volume.fetchNormals( | points[, normals] | ) -> | normals

Extract the all data from volume.

Parameters

  points | the input exist point.
  normals | the storage of normals (corresponding to input points) in the image.

## ◆ fetchPointsNormals()

void cv::Volume::fetchPointsNormals | ( | OutputArray | points,
|  | OutputArray | normals ) const

Python:
| cv.Volume.fetchPointsNormals( | [, points[, normals]] | ) -> | points, normals

Extract the all data from volume.

Parameters

  points | the storage of all points.
  normals | the storage of all normals, corresponding to points.

## ◆ fetchPointsNormalsColors()

void cv::Volume::fetchPointsNormalsColors | ( | OutputArray | points,
|  | OutputArray | normals,
|  | OutputArray | colors ) const

Python:
| cv.Volume.fetchPointsNormalsColors( | [, points[, normals[, colors]]] | ) -> | points, normals, colors

Extract the all data from volume.

Parameters

  points | the storage of all points.
  normals | the storage of all normals, corresponding to points.
  colors | the storage of all colors, corresponding to points (only for ColorTSDF).

## ◆ getBoundingBox()

void cv::Volume::getBoundingBox | ( | OutputArray | bb,
|  | int | precision ) const

Python:
| cv.Volume.getBoundingBox( | precision[, bb] | ) -> | bb

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

Parameters

  bb | 6-float 1d array containing (min_x, min_y, min_z, max_x, max_y, max_z) in volume coordinates
  precision | bounding box calculation precision

## ◆ getEnableGrowth()

bool cv::Volume::getEnableGrowth | ( |  | ) | const

Python:
| cv.Volume.getEnableGrowth( |  | ) -> | retval

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

## ◆ getTotalVolumeUnits()

size_t cv::Volume::getTotalVolumeUnits | ( |  | ) | const

Python:
| cv.Volume.getTotalVolumeUnits( |  | ) -> | retval

return number of volume units in volume.

## ◆ getVisibleBlocks()

int cv::Volume::getVisibleBlocks | ( |  | ) | const

Python:
| cv.Volume.getVisibleBlocks( |  | ) -> | retval

return visible blocks in volume.

## ◆ integrate() [1/3]

void cv::Volume::integrate | ( | const OdometryFrame & | frame,
|  | InputArray | pose )

Python:
| cv.Volume.integrate( | depth, pose | ) -> | None
| cv.Volume.integrateColor( | depth, image, pose | ) -> | None
| cv.Volume.integrateFrame( | frame, pose | ) -> | None

Integrates the input data to the volume.

Camera intrinsics are taken from volume settings structure.

Parameters

  frame | the 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.
  pose | the pose of camera in global coordinates.

## ◆ integrate() [2/3]

void cv::Volume::integrate | ( | InputArray | depth,
|  | InputArray | image,
|  | InputArray | pose )

Python:
| cv.Volume.integrate( | depth, pose | ) -> | None
| cv.Volume.integrateColor( | depth, image, pose | ) -> | None
| cv.Volume.integrateFrame( | frame, pose | ) -> | None

Integrates the input data to the volume.

Camera intrinsics are taken from volume settings structure.

Parameters

  depth | the depth image.
  image | the 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.
  pose | the pose of camera in global coordinates.

## ◆ integrate() [3/3]

void cv::Volume::integrate | ( | InputArray | depth,
|  | InputArray | pose )

Python:
| cv.Volume.integrate( | depth, pose | ) -> | None
| cv.Volume.integrateColor( | depth, image, pose | ) -> | None
| cv.Volume.integrateFrame( | frame, pose | ) -> | None

Integrates the input data to the volume.

Camera intrinsics are taken from volume settings structure.

Parameters

  depth | the depth image.
  pose | the pose of camera in global coordinates.

## ◆ raycast() [1/4]

void cv::Volume::raycast | ( | InputArray | cameraPose,
|  | int | height,
|  | int | width,
|  | InputArray | K,
|  | OutputArray | points,
|  | OutputArray | normals ) const

Python:
| cv.Volume.raycast( | cameraPose[, points[, normals]] | ) -> | points, normals
| cv.Volume.raycastColor( | cameraPose[, points[, normals[, colors]]] | ) -> | points, normals, colors
| cv.Volume.raycastEx( | cameraPose, height, width, K[, points[, normals]] | ) -> | points, normals
| cv.Volume.raycastExColor( | cameraPose, height, width, K[, points[, normals[, colors]]] | ) -> | points, normals, 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

  cameraPose | the pose of camera in global coordinates.
  height | the height of result image
  width | the width of result image
  K | camera raycast intrinsics
  points | image to store rendered points.
  normals | image to store rendered normals corresponding to points.

## ◆ raycast() [2/4]

void cv::Volume::raycast | ( | InputArray | cameraPose,
|  | int | height,
|  | int | width,
|  | InputArray | K,
|  | OutputArray | points,
|  | OutputArray | normals,
|  | OutputArray | colors ) const

Python:
| cv.Volume.raycast( | cameraPose[, points[, normals]] | ) -> | points, normals
| cv.Volume.raycastColor( | cameraPose[, points[, normals[, colors]]] | ) -> | points, normals, colors
| cv.Volume.raycastEx( | cameraPose, height, width, K[, points[, normals]] | ) -> | points, normals
| cv.Volume.raycastExColor( | cameraPose, height, width, K[, points[, normals[, colors]]] | ) -> | points, normals, 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

  cameraPose | the pose of camera in global coordinates.
  height | the height of result image
  width | the width of result image
  K | camera raycast intrinsics
  points | image to store rendered points.
  normals | image to store rendered normals corresponding to points.
  colors | image to store rendered colors corresponding to points (only for ColorTSDF).

## ◆ raycast() [3/4]

void cv::Volume::raycast | ( | InputArray | cameraPose,
|  | OutputArray | points,
|  | OutputArray | normals ) const

Python:
| cv.Volume.raycast( | cameraPose[, points[, normals]] | ) -> | points, normals
| cv.Volume.raycastColor( | cameraPose[, points[, normals[, colors]]] | ) -> | points, normals, colors
| cv.Volume.raycastEx( | cameraPose, height, width, K[, points[, normals]] | ) -> | points, normals
| cv.Volume.raycastExColor( | cameraPose, height, width, K[, points[, normals[, colors]]] | ) -> | points, normals, 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

  cameraPose | the pose of camera in global coordinates.
  points | image to store rendered points.
  normals | image to store rendered normals corresponding to points.

## ◆ raycast() [4/4]

void cv::Volume::raycast | ( | InputArray | cameraPose,
|  | OutputArray | points,
|  | OutputArray | normals,
|  | OutputArray | colors ) const

Python:
| cv.Volume.raycast( | cameraPose[, points[, normals]] | ) -> | points, normals
| cv.Volume.raycastColor( | cameraPose[, points[, normals[, colors]]] | ) -> | points, normals, colors
| cv.Volume.raycastEx( | cameraPose, height, width, K[, points[, normals]] | ) -> | points, normals
| cv.Volume.raycastExColor( | cameraPose, height, width, K[, points[, normals[, colors]]] | ) -> | points, normals, 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

  cameraPose | the pose of camera in global coordinates.
  points | image to store rendered points.
  normals | image to store rendered normals corresponding to points.
  colors | image to store rendered colors corresponding to points (only for ColorTSDF).

## ◆ reset()

void cv::Volume::reset | ( |  | ) |

Python:
| cv.Volume.reset( |  | ) -> | None

clear all data in volume.

## ◆ setEnableGrowth()

void cv::Volume::setEnableGrowth | ( | bool | v | ) |

Python:
| cv.Volume.setEnableGrowth( | v | ) -> | None

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

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

- opencv2/3d/volume.hpp