Apollo  6.0
Open source self driving car software
object_filter_bank.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 <string>
19 #include <vector>
20 
21 #include "cyber/common/macros.h"
23 
24 namespace apollo {
25 namespace perception {
26 namespace lidar {
27 
29  public:
30  ObjectFilterBank() = default;
31 
33  for (auto& filter : filter_bank_) {
34  delete filter;
35  }
36  }
37 
38  bool Init(const ObjectFilterInitOptions& options = ObjectFilterInitOptions());
39 
40  // @brief: filter objects
41  // @param [in]: options
42  // @param [in/out]: frame
43  // segmented_objects should be valid, and will be filtered,
44  bool Filter(const ObjectFilterOptions& options, LidarFrame* frame);
45 
46  std::string Name() const { return "ObjectFilterBank"; }
47 
48  size_t Size() const { return filter_bank_.size(); }
49 
50  private:
51  std::vector<BaseObjectFilter*> filter_bank_;
52  DISALLOW_COPY_AND_ASSIGN(ObjectFilterBank);
53 };
54 
55 } // namespace lidar
56 } // namespace perception
57 } // namespace apollo
~ObjectFilterBank()
Definition: object_filter_bank.h:32
PlanningContext is the runtime context in planning. It is persistent across multiple frames...
Definition: atomic_hash_map.h:25
bool Init(const ObjectFilterInitOptions &options=ObjectFilterInitOptions())
bool Filter(const ObjectFilterOptions &options, LidarFrame *frame)
Definition: base_object_filter.h:28
size_t Size() const
Definition: object_filter_bank.h:48
std::string Name() const
Definition: object_filter_bank.h:46
Definition: lidar_frame.h:33
Definition: object_filter_bank.h:28
Definition: base_object_filter.h:32