Apollo  6.0
Open source self driving car software
roi_filter.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 <vector>
20 
24 
25 namespace apollo {
26 namespace perception {
27 namespace common {
28 
29 // @brief: whether a point is in ROI.
30 bool IsPtInRoi(
31  const std::shared_ptr<const apollo::perception::base::HdmapStruct> roi,
33 
34 // @brief: whether an object's center is in ROI.
35 bool IsObjectInRoi(
36  const std::shared_ptr<const apollo::perception::base::HdmapStruct> roi,
37  const std::shared_ptr<const apollo::perception::base::Object> obj);
38 
39 // @brief: whether an object's bbox is in ROI.
41  const std::shared_ptr<const apollo::perception::base::HdmapStruct> roi,
42  const std::shared_ptr<const apollo::perception::base::Object> obj);
43 
44 // @brief: whether objects' center are in ROI. If return True,
45 // you can get objects in ROI by param valid_objects.
46 bool ObjectInRoiCheck(
47  const std::shared_ptr<const apollo::perception::base::HdmapStruct> roi,
48  const std::vector<std::shared_ptr<apollo::perception::base::Object>>& objs,
49  std::vector<std::shared_ptr<apollo::perception::base::Object>>* valid_objs);
50 
51 } // namespace common
52 } // namespace perception
53 } // namespace apollo
bool IsObjectInRoi(const std::shared_ptr< const apollo::perception::base::HdmapStruct > roi, const std::shared_ptr< const apollo::perception::base::Object > obj)
PlanningContext is the runtime context in planning. It is persistent across multiple frames...
Definition: atomic_hash_map.h:25
Definition: point.h:28
bool IsPtInRoi(const std::shared_ptr< const apollo::perception::base::HdmapStruct > roi, const apollo::perception::base::PointD pt)
bool IsObjectBboxInRoi(const std::shared_ptr< const apollo::perception::base::HdmapStruct > roi, const std::shared_ptr< const apollo::perception::base::Object > obj)
bool ObjectInRoiCheck(const std::shared_ptr< const apollo::perception::base::HdmapStruct > roi, const std::vector< std::shared_ptr< apollo::perception::base::Object >> &objs, std::vector< std::shared_ptr< apollo::perception::base::Object >> *valid_objs)