Skip to content

Commit ec03ab4

Browse files
committed
adding quit tracking and other stuf for the transpose matrix
1 parent 41eb40a commit ec03ab4

File tree

5 files changed

+5397
-2999
lines changed

5 files changed

+5397
-2999
lines changed

build/artoolkitNft.debug.js

Lines changed: 5373 additions & 2985 deletions
Large diffs are not rendered by default.

build/artoolkitNft.min.js

Lines changed: 13 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/artoolkitNft_wasm.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/artoolkitNft_wasm.wasm

15.4 KB
Binary file not shown.

emscripten/ARToolKitJS.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
#include "ARMarkerNFT.h"
1818
#include "trackingSub.h"
1919

20+
#define PAGES_MAX 10
21+
2022
struct multi_marker {
2123
int id;
2224
ARMultiMarkerInfoT *multiMarkerHandle;
@@ -46,6 +48,7 @@ struct arController {
4648

4749
int surfaceSetCount = 0; // Running NFT marker id
4850
std::unordered_map<int, AR2SurfaceSetT*> surfaceSets;
51+
AR2SurfaceSetT *surfaceSet[PAGES_MAX];
4952

5053
ARdouble nearPlane = 0.0001;
5154
ARdouble farPlane = 1000.0;
@@ -105,6 +108,11 @@ extern "C" {
105108
float trackingTrans[3][4];
106109

107110
kpmResultNum = trackingInitGetResult( arc->threadHandle, trackingTrans, &pageNo);
111+
ar2SetInitTrans(arc->surfaceSet[pageNo], trackingTrans);
112+
if( ar2Tracking(arc->ar2Handle, arc->surfaceSet[pageNo], arc->videoLuma, trackingTrans, &err) < 0 ) {
113+
ARLOGd("Tracking lost.\n");
114+
}
115+
//ar2SetInitTrans(surfaceSet[detectedPage], trackingTrans);
108116
ARLOGi("kpmResultNum is: %d\n", kpmResultNum);
109117

110118
for( i = 0; i < kpmResultNum; i++ ) {
@@ -401,6 +409,8 @@ extern "C" {
401409
delete &arc->multi_markers;
402410
delete arc;
403411

412+
trackingInitQuit(&arc->threadHandle);
413+
404414
return 0;
405415
}
406416

0 commit comments

Comments
 (0)