transmote speaks…

design + art + code
  • portfolio
  • rss
  • Home
  • About
  • FLARManager: Augmented Reality in Flash
    • FLARManager intro
    • FLARManager documentation
    • FLARManager – donate
    • Inside FLARManager
      • Inside FLARManager: Getting Started
      • Inside FLARManager: 2D Marker Tracking
      • Inside FLARManager: Basic Augmented Reality
      • Inside FLARManager: Loading Collada Models
      • Inside FLARManager: Tracking Engines
      • Inside FLARManager: Customization
      • Inside FLARManager: FLARManager Miscellany
  • Contact

FLARManager v0.6 (augmented reality in Flash)

ericsoco | 2009/09/23 | 2:04 am

when memes collide...

On to version 0.6. 1.0 is around the corner…
download here:
http://words.transmote.com/wp/flarmanager/

 

what is this?

FLARManager is a lightweight framework that makes it easier to build FLARToolkit augmented reality applications for Flash. it is compatible with a variety of 3D engines, and provides a more robust event-based system for managing marker addition, update, and removal. it supports detection and management of multiple patterns, and multiple markers of a given pattern.

 

what’s new this time around?

[customization]
FLARManager’s smoothing and adaptive thresholding display algorithms are now broken out into separate classes, allowing developers to implement their own algorithms. see Inside FLARManager: Customization for more info. additionally, custom smoother and threshold display algorithms can be implemented via flarConfig.xml, to allow fine-tuning without recompiling.

[better 2D support]
added .x, .y, .z, .rotation2D, .scale2D, and .matrix2D properties to FLARMarker, for easier access to 2D transformation properties that used to be hidden inside FLARToolkit’s 3D transformation matrices.

[better camera management]
changes to FLARCameraSource provide better camera management, with less of a chance that the wrong camera will be auto-selected.

[FLARManager deactivation and disposal]
improved support for de- and reactivating, and for completely removing FLARManager from memory.

[native mirroring]
developers no longer need to flip the viewport to achieve mirroring. when FLARManager.mirrorDisplay is set to true (as it is by default), FLARManager internally mirrors the matrices generated by FLARToolkit.

 


 
below is a full list of the changes since v0.5. most of these changes will not affect applications written with FLARManager v0.5, with the exception of the change in how adaptive thresholding is implemented (see below).

 

custom adaptive thresholding and smoothing

FLARManager’s smoothing and adaptive thresholding display algorithms are now broken out into separate classes, allowing developers to implement their own algorithms. see Inside FLARManager: Customization for more info. additionally, custom smoother and threshold display algorithms can be implemented via flarConfig.xml, to allow fine-tuning without recompiling.

as a result of these changes, FLARManager.adaptiveThresholding, .adaptiveThresholdSpeed, and adaptiveThresholdBias are deprecated and removed. developers should instead specify adaptive threshold speed and bias in a <thresholdAdapter> tag, as described here.

thanks to eugene zatepyakin and matt reynolds for their suggestions and contributions to the still-in-process IntegralImageThresholdAdapter and HistogramThresholdAdapter algorithms.

 

better camera management

FLARCameraSource now activates the first camera found, instead of defaulting to ‘USB Video Class Video’. if a camera reports no activity after a few seconds, the next camera in line is automatically selected. this continues until an active camera is found, or all camera options are exhausted. also, developers can manually specify a camera index (from Camera.names) via FLARCameraSource.cameraIndex.

 

better 2D support

added .x, .y, .z, .rotation2D, .scale2D, and .matrix2D properties to FLARMarker, for easier access to 2D transformation properties that used to be hidden inside FLARToolkit’s 3D transformation matrices. updated FLARManagerTutorial_2D and FLARManagerExample_2D to demonstrate these new properties.

 

updated 3D engines

the FLARManager distro now includes Away3D 3.3.4 (featuring vector shape primitives, like text) and Papervision3D 2.1.920 (featuring better COLLADA support).

 

more configuration options

in addition to exposing custom smoothing and adaptive thresholding in flarConfig.xml, developers can also specify the pixel size of a pattern at which it generates a transformation matrix of a scale of 1.0, via <pattern size='N'>; and can tweak FLARManager performance using <flarManagerSettings minimumLabelSize=’N'>. see the documentation page for more details.

 

native mirroring

developers no longer need to flip the viewport to achieve mirroring. when FLARManager.mirrorDisplay is set to true (as it is by default), FLARManager internally mirrors the matrices generated by FLARToolkit.

 

improved stability in tutorials/examples

a condition in a number of the tutorials and examples caused content to be absent from the screen, even when the marker was clearly present. this is fixed, by adding a handler for FLARMarkerEvent.MARKER_UPDATED events in those tutorials/examples.

 

FLARManager deactivation and disposal

FLARManager.activate(), FLARManager.deactivate(), and FLARManager.dispose() give developers more control over when FLARManager is consuming resources.

 

FLARManager.verbose

setting FLARManager.verbose to true allows developers to keep a closer eye on changes to FLARManager's configuration via trace() output.

Categories
to do
Tags
actionscript, as3, augmented reality, computer vision, flarmanager, flartoolkit, flash
Comments rss
Comments rss
Trackback
Trackback

« FLARToolkit/FLARManager article on InsideRIA.com FLARManager v0.61 (augmented reality in Flash) »

44 responses

Can not wait to get out the 1.0 version with

Rafael Lima | 2009/09/23 | 10:40 am

Can not wait to get out the 1.0 version with improved light and contrast.
Anyway, it was very good this update.

Great!!! Thanks for this update! But I have a problem: I've got

Guile C. | 2009/09/24 | 6:49 am

Great!!!

Thanks for this update!

But I have a problem: I’ve got a marker active, include in activeMarkers vector, but I’ve got the MARKER_REMOVED dispatched and the MARKER_ADDED not dispatched after this. Its not sinc anyway.

Any help?

Thanks in advance!

Any chance I can get some help getting v0.6 running

Ric | 2009/09/25 | 10:02 am

Any chance I can get some help getting v0.6 running in Flash CS4 Pro?

I’ve created a FLA with the class set to FLARManagerExampleLauncher, and I’ve added the supporting libraries to my library path in publish settings. When I compile, I’m getting a ton of errors and warnings. They start off with a series of errors in the labeling class:

1044: Interface method attachDestination in namespace org.libspark.flartoolkit.core.labeling:IFLARLabeling not implemented by class org.libspark.flartoolkit.core.labeling:FLARLabeling_BitmapData.

Sorry to spam, but previous comment was cut off... I can

Ric | 2009/09/25 | 10:09 am

Sorry to spam, but previous comment was cut off…

I can see that these methods are in the class so I’m at a loss as to why they’re failing. I’ve been banging my head on this for a while and finally am to the point of asking for any help at all.

Has anyone got v0.6 working in Flash, and if so do you have any idea what I’m doing wrong?

Thanks,

-Ric

@guile -- i'm sorry, i'm not understanding your question...there is

ericsoco | 2009/09/25 | 11:15 am

@guile — i’m sorry, i’m not understanding your question…there is a problem, caused by markerRemovalDelay > 0, in which the MARKER_REMOVED event for a given marker is dispatched *after* the MARKER_ADDED event is dispatched. this happens when a marker moves very quickly to a new location. it’s best resolved by adding a MARKER_UPDATED handler as well, as done in, for example, FLARManager_Tutorial2D.

also, you asked about Away3D Lite — no plans to add support, but it should be quite simple; i understand the basic framework is the same, so you should be able to just remove the Away3D 3.3.4 SWC and add in the Away3D Lite package or SWC and be up and running, no?

@ric -- very strange. yes, the attachDestination method is

ericsoco | 2009/09/25 | 11:17 am

@ric — very strange. yes, the attachDestination method is implemented by FLARLabeling_BitmapData, and i’m definitely not seeing that error. perhaps you should download the latest FLARToolkit via SVN? although that’s exactly what’s included in the FLARManager distro. if you figure out the problem, please let us know…

@ericsoco Looks like it may be a Flash CS4 bug.

Ric | 2009/09/28 | 11:02 am

@ericsoco Looks like it may be a Flash CS4 bug. Here’s what I’ve learned so far:
* I downloaded the latest FLARtolkit from the SVN, and it has the same issue (which is expected given that’s the same code you ship with).
* I can compile FM v0.5 without issue, with either the latest FLARtoolkit or the older version that shipped with v0.5.
* I get the same issue if I downgrade FLARtoolkit to the version that shipped with v0.5.
This was smelling like a bug in Flash Pro CS4 (shocker, I know), so I did some googling and turned up this blog post which looked promising (and shows a workaround):
http://blog.webdeely.com/2009/02/cs4-doesnt-like-the-combo-of-internal-classes-and-interfaces-in-as3/
I’ve done a bit of digging in FLARmanager to see if I could alter singletons that may be tripping this bug, but so far all I’ve done is bork the code further. Any chance this makes more sense to you?

@ric -- looks like you're probably right. dunno why

ericsoco | 2009/09/28 | 12:10 pm

@ric — looks like you’re probably right. dunno why FM v0.5 does not have this problem, perhaps there was a change in FLARLabeling_BitmapData in between the two releases. dunno (i don’t maintain the FLARToolkit source). but yes, FLARLabeling_BitmapData does implement an interface *and* include an internal class, which matches the bug description in your link. so, to fix it, try creating a dummy interface and also implementing it in FLARLabeling_BitmapData, and let us know if that works. thanks!

[...] Dependency Injection September 29, 2009 — mattreyuk I’ve

FLARM and Dependency Injection « M@ Blog | 2009/09/29 | 3:35 pm

[...] Dependency Injection September 29, 2009 — mattreyuk I’ve been taking a look at the latest FLAR Manager code with a view to implementing the histogram bias generation for adaptive thresholding I’ve [...]

Good stuff, thanks.

Kaspar | 2009/09/30 | 1:20 pm

Good stuff, thanks.

i'm having exactly the same error as ric , what

max | 2009/10/01 | 8:16 am

i’m having exactly the same error as ric , what version of flash are you using?
or what version should i use to compile right, i see many people have no problem in compiling the code i have flash cs4 version 10

solved it

max | 2009/10/01 | 9:18 am

solved it

@max: How did you solve this?

Ric | 2009/10/02 | 10:48 am

@max: How did you solve this?

Just implement another dummy interface for FLARLabeling_BitmapData: public class FLARLabeling_BitmapData implements

Gerald Yeo | 2009/10/05 | 11:13 pm

Just implement another dummy interface for FLARLabeling_BitmapData:

public class FLARLabeling_BitmapData implements IFLARLabeling, IDummy {...

I am wondering how to change video's res to 1280x720,

Vossler | 2009/10/08 | 3:36 am

I am wondering how to change video’s res to 1280×720, I make some changed in flarConfig.xml
flarConfig.xml、flarConfig_loader.xml and flarConfig_wide.xml to follow,but video’s res remian 640×480, anyway to slove this?

My webcam can support to 1280×720 at 30 fps (microsoft lifecam)

tahnks

@vossler, try: you could probably capture at a higher res than

ericsoco | 2009/10/08 | 12:55 pm

@vossler, try:

you could probably capture at a higher res than that, but only if you have a fast computer.
i’ve never tested FLARManager with a non-4×3 camera, so it’s possible there’s a bug in there, but that *should* work.

Hi! awesome work man!!! its really great!! i' m having problems

Nacho | 2009/10/20 | 6:49 am

Hi! awesome work man!!! its really great!!

i’ m having problems controlling the animations with collada models, is there any way to do this??
not just starting the animation when the model is loaded or looping it through the constructor of the DAE class, i mean controlling the animations separately, for example i want to do this:
if (“some key is pressed”)
{
//load animation A or load animation B
}

maybe there is a way to get the frames, so i can load an animation from x frame to x frame and so on….

well, thats the problem!! please HELP!!!!
thanks!!! and again, awesome work with flarmanager!!!!

@nacho, i don't know much about pv3d or collada.

ericsoco | 2009/10/20 | 8:27 pm

@nacho, i don’t know much about pv3d or collada. try the flartoolkit forum.

Hey guys I'm trying to run this in Flash CS4

Rob | 2009/10/25 | 10:21 am

Hey guys I’m trying to run this in Flash CS4 too. How exactly do I “Just implement another dummy interface for FLARLabeling_BitmapData: public class FLARLabeling_BitmapData implements “? Thanks.

@ericsoco - FYI, I was having issues with detecting my

atmospherix | 2009/10/27 | 7:47 am

@ericsoco – FYI, I was having issues with detecting my camera on my Mac (using Flash CS4). For whatever reason Flash thinks I have 3 different camera sources, yet only one physical camera attached. The bit of code in FLARCameraSource.as that cycles thru the cameras just sets the active camera to the last one in the list, which in my case was not a true camera. I removed the code and just used this.camera = Camera.getCamera(); which should return the default. I’m guessing the code that was there was to make sure all cameras were tried to activate – any thoughts if what I changed it to would cause problems?

@rob, in FLARLabeling_BitmapData.as, add a dummy class after “implements” in the class declaration, such as IDummy:


public class FLARLabeling_BitmapData implements IFLARLabeling, IDummy

then, in the same location as FLARLabeling_BitmapData.as, create an empty interface named IDummy.as:


package org.libspark.flartoolkit.core.labeling {
public interface IDummy {
}
}

Rob and all other Flash CS4 users: Step 1.- Open the

Daniel | 2009/10/27 | 11:17 am

Rob and all other Flash CS4 users:

Step 1.- Open the FLARLabeling_BitmapData.as file and replace the line that says:
public class FLARLabeling_BitmapData implements IFLARLabeling {
with this line:
public class FLARLabeling_BitmapData implements IFLARLabeling, IFLARDummy {
(Should be around line 44). Save and close the file.

Step 2.- Create an AS file named IFLARDummy.as in the same folder where FLARLabeling_BitmapData.as is. Inside IFLARDummy.as paste the following code:

package org.libspark.flartoolkit.core.labeling {
public interface IFLARDummy {
}
}

That’s it! This will resolve the Flash CS4 complie error.
Hope this works for you as it worked for me!

@atmospherix: yeah, this camera thing is a huge pain in my

ericsoco | 2009/10/27 | 11:41 am

@atmospherix:
yeah, this camera thing is a huge pain in my ass. and a lot of other asses, like yours. jim alliban just suggested something else to try, but will be a bit until i have it implemented. if you want FLARManager to just use Camera.getCamera(), you can do so by downloading the latest from SVN, and setting your FLARCameraSource.useDefaultCamera = true:


var flarManager:FLARManager = new FLARManager("configfilepath");
flarManager.flarCameraSource.useDefaultCamera = true;

if we can get this issue sorted, i’ll release a new minor version with the fix in it. been lots of people with this problem lately.

@atmospherix & @daniel — thx for explaining how to get around that CS4 bug!

@atmospherix Thanks for getting back to me! Unfortunately

Rob | 2009/10/27 | 6:48 pm

@atmospherix

Thanks for getting back to me! Unfortunately I have more errors popping up after I implement the dummy class.

Warning: 1090: Migration issue: The onMouseDown event handler is not triggered automatically by Flash Player at run time in ActionScript 3.0. You must first register this handler for the event using addEventListener ( ‘mouseDown’, callback_handler).

Warning: 1090: Migration issue: The onMouseMove event handler is not triggered automatically by Flash Player at run time in ActionScript 3.0. You must first register this handler for the event using addEventListener ( ‘mouseMove’, callback_handler).

Warning: 1090: Migration issue: The onMouseUp event handler is not triggered automatically by Flash Player at run time in ActionScript 3.0. You must first register this handler for the event using addEventListener ( ‘mouseUp’, callback_handler).

Warning: 1090: Migration issue: The onKeyDown event handler is not triggered automatically by Flash Player at run time in ActionScript 3.0. You must first register this handler for the event using addEventListener ( ‘keyDown’, callback_handler).

I’m going to try to work through these but if you know what’s going on it’d be much appreciated!

@atmospherix -- those aren't errors, they're just CS4 being cranky

ericsoco | 2009/10/28 | 11:09 am

@atmospherix — those aren’t errors, they’re just CS4 being cranky about me using names for event handlers that make sense. ignore them. (the flex/flash builder compiler doesn’t generate those errors, thankfully.)

I set up the dummy class but now I receive

Rob | 2009/10/30 | 3:28 pm

I set up the dummy class but now I receive this error
VerifyError: Error #1014: Class Vid could not be found.

at global$init()

I still get the mirgration issue warnings as well.

*** CAMERA FIX *** to those who were having camera selection

ericsoco | 2009/10/30 | 4:16 pm

*** CAMERA FIX ***
to those who were having camera selection issues, please download the latest from SVN. i believe it’s fixed now. if so, i’ll roll it out as a minor version.

@daniel Cheers, this works in CS4.

th3d0g | 2009/11/03 | 3:57 am

@daniel

Cheers, this works in CS4.

Hi, I keep getting theses vid errors also. I cannot find where

pd7 | 2009/12/06 | 2:55 am

Hi,
I keep getting theses vid errors also.
I cannot find where the problem could be.
1046: Type was not found or was not a compile-time constant: Vid
1180: Call to a possibly undefined method Vid

thanks.

@pd7 -- no idea. you must have altered the

ericsoco | 2009/12/06 | 1:21 pm

@pd7 — no idea. you must have altered the code in some way, there is nothing in FLARManager called ‘Vid’.

Thank you. I just figured it out. I was doing

pd7 | 2009/12/06 | 2:00 pm

Thank you. I just figured it out.
I was doing a tutorial where you could play a video. where the swc had the flv playback that was of type vid. I had to add the swc file correctly into flash builder by adding it to my library path.

thanks.

[...] Thanks to the wonderful comments on the flarmanager site,

GuessWho: Augmented Reality Project « OhNit | 2010/01/27 | 10:46 am

[...] Thanks to the wonderful comments on the flarmanager site, a solution was found. This comment was found there (http://words.transmote.com/wp/20090923/flarmanager-v0-6-augmented-reality-in-flash/): [...]

Hi @pd7 and ericsoco, I think I've been following the same

ads | 2010/02/05 | 10:21 am

Hi @pd7 and ericsoco,

I think I’ve been following the same tutorial and have the same error msg being returned …

1046: Type was not found or was not a compile-time constant: Vid
1180: Call to a possibly undefined method Vid

Was wondering if you could point me in the right direction in terms of loading an swc correctly into my flash builder project and library …

Thanks in advance!

@ads -- i really have no idea where you're getting

ericsoco | 2010/02/05 | 10:46 am

@ads — i really have no idea where you’re getting ‘Vid’ from…what file is returning those errors? it should be visible in the console / error dialog.

yes i was following the same tutorial. Vid is a

pd7 | 2010/02/05 | 2:12 pm

yes i was following the same tutorial. Vid is a .swc file that is being used in that tutorial.
what you have to do is In flash builder add the Vid.swc file into the library path in the project.
go into the properties of your project- actionscript build path and add the swc to your library path from your src folder.

that should fix those errors msg’s.

@pd7 -- what tutorial? not one of mine...

ericsoco | 2010/02/05 | 4:57 pm

@pd7 — what tutorial? not one of mine…

Thanks guys, yep, got the right .swc file loaded now

ads | 2010/02/07 | 9:11 am

Thanks guys, yep, got the right .swc file loaded now (this was from a tutorial on loading videos onto planes … http://www.gotoandlearn.com/play?id=114)

Thanks again … now onto loading/attaching different videos to different markers!

@ads -- thanks for answering this question. relieved to

ericsoco | 2010/02/07 | 12:29 pm

@ads — thanks for answering this question. relieved to hear it’s not my issue :) and good for other readers to know about.

Warning: 1090: Migration issue: The onMouseDown event handler is not

BenJah | 2010/02/09 | 3:32 pm

Warning: 1090: Migration issue: The onMouseDown event handler is not triggered automatically by Flash Player at run time in ActionScript 3.0. You must first register this handler for the event using addEventListener ( ‘mouseDown’, callback_handler).

=========================

Hi

I’m usign Flash CS4 10.2, and at this issue I replace onMouseDown to fOnMouseDown, same nomenclature for the rest: “fOn…” and the migration issue solved.

Thanks for the dummy class by the way.

Hey, I'm using the tutorial from Lee about FLARManager and

FlarGuy | 2010/03/07 | 4:37 pm

Hey, I’m using the tutorial from Lee about FLARManager and I’m almost through it! However, I am getting an error about DesignerLayer, and I don’t know that I ever used that. It may have been caused from creating an swc by converting an FLVPlayback into a movieclip symbol and exporting it as a flex component, and then exporting it as an swc.
Any Idea how this can be solved?

@flarguy - no idea, sorry. never heard of DesignerLayer.

ericsoco | 2010/03/07 | 7:27 pm

@flarguy – no idea, sorry. never heard of DesignerLayer. ask lee?

@daniel thanks for the dummy trick. It works perfect for me

Flacoloco | 2010/03/18 | 7:41 am

@daniel

thanks for the dummy trick. It works perfect for me (Flash CS4 v10.0, Mac)

hi..i just started to use FM and very new to

berylsun | 2010/05/05 | 12:58 am

hi..i just started to use FM and very new to AR..im following the same tutorial and getting the same errors which are
1046: Type was not found or was not a compile-time constant: Vid
1180: Call to a possibly undefined method Vid
may i know where to get the Vid.SWC?more specified path to get it? i dun seems like able to find the swc in my src folder and add to the lib path in the project..

@berylsun -- this is a problem with lee's tutorial, and

ericsoco | 2010/05/05 | 9:52 am

@berylsun — this is a problem with lee’s tutorial, and i don’t know how to help you. it came up on the flartoolkit forum, and i believe if you search there you’ll find an answer.

thanks for answering my question..problem solved :D u need to go

berylsun | 2010/05/09 | 3:09 pm

thanks for answering my question..problem solved :D
u need to go to the site where u got the tutorial and get the source file..the vid.swc is inside the src folder..take that and include it into ur src folder and add to ur project’s build path :)

Leave a comment

You can use these tags : <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Additional comments powered by BackType

Recent Posts

  • FLARManager v1.0.1 – Augmented Reality with Flash
  • FLARManager v1.0 – Augmented Reality with Flash
  • mounting a server on a wireless network
  • FLARManager for flare/NFT
  • FITC Toronto 2010 – Slides

Tags

3d actionscript Add new tag AR ARDevCamp as3 augmented reality camera Capabilities computer vision connections culture digital elastic event handler exhibit exploratorium fiducial flar flarmanager flartoolkit flash flash player forum garbage collection generative grid interactive Keyboard marker memory mesh mirror notes papervision presentation reflection slides sputnik theory to see tracking video video mirror webcam


rss Comments rss design by jide