An update:
> > I can answer part of your question right away, for the rest I'll have to
> > look at the code again.
>
> Ok. I've attached the code i'm writing. Be warned that there's lots of
> random stuff not to do with ARToolkit in the file! The section marked "//
> Update the info in the EQUIP dataspace" is where the camera positions are
> assigned.
I've managed to get the camera position without any trouble, so that's
good. I'm currently using your example pattern as a test (i.e. the one
with A, B, C, D, G and F markers on), and the positions appear to be
updating correctly. The difficulty i'm having really is to do with the
config structure. I'm publishing the config->trans camera positions ok,
and my code is spitting out the current "best marker" found:
bestmkr = -1;
// Check for object visibility
for(i = 0; i < config->marker_num; ++i) {
if(config->marker[i].visible >= 0) {
if (bestmkr == -1)
bestmkr = i;
else
// Get the most confident marker we can find
if(marker_info[bestmkr].cf < marker_info[i].cf)
bestmkr = i;
}
}
I am unsure about the config structure, essentially and how this
relates to the marker_info structure. The simpleTest made sense, but i
don't know whether the procedure for multiTest is the same or not. I want
to identify a particular marker using the marker_info.id variable, but i
simply don't know how this is done using the multiTest-style method. If
the above code is correct, then i can identify the most confident marker
in the set (i.e. the multi-marker), and base my camera measurement on
that.
Looking at the marker data file brings in a few more confusing things. I
think that i understand the structure:
# Number of patterns to be recognised
6
# Marker 1
data/multi/a.patt # Pathname
40.0 # Width of marker
# Marker position data
0.0 0.0
1.0000 0.0000 0.0000 0.0000
0.0000 1.0000 0.0000 0.0000
0.0000 0.0000 1.0000 0.0000
etc.
However, i don't know how to alter this config file so that i can add new
marker sets.
Argh! Sorry for the long, rambling email (which probably doesn't make
sense), but i'm confused!
later,
Stuart
---
email: stuart@t ............
my pointless, self-congratulatory vanity site is located here:
http://www.nontrivial.uklinux.net
|