Open3D (C++ API)  0.12.0
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 pipelines {
48 namespace odometry {
49 
50 typedef std::vector<Eigen::Vector4i, utility::Vector4i_allocator>
52 
57 public:
60  virtual ~RGBDOdometryJacobian() {}
61 
62 public:
67  virtual void ComputeJacobianAndResidual(
68  int row,
69  std::vector<Eigen::Vector6d, utility::Vector6d_allocator> &J_r,
70  std::vector<double> &r,
71  std::vector<double> &w,
72  const geometry::RGBDImage &source,
73  const geometry::RGBDImage &target,
74  const geometry::Image &source_xyz,
75  const geometry::RGBDImage &target_dx,
76  const geometry::RGBDImage &target_dy,
77  const Eigen::Matrix3d &intrinsic,
78  const Eigen::Matrix4d &extrinsic,
79  const CorrespondenceSetPixelWise &corresps) const = 0;
80 };
81 
92 public:
96 
97 public:
99  void ComputeJacobianAndResidual(
100  int row,
101  std::vector<Eigen::Vector6d, utility::Vector6d_allocator> &J_r,
102  std::vector<double> &r,
103  std::vector<double> &w,
104  const geometry::RGBDImage &source,
105  const geometry::RGBDImage &target,
106  const geometry::Image &source_xyz,
107  const geometry::RGBDImage &target_dx,
108  const geometry::RGBDImage &target_dy,
109  const Eigen::Matrix3d &intrinsic,
110  const Eigen::Matrix4d &extrinsic,
111  const CorrespondenceSetPixelWise &corresps) const override;
112 };
113 
123 public:
127 
128 public:
130  void ComputeJacobianAndResidual(
131  int row,
132  std::vector<Eigen::Vector6d, utility::Vector6d_allocator> &J_r,
133  std::vector<double> &r,
134  std::vector<double> &w,
135  const geometry::RGBDImage &source,
136  const geometry::RGBDImage &target,
137  const geometry::Image &source_xyz,
138  const geometry::RGBDImage &target_dx,
139  const geometry::RGBDImage &target_dy,
140  const Eigen::Matrix3d &intrinsic,
141  const Eigen::Matrix4d &extrinsic,
142  const CorrespondenceSetPixelWise &corresps) const override;
143 };
144 
145 } // namespace odometry
146 } // namespace pipelines
147 } // namespace open3d
RGBDOdometryJacobian()
Default Constructor.
Definition: RGBDOdometryJacobian.h:59
std::vector< Eigen::Vector4i, utility::Vector4i_allocator > CorrespondenceSetPixelWise
Definition: RGBDOdometryJacobian.h:51
Class to compute Jacobian using color term.
Definition: RGBDOdometryJacobian.h:91
RGBDOdometryJacobianFromHybridTerm()
Default Constructor.
Definition: RGBDOdometryJacobian.h:125
RGBDOdometryJacobianFromColorTerm()
Default Constructor.
Definition: RGBDOdometryJacobian.h:94
Class to compute Jacobian using hybrid term.
Definition: RGBDOdometryJacobian.h:122
RGBDImage is for a pair of registered color and depth images,.
Definition: RGBDImage.h:46
Definition: PinholeCameraIntrinsic.cpp:35
virtual ~RGBDOdometryJacobian()
Definition: RGBDOdometryJacobian.h:60
~RGBDOdometryJacobianFromHybridTerm() override
Definition: RGBDOdometryJacobian.h:126
~RGBDOdometryJacobianFromColorTerm() override
Definition: RGBDOdometryJacobian.h:95
The Image class stores image with customizable width, height, num of channels and bytes per channel...
Definition: Image.h:53
Base class that computes Jacobian from two RGB-D images.
Definition: RGBDOdometryJacobian.h:56