66 Image(int64_t rows = 0,
125 return data_[r][c][0];
133 return data_[r][c][ch];
182 double offset = 0.0)
const;
242 float value_sigma = 20.0f,
243 float distance_sigma = 10.0f)
const;
255 std::pair<Image, Image>
FilterSobel(
int kernel_size = 3)
const;
295 float clip_fill = 0.0f)
const;
310 float invalid_fill = 0.0f);
364 static constexpr
bool HAVE_IPPICV =
false;
int64_t GetChannels() const
Get the number of channels of the image.
Definition: Image.h:109
Image ColorizeDepth(float scale, float min_value, float max_value)
Colorize an input depth image (with Dtype UInt16 or Float32).
Definition: Image.cpp:557
Image Clone() const
Returns copy of the image on the same device.
Definition: Image.h:156
constexpr nullopt_t nullopt
Definition: Optional.h:146
Super sampling interpolation (only downsample).
Image & Reset(int64_t rows=0, int64_t cols=0, int64_t channels=1, core::Dtype dtype=core::Dtype::Float32, const core::Device &device=core::Device("CPU:0"))
Reinitialize image with new parameters.
Definition: Image.cpp:74
core::Tensor GetMaxBound() const
Compute max 2D coordinates for the data ({rows, cols}).
Definition: Image.h:344
int64_t GetRows() const
Get the number of rows of the image.
Definition: Image.h:103
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:132
Image & LinearTransform(double scale=1.0, double offset=0.0)
Function to linearly transform pixel intensities in place.
Definition: Image.h:193
int offset
Definition: FilePCD.cpp:64
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:293
bool IsEmpty() const override
Returns true if rows * cols * channels == 0.
Definition: Image.h:90
Image CreateVertexMap(const core::Tensor &intrinsics, float invalid_fill=0.0f)
Create a vertex map from a depth image using unprojection.
Definition: Image.cpp:521
Image CUDA(int device_id=0) const
Transfer the image to a CUDA device.
Definition: Image.h:167
const char const char value recording_handle imu_sample recording_handle uint8_t size_t data_size k4a_record_configuration_t config target_format k4a_capture_t capture_handle k4a_imu_sample_t imu_sample playback_handle k4a_logging_message_cb_t void min_level device_handle k4a_imu_sample_t timeout_in_ms capture_handle capture_handle capture_handle image_handle temperature_c k4a_image_t image_handle uint8_t image_handle image_handle image_handle image_handle image_handle timestamp_usec white_balance image_handle k4a_device_configuration_t config device_handle char size_t serial_number_size bool int32_t int32_t max_value
Definition: K4aPlugin.cpp:648
Image RGBToGray() const
Converts a 3-channel RGB image to a new 1-channel Grayscale image.
Definition: Image.cpp:169
Image PyrDown() const
Return a new downsampled image with pyramid downsampling.
Definition: Image.cpp:462
void * GetDataPtr()
Get raw buffer of the Image data.
Definition: Image.h:137
Image Filter(const core::Tensor &kernel) const
Return a new image after filtering with the given kernel.
Definition: Image.cpp:334
virtual ~Image() override
Definition: Image.h:79
Device GetDevice() const
Definition: Tensor.cpp:1098
std::string ToString() const
Text description.
Definition: Image.cpp:632
Dtype GetDtype() const
Definition: Tensor.h:1025
Nearest neighbors interpolation.
The Image class stores image with customizable rows, cols, channels, dtype and device.
Definition: Image.h:48
open3d::geometry::Image ToLegacyImage() const
Convert to legacy Image type.
Definition: Image.cpp:611
core::Tensor data_
Definition: Image.h:371
core::Device GetDevice() const
Get device of the image.
Definition: Image.h:115
Image CreateNormalMap(float invalid_fill=0.0f)
Create a normal map from a vertex map.
Definition: Image.cpp:540
Tensor To(Dtype dtype, bool copy=false) const
Definition: Tensor.cpp:540
int64_t GetCols() const
Get the number of columns of the image.
Definition: Image.h:106
core::Tensor At(int64_t r, int64_t c) const
Get pixel(s) in the image.
Definition: Image.h:123
Image CPU() const
Transfer the image to CPU.
Definition: Image.h:161
static Tensor Zeros(const SizeVector &shape, Dtype dtype, const Device &device=Device("CPU:0"))
Create a tensor fill with zeros.
Definition: Tensor.cpp:240
Image(int64_t rows=0, int64_t cols=0, int64_t channels=1, core::Dtype dtype=core::Dtype::Float32, const core::Device &device=core::Device("CPU:0"))
Constructor for image.
Definition: Image.cpp:49
static const Dtype Float32
Definition: Dtype.h:42
const void * GetDataPtr() const
Get raw buffer of the Image data.
Definition: Image.h:140
core::Tensor GetMinBound() const
Compute min 2D coordinates for the data (always {0, 0}).
Definition: Image.h:339
Image FilterGaussian(int kernel_size=3, float sigma=1.0f) const
Return a new image after Gaussian filtering.
Definition: Image.cpp:370
Definition: Optional.h:54
SizeVector GetShape() const
Definition: Tensor.h:988
The base geometry class.
Definition: Geometry.h:38
InterpType
Image interpolation algorithms.
Definition: Image.h:204
static const Dtype Int64
Definition: Dtype.h:47
Definition: PinholeCameraIntrinsic.cpp:35
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:411
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:486
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:467
T * GetDataPtr()
Definition: Tensor.h:1005
Image & Clear() override
Clear image contents by resetting the rows and cols to 0, while keeping channels, dtype and device un...
Definition: Image.h:84
Image To(const core::Device &device, bool copy=false) const
Transfer the image to a specified device.
Definition: Image.h:151
static Image FromLegacyImage(const open3d::geometry::Image &image_legacy, const core::Device &Device=core::Device("CPU:0"))
Create from a legacy Open3D Image.
Definition: Image.cpp:582
Lanczos filter interpolation.
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:206
static constexpr bool HAVE_IPPICV
Do we use IPP ICV for accelerating image processing operations?
Definition: Image.h:364
Image Dilate(int kernel_size=3) const
Return a new image after performing morphological dilation.
Definition: Image.cpp:252
core::Dtype GetDtype() const
Get dtype of the image.
Definition: Image.h:112
const char const char value recording_handle imu_sample recording_handle uint8_t size_t data_size k4a_record_configuration_t config target_format k4a_capture_t capture_handle k4a_imu_sample_t imu_sample playback_handle k4a_logging_message_cb_t void min_level device_handle k4a_imu_sample_t timeout_in_ms capture_handle capture_handle capture_handle image_handle temperature_c k4a_image_t image_handle uint8_t image_handle image_handle image_handle image_handle image_handle timestamp_usec white_balance image_handle k4a_device_configuration_t config device_handle char size_t serial_number_size bool int32_t min_value
Definition: K4aPlugin.cpp:648
The Image class stores image with customizable width, height, num of channels and bytes per channel...
Definition: Image.h:53
core::Tensor AsTensor() const
Retuns the underlying Tensor of the Image.
Definition: Image.h:143