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 
56 public:
59  virtual ~RGBDOdometryJacobian() {}
60 
61 public:
66  virtual void ComputeJacobianAndResidual(
67  int row,
68  std::vector<Eigen::Vector6d, utility::Vector6d_allocator> &J_r,
69  std::vector<double> &r,
70  const geometry::RGBDImage &source,
71  const geometry::RGBDImage &target,
72  const geometry::Image &source_xyz,
73  const geometry::RGBDImage &target_dx,
74  const geometry::RGBDImage &target_dy,
75  const Eigen::Matrix3d &intrinsic,
76  const Eigen::Matrix4d &extrinsic,
77  const CorrespondenceSetPixelWise &corresps) const = 0;
78 };
79 
90 public:
94 
95 public:
97  void ComputeJacobianAndResidual(
98  int row,
99  std::vector<Eigen::Vector6d, utility::Vector6d_allocator> &J_r,
100  std::vector<double> &r,
101  const geometry::RGBDImage &source,
102  const geometry::RGBDImage &target,
103  const geometry::Image &source_xyz,
104  const geometry::RGBDImage &target_dx,
105  const geometry::RGBDImage &target_dy,
106  const Eigen::Matrix3d &intrinsic,
107  const Eigen::Matrix4d &extrinsic,
108  const CorrespondenceSetPixelWise &corresps) const override;
109 };
110 
120 public:
124 
125 public:
127  void ComputeJacobianAndResidual(
128  int row,
129  std::vector<Eigen::Vector6d, utility::Vector6d_allocator> &J_r,
130  std::vector<double> &r,
131  const geometry::RGBDImage &source,
132  const geometry::RGBDImage &target,
133  const geometry::Image &source_xyz,
134  const geometry::RGBDImage &target_dx,
135  const geometry::RGBDImage &target_dy,
136  const Eigen::Matrix3d &intrinsic,
137  const Eigen::Matrix4d &extrinsic,
138  const CorrespondenceSetPixelWise &corresps) const override;
139 };
140 
141 } // namespace odometry
142 } // namespace open3d
~RGBDOdometryJacobianFromColorTerm() override
Definition: RGBDOdometryJacobian.h:93
RGBDOdometryJacobian()
Default Constructor.
Definition: RGBDOdometryJacobian.h:58
Class to compute Jacobian using hybrid term.
Definition: RGBDOdometryJacobian.h:119
std::vector< Eigen::Vector4i, utility::Vector4i_allocator > CorrespondenceSetPixelWise
Definition: RGBDOdometryJacobian.h:50
RGBDOdometryJacobianFromHybridTerm()
Default Constructor.
Definition: RGBDOdometryJacobian.h:122
~RGBDOdometryJacobianFromHybridTerm() override
Definition: RGBDOdometryJacobian.h:123
RGBDImage is for a pair of registered color and depth images,.
Definition: RGBDImage.h:46
Definition: Open3DViewer.h:29
RGBDOdometryJacobianFromColorTerm()
Default Constructor.
Definition: RGBDOdometryJacobian.h:92
virtual ~RGBDOdometryJacobian()
Definition: RGBDOdometryJacobian.h:59
Base class that computes Jacobian from two RGB-D images.
Definition: RGBDOdometryJacobian.h:55
Class to compute Jacobian using color term.
Definition: RGBDOdometryJacobian.h:89
The Image class stores image with customizable width, height, num of channels and bytes per channel...
Definition: Image.h:53