-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improving WebARKitLib with PnP algorithm #24
Conversation
Another issue with the pose matrix, i receive always these values |
- WebARKitCamera need to be changed
- continue from previous commit
i think the result from matrixGL_RH is not correct, look at these values, this is matrixGL_RH from jsartoolkitNFT:
instead this is from webarkit-testing (WebARKitLib) :
note 12, 13, 14 index values are quite different, from webarkit-testing are all zeros... need to found where is the bug. |
- new getGLViewMatrix function
Now i developed and implemented a new function getGLViewMatrix to pass the correct matrix, the sphere is displayed and don't move. To add to this: It's harder to detect and track (maybe because different video settings?) and even when the pinball pattern is not on the screen and for sure is not detected and tracked the application still output the message |
- randomly imageData from the OffScreenCanvas is empty
I'm testing with the latest commits the speedy-vision library with my code. In detail: i'm using it to pass the data from the pinball marker and the video data to speedy-vision pipeline to convert to grey. It works fine but i have some issues updating the videoData. I will fix it soon. |
Initially in various part i developed some update functions with requestAnimationFrame returning some data values, but that is not the best way doing this. it will not return correct values, better to provide a callback function or maybe a global variable that can be accessible outside of that function. Now i changed my code with some callback functions but i always get ImageData with empty Uint8ClampedArray, why this? but maybe there is a smarter way to get this data with speedy vision? Investigating.... |
examples/init_speedy.js
Outdated
let dt = ctx.getImageData(0, 0, oWidth, oHeight); | ||
data = ctx.getImageData(0, 0, oWidth, oHeight); | ||
|
||
//console.log(data); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if you comment out this console.log it will ever return an ImageData with a correct (not empty) Uint8ClampedArray
examples/init_speedy.js
Outdated
|
||
requestAnimationFrame(update); | ||
return dt; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a function with requestAnimationFrame should never return a value...
There are a lot of improves to do but probably the
At least the issue i had with the persisting tracking is gone, but still a lot of works need to do. |
- new getMatches method
I think this PR is quite long and all the code for the the PnP feature was implemented, there are other improvements to do but it's out of this scope. I will merge this soon. |
This PR is based on changes in PR webarkit/WebARKitLib#23