 |
ACloudViewer
3.9.4
A Modern Library for 3D Data Processing
|
Go to the documentation of this file.
19 class PinholeCameraIntrinsic;
27 typedef std::vector<std::shared_ptr<Image>>
ImagePyramid;
78 virtual ccBBox getOwnBB(
bool withGLFeatures =
false)
override;
83 virtual void onDeletionOf(
const ccHObject *obj)
override;
87 inline virtual bool IsEmpty()
const override {
return !HasData(); }
88 virtual Eigen::Vector2d GetMin2DBound()
const override;
89 virtual Eigen::Vector2d GetMax2DBound()
const override;
99 bool TestImageBoundary(
double u,
double v,
double inner_margin = 0.0)
const;
104 return width_ > 0 && height_ > 0 &&
105 data_.size() == size_t(height_ * BytesPerLine());
112 int bytes_per_channel) {
115 num_of_channels_ = num_of_channels;
116 bytes_per_channel_ = bytes_per_channel;
117 AllocateDataBuffer();
123 return width_ * num_of_channels_ * bytes_per_channel_;
131 std::pair<bool, double> FloatValueAt(
double u,
double v)
const;
140 static std::shared_ptr<Image>
141 CreateDepthToCameraDistanceMultiplierFloatImage(
145 std::shared_ptr<Image> CreateFloatImage(
150 template <
typename T>
151 T *PointerAt(
int u,
int v)
const;
154 template <
typename T>
155 T *PointerAt(
int u,
int v,
int ch)
const;
157 std::shared_ptr<Image> ConvertDepthToFloatImage(
158 double depth_scale = 1000.0,
double depth_trunc = 3.0)
const;
160 std::shared_ptr<Image> Transpose()
const;
163 std::shared_ptr<Image> FlipHorizontal()
const;
165 std::shared_ptr<Image> FlipVertical()
const;
171 std::shared_ptr<Image>
Filter(
const std::vector<double> &dx,
172 const std::vector<double> &dy)
const;
174 std::shared_ptr<Image> FilterHorizontal(
175 const std::vector<double> &kernel)
const;
178 std::shared_ptr<Image> Downsample()
const;
181 std::shared_ptr<Image>
Dilate(
int half_kernel_size = 1)
const;
185 Image &LinearTransform(
double scale = 1.0,
double offset = 0.0);
191 Image &ClipIntensity(
double min = 0.0,
double max = 1.0);
196 template <
typename T>
197 std::shared_ptr<Image> CreateImageFromFloatImage()
const;
205 bool with_gaussian_filter =
true)
const;
208 std::shared_ptr<Image> CreateDepthBoundaryMask(
209 double depth_threshold_for_discontinuity_check = 0.1,
210 int half_dilation_kernel_size_for_discontinuity_map = 3)
const;
214 data_.resize(width_ * height_ * num_of_channels_ * bytes_per_channel_);
223 int num_of_channels_ = 0;
225 int bytes_per_channel_ = 0;
Generic file read and write utility for python interface.
Definition: CloudViewerConfig.cpp:12
void AllocateDataBuffer()
Definition: Image.h:213
ColorToIntensityConversionType
Specifies whether R, G, B channels have the same weight when converting to intensity....
Definition: Image.h:42
FilterType
Specifies the Image filter type.
Definition: Image.h:52
int offset
Definition: FileIOFactory.cpp:135
virtual bool HasData() const
Returns true if the Image has valid data.
Definition: Image.h:103
Bounding box structure.
Definition: ecvBBox.h:25
std::vector< std::shared_ptr< Image > > ImagePyramid
Typedef and functions for ImagePyramid.
Definition: Image.h:24
int width
Definition: FileIOFactory.cpp:142
int64_t CV_CLASS_ENUM
Type of object type flags (64 bits)
Definition: CVTypes.h:97
ImGuiContext * context
Definition: Window.cpp:76
int BytesPerLine() const
Returns data size per line (row, or the width) in bytes.
Definition: Image.h:122
int height
Definition: FileIOFactory.cpp:143
~Image() override
Definition: Image.h:68
Contains the pinhole camera intrinsic parameters.
Definition: PinholeCameraIntrinsic.h:34
virtual void drawMeOnly(CC_DRAW_CONTEXT &context) override
Draws the entity only (not its children)
Definition: Image.h:82
std::vector< uint8_t > data_
Image storage buffer.
Definition: Image.h:227
void Filter(const core::Tensor &src_im, core::Tensor &dst_im, const core::Tensor &kernel)
Definition: IPPImage.cpp:170
@ IMAGE2
Definition: CVTypes.h:156
virtual bool isSerializable() const override
Returns whether object is serializable of not.
Definition: Image.h:71
virtual CV_CLASS_ENUM getClassID() const override
Returns unique class ID.
Definition: Image.h:74
Image(const char *name="Image")
Default Constructor.
Definition: Image.h:67
Hierarchical CLOUDVIEWER Object.
Definition: ecvHObject.h:25
#define CV_DB_LIB_API
Definition: CV_db.h:15
Display context.
Definition: ecvDrawContext.h:365
void Dilate(const core::Tensor &src_im, core::Tensor &dst_im, int kernel_size)
Definition: IPPImage.cpp:133
@ Weighted
Weighted R, G, B channels: I = 0.299 * R + 0.587 * G + 0.114 * B.
virtual bool IsEmpty() const override
Definition: Image.h:87
char type
Definition: FileIOFactory.cpp:131
The Image class stores image with customizable width, height, num of channels and bytes per channel.
Definition: Image.h:33
std::string name
Definition: FileIOFactory.cpp:129
Image & Prepare(int width, int height, int num_of_channels, int bytes_per_channel)
Prepare Image properties and allocate Image buffer.
Definition: Image.h:109