Index of /xtras/ar_xtra

Icon  Name                    Last modified      Size  Description
[PARENTDIR] Parent Directory - [DIR] fla/ 2010-07-18 20:38 - [DIR] mac/ 2011-04-09 04:18 - [DIR] win/ 2015-12-07 22:51 - [IMG] arxtra_demo.png 2015-12-07 22:35 150K [TXT] readme.txt 2015-12-12 20:28 4.2K
-- xtra arXtra
-- arXtra v0.1.9 (c) 2009 Valentin Schmidt
-- contact:


arXtra is an Xtra for Director (tested with v9 - v12) that implements optical marker 
tracking and overlay for augmented reality. 

It allows to detect previously loaded markers in lingo images, which can be frames of 
a live camera stream. If markers are detected, a lingo transform object is returned 
that specifies the position and orientation of the detected marker in the lingo image. 
This information can be then used to copy 3D objects into the image.

arXtra uses some code of the NyARToolKitCPP library, which is derived from ARToolKit 
library v2.72.1:


-- create new instance 
-- args: camera settings (external file or lingo list), image width, image height
new object me, any cameraFileOrList, integer w, integer h

-- set treshold (0..1) for marker detection (="sensibility")
setConfidenceTreshold object me, float minConfidence

-- load pattern(s) into xtra
loadPatternFile object me, string patternFile, *patternWidth, patternHeight
loadPatternList object me, list patternList, *patternWidth, patternHeight

-- unload all loaded patterns
unloadAllPatterns object me

-- main function, single marker mode
-- tries to detect loaded pattern in image passed as argument
-- image must be 32-bit, and must have width and height that were passed to new()
-- if successful, a #transform object is returned, otherwise VOID
detectSingleMarker object me, object image

-- main function, multi marker mode
-- tries to detect loaded patterns in image passed as argument
-- image must be 32-bit, and must have width and height that were passed to new()
-- returns lingo list with n elements, if n markers are loaded
-- list elements are either #transform objects, if corresponding marker was detected, or 0.
detectMarkers object me, object image


Demo in D10, D11 or D12 format for Windows can be downloaded from:

For Mac there is currently only a D11 demo:

Steps to get started with the demo:

- Open "pattHiro.pdf" (in folder "test_patterns") and print it on a white 
paper or karton.

- To run the demo, you also need a video camera that is compatible with
Flash (since the arXtra demo uses the flash camera object to get the
live camera image).

- Start "demo.exe" and press the "settings" button, now you should see a
flash settings panel in the center of the window. Select your camera in
the camera tab, and allow access to the camera (and also activate
checkbox "Save") in the access tab, then close the settings panel.

Notice: unfortunately in Director 12 this settings panel doesn't react 
on mouse clicks, so to use the D12 demo, you first have to run either the 
D10 or D11 demo once, and configure the settings there (important: make 
sure to save camera access permission also for the future!). After this, the 
d12 demo should also run fine.

- Now you should see your camera's image stream in the window. Put your
printed "Hiro" image (see above) somewhere inside the camera's view. If
everything works, arXtra should detect the marker image, and you should
now see a virtual 3D cube put on top of the pattern, with same
orientation as the marker print. Notice: the printed image must not be
bent (that's why karton is better than thin paper), and there must be
enough light/contrast.

Here a screenshot that shows what should happen if everything worked fine:

If the demo runs fine for you, and you're still interested in using the
xtra for your own projects, I could search for documentation (it's
somewhere hidden on my hard disc) on how to use your own patterns and
create the required pattern lingo lists (corresponding field member 
"patt.hiro" in demo.dir).