diff --git a/WebARKit/CMakeLists.txt b/WebARKit/CMakeLists.txt index 594470a..23d82ea 100644 --- a/WebARKit/CMakeLists.txt +++ b/WebARKit/CMakeLists.txt @@ -14,13 +14,13 @@ if(${EMSCRIPTEN_COMP} EQUAL 1) message("Fetching opencv for emscripten compilation from webarkit/opencv-em ...") FetchContent_Declare( build_opencv - URL https://github.com/webarkit/opencv-em/releases/download/0.1.3/opencv-js-4.7.0-emcc-3.1.26.zip + URL https://github.com/webarkit/opencv-em/releases/download/0.1.4/opencv-js-4.7.0-emcc-3.1.26.zip ) else() message("Fetching opencv from webarkit/opencv-em ...") FetchContent_Declare( build_opencv - URL https://github.com/webarkit/opencv-em/releases/download/0.1.3/opencv-4.7.0.zip + URL https://github.com/webarkit/opencv-em/releases/download/0.1.4/opencv-4.7.0.zip ) endif() @@ -69,4 +69,9 @@ target_include_directories(WebARKitLib PRIVATE "${build_opencv_SOURCE_DIR}/libs/opencv/modules/imgproc/include" "${build_opencv_SOURCE_DIR}/libs/opencv/modules/video/include" "${build_opencv_SOURCE_DIR}/libs/opencv_contrib/modules/xfeatures2d/include" - ) \ No newline at end of file + ) + +target_link_libraries(WebARKitLib +jpeg +"${build_opencv_SOURCE_DIR}/3rdparty/lib/liblibopenjp2.a" +) \ No newline at end of file diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 211e0ad..b053da3 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -19,16 +19,9 @@ set(gtest_force_shared_crt ON CACHE BOOL "" FORCE) FetchContent_Declare( build_opencv - URL https://github.com/webarkit/opencv-em/releases/download/0.1.3/opencv-4.7.0.zip + URL https://github.com/webarkit/opencv-em/releases/download/0.1.4/opencv-4.7.0.zip ) - -#[[FetchContent_Declare( - build_opencv - URL /home/kalwalt/kalwalt-github/opencv-em/packaging/opencv-4.7.0.zip -) -]]# - FetchContent_MakeAvailable(googletest build_opencv) enable_testing() diff --git a/tests/webarkit_test.cc b/tests/webarkit_test.cc index 2e2fc62..709160c 100644 --- a/tests/webarkit_test.cc +++ b/tests/webarkit_test.cc @@ -2,7 +2,6 @@ #include #include #include -//#include #include class WebARKitEnumTest : public testing::TestWithParam> {}; @@ -91,9 +90,6 @@ TEST(WebARKitGLTest, TestCameraProjectionMatrix) { std::array camera_mat = camera.getCameraData(); std::array projectionMatrix = {0.0}; webarkit::cameraProjectionMatrix(camera_mat, 0.01, 100.0, width, height, projectionMatrix); - /*for(auto i : projectionMatrix) { - std::cout << "proj Matrix: " << (double)i << std::endl; - }*/ EXPECT_EQ(projectionMatrix[0], -1.7851850084276433); EXPECT_EQ(projectionMatrix[5], 2.3802466779035241); EXPECT_EQ(projectionMatrix[10], -1.0002000200020003); @@ -164,7 +160,7 @@ TEST(WebARKitTest, InitTrackerTest) { // Init the manager with the Akaze tracker manager.initialiseBase(webarkit::TRACKER_TYPE::AKAZE_TRACKER, 640, 480); // Load the test image - cv::Mat image = cv::imread("pinball.jpg"); + cv::Mat image = cv::imread("../pinball.jpg"); if(image.data == NULL) { std::cout << "Something wrong while reading the image!" << std::endl;