From 7bd85fcc2add047a8c7cb291c5990b634c72e85c Mon Sep 17 00:00:00 2001 From: kechxu Date: Tue, 25 Sep 2018 11:27:41 -0700 Subject: [PATCH] Perception: compile camera_homography --- modules/perception/common/geometry/BUILD | 15 ++++++++++++++- .../common/geometry/camera_homography.cc | 1 + .../common/geometry/camera_homography.h | 10 +++++----- 3 files changed, 20 insertions(+), 6 deletions(-) diff --git a/modules/perception/common/geometry/BUILD b/modules/perception/common/geometry/BUILD index b44776c8b7..2ad5d5a588 100644 --- a/modules/perception/common/geometry/BUILD +++ b/modules/perception/common/geometry/BUILD @@ -24,7 +24,6 @@ cc_library( ], ) - cc_library( name = "convex_hull_2d", hdrs = [ @@ -35,6 +34,20 @@ cc_library( ], ) +cc_library( + name = "camera_homography", + srcs = [ + "camera_homography.cc", + ], + hdrs = [ + "camera_homography.h", + ], + deps = [ + "//modules/perception/base:camera", + "@eigen", + ], +) + cc_test( name = "basic_test", size = "small", diff --git a/modules/perception/common/geometry/camera_homography.cc b/modules/perception/common/geometry/camera_homography.cc index 8b813dd329..aca65021c8 100644 --- a/modules/perception/common/geometry/camera_homography.cc +++ b/modules/perception/common/geometry/camera_homography.cc @@ -14,6 +14,7 @@ * limitations under the License. *****************************************************************************/ #include "modules/perception/common/geometry/camera_homography.h" + #include namespace apollo { diff --git a/modules/perception/common/geometry/camera_homography.h b/modules/perception/common/geometry/camera_homography.h index dbcbe9b598..0479194d70 100644 --- a/modules/perception/common/geometry/camera_homography.h +++ b/modules/perception/common/geometry/camera_homography.h @@ -13,11 +13,11 @@ * See the License for the specific language governing permissions and * limitations under the License. *****************************************************************************/ -#ifndef PERCEPTION_COMMON_GEOMETRY_CAMERA_HOMOGRAPHY_H_ -#define PERCEPTION_COMMON_GEOMETRY_CAMERA_HOMOGRAPHY_H_ +#ifndef MODULES_PERCEPTION_COMMON_GEOMETRY_CAMERA_HOMOGRAPHY_H_ +#define MODULES_PERCEPTION_COMMON_GEOMETRY_CAMERA_HOMOGRAPHY_H_ -#include -#include +#include "Eigen/Core" +#include "Eigen/Geometry" #include "modules/perception/base/camera.h" namespace apollo { @@ -44,4 +44,4 @@ bool IsCamerasFieldOverlap(const base::PinholeCameraModel& from_camera, } // namespace perception } // namespace apollo -#endif // PERCEPTION_COMMON_GEOMETRY_CAMERA_HOMOGRAPHY_H_ +#endif // MODULES_PERCEPTION_COMMON_GEOMETRY_CAMERA_HOMOGRAPHY_H_ -- GitLab