diff --git a/include/surface_normal.h b/include/surface_normal.h index 0a39ab7..f2e97bc 100644 --- a/include/surface_normal.h +++ b/include/surface_normal.h @@ -1,7 +1,5 @@ #pragma once -#include - #include using Plane = cv::Vec4f; @@ -18,6 +16,6 @@ cv::Mat3f normals_from_depth(const cv::Mat1f &depth, CameraIntrinsics intrinsics cv::Mat3b normals_to_rgb(const cv::Mat3f &normals); cv::Mat1f get_surrounding_points(const cv::Mat1f &depth, int i, int j, CameraIntrinsics intrinsics, - size_t window_size, float max_rel_depth_diff); + int window_size, float max_rel_depth_diff); cv::Vec3f fit_plane(const cv::Mat &points); diff --git a/src/surface_normal.cpp b/src/surface_normal.cpp index 938ea72..8b2f2d0 100644 --- a/src/surface_normal.cpp +++ b/src/surface_normal.cpp @@ -1,14 +1,15 @@ -#include +#include #include #include "surface_normal.h" using namespace cv; +using std::abs; // Returns a Nx3 matrix of 3D points surrounding the i,j pixel within the window_size window. Mat1f get_surrounding_points(const Mat1f &depth, int i, int j, CameraIntrinsics intrinsics, - size_t window_size, float max_rel_depth_diff) { + int window_size, float max_rel_depth_diff) { float f_inv = 1.f / intrinsics.f; float cx = intrinsics.cx; float cy = intrinsics.cy;