Creating custom Patterns

306 views
Skip to first unread message

Josh

unread,
Jul 27, 2009, 10:33:14 AM7/27/09
to FLARToolKit userz
Hi

I was wondering how do you make custom patterns that work with
FLARManager.

I know with the FLAR toolkit you can use an Air application - AR
Marker Generator to generate the patterns, but when I tried using that
for FLARManager, it does not work.

P.S I have modified my flarConfig.xml with <pattern
path="myPattern.pat" />, but it does not recognize my pattern :(

rez

unread,
Jul 27, 2009, 12:19:14 PM7/27/09
to FLARToolKit userz
Hi Josh.

You can also use the Tarotaro Online Generator. Here the link:
http://flash.tarotaro.org/blog/2009/07/12/mgo2/
Remember you can select different number of segments and "zoom" for
your patterns when you create your pattern and that have to match your
config xml files.

I've been creating custom patterns with the Artoolkit mkpat binary
file and the TaroTaro online generator and both works fine with
FLARtookit, FLAManager and Artisan. You shouldn't have problems using
different frameworks if you setup properly the xml config files.

Hope it works.

rez

eric socolofsky

unread,
Jul 27, 2009, 1:00:01 PM7/27/09
to flartool...@googlegroups.com
hey joshua.
the process is the same for FLARManager as it is for FLARToolkit -- i
also use tarotaro's marker generator.

one thing that catches some people:
you have to be sure to use the same marker resolution for *all* loaded
pattern files. you set the marker resolution in the <patterns> node,
it's the attribute called 'resolution'. it should be the same as the
dropdown in the marker generator (probably either 16 or 8).

-eric

dieGopen.com

unread,
Jul 27, 2009, 1:18:35 PM7/27/09
to flartool...@googlegroups.com
Now that we are in topic "marker generator": 

1) The 16x16 should be used with 16x16 cm side printed markers? Is that the relation?
2) Everytime I press "get pattern" the image it shows is blurred..Is impossible to recognize the design in the marker. Is that ok? 

My markers works, but I would like to know how to setup properly :)

thanks

PS: thanks eric for your quick reply about the FLARManager faqs!

Josh

unread,
Jul 27, 2009, 1:22:37 PM7/27/09
to FLARToolKit userz
Thanks to everyone for the quick reply.

yeah I just found that website and I started to use it.
But I find if I have an image it is really blurry, I upped the
resolution to 64x64 for a clear image. But I can't get good results
compared to the FLARManager examples.

Josh

unread,
Jul 27, 2009, 1:27:03 PM7/27/09
to FLARToolKit userz
Thanks to everyone for the quick reply.

yeah I just found that website and I started to use it.
But I find if I have an image it is really blurry, I upped the
resolution to 64x64 for a clear image. But I can't get good results
compared to the FLARManager examples.


On Jul 27, 1:18 pm, "dieGopen.com" <i...@diegopen.com> wrote:

eric socolofsky

unread,
Jul 27, 2009, 1:27:23 PM7/27/09
to flartool...@googlegroups.com
no, the pattern resolution doesn't have anything to do with the physical size of the marker.
the pattern resolution is the resolution of the graphic printed on the marker.

so, something this (X=black, 0=white):

X00X
0000
0000
X000

would be 4x4.

something like this:

XX0000XX
XX0000XX
00000000
00000000
00000000
00000000
XX000000
XX000000

would be 8x8.

the higher the resolution, the longer it takes to match the pattern (slower performance), and the closer the marker must be to the camera to get all the information in the marker.  of course, the lower the resolution, the fewer the total number of possible patterns, and the "uglier" (subjective term!) the pattern.  i chose 8x8 for FLARManager's examples and tutorials because it's a good balance between performance and variety of patterns available.  16x16 generally works okay too.

also, i strongly recommend you load images into the marker generator, instead of capturing from your camera.  the closer to black and white your pattern file is, the better it will work in a variety of environments.  i also modify the resultant .pat files by hand -- every low number, i replace with 0; every high number, i replace with 255.  if you do this, be VERY SURE to maintain whitespace, or your .pat files will break.

you can see this by taking a look at the .pat files included in FLARManager, in a text editor:

-eric

eric socolofsky

unread,
Jul 27, 2009, 1:28:27 PM7/27/09
to flartool...@googlegroups.com
eek! don't go up to 64x64. you'll get horrible detection results.
again, i really don't suggest you go over 16x16.
as computers and flash player and FLARToolkit get faster, you'll be
able to up that resolution.
just be patient!
;)

-e

Josh

unread,
Jul 27, 2009, 1:33:55 PM7/27/09
to FLARToolKit userz
Yeah I am using an old cheapo webcam to make sure the FLAR marker
works on old and new webcams.

Thanks for the info.

But what is the most ideal way to capture images in a pattern file. I
find that the image is very blurry and is hard to make a distinction.
Is that alright?

dieGopen.com

unread,
Jul 27, 2009, 1:34:33 PM7/27/09
to flartool...@googlegroups.com
Flawless victory tip eric! gracias

eric socolofsky

unread,
Jul 27, 2009, 1:41:45 PM7/27/09
to flartool...@googlegroups.com
like i said, don't capture it with the camera, load an image.

in the 'Mode select' dropdown, select 'Load marker image'.

-e

rez

unread,
Jul 27, 2009, 1:42:59 PM7/27/09
to FLARToolKit userz
hey Josh,

In my opinion, probably your situation is that one: once captured the
pattern from the webcam/image you see the preview result pattern and
you see a kind of blurry-pixeled image. That's ok because that's the
idea of the marker, reduce the resolution to a minimum acceptable
where the recognition matches and the tracking flows.

As Eric said, the better way to capture a pattern is using a image
file instead a webcam capture.

good luck!

eric socolofsky

unread,
Jul 27, 2009, 1:46:21 PM7/27/09
to flartool...@googlegroups.com
oh! totally forgot about this very excellent blog post from the
squidder folks:
http://www.squidder.com/2009/03/05/for-nerds-only-custom-flar-markers-explained/

that's how i first learned the ins and outs of marker creation.
-e

ericsoco

unread,
Jul 27, 2009, 2:00:25 PM7/27/09
to FLARToolKit userz
ok, i just wrote this up on the FLARManager site:
http://words.transmote.com/wp/flarmanager/inside-flarmanager/flarmanager-miscellany/

On Jul 27, 10:46 am, eric socolofsky <e...@transmote.com> wrote:
> oh!  totally forgot about this very excellent blog post from the  
> squidder folks:http://www.squidder.com/2009/03/05/for-nerds-only-custom-flar-markers...

Guidewire

unread,
Jul 29, 2009, 4:29:26 PM7/29/09
to FLARToolKit userz
So...what do you consider low numbers and high numbers ? Is there a
more systematic way of doing this or is it really helpful?

eric socolofsky

unread,
Jul 29, 2009, 4:32:04 PM7/29/09
to flartool...@googlegroups.com
low is <127, high is >= 127

Makc

unread,
Jul 30, 2009, 10:33:14 AM7/30/09
to flartool...@googlegroups.com
this seems like a good thing to do only along vertical or horizontal
edges, and in solid areas, but on diagonal edges this should make
things worse. also, what about fine details that are below marker
resolution? these should better be left intact too, shouldn't they.
Reply all
Reply to author
Forward
0 new messages