61 Image(int64_t rows = 0,
111 return data_[r][c][0];
119 return data_[r][c][ch];
int64_t GetChannels() const
Get the number of channels of the image.
Definition: Image.h:97
int64_t GetRows() const
Get the number of rows of the image.
Definition: Image.h:91
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:118
void * GetDataPtr()
Definition: Tensor.h:939
bool IsEmpty() const override
Returns true if rows * cols * channels == 0.
Definition: Image.h:85
void * GetDataPtr()
Get raw buffer of the Image data.
Definition: Image.h:123
virtual ~Image() override
Definition: Image.h:74
Device GetDevice() const
Definition: Tensor.cpp:944
Dtype GetDtype() const
Definition: Tensor.h:943
The Image class stores image with customizable rols, cols, channels, dtype and device.
Definition: Image.h:43
core::Tensor data_
Definition: Image.h:134
core::Device GetDevice() const
Get device of the image.
Definition: Image.h:103
int64_t GetCols() const
Get the number of columns of the image.
Definition: Image.h:94
core::Tensor At(int64_t r, int64_t c) const
Definition: Image.h:109
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:38
static const Dtype Float32
Definition: Dtype.h:42
const void * GetDataPtr() const
Get raw buffer of the Image data.
Definition: Image.h:126
SizeVector GetShape() const
Definition: Tensor.h:923
The base geometry class.
Definition: Geometry.h:36
Definition: PinholeCameraIntrinsic.cpp:35
Image & Clear() override
Definition: Image.h:79
core::Dtype GetDtype() const
Get dtype of the image.
Definition: Image.h:100
core::Tensor AsTensor() const
Retuns the underlying Tensor of the Image.
Definition: Image.h:129