Giter VIP home page Giter VIP logo

Comments (5)

jcmellado avatar jcmellado commented on September 18, 2024

I don't understand your question. You can use the translation matrix, not only the rotation one. Sorry, maybe I missing something from your question.

Have you take a look to the source code of the samples? The documentation in the main page of the project has relevant information too.

from js-aruco.

boonkey avatar boonkey commented on September 18, 2024

I'll try and explain my issue better using pictures (which I took from your example page).
both picture A and picture B has the same marker, at the same distance from the camera, facing the same direction. The same goes for pictures C and D.

The only difference between pictures A and C are the angle of the marker in respect to the camera.
The same goes for pictures B and D.

I need to "project" the yaw angles in pictures B and D, so they show the same values as pictures A and C respectively.

i.e. I want the yaw angle in picture B to show 0 deg, while the yaw angle in picture D to show 45 deg.

Thanks for the help and fast response,
Dan

dans problem

from js-aruco.

jcmellado avatar jcmellado commented on September 18, 2024
  • Both pose estimations for the Picture B have an error of 5 and a yaw of 43. If you take a look to the blue squares in that picture, they are quite similar to the blue square of the Picture D. That is, you say that the marker is facing the camera, but the library is detecting that it is rotated.

  • The best pose estimation for the Picture D has an error of 0 and a yaw of 49. Ok, 49 is not 45, but it's quite similar.

That example use very little pixels to calculate the square. The video is recorded to a resolution of 320x240 and the marker is expected to have about 35 millimeters or so. Take a look to the debug-posit.html file. One pixel more or less and you should not have a perfect square. The library will think that it is rotated.

Maybe you should play with that parameters and increment the resolution.

from js-aruco.

boonkey avatar boonkey commented on September 18, 2024

Unfortunately for me, neither increasing the resolution (up to 800x600) nor playing with parameters has changed calculations results for me.

the calculations for yaw remains very good when the marker is directly in front of the camera (like in pictures A and C) and 'random' when it's offset to it (as in pictures B and D).

Might it be that the calculation itself is wrong?
I try to do it as you calculated in debug-posit.html:
yaw = -Math.atan2(pose.bestRotation[0][2], pose.bestRotation[2][2]);
should I maybe use another formula?

Thanks,
Dan

from js-aruco.

jcmellado avatar jcmellado commented on September 18, 2024

I don't think that the result is random. Blue square in pictures B and D are quite similar.

BTW, there are two implementations of the POSIT algorithm.

Have you tried to replace <script type="text/javascript" src="posit1.js"></script> with <script type="text/javascript" src="posit2.js"></script>?

from js-aruco.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.