Apollo  6.0
Open source self driving car software
traffic_light_camera_perception.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 "modules/perception/camera/app/proto/perception.pb.h"
28 
29 namespace apollo {
30 namespace perception {
31 namespace camera {
32 
34  public:
36  : detector_(nullptr), recognizer_(nullptr), tracker_(nullptr) {}
38  bool Init(const CameraPerceptionInitOptions &options) override;
39  bool Perception(const CameraPerceptionOptions &options,
40  CameraFrame *frame) override;
41  std::string Name() const override { return "TrafficLightCameraPerception"; }
42 
43  private:
44  std::shared_ptr<BaseTrafficLightDetector> detector_;
45  std::shared_ptr<BaseTrafficLightDetector> recognizer_;
46  std::shared_ptr<BaseTrafficLightTracker> tracker_;
47  app::TrafficLightParam tl_param_;
48 };
49 
50 } // namespace camera
51 } // namespace perception
52 } // namespace apollo
Definition: camera_frame.h:33
PlanningContext is the runtime context in planning. It is persistent across multiple frames...
Definition: atomic_hash_map.h:25
bool Init(const CameraPerceptionInitOptions &options) override
Definition: traffic_light_camera_perception.h:33
TrafficLightCameraPerception()
Definition: traffic_light_camera_perception.h:35
Definition: base_camera_perception.h:28
bool Perception(const CameraPerceptionOptions &options, CameraFrame *frame) override
Definition: base_camera_perception.h:36
Definition: base_camera_perception.h:34
std::string Name() const override
Definition: traffic_light_camera_perception.h:41