Apollo  6.0
Open source self driving car software
camera_homography.h
Go to the documentation of this file.
1 /******************************************************************************
2  * Copyright 2018 The Apollo Authors. All Rights Reserved.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *****************************************************************************/
16 #pragma once
17 
18 #include "Eigen/Core"
19 #include "Eigen/Geometry"
21 
22 namespace apollo {
23 namespace perception {
24 namespace common {
25 
26 // @brief: find the corresponding 2D point in camera2, given 2D point in
27 // camera1. assume the two cameras have the same optical center.
28 // notice camera1_intrinsic_inverse is inverse version
29 bool PointCamera1ToCamera2(const Eigen::Vector2d& point,
30  const Eigen::Matrix3d& camera1_intrinsic_inverse,
31  const Eigen::Matrix3d& camera2_intrinsic,
32  const Eigen::Matrix3d& trans_camera1_to_camera2,
33  Eigen::Vector2d* point_out);
34 
35 // @brief: estimate whether two cameras have field overlap.
36 bool IsCamerasFieldOverlap(const base::PinholeCameraModel& from_camera,
37  const base::PinholeCameraModel& to_camera,
38  const Eigen::Matrix4d& extrinsic,
39  Eigen::Vector2d* up_left,
40  Eigen::Vector2d* low_right);
41 
42 } // namespace common
43 } // namespace perception
44 } // namespace apollo
PlanningContext is the runtime context in planning. It is persistent across multiple frames...
Definition: atomic_hash_map.h:25
Eigen::Vector2d Vector2d
Definition: base_map_fwd.h:36
Eigen::Matrix4d Matrix4d
Definition: base_map_fwd.h:32
bool IsCamerasFieldOverlap(const base::PinholeCameraModel &from_camera, const base::PinholeCameraModel &to_camera, const Eigen::Matrix4d &extrinsic, Eigen::Vector2d *up_left, Eigen::Vector2d *low_right)
bool PointCamera1ToCamera2(const Eigen::Vector2d &point, const Eigen::Matrix3d &camera1_intrinsic_inverse, const Eigen::Matrix3d &camera2_intrinsic, const Eigen::Matrix3d &trans_camera1_to_camera2, Eigen::Vector2d *point_out)
Eigen::Matrix3d Matrix3d
Definition: base_map_fwd.h:33