webarkit / webarkit-testing

Testing a new version of WebARKit
https://www.webarkit.org/examples/webarkit-testing/
GNU General Public License v3.0
2 stars 0 forks source link

Testing new WebARKitLib Trackers #1

Open kalwalt opened 3 years ago

kalwalt commented 3 years ago

@ThorstenBux @EdwardLu2018 i'm testing a new class that i created inside WebARKitLib see here in my testing branch feature-webarkittrackers . You can see the WebARKitOrbTracker.cpp that implement the necessary functions for initializing and to track. WebARKitOrbTracker is a class, but i think we should implement a base class that may serve as base class for all future trackers. I also created a WebARKitUtils.h file to store functions that can be shared by trackers. For example we could store the im_gray(uchar data[], size_t cols, size_t rows) and maybe other functions. There is also an example, but it only provide a test to verify the setup. It is just a beginning, a lot of work must be done! :smile: At least i can say the project may be built without errors, from emscripten....

ThorstenBux commented 3 years ago

Hi Walter,

Thank you that is great work.

In artoolkitX we have something like that. Have a look here https://github.com/artoolkitx/artoolkitx/blob/master/Source/ARX/include/ARX/ARTracker.h the idea was to have it as interface which all other Trackers like Tracker2D are implementing.

In our case that coulde be WebARKitOrbTracker and the interface we can name WebARKitTracker.h?

From: Walter Perdan notifications@github.com Reply to: kalwalt/webarkit-testing reply@reply.github.com Date: Tuesday, 24 November 2020 at 5:29 AM To: kalwalt/webarkit-testing webarkit-testing@noreply.github.com Cc: Thorsten Bux thorsten.bux@outlook.com, Mention mention@noreply.github.com Subject: [kalwalt/webarkit-testing] Testing new WebARKitLib Trackers (#1)

@ThorstenBux @edwardlu i'm testing a new class that i created inside WebARKitLib see here in my testing branch feature-webarkittrackers . You can see the WebARKitOrbTracker.cpp that implement the necessary functions for initializing and to track. WebARKitOrbTracker is a class, but i think we should implement a base class that may serve as base class for all future trackers. I also created a WebARKitUtils.h file to store functions that can be shared by trackers. For example we could store the im_gray(uchar data[], size_t cols, size_t rows) and maybe other functions. There is also an example, but it only provide a test to verify the setup. It is just a beginning, a lot of work must be done! 😄 At least i can say the project may be built without errors, from emscripten....

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

kalwalt commented 3 years ago

Hi Walter,

Thank you that is great work.

In artoolkitX we have something like that. Have a look here https://github.com/artoolkitx/artoolkitx/blob/master/Source/ARX/include/ARX/ARTracker.h the idea was to have it as interface which all other Trackers like Tracker2D are implementing.

In our case that coulde be WebARKitOrbTracker and the interface we can name WebARKitTracker.h?

Thank you @ThorstenBux ! yes i think that class is what we need. I will implement it.

kalwalt commented 3 years ago

i implemented initTracking() https://github.com/kalwalt/webarkit-testing/blob/7034e6d9e05cefc3b98010bde4ecd707fdc68f40/emscripten/WebARKitJS.cpp#L12-L16

setting the allow_raw_pointers() directive: https://github.com/kalwalt/webarkit-testing/blob/7034e6d9e05cefc3b98010bde4ecd707fdc68f40/emscripten/bindings.cpp#L7

the code compille but won't work... i think i have overcomplicated the code, better to load the image inside initTracking with the Jpeg lib and pass the raw data internally, as is implemented in ArtoolkitX.js and jsartoolkit5 (See ltrackables oaders)

kalwalt commented 3 years ago

@ThorstenBux i did some nice progresses, i hope that in the next days i can present a working example. :smile: