39 class PinholeCameraIntrinsic;
64 void Clear()
override;
65 bool IsEmpty()
const override;
66 Eigen::Vector2d GetMinBound()
const override;
67 Eigen::Vector2d GetMaxBound()
const override;
68 bool TestImageBoundary(
double u,
double v,
double inner_margin = 0.0)
const;
72 return width_ > 0 && height_ > 0 &&
73 data_.size() == height_ * BytesPerLine();
79 int bytes_per_channel) {
82 num_of_channels_ = num_of_channels;
83 bytes_per_channel_ = bytes_per_channel;
88 return width_ * num_of_channels_ * bytes_per_channel_;
93 std::pair<bool, double> FloatValueAt(
double u,
double v)
const;
97 data_.resize(width_ * height_ * num_of_channels_ * bytes_per_channel_);
103 int num_of_channels_ = 0;
104 int bytes_per_channel_ = 0;
121 Image::ColorToIntensityConversionType::Weighted);
124 template <
typename T>
128 template <
typename T>
132 double depth_scale = 1000.0,
133 double depth_trunc = 3.0);
142 const std::vector<double> &dx,
143 const std::vector<double> &dy);
146 const std::vector<double> &kernel);
153 int half_kernel_size = 1);
169 template <
typename T>
181 size_t num_of_levels,
182 bool with_gaussian_filter =
true);
186 const Image &depth_image_input,
187 double depth_threshold_for_discontinuity_check = 0.1,
188 int half_dilation_kernel_size_for_discontinuity_map = 3);
std::vector< std::shared_ptr< Image > > ImagePyramid
Typedef and functions for ImagePyramid.
Definition: Image.h:173
Definition: Geometry.h:32
int offset
Definition: FilePCD.cpp:60
Definition: PinholeCameraIntrinsic.h:41
ImagePyramid FilterImagePyramid(const ImagePyramid &input, Image::FilterType type)
Function to filter image pyramid.
Definition: Image.cpp:249
T * PointerAt(const Image &image, int u, int v)
Function to access the raw data of a single-channel Image.
Definition: Image.cpp:86
~Image() override
Definition: Image.h:61
void PrepareImage(int width, int height, int num_of_channels, int bytes_per_channel)
Definition: Image.h:76
std::shared_ptr< Image > FilterHorizontalImage(const Image &input, const std::vector< double > &kernel)
Definition: Image.cpp:186
std::shared_ptr< Image > DilateImage(const Image &input, int half_kernel_size)
Function to dilate 8bit mask map.
Definition: Image.cpp:296
Definition: Geometry2D.h:35
std::shared_ptr< Image > CreateImageFromFloatImage(const Image &input)
Definition: ImageFactory.cpp:126
Image()
Definition: Image.h:60
virtual bool HasData() const
Definition: Image.h:71
std::shared_ptr< Image > FilterImage(const Image &input, Image::FilterType type)
Function to filter image with pre-defined filtering type.
Definition: Image.cpp:219
void ClipIntensityImage(Image &input, double min, double max)
Definition: Image.cpp:127
void AllocateDataBuffer()
Definition: Image.h:96
char type
Definition: FilePCD.cpp:56
std::vector< uint8_t > data_
Definition: Image.h:105
FilterType
Definition: Image.h:51
ImagePyramid CreateImagePyramid(const Image &image, size_t num_of_levels, bool with_gaussian_filter=true)
Function to create image pyramid.
Definition: ImageFactory.cpp:150
void LinearTransformImage(Image &input, double scale, double offset)
Definition: Image.cpp:144
Definition: PinholeCameraIntrinsic.cpp:33
int BytesPerLine() const
Definition: Image.h:87
std::shared_ptr< Image > DownsampleImage(const Image &input)
Function to 2x image downsample using simple 2x2 averaging.
Definition: Image.cpp:160
GeometryType
Definition: Geometry.h:34
int height
Definition: FilePCD.cpp:68
std::shared_ptr< Image > CreateFloatImageFromImage(const Image &image, Image::ColorToIntensityConversionType type=Image::ColorToIntensityConversionType::Weighted)
Return a gray scaled float type image.
Definition: ImageFactory.cpp:64
std::shared_ptr< Image > FlipImage(const Image &input)
Definition: Image.cpp:275
std::shared_ptr< Image > CreateDepthToCameraDistanceMultiplierFloatImage(const camera::PinholeCameraIntrinsic &intrinsic)
Definition: ImageFactory.cpp:34
std::shared_ptr< Image > ConvertDepthToFloatImage(const Image &depth, double depth_scale, double depth_trunc)
Definition: Image.cpp:110
std::shared_ptr< Image > CreateDepthBoundaryMask(const Image &depth_image_input, double depth_threshold_for_discontinuity_check, int half_dilation_kernel_size_for_discontinuity_map)
Function to create a depthmap boundary mask from depth image.
Definition: Image.cpp:328
ColorToIntensityConversionType
Definition: Image.h:46
int width
Definition: FilePCD.cpp:67