Apollo 11.0
自动驾驶开放平台
recognition.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#include <vector>
21
22#include "cyber/common/macros.h"
26#include "modules/perception/traffic_light_recognition/recognition/caffe_recognizer/proto/model_param.pb.h"
27
28namespace apollo {
29namespace perception {
30namespace trafficlight {
31
33public:
51 bool Init(const TrafficLightRecognitorInitOptions& options) override;
52
60 bool Detect(camera::TrafficLightFrame* frame) override;
61
62private:
63 std::shared_ptr<ClassifyBySimple> classify_vertical_;
64 std::shared_ptr<ClassifyBySimple> classify_quadrate_;
65 std::shared_ptr<ClassifyBySimple> classify_horizontal_;
66
67 TrafficLightRecognitionConfig recognize_param_;
68 std::string recognition_root_dir;
69
71};
72
73} // namespace trafficlight
74} // namespace perception
75} // namespace apollo
~TrafficLightRecognition()=default
Destroy the Traffic Light Recognition object
TrafficLightRecognition()=default
Construct a new Traffic Light Recognition object
bool Detect(camera::TrafficLightFrame *frame) override
recogn traffic_light from image.
bool Init(const TrafficLightRecognitorInitOptions &options) override
Initialize traffic light recognitor parameters.
#define DISALLOW_COPY_AND_ASSIGN(classname)
Definition macros.h:48
class register implement
Definition arena_queue.h:37