jcmellado / js-aruco

JavaScript library for Augmented Reality applications
Other
600 stars 132 forks source link

averaging several markers to increase robustness ? #7

Closed jeromeetienne closed 9 years ago

jeromeetienne commented 9 years ago

Hi,

This is not to report a bug, this is more about asking to an expert in ar. When using the library, it is amazing work. but the pose reported are shaky if done over a single marker. maybe we could go further. This is likely a naive question im just starting in the field :)

i was thinking "could we improve the robustness by having multiple markers and average them?". do you have code or pointer on how to do that ? i included a screenshot of a toy im playing with. you can see the detected markers on the topleft. i would like to average all the markers.

screen shot 2015-04-11 at 13 44 33

here is a video of somebody doing the same i think https://www.youtube.com/watch?v=CzD48UkGsK8

i would take pointer or code about how to do that :)

thanks

jcmellado commented 9 years ago

That video is part of the original ARUCO project: http://www.uco.es/investiga/grupos/ava/node/26

All the source code is available here: http://sourceforge.net/projects/aruco/files/

I think that the BoardDetector class (boardetector.cpp) is what are you looking for. And probably aruco_test_board.cpp for a better understanding about how to use it,

The class is just two hundred lines of C++ code with some comments here and there, so you could port it to JavaScript. The bad news are the calls to some OpenCV functions (cv::solvePnP, cv::projectPoints, cv::norm, ... ) that you should port too.

By the way, I don't know if you know skarf.js: https://github.com/skeelogy/skarf.js

I remember (I'm not really sure right now) that it has some controls to control flickering and the output was more stable.