Apollo 11.0
自动驾驶开放平台
spp_struct.cc
浏览该文件的文档.
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 *****************************************************************************/
17
18namespace apollo {
19namespace perception {
20namespace lidar {
21
22void SppData::MakeReference(size_t width, size_t height, float range) {
26 if (height_pt_blob != nullptr) {
28 }
29 if (classify_pt_blob != nullptr) {
31 }
32 if (heading_pt_blob != nullptr) {
34 }
35
36 if (obs_prob_data_ref == nullptr) {
37 obs_prob_data_ref = new float*[height];
38 }
39 for (size_t i = 0; i < height; ++i) {
40 obs_prob_data_ref[i] = obs_prob_data + i * width;
41 }
42
43 data_width = width;
44 data_height = height;
45 data_range = range;
46 data_size = width * height;
47}
48
51 delete[] obs_prob_data_ref;
52 }
53}
54
55} // namespace lidar
56} // namespace perception
57} // namespace apollo
class register implement
Definition arena_queue.h:37
void MakeReference(size_t width, size_t height, float range)
Definition spp_struct.cc:22
base::Blob< float > * category_pt_blob
Definition spp_struct.h:33
base::Blob< float > * instance_pt_blob
Definition spp_struct.h:32
base::Blob< float > * heading_pt_blob
Definition spp_struct.h:36
base::Blob< float > * classify_pt_blob
Definition spp_struct.h:35
base::Blob< float > * height_pt_blob
Definition spp_struct.h:37
base::Blob< float > * confidence_pt_blob
Definition spp_struct.h:34