10 {
throw "Not implemented"; }
13 {
throw "Not implemented"; }
19 size_(
Vec3f::all(3.f)), pose_(
Affine3f::Identity()), gradient_delta_factor_(0.75f), raycast_step_factor_(0.75f)
53 float max_coeff = std::max<float>(std::max<float>(vsz[0], vsz[1]), vsz[2]);
54 trunc_dist_ = std::max (distance, 2.1f * max_coeff);
59 return data_.
ptr<ushort2>() + x + y*dim_x + z*dim_y*dim_x;
88 offset_c.x = offset[0];
89 offset_c.y = offset[1];
90 offset_c.z = offset[2];
150 enum { DEFAULT_CLOUD_BUFFER_SIZE = 10 * 1000 * 1000 };
152 if (cloud_buffer.
empty ())
153 cloud_buffer.
create (DEFAULT_CLOUD_BUFFER_SIZE);
187 enum { DEFAULT_CLOUD_BUFFER_SIZE = 10 * 1000 * 1000 };
188 if (cloud_buffer.
empty ())
189 cloud_buffer.
create (DEFAULT_CLOUD_BUFFER_SIZE);
195 deviceGlobalShift.x = globalShift[0];
196 deviceGlobalShift.y = globalShift[1];
197 deviceGlobalShift.z = globalShift[2];
200 minBounds_c.x = minBounds[0];
201 minBounds_c.y = minBounds[1];
202 minBounds_c.z = minBounds[2];
205 maxBounds_c.x = maxBounds[0];
206 maxBounds_c.y = maxBounds[1];
207 maxBounds_c.z = maxBounds[2];
214 size_t size =
extractSliceAsCloud (volume, buffer, minBounds_c, maxBounds_c, deviceGlobalShift, aff, b);
float gradient_delta_factor_
static float half2float(half value)
TsdfVolume::Entry.
void create(size_t size)
Allocates internal buffer in GPU memory. If internal buffer was created before the function recreates...
void clearTSDFSlice(const TsdfVolume &volume, const kfusion::tsdf_buffer *buffer, const Vec3i offset)
virtual void integrate(const Dists &dists, tsdf_buffer &buffer, const Affine3f &camera_pose, const Intr &intr)
Structure to handle buffer addresses.
void swap(DeviceMemory &other_arg)
Performs swap of data pointed with another device memory.
void setSize(const Vec3f &size)
float getRaycastStepFactor() const
T * ptr()
Returns pointer for internal buffer in GPU memory.
void swap(CudaData &data)
const CudaData data() const
size_t size() const
Returns size in elements.
bool empty() const
Returns true if unallocated otherwise false.
void raycast(const TsdfVolume &volume, tsdf_buffer &buffer, const Aff3f &aff, const Mat3f &Rinv, const Reprojector &reproj, Depth &depth, Normals &normals, float step_factor, float delta_factor)
void integrate(const Dists &depth, TsdfVolume &volume, tsdf_buffer &buffer, const Aff3f &aff, const Projector &proj)
TsdfVolume(const cv::Vec3i &dims)
TsdfVolume.
size_t extractCloud(const TsdfVolume &volume, const tsdf_buffer &buffer, const Aff3f &aff, PtrSz< Point > output)
void clearSlice(const kfusion::tsdf_buffer *buffer, const Vec3i offset) const
size_t extractSliceAsCloud(const TsdfVolume &volume, const kfusion::tsdf_buffer *buffer, const Vec3i minBounds, const Vec3i maxBounds, const Vec3i globalShift, const Aff3f &aff, PtrSz< Point > output)
float getGradientDeltaFactor() const
void setPose(const Affine3f &pose)
void setTruncDist(float distance)
void setGradientDeltaFactor(float factor)
T * ptr()
Returns pointer for internal buffer in GPU memory.
void create(const Vec3i &dims)
D device_cast(const S &source)
virtual void raycast(const Affine3f &camera_pose, tsdf_buffer &buffer, const Intr &intr, Depth &depth, Normals &normals)
DeviceArray< Point > fetchCloud(DeviceArray< Point > &cloud_buffer, const tsdf_buffer &buffer) const
void create(size_t sizeBytes_arg)
Allocates internal buffer in GPU memory. If internal buffer was created before the function recreates...
static half float2half(float value)
void extractNormals(const TsdfVolume &volume, const tsdf_buffer &buffer, const PtrSz< Point > &points, const Aff3f &aff, const Mat3f &Rinv, float gradient_delta_factor, float4 *output)
float raycast_step_factor_
ushort2 * getCoord(int x, int y, int z, int dim_x, int dim_y)
void setMaxWeight(int weight)
virtual void applyAffine(const Affine3f &affine)
Vec3f getVoxelSize() const
DeviceArray< Point > fetchSliceAsCloud(DeviceArray< Point > &cloud_buffer, const kfusion::tsdf_buffer *buffer, const Vec3i minBounds, const Vec3i maxBounds, const Vec3i globalShift) const
Generates cloud using GPU in connected6 mode only.
void clear_volume(TsdfVolume volume)
float getTruncDist() const
void setRaycastStepFactor(float factor)
void fetchNormals(const DeviceArray< Point > &cloud, const tsdf_buffer &buffer, DeviceArray< Normal > &normals) const