提交 a1ac6069 编写于 作者: Z zhujun08 提交者: Liangliang Zhang

fix bug in type.h for lane post-processing

上级 7ffea8ed
......@@ -22,6 +22,7 @@ cc_library(
"//modules/perception/lib/base",
"//modules/perception/lib/pcl_util",
"//modules/perception/proto:perception_proto",
"//modules/perception/obstacle/camera/lane_post_process/common:perception_obstacle_camera_lane_post_process_common_type",
"@eigen",
"@opencv2//:core",
],
......
......@@ -30,6 +30,7 @@
#include "modules/perception/lib/pcl_util/pcl_types.h"
#include "modules/perception/obstacle/base/object_supplement.h"
#include "modules/perception/obstacle/base/types.h"
#include "modules/perception/obstacle/camera/lane_post_process/common/type.h"
namespace apollo {
namespace perception {
......@@ -113,6 +114,7 @@ struct SensorObjects {
SeqId seq_num = 0;
std::vector<ObjectPtr> objects;
Eigen::Matrix4d sensor2world_pose;
LaneObjectsPtr lane_objects;
};
} // namespace perception
......
......@@ -3,7 +3,7 @@ load("//tools:cpplint.bzl", "cpplint")
package(default_visibility = ["//visibility:public"])
cc_library(
name = "lane_type",
name = "perception_obstacle_camera_lane_post_process_common_type",
hdrs = ["type.h"],
deps = [
"//modules/common:log",
......@@ -13,11 +13,23 @@ cc_library(
)
cc_library(
name = "lane_util",
name = "perception_obstacle_camera_lane_post_process_common_util",
hdrs = ["util.h"],
deps = [
"//modules/common:log",
"//modules/perception/obstacle/camera/lane_post_process/common:lane_type",
"//modules/perception/obstacle/camera/lane_post_process/common:perception_obstacle_camera_lane_post_process_common_type",
],
)
cc_library(
name = "perception_obstacle_camera_lane_post_process_common_connected_component_analysis",
srcs = ["connected_component.cc"],
hdrs = ["connected_component.h"],
deps = [
"//modules/common:log",
"//modules/perception/obstacle/camera/lane_post_process/common:perception_obstacle_camera_lane_post_process_common_type",
"@eigen//:eigen",
"@opencv2//:core",
],
)
......
/******************************************************************************
* Copyright 2017 The Apollo Authors. All Rights Reserved.
* Copyright 2018 The Apollo Authors. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
......@@ -14,8 +14,6 @@
* limitations under the License.
*****************************************************************************/
// @brief: connected component analysis for lane detection
#ifndef MODULES_PERCEPTION_OBSTACLE_CAMERA_LANE_POST_PROCESS_COMMON_CONNECTED_COMPONENT_H_
#define MODULES_PERCEPTION_OBSTACLE_CAMERA_LANE_POST_PROCESS_COMMON_CONNECTED_COMPONENT_H_
......@@ -27,8 +25,8 @@
#include <Eigen/Core>
#include <opencv2/core/core.hpp>
//#include <cuda.h>
//#include <cuda_runtime.h>
// #include <cuda.h>
// #include <cuda_runtime.h>
#include "modules/common/log.h"
#include "modules/perception/obstacle/camera/lane_post_process/common/type.h"
......@@ -346,7 +344,8 @@ class ConnectedComponentGenerator {
#endif
}
bool FindCC(const cv::Mat& lane_map,
bool FindConnectedComponents(
const cv::Mat& lane_map,
std::vector<std::shared_ptr<ConnectedComponent>>& cc);
private:
......@@ -368,13 +367,13 @@ class ConnectedComponentGenerator {
#if CUDA_CC
int* labels_;
cudaArray* img_array_;
int* label_array_;
#else
DisjointSet labels_;
std::vector<int> frame_label_;
#endif
std::vector<int> root_map_;
cudaArray* img_array_;
int* label_array_;
};
} // namespace perception
......
/******************************************************************************
* Copyright 2017 The Apollo Authors. All Rights Reserved.
* Copyright 2018 The Apollo Authors. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
......@@ -477,7 +477,7 @@ struct LaneObject {
new_lane_object->semantic = semantic;
new_lane_object->is_compensated = is_compensated;
for (size_t i = 0; i < new_lane_object.point_num; ++i) {
for (size_t i = 0; i < new_lane_object->point_num; ++i) {
new_lane_object->pos.push_back(pos[i]);
new_lane_object->orie.push_back(orie[i]);
new_lane_object->image_pos.push_back(image_pos[i]);
......
/******************************************************************************
* Copyright 2017 The Apollo Authors. All Rights Reserved.
* Copyright 2018 The Apollo Authors. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册