i'm a bit confused; if you have a limited number of patterns your
application is looking for, why do you need to train the algorithm?
wouldn't it just weight matches against the list of patterns (e.g.
FLARCodes) you load into FLARToolkit? or is the idea that with this
setup, you don't need to load .pat files, you can just show an app a
4x4 marker and it will spit out an ID? in either case, i guess i'm
not clear on where/how the 'training' takes place.
tell us more! sounds great.
-eric
There are three square things in every QR code that can be recognized
as flartoolkit markers, right? This should actually give you three
times more stable 3D location than just one normal marker. Using this
information, you can easily perform homography and then read QR code
data using simple getPixel loop, but if you use existing QR reader
this is not necessary.
Maybe I am missing something in big picture, but this seems like a day
of work for someone like Eric.
i think the tricky thing here would be recognizing the markers at that
small a size.
however, it might not be that tricky, since the content of those
markers doesn't matter, just their location.
could be a fun project, would probably only be a day of work for
someone like makc ;)
you definitely win the prize. most impressive.
as far as i can tell, it's currently the slowest part of the whole
engine.
FLARManager has a hook to speed things up by specifying a minimum size
for labeled areas (minimumLabelSize), which helps somewhat, but
increasing that number too much reduces detection at smaller sizes.
the idea of using a lower resolution for the labeling could be a good
one; it will have the same issue that minimumLabelSize has, which is
that it will work poorly for smaller (i.e. further-away) markers. but
you're right, the square outline doesn't need as high resolution for
accurate detection as the pattern within the outline.
i get the feeling you're already pretty up on this stuff, but in case
you want verification of your own findings, you can take a read
through this article i wrote:
http://www.insideria.com/2009/07/flartoolkit-and-flarmanager.html
that describes some of the processes within FLARToolkit (and
FLARManager).
looking forward to see what you put together! and if you need a
second pair of eyeballs (or hands on a keyboard), let me know...
-e
have you thought about using correction codes? you would have much
less possible numbers to store, but much better error resistance.
> And, going back to this thread's headline - it's not that hard to
> implement a QR-detector directly into FLARToolKit. All you need to do
> is to write a new matcher and have a pretty high resolution on the
> picker (I'd say 64x64 pixels at least). It should be much faster than
> tracking three codes.
that would not really work out of the box because qr code will be
broken into many squares. if you could guarantee solid black frame
around qr code - then yes.
the same way, you could detect arbitrary jpegs, for example, but the
problem is, again, that you can't force black square frame.
> it'd be interesting to compare the performance vs the 16 bit number
> algorithm as suggested above
obviously you can't compare them because 4x4 is not enough to fit qr code :(
not just checksum but codes that allow to recover from error, see
http://en.wikipedia.org/wiki/Error_correcting_code
re: using a checksum, error correction could essentially happen over
time, instead of within one frame. something like if (checksum != 0)
{ use last frame's pattern ID }. it's unlikely (near-impossible for
most applications) that a pattern ID would change from frame to frame
if it's in the same location.
and, fwiw -- exciting to see some interesting conversations about
"under the hood", been looking forward to this :) if only i had more
time to tinker.
-e
basically these codes work as follows: you have, for examle, 8 bits of
input; you add another 8 bits calculated by the algorithm; now if you
alter ANY 1 or 2 bits in these 16, you can run the algorithm, detect
the change and restore original bits. exact number of bits you can
change before error is irreversible depends on algorithm and, I think,
is limited by some theorem.
in context of 4x4 markers, the above scenario means you limit a total
number of markers to 2^8 instead of 2^16 but you gain far better
stability of readings between frames.
I still have one such algorithm described in details in my old notes,
I might try to implement it some day for kicks.