Open3D (C++ API)
RGBDImage.h
Go to the documentation of this file.
1 // ----------------------------------------------------------------------------
2 // - Open3D: www.open3d.org -
3 // ----------------------------------------------------------------------------
4 // The MIT License (MIT)
5 //
6 // Copyright (c) 2018 www.open3d.org
7 //
8 // Permission is hereby granted, free of charge, to any person obtaining a copy
9 // of this software and associated documentation files (the "Software"), to deal
10 // in the Software without restriction, including without limitation the rights
11 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12 // copies of the Software, and to permit persons to whom the Software is
13 // furnished to do so, subject to the following conditions:
14 //
15 // The above copyright notice and this permission notice shall be included in
16 // all copies or substantial portions of the Software.
17 //
18 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
23 // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
24 // IN THE SOFTWARE.
25 // ----------------------------------------------------------------------------
26 
27 #pragma once
28 
30 #include <Open3D/Geometry/Image.h>
31 
32 namespace open3d {
33 namespace geometry {
34 
38 class RGBDImage {
39 public:
40  RGBDImage(){};
41  RGBDImage(const Image &color, const Image &depth)
42  : color_(color), depth_(depth){};
44  color_.Clear();
45  depth_.Clear();
46  };
47 
48 public:
49  Image color_;
51 };
52 
54 std::shared_ptr<RGBDImage> CreateRGBDImageFromColorAndDepth(
55  const Image &color,
56  const Image &depth,
57  double depth_scale = 1000.0,
58  double depth_trunc = 3.0,
59  bool convert_rgb_to_intensity = true);
60 
62 std::shared_ptr<RGBDImage> CreateRGBDImageFromRedwoodFormat(
63  const Image &color,
64  const Image &depth,
65  bool convert_rgb_to_intensity = true);
66 
68 std::shared_ptr<RGBDImage> CreateRGBDImageFromTUMFormat(
69  const Image &color,
70  const Image &depth,
71  bool convert_rgb_to_intensity = true);
72 
74 std::shared_ptr<RGBDImage> CreateRGBDImageFromSUNFormat(
75  const Image &color,
76  const Image &depth,
77  bool convert_rgb_to_intensity = true);
78 
80 std::shared_ptr<RGBDImage> CreateRGBDImageFromNYUFormat(
81  const Image &color,
82  const Image &depth,
83  bool convert_rgb_to_intensity = true);
84 
86 typedef std::vector<std::shared_ptr<RGBDImage>> RGBDImagePyramid;
87 
88 RGBDImagePyramid FilterRGBDImagePyramid(
89  const RGBDImagePyramid &rgbd_image_pyramid, Image::FilterType type);
90 
91 RGBDImagePyramid CreateRGBDImagePyramid(
92  const RGBDImage &rgbd_image,
93  size_t num_of_levels,
94  bool with_gaussian_filter_for_color = true,
95  bool with_gaussian_filter_for_depth = false);
96 
97 } // namespace geometry
98 } // namespace open3d
RGBDImage()
Definition: RGBDImage.h:40
Image depth_
Definition: RGBDImage.h:50
~RGBDImage()
Definition: RGBDImage.h:43
RGBDImage(const Image &color, const Image &depth)
Definition: RGBDImage.h:41
std::shared_ptr< RGBDImage > CreateRGBDImageFromColorAndDepth(const Image &color, const Image &depth, double depth_scale=1000.0, double depth_trunc=3.0, bool convert_rgb_to_intensity=true)
Factory function to create an RGBD Image from color and depth Images.
Definition: RGBDImageFactory.cpp:32
Definition: RGBDImage.h:38
char type
Definition: FilePCD.cpp:56
Image color_
Definition: RGBDImage.h:46
FilterType
Definition: Image.h:51
Definition: PinholeCameraIntrinsic.cpp:33
std::shared_ptr< RGBDImage > CreateRGBDImageFromRedwoodFormat(const Image &color, const Image &depth, bool convert_rgb_to_intensity=true)
Factory function to create an RGBD Image from Redwood dataset.
Definition: RGBDImageFactory.cpp:55
std::shared_ptr< RGBDImage > CreateRGBDImageFromNYUFormat(const Image &color, const Image &depth, bool convert_rgb_to_intensity=true)
Factory function to create an RGBD Image from NYU dataset.
Definition: RGBDImageFactory.cpp:97
std::shared_ptr< RGBDImage > CreateRGBDImageFromTUMFormat(const Image &color, const Image &depth, bool convert_rgb_to_intensity=true)
Factory function to create an RGBD Image from TUM dataset.
Definition: RGBDImageFactory.cpp:65
std::vector< std::shared_ptr< RGBDImage > > RGBDImagePyramid
Typedef and functions for RGBDImagePyramid.
Definition: RGBDImage.h:86
std::shared_ptr< RGBDImage > CreateRGBDImageFromSUNFormat(const Image &color, const Image &depth, bool convert_rgb_to_intensity=true)
Factory function to create an RGBD Image from SUN3D dataset.
Definition: RGBDImageFactory.cpp:75
RGBDImagePyramid FilterRGBDImagePyramid(const RGBDImagePyramid &rgbd_image_pyramid, Image::FilterType type)
Definition: RGBDImage.cpp:32
RGBDImagePyramid CreateRGBDImagePyramid(const RGBDImage &rgbd_image, size_t num_of_levels, bool with_gaussian_filter_for_color, bool with_gaussian_filter_for_depth)
Definition: RGBDImage.cpp:49
Definition: Image.h:44
void Clear() override
Definition: Image.cpp:43