Apollo  6.0
Open source self driving car software
omnidirectional_model.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 <memory>
19 #include <string>
20 
21 #include "Eigen/Core"
22 
26 
27 namespace apollo {
28 namespace perception {
29 namespace base {
30 
32  public:
33  EIGEN_MAKE_ALIGNED_OPERATOR_NEW
34 
35  public:
38 
39  Eigen::Vector2f Project(const Eigen::Vector3f& point3d) override;
40 
41  std::shared_ptr<BaseCameraModel> get_camera_model() override;
42 
43  std::string name() const override {
44  return "OmnidirectionalCameraDistortionModel";
45  }
46 
47  bool set_params(size_t width, size_t height,
48  const Eigen::VectorXf& params) override;
49 
50  protected:
54  float center_[2]; // x, y
55  float affine_[3]; // c, d, e
56 };
57 
58 /* TODO(all): to remove
59 typedef std::shared_ptr<OmnidirectionalCameraDistortionModel>
60  OmnidirectionalCameraDistortionModelPtr;
61 typedef std::shared_ptr<const OmnidirectionalCameraDistortionModel>
62  OmnidirectionalCameraDistortionModelConstPtr;
63 */
64 
65 } // namespace base
66 } // namespace perception
67 } // namespace apollo
Definition: polynomial.h:26
Eigen::Vector3f Vector3f
Definition: base_map_fwd.h:29
PlanningContext is the runtime context in planning. It is persistent across multiple frames...
Definition: atomic_hash_map.h:25
Polynomial world2cam_
Definition: omnidirectional_model.h:53
Eigen::Matrix3f Matrix3f
Definition: base_map_fwd.h:27
std::string name() const override
Definition: omnidirectional_model.h:43
float center_[2]
Definition: omnidirectional_model.h:54
Eigen::Matrix3f intrinsic_params_
Definition: omnidirectional_model.h:51
std::shared_ptr< BaseCameraModel > get_camera_model() override
float affine_[3]
Definition: omnidirectional_model.h:55
Eigen::Vector2f Vector2f
Definition: base_map_fwd.h:30
Eigen::Vector2f Project(const Eigen::Vector3f &point3d) override
bool set_params(size_t width, size_t height, const Eigen::VectorXf &params) override
Polynomial cam2world_
Definition: omnidirectional_model.h:52