-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/dev' into dev
# Conflicts: # WebARKit/WebARKitManager.cpp
- Loading branch information
Showing
11 changed files
with
145 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
name: WebARKitLib test | ||
|
||
on: push | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '16.x' | ||
- name: Build and test WebARKitLib | ||
run: | | ||
cd tests && mkdir build && cd build && cmake .. && make && ./webarkit_test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
include/AR/config.h | ||
tests/build | ||
tests/build | ||
build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
cmake_minimum_required(VERSION 3.20) | ||
|
||
project(WebARKitLib) | ||
|
||
set(CMAKE_CXX_STANDARD 14) | ||
|
||
cmake_policy(SET CMP0135 NEW) | ||
|
||
include(FetchContent) | ||
|
||
FetchContent_Declare( | ||
build_opencv | ||
URL https://github.com/webarkit/opencv-em/releases/download/0.1.0/opencv-4.7.0.zip | ||
) | ||
|
||
FetchContent_MakeAvailable(build_opencv) | ||
|
||
get_filename_component(PARENT_DIR ./ ABSOLUTE) | ||
|
||
set(WEBARKIT_HEADERS | ||
${PARENT_DIR}/WebARKitTrackers/WebARKitOpticalTracking/include/WebARKitTrackers/WebARKitOpticalTracking/WebARKitConfig.h | ||
${PARENT_DIR}/WebARKitTrackers/WebARKitOpticalTracking/include/WebARKitTrackers/WebARKitOpticalTracking//WebARKitEnums.h | ||
${PARENT_DIR}/WebARKitTrackers/WebARKitOpticalTracking/include/WebARKitTrackers/WebARKitOpticalTracking/WebARKitTracker.h | ||
${PARENT_DIR}/WebARKitTrackers/WebARKitOpticalTracking/include/WebARKitTrackers/WebARKitOpticalTracking/WebARKitUtils.h | ||
${PARENT_DIR}/include/WebARKitLog.h | ||
${PARENT_DIR}/include/WebARKitManager.h | ||
) | ||
|
||
set(SOURCE | ||
${PARENT_DIR}/WebARKitTrackers/WebARKitOpticalTracking/WebARKitConfig.cpp | ||
${PARENT_DIR}/WebARKitTrackers/WebARKitOpticalTracking/WebARKitTracker.cpp | ||
${PARENT_DIR}/WebARKitLog.cpp | ||
${PARENT_DIR}/WebARKitManager.cpp | ||
) | ||
|
||
add_library( | ||
WebARKitLib STATIC | ||
${WEBARKIT_HEADERS} | ||
${SOURCE} | ||
) | ||
|
||
target_include_directories(WebARKitLib PRIVATE "${PARENT_DIR}/include") | ||
target_include_directories(WebARKitLib PRIVATE "${PARENT_DIR}/WebARKitTrackers/WebARKitOpticalTracking/include") | ||
|
||
target_include_directories(WebARKitLib PRIVATE | ||
"${build_opencv_SOURCE_DIR}" | ||
"${build_opencv_SOURCE_DIR}/libs/opencv/include" | ||
"${build_opencv_SOURCE_DIR}/libs/opencv/modules/calib3d/include" | ||
"${build_opencv_SOURCE_DIR}/libs/opencv/modules/core/include" | ||
"${build_opencv_SOURCE_DIR}/libs/opencv/modules/features2d/include" | ||
"${build_opencv_SOURCE_DIR}/libs/opencv/modules/flann/include" | ||
"${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" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#include <gtest/gtest.h> | ||
#include <WebARKitManager.h> | ||
|
||
// Check WebARKitManager initialisation. | ||
TEST(WebARKitTest, InitialiseBaseTest) { | ||
// Create a WebARKitManager object | ||
webarkit::WebARKitManager manager; | ||
// Check if the WebARKitManager initialisation is successful | ||
EXPECT_TRUE(manager.initialiseBase(webarkit::TRACKER_TYPE::AKAZE_TRACKER)); | ||
} | ||
|
||
// Check WebARKit version | ||
TEST(WebARKitTest, CheckWebARKitVersion) { | ||
// Create a WebARKitManager object | ||
webarkit::WebARKitManager manager; | ||
// Init the manager with the Akaze tracker | ||
manager.initialiseBase(webarkit::TRACKER_TYPE::AKAZE_TRACKER); | ||
// Check if the WebARKit version is correct | ||
EXPECT_STREQ(manager.getWebARKitVersion().c_str(), "1.0.0"); | ||
} |