Inside FLARManager: Tracking Engines

<– Loading Collada Models | Customization –>
 
From a very young age, FLARManager has offered developers their choice of 3D frameworks with which to create assets for their augmented scenes. For even more flexibility, FLARManager v1.0+ also offers developers the option to work with any tracking library they desire. Here’s how to use the libraries currently implemented by FLARManager, and also how to create your own IFLARTrackerManager for interfacing with any other tracking library.
 



FLARToolkit

Back in November 2008, a group of Japanese coders, working largely under the radar, unveiled a project that redefined many ActionScript developers’ ideas of what the language could do. FLARToolkit, developed primarily by Tomohiko Koyama (aka Saqoosha), introduced augmented reality to the web, and to a large segment of the population as a whole.

For more information on FLARToolkit, read through this article that describes some of FLARToolkit’s inner workings.
 

FLARToolkit setup

To use FLARToolkit in FLARManager, pass an instance of FLARToolkitManager into the FLARManager constructor:
new FLARManager("flarConfig.xml", new FlarToolkitManager(), this.stage);Also, ensure the jp.nyatla and org.libspark.flartoolkit packages are in your build path.
 

FLARToolkit markers

FLARToolkit uses user-definable ARToolkit-style markers. For more information on creating ARToolkit-style markers for use with FLARToolkit, read this page.

FLARManager comes bundled with a collection of low-resolution, high-performance markers that can be used with any FLARToolkit application. The pattern files must be specified in FLARManager’s configuration xml file (by default, /resources/flar/flarConfig.xml), and can be found within the /resources/flarToolkit/patterns/pat8/ folder; the pattern images to print out are within /resources/flarToolkit/patterns/.

FLARToolkit v2.5.4 implemented ID-markers, a marker system that allows the use of thousands of different marker patterns, with no additional performance per detectable pattern. This is not yet implemented in FLARManager, but look for this feature to be added soon.

For a description of how to specify FLARToolkit pattern files within flarConfig.xml, read the documentation.
 



flare*tracker

Imagination is an Austrian company offering a number of impressive computer vision-related products across a broad spectrum of applications. flare*tracker is a marker-tracking solution that offers a number of features, including a very impressive framerate (around 45+ fps at the time of this writing), and support for a number of marker types.
 

flare*tracker setup

To use flare*tracker in FLARManager, pass an instance of FlareManager into the FLARManager constructor:
new FLARManager("flarConfig.xml", new FlareManager(), this.stage);Also, ensure libFlareTracker.swc is in your build path, and that flareTracker.lic is in the same folder as your application .swf. You can download an evaluation version of the .swc and .lic files from Imagination’s site.
 

flare*tracker markers

flare*tracker supports a number of different marker types, including ID-markers, DataMatrix markers, and Frame/Split markers. To specify the type(s) of markers to track, call FlareManager.addMarkerDetector(). Marker types are enumerated within FlareTracker.as. When using flare*tracker in FLARManager, the default marker type is simple ID-markers (FlareTracker.MARKER_SIMPLE_ID).

FLARManager comes bundled with a collection of 512 simple ID-style patterns, within /resources/markers/ARToolKitPlus_AllMarkers.zip. Note that each of these patterns is reduced to a minimum pixel size (12×12), so they must be enlarged before printing.

FLARManager also comes bundled with a collection of frame-style patterns, within
/resources/markers/FrameMarkers_SimpleId_thin.rar. Frame-style markers allow arbitrary printed content to exist within the frame; only the frame is used for tracking. Note that each of these patterns is reduced to a minimum pixel size (12×12), so they must be enlarged before printing.
 



flare*NFT

Imagination is an Austrian company offering a number of impressive computer vision-related products across a broad spectrum of applications. flare*NFT is a ‘natural feature tracking’ solution that can track any suitable 2D image, freeing creatives to specify their own, custom, trackable markers. Additionally, flare*NFT offers this flexibility at fast framerates, of 25-30 fps.
 

flare*NFT setup

To use flare*NFT in FLARManager, pass an instance of FlareNFTManager into the FLARManager constructor:
new FLARManager("flarConfig.xml", new FlareNFTManager(), this.stage);Also, ensure libFlareNFT.swc is in your build path (or libFlareNFT_LD.swc, if tracking multiple targets), and that flareNFT.lic is in the same folder as your application .swf. You can download an evaluation version of the .swc and .lic files from Imagination’s site.
 

flare*NFT targets

While almost any 2D image can be tracked by flare*NFT, creating targets from these images requires Imagination’s help. Contact Imagination for pricing on custom target encoding.

FLARManager comes bundled with a collection of NFT targets, saved as .pgm image files, within /resources/flare/. Refer to the documentation for more information on specifying your target feature sets to FLARManager.
 



Implementing a custom tracking library


As of the time of this writing, FLARManager supports FLARToolkit, flare*tracker, and flare*NFT. To add support for a new tracking library, follow these directions. Please also contact me via the link at the top-right of this page so that I can help you with the process, and keep tabs on new tracking libraries.

Create a new tracker library manager class that implements the IFLARTrackerManager interface. All of the methods and properties required by this interface are called or referenced internally by FLARManager, and so must be implemented or at least stubbed out. Look through other IFLARTrackerManager implementors (e.g. FlarToolkitManager and FlareTracker) for examples.

With your new tracker manager in place, set it in motion by passing an instance into the FLARManager constructor:
new FLARManager("flarConfig.xml", new MyTrackerManager(), this.stage);Setting up the xml configuration and parsing is a bit tricker; it’s probably best to manage configuration by directly setting properties as needed on the tracker manager instance instead.
 
 
<– Loading Collada Models | Customization –>