Skip to content

Commit

Permalink
add a simple test executable
Browse files Browse the repository at this point in the history
  • Loading branch information
valgur committed Jun 19, 2020
1 parent e849d06 commit 81193da
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
5 changes: 5 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,8 @@ if(CUDA_FOUND AND WITH_CUDA)
elseif(${WITH_CUDA})
message(WARNING "Could not find CUDA")
endif()

if (BUILD_TEST)
add_executable(test src/test.cpp)
target_link_libraries(test PRIVATE ${PROJECT_NAME}_gpu ${PROJECT_NAME}_cpu)
endif()
12 changes: 12 additions & 0 deletions src/test.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#include "surface_normal/opencv2.hpp"

using namespace surface_normal;

int main() {
CameraIntrinsics intrinsics;
intrinsics.f = 721.5377;
intrinsics.cx = 609.5593;
intrinsics.cy = 172.8540;
normals_from_depth_imgfile("depth.png", "normals.png", intrinsics, 15, 0.1, true);
return 0;
}

0 comments on commit 81193da

Please sign in to comment.