mirror of
https://github.com/opencv/opencv.git
synced 2026-07-30 07:43:03 +04:00
Merge pull request #22178 from savuor:hash_tsdf_fixes
This PR contains:
- a new property enableGrowth which controls should the HashTSDF be extended during integration by adding new volume units or not
- a new method getBoundingBox which calculates the size of currently occupied data
- a set of tests to check that new functionality
- a fix for TSDF GPU reset (data is correctly zeroed now using floatToTsdf() function)
minor changes
This commit is contained in:
committed by
GitHub
parent
a9d98bfb34
commit
2407ab4e61
@@ -23,7 +23,7 @@ public:
|
||||
* @param settings the custom settings for volume.
|
||||
*/
|
||||
Volume(VolumeType vtype, const VolumeSettings& settings);
|
||||
~Volume();
|
||||
virtual ~Volume();
|
||||
|
||||
/** @brief Integrates the input data to the volume.
|
||||
|
||||
@@ -102,14 +102,38 @@ public:
|
||||
*/
|
||||
void reset();
|
||||
|
||||
//TODO: remove this
|
||||
/** @brief return visible blocks in volume.
|
||||
*/
|
||||
int getVisibleBlocks() const;
|
||||
|
||||
/** @brief return number of vulmeunits in volume.
|
||||
/** @brief return number of volume units in volume.
|
||||
*/
|
||||
size_t getTotalVolumeUnits() const;
|
||||
|
||||
enum BoundingBoxPrecision
|
||||
{
|
||||
VOLUME_UNIT = 0,
|
||||
VOXEL = 1
|
||||
};
|
||||
/** @brief Gets bounding box in volume coordinates with given precision:
|
||||
* VOLUME_UNIT - up to volume unit
|
||||
* VOXEL - up to voxel (currently not supported)
|
||||
* @return (min_x, min_y, min_z, max_x, max_y, max_z) in volume coordinates
|
||||
*/
|
||||
virtual Vec6f getBoundingBox(int precision) const;
|
||||
|
||||
/**
|
||||
* @brief Enables or disables new volume unit allocation during integration.
|
||||
* Makes sense for HashTSDF only.
|
||||
*/
|
||||
virtual void setEnableGrowth(bool v);
|
||||
/**
|
||||
* @brief Returns if new volume units are allocated during integration or not.
|
||||
* Makes sense for HashTSDF only.
|
||||
*/
|
||||
virtual bool getEnableGrowth() const;
|
||||
|
||||
class Impl;
|
||||
private:
|
||||
Ptr<Impl> impl;
|
||||
|
||||
Reference in New Issue
Block a user