-
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
Pointers feature setup #4
Conversation
with this code i get this error:
because i initialize the new intance of WebARKitOrbTracker in the wrong way: WebARKitOrbTracker *tracker;
//.... other code
tracker->initialize(....) should be instead: WebARKitOrbTracker tracker;
//.... other code
tracker.initialize(....) the error really point to this, spent hours to understand the output. 😄 |
Now with commit 3c99a38 that error is fixed, look at the log the program go over but stop in another location:
|
The last commit c7fe31b fixed the error. // inside WebARKitOrbTracker.cpp
- WebARKitOrbTracker::WebARKitOrbTracker()
+ WebARKitOrbTracker::WebARKitOrbTracker():corners(4) I will implement now the other methods in WebARKitJS.cpp. 😄 |
I think i need separate the video setup and the image setup, doing the init in the same place is not recommended. So the setup https://github.com/kalwalt/webarkit-testing/blob/689585d601d363663de8dd9f727b49db61709d03/emscripten/WebARKitJS.cpp#L32 will be for video pointer initialization and passing data from javascript to WASM, and i will create a setupImage for the image to be tracked. |
Now i get this error:
Similar errors related to the 'corners', but i have not touched that code... |
This happens because i'm passing to the _copyImageToHeap function a video HTML element that is object and not an Array of data... 😭 😄 |
Maybe the problem came because i mixing |
- fixed odd error with pointer....
The stack-buffer-underflow error and other similar errors was caused because a wrong initialization of the |
with these flags: https://github.com/kalwalt/webarkit-testing/blob/f2ebc7ce28bde0c6eb18c4f3e81d123fb38070b5/tools/makem.js#L177
the problem is passing data from the fameCurr to framePrev see: https://github.com/kalwalt/WebARKitLib/blob/ac267d5c57fa9a825fb57de51769f24763b74771/lib/SRC/WebARKitTrackers/WebARKitOpticalTracking/WebARKitOrbTracker.cpp#L88 if i comment out that line i did not receive this error. |
Not sure if this is correct but i will continue on this. I think #6 is not the best approach. Better create a class and intantiate it. As a reminder i'm using emsdk 3.1.9 and opencv-em 0.0.4, seee also comments in commits. |
Finally now it track! But I needed to lower the number of frame Points detected to start the tracking process. There are a slight difference (about this aspect) in comparison to webarkit-OCVT. I think i can merge soon this PR. Other improves in other PRs. |
See #3 I'm testing an alternative approach to loading the tracker. I think that probably i will continue on this path.