47 Image(int64_t rows = 0,
106 return data_[r][c][0];
114 return data_[r][c][ch];
150 double offset = 0.0)
const;
212 float value_sigma = 20.0f,
213 float distance_sigma = 10.0f)
const;
225 std::pair<Image, Image>
FilterSobel(
int kernel_size = 3)
const;
265 float clip_fill = 0.0f)
const;
280 float invalid_fill = 0.0f);
bool copy
Definition VtkUtils.cpp:73
SizeVector GetShape() const
Definition Tensor.h:1116
T * GetDataPtr()
Definition Tensor.h:1133
static Tensor Zeros(const SizeVector &shape, Dtype dtype, const Device &device=Device("CPU:0"))
Create a tensor fill with zeros.
Definition Tensor.cpp:373
Device GetDevice() const override
Definition Tensor.cpp:1365
Dtype GetDtype() const
Definition Tensor.h:1153
Tensor To(Dtype dtype, bool copy=false) const
Definition Tensor.cpp:706
The Image class stores image with customizable width, height, num of channels and bytes per channel.
Definition Image.h:34
The base geometry class.
Definition Geometry.h:21
The Image class stores image with customizable rows, cols, channels, dtype and device.
Definition Image.h:29
void * GetDataPtr()
Get raw buffer of the Image data.
Definition Image.h:118
Image Clone() const
Returns copy of the image on the same device.
Definition Image.h:137
core::Tensor AsTensor() const
Returns the underlying Tensor of the Image.
Definition Image.h:124
const void * GetDataPtr() const
Get raw buffer of the Image data.
Definition Image.h:121
core::Device GetDevice() const override
Get device of the image.
Definition Image.h:96
int64_t GetChannels() const
Get the number of channels of the image.
Definition Image.h:90
core::Tensor At(int64_t r, int64_t c, int64_t ch) const
Get pixel(s) in the image. Returns a tensor with shape {}.
Definition Image.h:113
Image FilterBilateral(int kernel_size=3, float value_sigma=20.0f, float distance_sigma=10.0f) const
Return a new image after bilateral filtering.
Definition Image.cpp:232
int64_t GetRows() const
Get the number of rows of the image.
Definition Image.h:84
Image ColorizeDepth(float scale, float min_value, float max_value)
Colorize an input depth image (with Dtype UInt16 or Float32).
Definition Image.cpp:475
InterpType
Image interpolation algorithms.
Definition Image.h:172
@ Super
Super sampling interpolation (only downsample).
@ Lanczos
Lanczos filter interpolation.
@ Linear
Bilinear interpolation.
@ Nearest
Nearest neighbors interpolation.
@ Cubic
Bicubic interpolation.
static constexpr bool HAVE_IPPICV
Do we use IPP ICV for accelerating image processing operations?
Definition Image.h:333
core::Tensor GetMinBound() const
Compute min 2D coordinates for the data (always {0, 0}).
Definition Image.h:309
Image PyrDown() const
Return a new downsampled image with pyramid downsampling.
Definition Image.cpp:388
bool IsEmpty() const override
Returns true if rows * cols * channels == 0.
Definition Image.h:71
Image PyrDownDepth(float diff_threshold, float invalid_fill=0.f) const
Edge and invalid value preserving downsampling by 2 specifically for depth images.
Definition Image.cpp:393
Image RGBToGray() const
Converts a 3-channel RGB image to a new 1-channel Grayscale image.
Definition Image.cpp:119
static Image FromLegacy(const open3d::geometry::Image &image_legacy, const core::Device &Device=core::Device("CPU:0"))
Create from a legacy Open3D Image.
Definition Image.cpp:498
Image ClipTransform(float scale, float min_value, float max_value, float clip_fill=0.0f) const
Return new image after scaling and clipping image values.
Definition Image.cpp:410
std::pair< Image, Image > FilterSobel(int kernel_size=3) const
Return a pair of new gradient images (dx, dy) after Sobel filtering.
Definition Image.cpp:338
int64_t GetCols() const
Get the number of columns of the image.
Definition Image.h:87
Image CreateVertexMap(const core::Tensor &intrinsics, float invalid_fill=0.0f)
Create a vertex map from a depth image using unprojection.
Definition Image.cpp:442
Image Dilate(int kernel_size=3) const
Return a new image after performing morphological dilation.
Definition Image.cpp:196
Image Resize(float sampling_rate=0.5f, InterpType interp_type=InterpType::Nearest) const
Return a new image after resizing with specified interpolation type.
Definition Image.cpp:155
Image FilterGaussian(int kernel_size=3, float sigma=1.0f) const
Return a new image after Gaussian filtering.
Definition Image.cpp:302
virtual ~Image() override
Definition Image.h:60
Image & Clear() override
Clear image contents by resetting the rows and cols to 0, while keeping channels, dtype and device un...
Definition Image.h:65
open3d::geometry::Image ToLegacy() const
Convert to legacy Image type.
Definition Image.cpp:527
Image Filter(const core::Tensor &kernel) const
Return a new image after filtering with the given kernel.
Definition Image.cpp:271
Image CreateNormalMap(float invalid_fill=0.0f)
Create a normal map from a vertex map.
Definition Image.cpp:460
Image & LinearTransform(double scale=1.0, double offset=0.0)
Function to linearly transform pixel intensities in place.
Definition Image.h:161
Image & Reset(int64_t rows=0, int64_t cols=0, int64_t channels=1, core::Dtype dtype=core::Float32, const core::Device &device=core::Device("CPU:0"))
Reinitialize image with new parameters.
Definition Image.cpp:55
Image To(const core::Device &device, bool copy=false) const
Transfer the image to a specified device.
Definition Image.h:132
core::Tensor data_
Definition Image.h:340
core::Tensor At(int64_t r, int64_t c) const
Get pixel(s) in the image.
Definition Image.h:104
std::string ToString() const
Text description.
Definition Image.cpp:548
core::Dtype GetDtype() const
Get dtype of the image.
Definition Image.h:93
core::Tensor GetMaxBound() const
Compute max 2D coordinates for the data ({rows, cols}).
Definition Image.h:314
Definition Optional.h:259
const Dtype Int64
Definition Dtype.cpp:47
const Dtype Float32
Definition Dtype.cpp:42
constexpr nullopt_t nullopt
Definition Optional.h:152
Definition PinholeCameraIntrinsic.cpp:16