Apollo 11.0
自动驾驶开放平台
track_object_similarity.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 <vector>
19
26
27namespace apollo {
28namespace perception {
29namespace fusion {
30
32
34 float welsh_loss_thresh_ = 0.5f;
35 float welsh_loss_scale_ = 0.3f;
38}; // struct XSimilarityParams
40 float smooth_factor_ = 0.3f;
41 float diff_std_dev_ = 0.2f;
44}; // struct YSimilarityParams
46 float initial_similarity_ = 0.5f;
47 float diff_std_dev_ = 0.1f;
50}; // struct HSimilarityParams
52 float diff_std_dev_ = 0.1f;
55}; // struct WSimilarityParams
57 float welsh_loss_thresh_ = 0.05f;
58 float welsh_loss_scale_ = 0.05f;
61}; // struct LocSimilarityParams
62
63// @brief: calculate the location similarity btween cloud and camera box
64// @return the localtion similarity which belongs to [0, 1]. When cloud's
65// location close to the camera box's, the similarity would close to 1.
66// Otherwise, it would close to 0.
67// @NOTE: original method name is compute_pts_box_dist_score
69 const ProjectionCacheObject* object,
70 const base::BBox2DF& camera_bbox);
71// @brief: calculate the shape similarity between cloud and camera box
72// @return the shape similarity which belongs to [0, 1]. When cloud's shape
73// close to the camera box's, the simialrity would close to 1. Otherwise,
74// it would close to 0.
75// @NOTE: original method name is compute_pts_box_shape_score
77 const ProjectionCacheObject* object,
78 const base::BBox2DF& camera_bbox);
79// @brief: calculate the similarity between cloud and camera box
80// @return the similarity which belongs to [0, 1].
81// @key idea:
82// 1. compute location similarity and shape similarity
83// 2. fuse the two similarity calculated above
84// @NOTE: original method name is compute_pts_box_score
86 const ProjectionCacheObject* object,
87 const base::BBox2DF& camera_bbox);
88// @brief: calculate the x similarity between radar and camera
89// @return the similarity which belongs to [0, 1].
90// @key idea:
91// 1. compute the difference on x/y/h/w/3d
92// 2. compute similarity according to the WelshVarLoss/ChiSquareProb
93// 3. scale the similarity above
94double ComputeRadarCameraXSimilarity(const double velo_ct_x,
95 const double camera_ct_x,
96 const double size_x,
97 const XSimilarityParams& params);
107double ComputeRadarCameraYSimilarity(const double velo_ct_y,
108 const double camera_ct_y,
109 const double size_y,
110 const YSimilarityParams& params);
122 const SensorObjectConstPtr& radar, const SensorObjectConstPtr& camera,
123 const double size_y,
124 const EigenVector<Eigen::Vector2d>& radar_box2d_vertices,
125 const HSimilarityParams& params);
137 const SensorObjectConstPtr& radar, const double width, const double size_x,
138 const EigenVector<Eigen::Vector2d>& radar_box2d_vertices,
139 const WSimilarityParams& params);
149double ComputeRadarCameraLocSimilarity(const Eigen::Vector3d& radar_ct,
150 const SensorObjectConstPtr& camera,
151 const Eigen::Matrix4d& world2camera_pose,
152 const LocSimilarityParams& params);
161 const SensorObjectConstPtr& camera);
162
163} // namespace fusion
164} // namespace perception
165} // namespace apollo
std::vector< EigenType, Eigen::aligned_allocator< EigenType > > EigenVector
Definition eigen_defs.h:33
std::shared_ptr< const SensorObject > SensorObjectConstPtr
double ComputePtsBoxSimilarity(const ProjectionCachePtr &cache, const ProjectionCacheObject *object, const base::BBox2DF &camera_bbox)
double ComputePtsBoxShapeSimilarity(const ProjectionCachePtr &cache, const ProjectionCacheObject *object, const base::BBox2DF &camera_bbox)
double ComputeRadarCameraWSimilarity(const SensorObjectConstPtr &radar, const double width, const double size_x, const EigenVector< Eigen::Vector2d > &radar_box2d_vertices, const WSimilarityParams &params)
calculate the w similarity between radar and camera
double ComputeRadarCameraYSimilarity(const double velo_ct_y, const double camera_ct_y, const double size_y, const YSimilarityParams &params)
calculate the y similarity between radar and camera
double ComputeRadarCameraXSimilarity(const double velo_ct_x, const double camera_ct_x, const double size_x, const XSimilarityParams &params)
double ComputeRadarCameraVelocitySimilarity(const SensorObjectConstPtr &radar, const SensorObjectConstPtr &camera)
calculate the velocity similarity between radar and camera
double ComputeRadarCameraLocSimilarity(const Eigen::Vector3d &radar_ct, const SensorObjectConstPtr &camera, const Eigen::Matrix4d &world2camera_pose, const LocSimilarityParams &params)
calculate the loc similarity between radar and camera
double ComputePtsBoxLocationSimilarity(const ProjectionCachePtr &cache, const ProjectionCacheObject *object, const base::BBox2DF &camera_bbox)
double ComputeRadarCameraHSimilarity(const SensorObjectConstPtr &radar, const SensorObjectConstPtr &camera, const double size_y, const EigenVector< Eigen::Vector2d > &radar_box2d_vertices, const HSimilarityParams &params)
calculate the h similarity between radar and camera
class register implement
Definition arena_queue.h:37