Open3D (C++ API)  0.15.1
ColorMapUtils.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-2021 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 
29 #include <memory>
30 #include <vector>
31 
33 #include "open3d/geometry/Image.h"
37 #include "open3d/utility/Eigen.h"
39 
40 namespace open3d {
41 namespace pipelines {
42 namespace color_map {
43 
44 std::tuple<std::vector<geometry::Image>,
45  std::vector<geometry::Image>,
46  std::vector<geometry::Image>,
47  std::vector<geometry::Image>,
48  std::vector<geometry::Image>>
49 CreateUtilImagesFromRGBD(const std::vector<geometry::RGBDImage>& images_rgbd);
50 
51 std::vector<geometry::Image> CreateDepthBoundaryMasks(
52  const std::vector<geometry::Image>& images_depth,
53  double depth_threshold_for_discontinuity_check,
54  int half_dilation_kernel_size_for_discontinuity_map);
55 
56 std::tuple<std::vector<std::vector<int>>, std::vector<std::vector<int>>>
58  const geometry::TriangleMesh& mesh,
59  const std::vector<geometry::Image>& images_depth,
60  const std::vector<geometry::Image>& images_mask,
61  const camera::PinholeCameraTrajectory& camera_trajectory,
62  double maximum_allowable_depth,
63  double depth_threshold_for_visibility_check);
64 
66  const geometry::TriangleMesh& mesh,
67  const std::vector<geometry::Image>& images_gray,
68  const utility::optional<std::vector<ImageWarpingField>>& warping_fields,
69  const camera::PinholeCameraTrajectory& camera_trajectory,
70  const std::vector<std::vector<int>>& visibility_vertex_to_image,
71  std::vector<double>& proxy_intensity,
72  int image_boundary_margin);
73 
75  geometry::TriangleMesh& mesh,
76  const std::vector<geometry::Image>& images_color,
77  const utility::optional<std::vector<ImageWarpingField>>& warping_fields,
78  const camera::PinholeCameraTrajectory& camera_trajectory,
79  const std::vector<std::vector<int>>& visibility_vertex_to_image,
80  int image_boundary_margin = 10,
81  int invisible_vertex_color_knn = 3);
82 
83 } // namespace color_map
84 } // namespace pipelines
85 } // namespace open3d
void SetProxyIntensityForVertex(const geometry::TriangleMesh &mesh, const std::vector< geometry::Image > &images_gray, const utility::optional< std::vector< ImageWarpingField >> &warping_fields, const camera::PinholeCameraTrajectory &camera_trajectory, const std::vector< std::vector< int >> &visibility_vertex_to_image, std::vector< double > &proxy_intensity, int image_boundary_margin)
Definition: ColorMapUtils.cpp:204
std::tuple< std::vector< geometry::Image >, std::vector< geometry::Image >, std::vector< geometry::Image >, std::vector< geometry::Image >, std::vector< geometry::Image > > CreateUtilImagesFromRGBD(const std::vector< geometry::RGBDImage > &images_rgbd)
Definition: ColorMapUtils.cpp:97
std::vector< geometry::Image > CreateDepthBoundaryMasks(const std::vector< geometry::Image > &images_depth, double depth_threshold_for_discontinuity_check, int half_dilation_kernel_size_for_discontinuity_map)
Definition: ColorMapUtils.cpp:121
std::tuple< std::vector< std::vector< int > >, std::vector< std::vector< int > > > CreateVertexAndImageVisibility(const geometry::TriangleMesh &mesh, const std::vector< geometry::Image > &images_depth, const std::vector< geometry::Image > &images_mask, const camera::PinholeCameraTrajectory &camera_trajectory, double maximum_allowable_depth, double depth_threshold_for_visibility_check)
Definition: ColorMapUtils.cpp:138
void SetGeometryColorAverage(geometry::TriangleMesh &mesh, const std::vector< geometry::Image > &images_color, const utility::optional< std::vector< ImageWarpingField >> &warping_fields, const camera::PinholeCameraTrajectory &camera_trajectory, const std::vector< std::vector< int >> &visibility_vertex_to_image, int image_boundary_margin, int invisible_vertex_color_knn)
Definition: ColorMapUtils.cpp:248
Definition: PinholeCameraIntrinsic.cpp:35