PAT file / marker generation

May 27, 2010 at 12:20 PM



What a GREAT piece of software J

Is there a way to generate the PAT files in code, so without the mentioned tools? Or better: is it possible to load images instead of PAT files for the recognition list?

How many possible markers are there / how many markers can be used ‘in the list’?


Thanx in advance,

Keep up the good work,



May 27, 2010 at 8:08 PM
Edited May 27, 2010 at 8:11 PM

Hi Jean-Pierre,


Yep, it's possible to generate the pattern files in code. If you open  a pat file with a text editor you'll see the actual pattern as text. The values represent the brightness of the pixel. The pattern is 4 times rotated in there. Obviously such pat files can be generated in code from an image. BUT, at the moment there's no such built-in functionality in SLARToolkit. I might provide such functionality in the future, but I've already a lot of thinks to do in the near future.

There's no artificial maximum marker restriction in SLARToolkit, but every marker you add increases the computation time. I just tried 102 unique markers and everything worked fine. I didn't even notice a slow down. So  I'm pretty  sure it works with a lot more.

- René


May 27, 2010 at 8:19 PM
Edited May 27, 2010 at 8:27 PM


Thanx for the reply. I did look in the PAT files, I can code them, but if there was a function...

Do you know ARtag (2002 possible codes and the tags are auto generated, but not downloadable anymore)

I will contact you if I manage to code the PATs.

Thanx again,


May 27, 2010 at 8:50 PM

Yep, I know ARTag. The license is also not useful.

And you can create much more unique markers when you use a higher segment count. It depends on the size of your blocks, but theoretically you can make (2^size) - 1 different patterns. This number is actually lower since ARToolkit needs rotational unique patterns.

I'm sure you might find this interesting
It's a unique pattern maker for ARToolkit and it comes with the source code. But I'm not sure about the license, although it's not very hard to implement this functionality.