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