Apollo 11.0
自动驾驶开放平台
multicue_transformer.h
浏览该文件的文档.
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
23#include "modules/perception/camera_location_estimation/transformer/multicue/proto/multicue.pb.h"
24
30
31namespace apollo {
32namespace perception {
33namespace camera {
34
36 public:
38
39 virtual ~MultiCueTransformer() = default;
47 bool Init(const TransformerInitOptions &options =
48 TransformerInitOptions()) override;
49
57 bool Transform(onboard::CameraFrame *frame) override;
58
59 std::string Name() const override { return "MultiCueTransformer"; }
60
61 private:
62 void SetObjMapperOptions(base::ObjectPtr obj,
63 const Eigen::Matrix3f &camera_k_matrix,
64 int width_image, int height_image,
65 ObjMapperOptions *obj_mapper_options,
66 float *theta_ray);
67 int MatchTemplates(base::ObjectSubType sub_type, float *dimension_hwl);
68 void FillResults(float object_center[3], float dimension_hwl[3],
69 float rotation_y, const Eigen::Affine3d &camera2world_pose,
70 float theta_ray, base::ObjectPtr obj);
71
72 private:
73 MulticueParam multicue_param_;
74 std::unique_ptr<ObjMapper> mapper_;
75
76 protected:
78};
79
80} // namespace camera
81} // namespace perception
82} // namespace apollo
bool Init(const TransformerInitOptions &options=TransformerInitOptions()) override
Init for ObjectTemplate and Object map
std::shared_ptr< Object > ObjectPtr
Definition object.h:127
class register implement
Definition arena_queue.h:37