#include <object_maintainer.h>
◆ ObjectMaintainer()
apollo::perception::camera::ObjectMaintainer::ObjectMaintainer |
( |
| ) |
|
|
default |
◆ ~ObjectMaintainer()
apollo::perception::camera::ObjectMaintainer::~ObjectMaintainer |
( |
| ) |
|
|
default |
◆ Add()
bool apollo::perception::camera::ObjectMaintainer::Add |
( |
int |
idx, |
|
|
base::ObjectPtr |
obj |
|
) |
| |
Maintain a collection of objects that can be added based on the index.
By comparing the Subtyping probability of the new object and the Subtyping probability of the new and old objects, decide whether to update the old object. If the Subtyping probability of the new object is greater than the Subtyping probability of the old object, the old object is updated to the new object
- 参数
-
idx | The index to maintain in the collection |
obj | New object to maintain in the collection |
- 返回
- status if the object was updated successfully, false otherwise
在文件 object_maintainer.cc 第 22 行定义.
22 {
26 return true;
27 }
28
29 auto pre_obj = obj_it->second;
30 int cur_type = static_cast<int>(obj->sub_type);
31 int pre_type = static_cast<int>(pre_obj->sub_type);
32
33 if (obj->sub_type_probs[cur_type] > pre_obj->sub_type_probs[pre_type]) {
34 *pre_obj = *obj;
35 }
36 return false;
37}
std::map< int, base::ObjectPtr > assigned_index_
◆ assigned_index_
std::map<int, base::ObjectPtr> apollo::perception::camera::ObjectMaintainer::assigned_index_ |
|
protected |
该类的文档由以下文件生成: