Comments (5)
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.
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
from js-aruco.
-
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.
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.
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)
- Set a matrix3d transform on an element ? HOT 2
- How to generate other markers? HOT 1
- DrawImage HOT 1
- sorting the contours HOT 3
- equivalent of boudingRect for width and height of the contouore HOT 1
- Reference HOT 6
- Difference between posit1.js and posit2.js HOT 4
- Is this repo dead? HOT 4
- Perspective transformation based on markers position HOT 3
- Scanning 3x3 marker HOT 1
- Suggestion on better pose estimation ? HOT 2
- samples/debug-posit shows incorrectly posed rectangles HOT 7
- Camera feed of samples does not work on Safari 11+ HOT 3
- Marker id more than 1023 HOT 3
- Marker detection range
- Obtaining Camera Pos from Aruco Marker? HOT 3
- Aruco & Aruco2 freeze on 1st frame on Safari-iOS HOT 1
- 6X6 improvement HOT 2
- code without minified HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from js-aruco.