Apollo 10.0
自动驾驶开放平台
hm_matcher.h
浏览该文件的文档.
1/******************************************************************************
2 * Copyright 2024 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
25
26namespace apollo {
27namespace perception {
28namespace camera {
29
30class HMMatcher : public BaseMatcher {
31 public:
32 HMMatcher() = default;
33 virtual ~HMMatcher() = default;
34
42 bool Init(const MatcherInitOptions &options) override;
43
56 bool Match(const std::vector<CameraTrackPtr> &camera_tracks,
57 const base::Frame &camera_frame,
58 const TrackObjectMatcherOptions &options,
59 std::vector<TrackObjectPair> *assignments,
60 std::vector<size_t> *unassigned_tracks,
61 std::vector<size_t> *unassigned_objects) override;
62
68 std::string Name() const override { return "HMMatcher"; }
69
70 protected:
81 bool RefinedTrack(const base::ObjectPtr &track_object, double track_timestamp,
82 const base::ObjectPtr &camera_object,
83 double camera_timestamp) override;
84
85 private:
87 void TrackObjectPropertyMatch(
88 const std::vector<CameraTrackPtr> &camera_tracks,
89 const base::Frame &camera_frame,
90 std::vector<TrackObjectPair> *assignments,
91 std::vector<size_t> *unassigned_tracks,
92 std::vector<size_t> *unassigned_objects);
93 void ComputeAssociationMat(const std::vector<CameraTrackPtr> &camera_tracks,
94 const base::Frame &camera_frame,
95 const std::vector<size_t> &unassigned_tracks,
96 const std::vector<size_t> &unassigned_objects,
97 std::vector<std::vector<double>> *association_mat);
98 double DistanceBetweenObs(const base::ObjectPtr &obs1, double timestamp1,
99 const base::ObjectPtr &obs2, double timestamp2);
100};
101
102} // namespace camera
103} // namespace perception
104} // namespace apollo
std::string Name() const override
The name of the HMMatcher
Definition hm_matcher.h:68
bool Init(const MatcherInitOptions &options) override
Init HMMatcher config
Definition hm_matcher.cc:33
bool RefinedTrack(const base::ObjectPtr &track_object, double track_timestamp, const base::ObjectPtr &camera_object, double camera_timestamp) override
After the IDMatch, then track targets based on their features.
Definition hm_matcher.cc:65
bool Match(const std::vector< CameraTrackPtr > &camera_tracks, const base::Frame &camera_frame, const TrackObjectMatcherOptions &options, std::vector< TrackObjectPair > *assignments, std::vector< size_t > *unassigned_tracks, std::vector< size_t > *unassigned_objects) override
match camera objects to tracks
Definition hm_matcher.cc:54
std::shared_ptr< Object > ObjectPtr
Definition object.h:127
class register implement
Definition arena_queue.h:37