Open3D (C++ API)  0.20.0
Loading...
Searching...
No Matches
ImageImpl.h
Go to the documentation of this file.
1// ----------------------------------------------------------------------------
2// - Open3D: www.open3d.org -
3// ----------------------------------------------------------------------------
4// Copyright (c) 2018-2026 www.open3d.org
5// SPDX-License-Identifier: MIT
6// ----------------------------------------------------------------------------
7
8#include <limits>
9
12#include "open3d/core/Indexer.h"
13#include "open3d/core/Tensor.h"
16
17namespace open3d {
18namespace t {
19namespace geometry {
20namespace kernel {
21namespace image {
22
23#ifndef __CUDACC__
24using std::isinf;
25using std::isnan;
26#endif
27
28#if defined(__CUDACC__)
29void ToCUDA
30#elif defined(SYCL_LANGUAGE_VERSION)
31void ToSYCL
32#else
34#endif
35 (const core::Tensor& src,
36 core::Tensor& dst,
37 double scale,
38 double offset) {
40 // elem_t: corresponds to dst_dtype.
41 // scalar_t: corresponds to src_dtype.
42 // calc_t: calculation type for intermediate results.
43#define LINEAR_SATURATE(elem_t, calc_t) \
44 elem_t limits[2] = {std::numeric_limits<elem_t>::min(), \
45 std::numeric_limits<elem_t>::max()}; \
46 calc_t c_scale = static_cast<calc_t>(scale); \
47 calc_t c_offset = static_cast<calc_t>(offset); \
48 DISPATCH_DTYPE_TO_TEMPLATE(src.GetDtype(), [&]() { \
49 core::ParallelFor( \
50 src.GetDevice(), indexer.NumWorkloads(), \
51 [=] OPEN3D_DEVICE(int64_t workload_idx) { \
52 auto src_ptr = \
53 indexer.GetInputPtr<scalar_t>(0, workload_idx); \
54 auto dst_ptr = indexer.GetOutputPtr<elem_t>(workload_idx); \
55 calc_t out = static_cast<calc_t>(*src_ptr) * c_scale + \
56 c_offset; \
57 out = out < limits[0] ? limits[0] : out; \
58 out = out > limits[1] ? limits[1] : out; \
59 *dst_ptr = static_cast<elem_t>(out); \
60 }); \
61 });
62 core::Dtype dst_dtype = dst.GetDtype();
63 if (dst_dtype == core::Float32) {
64 LINEAR_SATURATE(float, float)
65 } else if (dst_dtype == core::Float64) {
66 LINEAR_SATURATE(double, double)
67 } else if (dst_dtype == core::Int8) {
68 LINEAR_SATURATE(int8_t, float)
69 } else if (dst_dtype == core::UInt8) {
70 LINEAR_SATURATE(uint8_t, float)
71 } else if (dst_dtype == core::Int16) {
72 LINEAR_SATURATE(int16_t, float)
73 } else if (dst_dtype == core::UInt16) {
74 LINEAR_SATURATE(uint16_t, float)
75 } else if (dst_dtype == core::Int32) {
76 LINEAR_SATURATE(int32_t, double)
77 } else if (dst_dtype == core::UInt32) {
78 LINEAR_SATURATE(uint32_t, double)
79 } else if (dst_dtype == core::Int64) {
80 LINEAR_SATURATE(int64_t, double)
81 } else if (dst_dtype == core::UInt64) {
82 LINEAR_SATURATE(uint64_t, double)
83 }
84#undef LINEAR_SATURATE
85}
86
87#if defined(__CUDACC__)
88void ClipTransformCUDA
89#elif defined(SYCL_LANGUAGE_VERSION)
90void ClipTransformSYCL
91#else
93#endif
94 (const core::Tensor& src,
95 core::Tensor& dst,
96 float scale,
97 float min_value,
98 float max_value,
99 float clip_fill) {
100 NDArrayIndexer src_indexer(src, 2);
101 NDArrayIndexer dst_indexer(dst, 2);
102
103 int64_t rows = src.GetShape(0);
104 int64_t cols = dst.GetShape(1);
105 int64_t n = rows * cols;
106
107 DISPATCH_DTYPE_TO_TEMPLATE(src.GetDtype(), [&]() {
108 core::ParallelFor(src.GetDevice(), n,
109 [=] OPEN3D_DEVICE(int64_t workload_idx) {
110 int64_t y = workload_idx / cols;
111 int64_t x = workload_idx % cols;
112
113 float in = static_cast<float>(
114 *src_indexer.GetDataPtr<scalar_t>(x, y));
115 float out = in / scale;
116 out = out <= min_value ? clip_fill : out;
117 out = out >= max_value ? clip_fill : out;
118 *dst_indexer.GetDataPtr<float>(x, y) = out;
119 });
120 });
121}
122
123// Reimplementation of the reference:
124// https://github.com/mp3guy/ICPCUDA/blob/master/Cuda/pyrdown.cu#L41
125#if defined(__CUDACC__)
126void PyrDownDepthCUDA
127#elif defined(SYCL_LANGUAGE_VERSION)
128void PyrDownDepthSYCL
129#else
131#endif
132 (const core::Tensor& src,
133 core::Tensor& dst,
134 float depth_diff,
135 float invalid_fill) {
136 NDArrayIndexer src_indexer(src, 2);
137 NDArrayIndexer dst_indexer(dst, 2);
138
139 int rows = src_indexer.GetShape(0);
140 int cols = src_indexer.GetShape(1);
141
142 int rows_down = dst_indexer.GetShape(0);
143 int cols_down = dst_indexer.GetShape(1);
144 int n = rows_down * cols_down;
145
146 // Gaussian filter window size
147 // Gaussian filter weights
148 const int gkernel_size = 5;
149 const int gkernel_size_2 = gkernel_size / 2;
150 const float gweights[3] = {0.375f, 0.25f, 0.0625f};
151
152#ifndef __CUDACC__
153 using std::abs;
154 using std::max;
155 using std::min;
156#endif
157
159 src.GetDevice(), n, [=] OPEN3D_DEVICE(int64_t workload_idx) {
160 int y = workload_idx / cols_down;
161 int x = workload_idx % cols_down;
162
163 int y_src = 2 * y;
164 int x_src = 2 * x;
165
166 float v_center = *src_indexer.GetDataPtr<float>(x_src, y_src);
167 if (v_center == invalid_fill) {
168 *dst_indexer.GetDataPtr<float>(x, y) = invalid_fill;
169 return;
170 }
171
172 int x_min = max(0, x_src - gkernel_size_2);
173 int y_min = max(0, y_src - gkernel_size_2);
174
175 int x_max = min(cols - 1, x_src + gkernel_size_2);
176 int y_max = min(rows - 1, y_src + gkernel_size_2);
177
178 float v_sum = 0;
179 float w_sum = 0;
180 for (int yk = y_min; yk <= y_max; ++yk) {
181 for (int xk = x_min; xk <= x_max; ++xk) {
182 float v = *src_indexer.GetDataPtr<float>(xk, yk);
183 int dy = abs(yk - y_src);
184 int dx = abs(xk - x_src);
185
186 if (v != invalid_fill &&
187 abs(v - v_center) < depth_diff) {
188 float w = gweights[dx] * gweights[dy];
189 v_sum += w * v;
190 w_sum += w;
191 }
192 }
193 }
194
195 *dst_indexer.GetDataPtr<float>(x, y) =
196 w_sum == 0 ? invalid_fill : v_sum / w_sum;
197 });
198}
199
200// Workaround for lack of Intel GPU bilateral filter, Sobel filter, ImageResize
201// and Gaussian filter support in IPP.
202#if defined(SYCL_LANGUAGE_VERSION)
203void FilterBilateralSYCL(const core::Tensor& src,
204 core::Tensor& dst,
205 int kernel_size,
206 float value_sigma,
207 float dist_sigma) {
208 if (src.GetDtype() != core::Float32 && src.GetDtype() != core::UInt8) {
209 utility::LogError("SYCL bilateral filter does not support dtype {}.",
210 src.GetDtype().ToString());
211 }
212
213 NDArrayIndexer src_indexer(src, 2);
214 NDArrayIndexer dst_indexer(dst, 2);
215
216 const int rows = src_indexer.GetShape(0);
217 const int cols = src_indexer.GetShape(1);
218 const int radius = kernel_size / 2;
219 const float inv_value_sigma_squared = 0.5f / (value_sigma * value_sigma);
220 const float inv_dist_sigma_squared = 0.5f / (dist_sigma * dist_sigma);
221
222 using std::exp;
224 core::ParallelFor(
225 src.GetDevice(), static_cast<int64_t>(rows) * cols,
226 [=] OPEN3D_DEVICE(int64_t workload_idx) {
227 const int y = workload_idx / cols;
228 const int x = workload_idx % cols;
229 const float center = static_cast<float>(
230 *src_indexer.GetDataPtr<scalar_t>(x, y));
231 float value_sum = 0.0f;
232 float weight_sum = 0.0f;
233
234 for (int dy = -radius; dy <= radius; ++dy) {
235 const int sample_y = y + dy;
236 if (sample_y < 0 || sample_y >= rows) continue;
237 for (int dx = -radius; dx <= radius; ++dx) {
238 const int sample_x = x + dx;
239 if (sample_x < 0 || sample_x >= cols) continue;
240 const float sample = static_cast<float>(
241 *src_indexer.GetDataPtr<scalar_t>(
242 sample_x, sample_y));
243 const float spatial_distance =
244 static_cast<float>(dx * dx + dy * dy);
245 const float value_distance = sample - center;
246 const float weight = exp(
247 -spatial_distance * inv_dist_sigma_squared -
248 value_distance * value_distance *
249 inv_value_sigma_squared);
250 value_sum += weight * sample;
251 weight_sum += weight;
252 }
253 }
254 *dst_indexer.GetDataPtr<scalar_t>(x, y) =
255 static_cast<scalar_t>(value_sum / weight_sum);
256 });
257 });
258}
259#endif
260
261template <typename scalar_t, typename output_t>
263 core::Tensor& dst_dx,
264 core::Tensor& dst_dy,
265 int kernel_size) {
266 NDArrayIndexer src_indexer(src, 2);
267 NDArrayIndexer dst_dx_indexer(dst_dx, 2);
268 NDArrayIndexer dst_dy_indexer(dst_dy, 2);
269
270 const int rows = src_indexer.GetShape(0);
271 const int cols = src_indexer.GetShape(1);
272 const int radius = kernel_size / 2;
273 const float derivative_3[3] = {-1.0f, 0.0f, 1.0f};
274 const float smoothing_3[3] = {1.0f, 2.0f, 1.0f};
275 const float derivative_5[5] = {-1.0f, -2.0f, 0.0f, 2.0f, 1.0f};
276 const float smoothing_5[5] = {1.0f, 4.0f, 6.0f, 4.0f, 1.0f};
277
279 src.GetDevice(), static_cast<int64_t>(rows) * cols,
280 [=] OPEN3D_DEVICE(int64_t workload_idx) {
281 const int y = workload_idx / cols;
282 const int x = workload_idx % cols;
283 float value_dx = 0.0f;
284 float value_dy = 0.0f;
285
286 for (int ky = -radius; ky <= radius; ++ky) {
287 const int sample_y =
288 std::max(0, std::min(rows - 1, y + ky));
289 for (int kx = -radius; kx <= radius; ++kx) {
290 const int sample_x =
291 std::max(0, std::min(cols - 1, x + kx));
292 const float sample = static_cast<float>(
293 *src_indexer.GetDataPtr<scalar_t>(sample_x,
294 sample_y));
295 const int ix = kx + radius;
296 const int iy = ky + radius;
297 const float* derivative_coefficients =
298 kernel_size == 3 ? derivative_3 : derivative_5;
299 const float* smoothing_coefficients =
300 kernel_size == 3 ? smoothing_3 : smoothing_5;
301 value_dx += sample * derivative_coefficients[ix] *
302 smoothing_coefficients[iy];
303 value_dy += sample * smoothing_coefficients[ix] *
304 derivative_coefficients[iy];
305 }
306 }
307 *dst_dx_indexer.GetDataPtr<output_t>(x, y) =
308 static_cast<output_t>(value_dx);
309 *dst_dy_indexer.GetDataPtr<output_t>(x, y) =
310 static_cast<output_t>(value_dy);
311 });
312}
313
314#if defined(SYCL_LANGUAGE_VERSION)
315void FilterSobelSYCL(const core::Tensor& src,
316 core::Tensor& dst_dx,
317 core::Tensor& dst_dy,
318 int kernel_size) {
319 if (src.GetDtype() == core::Float32) {
320 FilterSobelSYCLImpl<float, float>(src, dst_dx, dst_dy, kernel_size);
321 } else if (src.GetDtype() == core::UInt8) {
322 FilterSobelSYCLImpl<uint8_t, int16_t>(src, dst_dx, dst_dy, kernel_size);
323 } else {
324 utility::LogError("SYCL Sobel filter does not support dtype {}.",
325 src.GetDtype().ToString());
326 }
327}
328#endif
329
330#if defined(SYCL_LANGUAGE_VERSION)
331template <typename scalar_t>
332void FilterGaussianSYCLImpl(const core::Tensor& src,
333 core::Tensor& dst,
334 int kernel_size,
335 float sigma) {
336 NDArrayIndexer src_indexer(src, 2);
337 NDArrayIndexer dst_indexer(dst, 2);
338 const int rows = src_indexer.GetShape(0);
339 const int cols = src_indexer.GetShape(1);
340 const int radius = kernel_size / 2;
341
343 src.GetDevice(), static_cast<int64_t>(rows) * cols,
344 [=] OPEN3D_DEVICE(int64_t workload_idx) {
345 const int y = workload_idx / cols;
346 const int x = workload_idx % cols;
347 float value_sum = 0.0f;
348 float weight_sum = 0.0f;
349 for (int ky = -radius; ky <= radius; ++ky) {
350 const int sample_y =
351 std::max(0, std::min(rows - 1, y + ky));
352 for (int kx = -radius; kx <= radius; ++kx) {
353 const int sample_x =
354 std::max(0, std::min(cols - 1, x + kx));
355 const float distance =
356 static_cast<float>(kx * kx + ky * ky);
357 const float weight =
358 exp(-distance / (2.0f * sigma * sigma));
359 value_sum += weight *
360 static_cast<float>(
361 *src_indexer.GetDataPtr<scalar_t>(
362 sample_x, sample_y));
363 weight_sum += weight;
364 }
365 }
366 *dst_indexer.GetDataPtr<scalar_t>(x, y) =
367 static_cast<scalar_t>(value_sum / weight_sum);
368 });
369}
370
371void FilterGaussianSYCL(const core::Tensor& src,
372 core::Tensor& dst,
373 int kernel_size,
374 float sigma) {
375 if (src.GetDtype() == core::Float32) {
376 FilterGaussianSYCLImpl<float>(src, dst, kernel_size, sigma);
377 } else if (src.GetDtype() == core::UInt8) {
378 FilterGaussianSYCLImpl<uint8_t>(src, dst, kernel_size, sigma);
379 } else if (src.GetDtype() == core::UInt16) {
380 FilterGaussianSYCLImpl<uint16_t>(src, dst, kernel_size, sigma);
381 } else {
382 utility::LogError("SYCL Gaussian filter does not support dtype {}.",
383 src.GetDtype().ToString());
384 }
385}
386
387template <typename scalar_t>
388void ResizeNearestSYCLImpl(const core::Tensor& src,
389 core::Tensor& dst,
390 float sampling_rate) {
391 NDArrayIndexer src_indexer(src, 2);
392 NDArrayIndexer dst_indexer(dst, 2);
393 const int src_rows = src_indexer.GetShape(0);
394 const int src_cols = src_indexer.GetShape(1);
395 const int dst_rows = dst_indexer.GetShape(0);
396 const int dst_cols = dst_indexer.GetShape(1);
397
399 src.GetDevice(), static_cast<int64_t>(dst_rows) * dst_cols,
400 [=] OPEN3D_DEVICE(int64_t workload_idx) {
401 const int y = workload_idx / dst_cols;
402 const int x = workload_idx % dst_cols;
403 const int source_y = std::min(
404 src_rows - 1, static_cast<int>(y / sampling_rate));
405 const int source_x = std::min(
406 src_cols - 1, static_cast<int>(x / sampling_rate));
407 *dst_indexer.GetDataPtr<scalar_t>(x, y) =
408 *src_indexer.GetDataPtr<scalar_t>(source_x, source_y);
409 });
410}
411
412void ResizeNearestSYCL(const core::Tensor& src,
413 core::Tensor& dst,
414 float sampling_rate) {
415 if (src.GetDtype() == core::Float32) {
416 ResizeNearestSYCLImpl<float>(src, dst, sampling_rate);
417 } else if (src.GetDtype() == core::UInt8) {
418 ResizeNearestSYCLImpl<uint8_t>(src, dst, sampling_rate);
419 } else if (src.GetDtype() == core::UInt16) {
420 ResizeNearestSYCLImpl<uint16_t>(src, dst, sampling_rate);
421 } else {
422 utility::LogError("SYCL nearest resize does not support dtype {}.",
423 src.GetDtype().ToString());
424 }
425}
426#endif
427
428#if defined(__CUDACC__)
429void CreateVertexMapCUDA
430#elif defined(SYCL_LANGUAGE_VERSION)
431void CreateVertexMapSYCL
432#else
434#endif
435 (const core::Tensor& src,
436 core::Tensor& dst,
437 const core::Tensor& intrinsics,
438 float invalid_fill) {
439 NDArrayIndexer src_indexer(src, 2);
440 NDArrayIndexer dst_indexer(dst, 2);
442 core::Device("CPU:0")));
443
444 int64_t rows = src.GetShape(0);
445 int64_t cols = src.GetShape(1);
446 int64_t n = rows * cols;
447
448#ifndef __CUDACC__
449 using std::isinf;
450 using std::isnan;
451#endif
452
454 src.GetDevice(), n, [=] OPEN3D_DEVICE(int64_t workload_idx) {
455 auto is_invalid = [invalid_fill] OPEN3D_DEVICE(float v) {
456 if (isinf(invalid_fill)) return isinf(v);
457 if (isnan(invalid_fill)) return isnan(v);
458 return v == invalid_fill;
459 };
460
461 int64_t y = workload_idx / cols;
462 int64_t x = workload_idx % cols;
463
464 float d = *src_indexer.GetDataPtr<float>(x, y);
465
466 float* vertex = dst_indexer.GetDataPtr<float>(x, y);
467 if (!is_invalid(d)) {
468 ti.Unproject(static_cast<float>(x), static_cast<float>(y),
469 d, vertex + 0, vertex + 1, vertex + 2);
470 } else {
471 vertex[0] = invalid_fill;
472 vertex[1] = invalid_fill;
473 vertex[2] = invalid_fill;
474 }
475 });
476}
477#if defined(__CUDACC__)
478void CreateNormalMapCUDA
479#elif defined(SYCL_LANGUAGE_VERSION)
480void CreateNormalMapSYCL
481#else
483#endif
484 (const core::Tensor& src, core::Tensor& dst, float invalid_fill) {
485 NDArrayIndexer src_indexer(src, 2);
486 NDArrayIndexer dst_indexer(dst, 2);
487
488 int64_t rows = src_indexer.GetShape(0);
489 int64_t cols = src_indexer.GetShape(1);
490 int64_t n = rows * cols;
491
493 src.GetDevice(), n, [=] OPEN3D_DEVICE(int64_t workload_idx) {
494 int64_t y = workload_idx / cols;
495 int64_t x = workload_idx % cols;
496
497 float* normal = dst_indexer.GetDataPtr<float>(x, y);
498
499 if (y < rows - 1 && x < cols - 1) {
500 float* v00 = src_indexer.GetDataPtr<float>(x, y);
501 float* v10 = src_indexer.GetDataPtr<float>(x + 1, y);
502 float* v01 = src_indexer.GetDataPtr<float>(x, y + 1);
503
504 if ((v00[0] == invalid_fill && v00[1] == invalid_fill &&
505 v00[2] == invalid_fill) ||
506 (v01[0] == invalid_fill && v01[1] == invalid_fill &&
507 v01[2] == invalid_fill) ||
508 (v10[0] == invalid_fill && v10[1] == invalid_fill &&
509 v10[2] == invalid_fill)) {
510 normal[0] = invalid_fill;
511 normal[1] = invalid_fill;
512 normal[2] = invalid_fill;
513 return;
514 }
515
516 float dx0 = v01[0] - v00[0];
517 float dy0 = v01[1] - v00[1];
518 float dz0 = v01[2] - v00[2];
519
520 float dx1 = v10[0] - v00[0];
521 float dy1 = v10[1] - v00[1];
522 float dz1 = v10[2] - v00[2];
523
524 normal[0] = dy0 * dz1 - dz0 * dy1;
525 normal[1] = dz0 * dx1 - dx0 * dz1;
526 normal[2] = dx0 * dy1 - dy0 * dx1;
527
528 constexpr float EPSILON = 1e-5f;
529 float normal_norm =
530 sqrt(normal[0] * normal[0] + normal[1] * normal[1] +
531 normal[2] * normal[2]);
532 normal_norm = std::max(normal_norm, EPSILON);
533 normal[0] /= normal_norm;
534 normal[1] /= normal_norm;
535 normal[2] /= normal_norm;
536 } else {
537 normal[0] = invalid_fill;
538 normal[1] = invalid_fill;
539 normal[2] = invalid_fill;
540 }
541 });
542}
543
544#if defined(__CUDACC__)
545void ColorizeDepthCUDA
546#elif defined(SYCL_LANGUAGE_VERSION)
547void ColorizeDepthSYCL
548#else
550#endif
551 (const core::Tensor& src,
552 core::Tensor& dst,
553 float scale,
554 float min_value,
555 float max_value) {
556 NDArrayIndexer src_indexer(src, 2);
557 NDArrayIndexer dst_indexer(dst, 2);
558
559 int64_t rows = src.GetShape(0);
560 int64_t cols = dst.GetShape(1);
561 int64_t n = rows * cols;
562
563 float inv_interval = 255.0f / (max_value - min_value);
564 DISPATCH_DTYPE_TO_TEMPLATE(src.GetDtype(), [&]() {
565 core::ParallelFor(
566 src.GetDevice(), n, [=] OPEN3D_DEVICE(int64_t workload_idx) {
567 int64_t y = workload_idx / cols;
568 int64_t x = workload_idx % cols;
569
570 float in = static_cast<float>(
571 *src_indexer.GetDataPtr<scalar_t>(x, y));
572 float out = in / scale;
573 out = out <= min_value ? min_value : out;
574 out = out >= max_value ? max_value : out;
575
576 int idx =
577 static_cast<int>(inv_interval * (out - min_value));
578 uint8_t* out_ptr = dst_indexer.GetDataPtr<uint8_t>(x, y);
579 out_ptr[0] = turbo_srgb_bytes[idx][0];
580 out_ptr[1] = turbo_srgb_bytes[idx][1];
581 out_ptr[2] = turbo_srgb_bytes[idx][2];
582 });
583 });
584}
585
586} // namespace image
587} // namespace kernel
588} // namespace geometry
589} // namespace t
590} // namespace open3d
Common CUDA utilities.
#define OPEN3D_DEVICE
Definition CUDAUtils.h:44
#define DISPATCH_DTYPE_TO_TEMPLATE(DTYPE,...)
Definition Dispatch.h:30
std::shared_ptr< core::Tensor > image
Definition FilamentRenderer.cpp:347
#define LINEAR_SATURATE(elem_t, calc_t)
std::int64_t y
Definition NormalDistributionsTransform.cpp:43
std::int64_t x
Definition NormalDistributionsTransform.cpp:42
Real weight
Definition SurfaceReconstructionPoisson.cpp:270
double t
Definition SurfaceReconstructionPoisson.cpp:175
Indexer indexer
Definition UnaryEWSYCL.cpp:35
Definition Device.h:18
Definition Dtype.h:20
std::string ToString() const
Definition Dtype.h:64
Definition Indexer.h:326
Definition Tensor.h:32
Device GetDevice() const override
Definition Tensor.cpp:1556
static Tensor Eye(int64_t n, Dtype dtype, const Device &device)
Create an identity matrix of size n x n.
Definition Tensor.cpp:417
Dtype GetDtype() const
Definition Tensor.h:1223
Definition GeometryIndexer.h:160
OPEN3D_HOST_DEVICE void * GetDataPtr() const
Definition GeometryIndexer.h:314
OPEN3D_HOST_DEVICE index_t GetShape(int i) const
Definition GeometryIndexer.h:310
Helper class for converting coordinates/indices between 3D/3D, 3D/2D, 2D/3D.
Definition GeometryIndexer.h:25
OPEN3D_HOST_DEVICE void Unproject(float u_in, float v_in, float d_in, float *x_out, float *y_out, float *z_out) const
Unproject a 2D uv coordinate with depth to 3D in camera coordinate.
Definition GeometryIndexer.h:110
int offset
Definition FilePCD.cpp:46
const Dtype UInt32
Definition Dtype.cpp:50
const Dtype Int64
Definition Dtype.cpp:47
const Dtype UInt16
Definition Dtype.cpp:49
const Dtype Int32
Definition Dtype.cpp:46
const Dtype Int16
Definition Dtype.cpp:45
const Dtype UInt8
Definition Dtype.cpp:48
void ParallelFor(const Device &device, int64_t n, const func_t &func)
Definition ParallelFor.h:190
const Dtype Float64
Definition Dtype.cpp:43
const Dtype UInt64
Definition Dtype.cpp:51
const Dtype Int8
Definition Dtype.cpp:44
const Dtype Float32
Definition Dtype.cpp:42
void ClipTransformCPU(const core::Tensor &src, core::Tensor &dst, float scale, float min_value, float max_value, float clip_fill=0.0f)
Definition ImageImpl.h:94
void CreateNormalMapCPU(const core::Tensor &src, core::Tensor &dst, float invalid_fill)
Definition ImageImpl.h:484
void ColorizeDepthCPU(const core::Tensor &src, core::Tensor &dst, float scale, float min_value, float max_value)
Definition ImageImpl.h:551
void CreateVertexMapCPU(const core::Tensor &src, core::Tensor &dst, const core::Tensor &intrinsics, float invalid_fill)
Definition ImageImpl.h:435
void PyrDownDepthCPU(const core::Tensor &src, core::Tensor &dst, float diff_threshold, float invalid_fill)
Definition ImageImpl.h:132
void ToCPU(const core::Tensor &src, core::Tensor &dst, double scale, double offset)
Definition ImageImpl.h:35
void FilterSobelSYCLImpl(const core::Tensor &src, core::Tensor &dst_dx, core::Tensor &dst_dy, int kernel_size)
Definition ImageImpl.h:262
TArrayIndexer< int64_t > NDArrayIndexer
Definition GeometryIndexer.h:359
Definition PinholeCameraIntrinsic.cpp:16