Open3D (C++ API)  0.11.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  const geometry::RGBDImage &source,
72  const geometry::RGBDImage &target,
73  const geometry::Image &source_xyz,
74  const geometry::RGBDImage &target_dx,
75  const geometry::RGBDImage &target_dy,
76  const Eigen::Matrix3d &intrinsic,
77  const Eigen::Matrix4d &extrinsic,
78  const CorrespondenceSetPixelWise &corresps) const = 0;
79 };
80 
91 public:
95 
96 public:
98  void ComputeJacobianAndResidual(
99  int row,
100  std::vector<Eigen::Vector6d, utility::Vector6d_allocator> &J_r,
101  std::vector<double> &r,
102  const geometry::RGBDImage &source,
103  const geometry::RGBDImage &target,
104  const geometry::Image &source_xyz,
105  const geometry::RGBDImage &target_dx,
106  const geometry::RGBDImage &target_dy,
107  const Eigen::Matrix3d &intrinsic,
108  const Eigen::Matrix4d &extrinsic,
109  const CorrespondenceSetPixelWise &corresps) const override;
110 };
111 
121 public:
125 
126 public:
128  void ComputeJacobianAndResidual(
129  int row,
130  std::vector<Eigen::Vector6d, utility::Vector6d_allocator> &J_r,
131  std::vector<double> &r,
132  const geometry::RGBDImage &source,
133  const geometry::RGBDImage &target,
134  const geometry::Image &source_xyz,
135  const geometry::RGBDImage &target_dx,
136  const geometry::RGBDImage &target_dy,
137  const Eigen::Matrix3d &intrinsic,
138  const Eigen::Matrix4d &extrinsic,
139  const CorrespondenceSetPixelWise &corresps) const override;
140 };
141 
142 } // namespace odometry
143 } // namespace pipelines
144 } // 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:90
RGBDOdometryJacobianFromHybridTerm()
Default Constructor.
Definition: RGBDOdometryJacobian.h:123
RGBDOdometryJacobianFromColorTerm()
Default Constructor.
Definition: RGBDOdometryJacobian.h:93
Class to compute Jacobian using hybrid term.
Definition: RGBDOdometryJacobian.h:120
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:124
~RGBDOdometryJacobianFromColorTerm() override
Definition: RGBDOdometryJacobian.h:94
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