Open3D (C++ API)  0.18.0+252c867
Namespaces | Macros | Functions
ImageImpl.h File Reference

(252c867 (Sun May 5 05:39:34 2024 +0000))

#include <limits>
#include "open3d/core/CUDAUtils.h"
#include "open3d/core/Dispatch.h"
#include "open3d/core/Indexer.h"
#include "open3d/core/Tensor.h"
#include "open3d/t/geometry/kernel/GeometryIndexer.h"
#include "open3d/t/geometry/kernel/GeometryMacros.h"

Go to the source code of this file.

Namespaces

 open3d
 
 open3d::t
 
 open3d::t::geometry
 
 open3d::t::geometry::kernel
 
 open3d::t::geometry::kernel::image
 

Macros

#define LINEAR_SATURATE(elem_t, calc_t)
 

Functions

void open3d::t::geometry::kernel::image::ToCPU (const core::Tensor &src, core::Tensor &dst, double scale, double offset)
 
void open3d::t::geometry::kernel::image::ClipTransformCPU (const core::Tensor &src, core::Tensor &dst, float scale, float min_value, float max_value, float clip_fill=0.0f)
 
void open3d::t::geometry::kernel::image::PyrDownDepthCPU (const core::Tensor &src, core::Tensor &dst, float diff_threshold, float invalid_fill)
 
void open3d::t::geometry::kernel::image::CreateVertexMapCPU (const core::Tensor &src, core::Tensor &dst, const core::Tensor &intrinsics, float invalid_fill)
 
void open3d::t::geometry::kernel::image::CreateNormalMapCPU (const core::Tensor &src, core::Tensor &dst, float invalid_fill)
 
void open3d::t::geometry::kernel::image::ColorizeDepthCPU (const core::Tensor &src, core::Tensor &dst, float scale, float min_value, float max_value)
 

Macro Definition Documentation

◆ LINEAR_SATURATE

#define LINEAR_SATURATE (   elem_t,
  calc_t 
)
Value:
elem_t limits[2] = {std::numeric_limits<elem_t>::min(), \
std::numeric_limits<elem_t>::max()}; \
calc_t c_scale = static_cast<calc_t>(scale); \
calc_t c_offset = static_cast<calc_t>(offset); \
DISPATCH_DTYPE_TO_TEMPLATE(src.GetDtype(), [&]() { \
core::ParallelFor( \
src.GetDevice(), indexer.NumWorkloads(), \
[=] OPEN3D_DEVICE(int64_t workload_idx) { \
auto src_ptr = \
indexer.GetInputPtr<scalar_t>(0, workload_idx); \
auto dst_ptr = indexer.GetOutputPtr<elem_t>(workload_idx); \
calc_t out = static_cast<calc_t>(*src_ptr) * c_scale + \
c_offset; \
out = out < limits[0] ? limits[0] : out; \
out = out > limits[1] ? limits[1] : out; \
*dst_ptr = static_cast<elem_t>(out); \
}); \
});
int offset
Definition: FilePCD.cpp:45