kalwalt / kalwalt-interactivity-AR

Some various experiments with Ar.js and Three.js
https://kalwalt.github.io/kalwalt-interactivity-AR/
GNU Lesser General Public License v3.0
78 stars 11 forks source link

Can't detect nft marker on smartphone camera #3

Closed SystemDiagnosticss closed 2 years ago

SystemDiagnosticss commented 4 years ago

Hello. I use "camera_para.dat" file and host project on github ... On my PC all works fine, but when I open it's on my Androide or Iphone it's can't detect nft marker. You example https://kalwalt.github.io/kalwalt-interactivity-AR/ on phone dont work too .. Any idea?

kalwalt commented 4 years ago

It works for me. Are you enabled the SharedArrayBuffer option in your phone? and which of the examples are not working? I suggest also to use a good quality print for testing, trying to test the pinball image from a monitor can be more difficult to detect the NFT marker.

SystemDiagnosticss commented 4 years ago

@kalwalt yes. After enabled SharedArrayBuffer it's work. What exactly need for solve this issue with SharedArrayBuffer ?? Can I help you?

kalwalt commented 4 years ago

@SystemDiagnosticss The main problem is that SharedArrayBuffer is not safe at the moment until the big company solve the Spectre issue, maybe they will solve but who knows when? In the meantime we can direct our efforts to solve other problems: The app at the startup, testing in mobile device, stops and wait too much, about 8-10 seconds. We can find the reason for that. It seems that the laoding time for the NFT marker require a lot of time/resources (?). You can see the discussion in this other PR see this comment In this other PR the code is not with threads, that means you don't need to enable the SharedArray option but the performances are slower. We could find the way to optimize that code in PR. I didn't upload yet some example of the last one on my repo https://github.com/kalwalt/kalwalt-interactivity-AR yet, but i will do when i have a bit of time.

SystemDiagnosticss commented 4 years ago

@kalwalt thanks. I run code from PR without threads and it's work not so bad. If I understand right in artoolkit for feature detection use SIFT-algorithm. I tested SIFT, SURF and ORB locally on CPU with node.js and ORB a little worse but much faster then SIFT. If replace SIFT on ORB in this lib I think videostream will be much faster even for a single thread. In my case I need also multiple marker detection support. Now I want try to add this features but I need update my emscripten skills ... Also will be good if you download you last update. Thank you.

kalwalt commented 4 years ago

@SystemDiagnosticss i have uploaded the standard nft example you can try here if you want to try.

If I understand right in artoolkit for feature detection use SIFT-algorithm. I tested SIFT, SURF and ORB locally on CPU with node.js and ORB a little worse but much faster then SIFT. If replace SIFT on ORB in this lib I think videostream will be much faster even for a single thread.

you should ask to @ThorstenBux for this clarification.

ThorstenBux commented 4 years ago

@kalwalt thanks for pointing me to that. Just tested on an iPhone6s and it does work quite good. @SystemDiagnosticss changing it to ORB is a smart move indeed. :). I could support with Emscripten skills. @kalwalt this repo here is just the example hosting right? Where would I find the sources.

kalwalt commented 4 years ago

Dear @ThorstenBux this is just simple example hosting, i am referring to my work on jsartoolkit5: my PR https://github.com/kalwalt/jsartoolkit5/pull/1 and the threaded version in PR https://github.com/kalwalt/jsartoolkit5/pull/2 By the way this repo host also other my experimentations with code (glitch and other stuff...)

ThorstenBux commented 4 years ago

@kalwalt thanks, which one is currently hosted?

kalwalt commented 4 years ago

@kalwalt thanks, which one is currently hosted?

see in the previous comment :smile:

ThorstenBux commented 4 years ago

Yes, just wondering which PR is published :)

kalwalt commented 4 years ago

@ThorstenBux i hosted both version so other people may try it and test the code on a Smartphone device with more simplicity... and maybe other people can be interested to improve it.

kalwalt commented 4 years ago

@SystemDiagnosticss can you share an example with ORB (with node.js) as you said with us? It would be very helpful indeed...