Apollo  v5.5.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:
35 
36  Eigen::Vector2f Project(const Eigen::Vector3f& point3d) override;
37 
38  std::shared_ptr<BaseCameraModel> get_camera_model() override;
39 
40  std::string name() const override {
41  return "OmnidirectionalCameraDistortionModel";
42  }
43 
44  bool set_params(size_t width, size_t height,
45  const Eigen::VectorXf& params) override;
46 
47  protected:
48  Eigen::Matrix3f intrinsic_params_;
51  float center_[2]; // x, y
52  float affine_[3]; // c, d, e
53 };
54 
55 /* TODO(all): to remove
56 typedef std::shared_ptr<OmnidirectionalCameraDistortionModel>
57  OmnidirectionalCameraDistortionModelPtr;
58 typedef std::shared_ptr<const OmnidirectionalCameraDistortionModel>
59  OmnidirectionalCameraDistortionModelConstPtr;
60 */
61 
62 } // namespace base
63 } // namespace perception
64 } // namespace apollo
Definition: polynomial.h:26
Definition: blob.h:72
Polynomial world2cam_
Definition: omnidirectional_model.h:50
std::string name() const override
Definition: omnidirectional_model.h:40
float center_[2]
Definition: omnidirectional_model.h:51
Eigen::Matrix3f intrinsic_params_
Definition: omnidirectional_model.h:48
std::shared_ptr< BaseCameraModel > get_camera_model() override
float affine_[3]
Definition: omnidirectional_model.h:52
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:49