-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding Nft and 2d tracking. #7
Comments
Probably we don't need nft but for 2d tracking I need to solve the OpenCv issue with Cmake #8 In the meantime i tried to compile ArtoolkitX.js with NFt enabled: it is required to modify the CMakeLists.txt - set(HAVE_NFT 0)
+ set(HAVE_NFT 1) in the KPM directory make this change in the CMakeLists.txt add at the top this: if(NOT ARX_TARGET_PLATFORM_WINDOWS)
if(NOT ARX_TARGET_PLATFORM_EMSCRIPTEN)
find_package(JPEG REQUIRED)
endif()
else()
find_path(JPEG_INCLUDE_DIR
NAMES jconfig.h jmorecfg.h jpeglib.h jversion.h
PATHS ${PROJECT_SOURCE_DIR}/depends/windows/include
DOC "The directory where jpeg headers resides"
)
find_library(JPEG_LIBRARIES
NAMES libjpeg
PATHS ${PROJECT_SOURCE_DIR}/depends/windows/lib/x64
DOC "The directory where jpeg static library resides"
)
endif()
and at the end add the libAR2 and libKPM to https://github.com/augmentmy-world/artoolkitx/blob/4b707183779b7ff0cf9434620eb4f2f284f11219/Source/artoolkitx.js/CMakeLists.txt#L17 - link_libraries(libARX libARVideo libAR libARG libARUtil)
+ link_libraries(libARX libARVideo libAR libAR2 libARG libARUtil libKPM) testing example in my branch https://github.com/kalwalt/artoolkitX.js/tree/NFT-feature with Live reload enabled.
artoolkitx.js:6 [info] artoolkitX v1.0.2 initalised.
artoolkitX.api.js:66 Version: 1.0.2
artoolkitx.js:6 [info] Starting...
artoolkitx.js:6 [info] Setting video configuration '-module=Web -width=640 -height=480'.
artoolkitx.js:6 [info] Setting camera parameters file '/camera_param_0'.
artoolkitx.js:6 [info] Opening artoolkitX video using configuration '-module=Web -width=640 -height=480'.
artoolkitx.js:6 [info] Using supplied video config "-module=Web -width=640 -height=480".
artoolkitx.js:6 [info] ar2VideoOpenAsyncWeb '-module=Web -width=640 -height=480'.
artoolkitX.api.js:84 artoolkitX started
artoolkitx.js:6 [info] ARVideoSource::webVideoPushInit ...
artoolkitx.js:6 [info] Opened artoolkitX video 640x480@4Bpp (AR_PIXEL_FORMAT_RGBA).
artoolkitx.js:6 [info] Camera parameters loaded from file '/camera_param_0'.
simple_video_nft.html:40 start done
artoolkitX.api.js:288 we are in NFT
artoolkitX.api.js:291 /trackable_0
artoolkitx.js:6 [info] Loading '/trackable_0.fset'.
artoolkitx.js:6 [info]
artoolkitx.js:6 ### Surface No.1 ###
artoolkitx.js:6 [info] Read ImageSet.
artoolkitx.js:6 [error] Error: unable to open file '/trackable_0.iset' for reading.
artoolkitx.js:6 [error] Error opening file '/trackable_0.iset'.
artoolkitx.js:6 [error] Error reading data from '/trackable_0.fset'.
artoolkitx.js:6 [error] Error: Failed to load trackable.
artoolkitX.api.js:312 Uncaught (in promise) Faild to add Trackable: -1
simple_video_nft.html:42 [Violation] 'setInterval' handler took 717ms
simple_video_nft.html:42 [Violation] 'setInterval' handler took 165ms
simple_video_nft.html:42 [Violation] 'setInterval' handler took 55ms Probably a similar ajax issue with multi marker? see #3 I think i will try again to setup 2d tracking, i need to solve the OpenCV with Cmake. Maybe forcing cmake to find the libs and includes. |
@ThorstenBux you should also update your https://github.com/augmentmy-world/artoolkitx emscripten branch to the latest |
Any progress in this brunch? |
We welcome contributions. What are you looking for? |
@SystemDiagnosticss the main issue is to load the nft data see some my attempts (not woking yet) in this PR #18 . Unfortunately I hadn't the time to work on this again... |
@ThorstenBux Thank's for reply. I need 2dtracking or nft detection multiple img! I can't run 2d tracking example because I have error: It's because in your example trackableType: "2d" : but in your library function Any idea? |
@ThorstenBux @kalwalt what exactly difference between 2d tracking and NFT?? If I understand right in 2d tracking case we use jpg and in NFT case we use fset, fset3, iset ?? That's all?? |
@SystemDiagnosticss 2d tracking is not working at the moment so i cleaned the code. The main difference between the two is that with 2d tracking you can use a simple image as detector ( a .jpg for example) and the code is based on OpenCV, instead with NFT you need the precompiled set as you pointed out, and the code is plain ArtoolKitX. |
This a feature that absolutely we need to add. We will collect here all the issues and solutions for implementing this feature.
The text was updated successfully, but these errors were encountered: