Open3D (C++ API)
RGBDOdometryJacobian.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 
29 #include <iostream>
30 #include <vector>
31 #include <tuple>
32 #include <Eigen/Core>
34 #include <Open3D/Utility/Eigen.h>
35 
36 namespace open3d {
37 
38 namespace geometry {
39 class Image;
40 }
41 
42 namespace geometry {
43 class RGBDImage;
44 }
45 
46 namespace odometry {
47 
48 typedef std::vector<Eigen::Vector4i, utility::Vector4i_allocator>
50 
53 public:
55  virtual ~RGBDOdometryJacobian() {}
56 
57 public:
62  virtual void ComputeJacobianAndResidual(
63  int row,
64  std::vector<Eigen::Vector6d, utility::Vector6d_allocator> &J_r,
65  std::vector<double> &r,
66  const geometry::RGBDImage &source,
67  const geometry::RGBDImage &target,
68  const geometry::Image &source_xyz,
69  const geometry::RGBDImage &target_dx,
70  const geometry::RGBDImage &target_dy,
71  const Eigen::Matrix3d &intrinsic,
72  const Eigen::Matrix4d &extrinsic,
73  const CorrespondenceSetPixelWise &corresps) const = 0;
74 };
75 
83 public:
86 
87 public:
88  void ComputeJacobianAndResidual(
89  int row,
90  std::vector<Eigen::Vector6d, utility::Vector6d_allocator> &J_r,
91  std::vector<double> &r,
92  const geometry::RGBDImage &source,
93  const geometry::RGBDImage &target,
94  const geometry::Image &source_xyz,
95  const geometry::RGBDImage &target_dx,
96  const geometry::RGBDImage &target_dy,
97  const Eigen::Matrix3d &intrinsic,
98  const Eigen::Matrix4d &extrinsic,
99  const CorrespondenceSetPixelWise &corresps) const override;
100 };
101 
108 public:
111 
112 public:
113  void ComputeJacobianAndResidual(
114  int row,
115  std::vector<Eigen::Vector6d, utility::Vector6d_allocator> &J_r,
116  std::vector<double> &r,
117  const geometry::RGBDImage &source,
118  const geometry::RGBDImage &target,
119  const geometry::Image &source_xyz,
120  const geometry::RGBDImage &target_dx,
121  const geometry::RGBDImage &target_dy,
122  const Eigen::Matrix3d &intrinsic,
123  const Eigen::Matrix4d &extrinsic,
124  const CorrespondenceSetPixelWise &corresps) const override;
125 };
126 
127 } // namespace odometry
128 } // namespace open3d
~RGBDOdometryJacobianFromColorTerm() override
Definition: RGBDOdometryJacobian.h:85
RGBDOdometryJacobian()
Definition: RGBDOdometryJacobian.h:54
Definition: RGBDOdometryJacobian.h:107
std::vector< Eigen::Vector4i, utility::Vector4i_allocator > CorrespondenceSetPixelWise
Definition: RGBDOdometryJacobian.h:49
RGBDOdometryJacobianFromHybridTerm()
Definition: RGBDOdometryJacobian.h:109
~RGBDOdometryJacobianFromHybridTerm() override
Definition: RGBDOdometryJacobian.h:110
Definition: RGBDImage.h:38
Definition: PinholeCameraIntrinsic.cpp:33
RGBDOdometryJacobianFromColorTerm()
Definition: RGBDOdometryJacobian.h:84
virtual ~RGBDOdometryJacobian()
Definition: RGBDOdometryJacobian.h:55
Base class that computes Jacobian from two RGB-D images.
Definition: RGBDOdometryJacobian.h:52
Definition: RGBDOdometryJacobian.h:82
Definition: Image.h:44