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
*****************************************************************************/
16
#include "
modules/perception/lidar_detection/detector/cnn_segmentation/spp_engine/spp_struct.h
"
17
18
namespace
apollo
{
19
namespace
perception {
20
namespace
lidar {
21
22
void
SppData::MakeReference
(
size_t
width,
size_t
height,
float
range) {
23
obs_prob_data
=
category_pt_blob
->
mutable_cpu_data
();
24
offset_data
=
instance_pt_blob
->
mutable_cpu_data
();
25
confidence_data
=
confidence_pt_blob
->
mutable_cpu_data
();
26
if
(
height_pt_blob
!=
nullptr
) {
27
z_data
=
height_pt_blob
->
mutable_cpu_data
();
28
}
29
if
(
classify_pt_blob
!=
nullptr
) {
30
class_prob_data
=
classify_pt_blob
->
mutable_cpu_data
();
31
}
32
if
(
heading_pt_blob
!=
nullptr
) {
33
heading_data
=
heading_pt_blob
->
mutable_cpu_data
();
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
49
SppData::~SppData
() {
50
if
(
obs_prob_data_ref
) {
51
delete
[]
obs_prob_data_ref
;
52
}
53
}
54
55
}
// namespace lidar
56
}
// namespace perception
57
}
// namespace apollo
apollo::perception::base::Blob::mutable_cpu_data
Dtype * mutable_cpu_data()
Definition
blob.cc:171
apollo
class register implement
Definition
arena_queue.h:37
spp_struct.h
apollo::perception::lidar::SppData::~SppData
~SppData()
Definition
spp_struct.cc:49
apollo::perception::lidar::SppData::MakeReference
void MakeReference(size_t width, size_t height, float range)
Definition
spp_struct.cc:22
apollo::perception::lidar::SppData::category_pt_blob
base::Blob< float > * category_pt_blob
Definition
spp_struct.h:33
apollo::perception::lidar::SppData::instance_pt_blob
base::Blob< float > * instance_pt_blob
Definition
spp_struct.h:32
apollo::perception::lidar::SppData::data_height
size_t data_height
Definition
spp_struct.h:49
apollo::perception::lidar::SppData::z_data
float * z_data
Definition
spp_struct.h:28
apollo::perception::lidar::SppData::heading_data
float * heading_data
Definition
spp_struct.h:30
apollo::perception::lidar::SppData::obs_prob_data_ref
float ** obs_prob_data_ref
Definition
spp_struct.h:39
apollo::perception::lidar::SppData::data_size
size_t data_size
Definition
spp_struct.h:50
apollo::perception::lidar::SppData::data_width
size_t data_width
Definition
spp_struct.h:48
apollo::perception::lidar::SppData::heading_pt_blob
base::Blob< float > * heading_pt_blob
Definition
spp_struct.h:36
apollo::perception::lidar::SppData::classify_pt_blob
base::Blob< float > * classify_pt_blob
Definition
spp_struct.h:35
apollo::perception::lidar::SppData::offset_data
float * offset_data
Definition
spp_struct.h:26
apollo::perception::lidar::SppData::class_prob_data
float * class_prob_data
Definition
spp_struct.h:29
apollo::perception::lidar::SppData::height_pt_blob
base::Blob< float > * height_pt_blob
Definition
spp_struct.h:37
apollo::perception::lidar::SppData::data_range
float data_range
Definition
spp_struct.h:51
apollo::perception::lidar::SppData::confidence_pt_blob
base::Blob< float > * confidence_pt_blob
Definition
spp_struct.h:34
apollo::perception::lidar::SppData::confidence_data
float * confidence_data
Definition
spp_struct.h:27
apollo::perception::lidar::SppData::obs_prob_data
float * obs_prob_data
Definition
spp_struct.h:25
modules
perception
lidar_detection
detector
cnn_segmentation
spp_engine
spp_struct.cc