Open3D (C++ API)  0.16.1
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-2021 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
36
37namespace open3d {
38
39namespace geometry {
40class Image;
41}
42
43namespace geometry {
44class RGBDImage;
45}
46
47namespace pipelines {
48namespace odometry {
49
50typedef std::vector<Eigen::Vector4i, utility::Vector4i_allocator>
52
57public:
61
62public:
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
92public:
96
97public:
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
128public:
132
133public:
136 int row,
137 std::vector<Eigen::Vector6d, utility::Vector6d_allocator> &J_r,
138 std::vector<double> &r,
139 std::vector<double> &w,
140 const geometry::RGBDImage &source,
141 const geometry::RGBDImage &target,
142 const geometry::Image &source_xyz,
143 const geometry::RGBDImage &target_dx,
144 const geometry::RGBDImage &target_dy,
145 const Eigen::Matrix3d &intrinsic,
146 const Eigen::Matrix4d &extrinsic,
147 const CorrespondenceSetPixelWise &corresps) const override;
148};
149
150} // namespace odometry
151} // namespace pipelines
152} // namespace open3d
The Image class stores image with customizable width, height, num of channels and bytes per channel.
Definition: Image.h:53
RGBDImage is for a pair of registered color and depth images,.
Definition: RGBDImage.h:46
Class to compute Jacobian using color term.
Definition: RGBDOdometryJacobian.h:91
void ComputeJacobianAndResidual(int row, std::vector< Eigen::Vector6d, utility::Vector6d_allocator > &J_r, std::vector< double > &r, std::vector< double > &w, const geometry::RGBDImage &source, const geometry::RGBDImage &target, const geometry::Image &source_xyz, const geometry::RGBDImage &target_dx, const geometry::RGBDImage &target_dy, const Eigen::Matrix3d &intrinsic, const Eigen::Matrix4d &extrinsic, const CorrespondenceSetPixelWise &corresps) const override
Parameterized Constructor.
Definition: RGBDOdometryJacobian.cpp:44
RGBDOdometryJacobianFromColorTerm()
Default Constructor.
Definition: RGBDOdometryJacobian.h:94
~RGBDOdometryJacobianFromColorTerm() override
Definition: RGBDOdometryJacobian.h:95
Class to compute Jacobian using hybrid term.
Definition: RGBDOdometryJacobian.h:127
~RGBDOdometryJacobianFromHybridTerm() override
Definition: RGBDOdometryJacobian.h:131
RGBDOdometryJacobianFromHybridTerm()
Default Constructor.
Definition: RGBDOdometryJacobian.h:130
void ComputeJacobianAndResidual(int row, std::vector< Eigen::Vector6d, utility::Vector6d_allocator > &J_r, std::vector< double > &r, std::vector< double > &w, const geometry::RGBDImage &source, const geometry::RGBDImage &target, const geometry::Image &source_xyz, const geometry::RGBDImage &target_dx, const geometry::RGBDImage &target_dy, const Eigen::Matrix3d &intrinsic, const Eigen::Matrix4d &extrinsic, const CorrespondenceSetPixelWise &corresps) const override
Parameterized Constructor.
Definition: RGBDOdometryJacobian.cpp:90
Base class that computes Jacobian from two RGB-D images.
Definition: RGBDOdometryJacobian.h:56
virtual ~RGBDOdometryJacobian()
Definition: RGBDOdometryJacobian.h:60
virtual void ComputeJacobianAndResidual(int row, std::vector< Eigen::Vector6d, utility::Vector6d_allocator > &J_r, std::vector< double > &r, std::vector< double > &w, const geometry::RGBDImage &source, const geometry::RGBDImage &target, const geometry::Image &source_xyz, const geometry::RGBDImage &target_dx, const geometry::RGBDImage &target_dy, const Eigen::Matrix3d &intrinsic, const Eigen::Matrix4d &extrinsic, const CorrespondenceSetPixelWise &corresps) const =0
RGBDOdometryJacobian()
Default Constructor.
Definition: RGBDOdometryJacobian.h:59
std::vector< Eigen::Vector4i, utility::Vector4i_allocator > CorrespondenceSetPixelWise
Definition: RGBDOdometryJacobian.h:51
Definition: PinholeCameraIntrinsic.cpp:35