Single Marker Detector image input for AR

Michael Neely's picture

Curious to know if anyone has developed a patch similar to the Single Marker Detector, that would allow an image input?

dust's picture
Re: Single Marker Detector image input for AR

george toledo has a patch up on kineme that negates the matrix. here are two plugins and a qc patch. open m_AR_kz after you put the plugs where they need to go.

PreviewAttachmentSize
ar.zip6.89 MB

gtoledo3's picture
Re: Single Marker Detector image input for AR

Is that the compiled plugins? Cool. Man, if I had a dollar for everytime someone asks me about this... I can't even keep track of it.

I don't think the matrix to param plugin (which doesn't look like you've included?) that was made later on is bad, it just doesn't align correctly. If you want to use it and "try" to get it to work correctly, you would probably need to play around with the z values.

People tell me that the Xcode projects don't compile correctly. I would say, doublecheck your project settings, because if you get the projects off of the orig site, they definitely DO compile. I think I compiled in Debug. Number one suggestion if you are trying to compile alpha/beta type plugin projects that fail... switch the thing to debug mode.

There are problems with this AR in QC implementation that are a real thorn in the side. It is problematic to open up multiple compositions at the same time, it will make the single marker detector no longer function correctly. There are also problems with the way that ARToolkit handles image input that are "the suck".

.... which leads to what I believe is what Mike is asking. Basically, no. I also haven't been able to find a way to use video, or still image as an input, it has to be handled by the "single marker detector" plugin that integrates the video feed into it all. ARToolkit is setup so that it does it's own handling of the video stream, and is somewhat funky. I know Chris could speak more intelligently about that than I can.

I REALLY like AR and the inherent possibilities. If there was a way to dynamically load markers as well, it would be an amazing technology for QC.

dust's picture
Re: Single Marker Detector image input for AR

yeah the matrix thing is weird. the single marker plug works good. the matrix's origins are all messed up. you might want to download the xcode file and tidy up the matrix or you can structure out some parameters and add math. i tried to put the model inside a transform to help with the origin problem but the matrix plug needs to built again with a slight fix. have you seen mc augmented escher reality yet.

http://web.me.com/vjanomolee/VJ_Anomolee/Blog/Entries/2008/8/4_If_M.C.Es...

Giulietta Ravinelli's picture
Re: Single Marker Detector image input for AR

I'm a little confused- I have the QC/AR patch(es) running fine with a Quicktime movie i recorded of myself holding the printed marker. I used iMovie. I'm sure you could stick still images in an iMovie .mov easily enough.

I -think- I eventually X-code compiled in release mode, though I'm not sure ;-)

It would be nice to get better tracking - I assume many of us are using the in-built web-cam in the iMacs, so sorting the matrix/correction for those cameras at least would be useful.

plus - ideally - I'd love to see a "marker-select" input on the Single_Marker_detect patch : input an integer (0..15) to get the patch to detect one of (say) 16 different pre-loaded marker patterns.

Ciao a tutti,

-Giulietta-

gtoledo3's picture
Re: Single Marker Detector image input for AR

Well, as long as you wish, the thing to REALLY wish for would be dynamic loading of markers, but I don't see it happening.

I think as far as doing tracking off of the single marker, and getting something better going, you can really just use index+math, or javascript, and put everything in a 3D transform. The single marker makes a structure that you can extrapolate to xyz translations, and xyz rotations.

I admit... it doesn't take too much for something to irritate me into not using it. The fact that having two compositions open, and it makes the single marker detector not work is almost enough to have made me stop messing with it. However, I have rethought it a bit recently, since wrapping the compositions in applications seems to mitigate this problem.

I've seen a great deal of things lately that have had me interested in diving into it a bit again. I also think the licensing thing is bogus as well, when it seems like similar things could be achieved which principals that have been around since the 70's or earlier.

Michael Neely's picture
Re: Single Marker Detector image input for AR

So George, up to the task of developing a better marker tracking patch? ;)

Wish list: Image input to accommodate custom markers easily

gtoledo3's picture
Re: Single Marker Detector image input for AR

lol....ugh.

I can understand how the AR Toolkit development stuff works basically, and I can understand how the current Xcode plugin project for QC works, but...

1- I think that the non-standard API stuff that Kineme does is the better route. I DON'T quite get that. I can't conceptualize how to do it from scratch yet.

2- I have looked at the current to try to add markers, and while I think that is possible, I haven't sat down to do it, because I don't know why there is the problem with having multiple compositions open and the single marker quitting working. That bug is beyond me, so it leaves me less than enthusiastic about spending the time to put in some extra markers, and still have something with what I consider to be a bug.

3- AR Toolkit handles it's images in a somewhat "crappy" way (using my high tech talk here), in the way that it uses Quicktime. Chris could speak more intelligently about that.

All of that said, it is an awesome concept and technology. It's frustrating, because I can see many possibilities for various things that could be done with it.

However.... I also conceptualize something better than ARToolkit, which would be something kinda like the markers, but with color input/detection as well. Having something like the markers, but adding detection of basic primary color to create detection triggers would be a much more powerful thing. I have not a CLUE how to go about that. Well, a clue, but I don't think it's an endeavor I can spend that time on right now, unfortunately. It's one thing if you know how to do it, another if you have to learn to know.

Yeah, I think that the dynamic image input thing is probably the major downfall (given the ARToolkit code) and what makes the whole thing a crappy endeavor, to try to up the ante on this plugin.

Michael Neely's picture
Re: Single Marker Detector image input for AR

Has anyone tried wrapping a QC based AR project into a stand alone app yet? I tried with no worky worky. I also looked at QuartzCrystal for exporting results...again, no worky there either. Hmmm. I see Georges disillusionment clearly now. So far, a drag for Mac QC developers wanting good AR tools.

Cheers!

gtoledo3's picture
Re: Single Marker Detector image input for AR

Your post inspired my to sit down and "appify" something using AR Toolkit... after a couple of irritating problems of my own stupidity (misplaced clears/mixing a billboard and sprite in a stupid way...)... everything has been working ok in an Application setting, and with better performance than in QC "natively" (if that is the correct term).

I wrapped something that bar graph/glsl world example I posted on vimeo... so it uses a mix of patches and plugins, and works well.

Yeah.... the fact that this can't work with video streams, and that you can't subsequently do offline render... really sucks!!! Along with all of the other stuff...

I don't want to totally "down on it" though. In backing off my expectations a bit, I have been noting that there are a ton of things that I have neglected, and that I am letting my "wish list" get in the way of a great deal of clever things that can be done "as is".

I would post the app, but I don't want to waste Kineme bandwidth/it's not that big of a deal(nothing novel to be learned)/it uses Quartz Builder, so it wouldn't shed any light on trying to do this as a manual Xcode project.... interface/windows/resource, etc., is all automated.

Giulietta Ravinelli's picture
Re: Single Marker Detector image input for AR

I've been trying to increase the number of available patterns in this patch - i downloaded some pattern data from http://www.cs.utah.edu/gdc/projects/augmentedreality/download.html, renamed the marker data ("patt.sample3", etc) and add those data files to the project.

With a one-line change in "SingleMarkerDetectorPlugIn.m", I can get the patch to display a choice-list of 10 patterns, but it only loads sample1 and sample2, the others throw a pattern load error in arLoadPatt(), visible in the QC debugger window.

anybody care to help / suggest?

ciaooo

-G-

Giulietta Ravinelli's picture
Re: Single Marker Detector image input for AR

"doh", as the man says: I discover that my modified SMD patch in the user QC plugins directory trys to access package resources in the system QC plugins directory! ( where there i had an old unmodified version of the SMD plugin).

I now have this patch selecting any 1 of 10 markers. (yay!) And running multiple instances of the SMD patch in a QC composition works too, (as long as each copy of the patch is assigned to a different marker ???)

I need to sort out those Utah markers though, they're all kinda similar to each other :-(

ciao a tutti

Giulietta

chiara's picture
Re: Single Marker Detector image input for AR

Hello,

Maybe, you're so kind to tell me please, how can I add more pattern to the patch "single marker detector"? This patch have by default just the pattern "Sample1 and sample2". I'm interested also in pattkanjii, hero and multiple pattern. I've try to add them opening single marker detector with dashcode, but some error occurred.

Thanks and many compliment, Chiara

funboixero's picture
Re: Single Marker Detector image input for AR

Hiya! I hate to drudge up old threads but I am working on this for a project.

I am looking to see how you applied the patch and did the one line code change to allow multiple instances of the program to run at once. Also how you got it to change the marker?

Thanks!

funboixero's picture
Re: Single Marker Detector image input for AR

Ok I got the multiple instances to run. I just need some help with adding in more markers.

I tried the link listed above for generating the code but it doesn't put the files in the right format. I understand I need to change the file extension but the code doesn't seem right.

Thanks!

gtoledo3's picture
Re: Single Marker Detector image input for AR

This is the easiest way to prep your marker image; feed an image to this, and it will give you an image with the black outline w/ the correct ratio of black to image:

http://roarmot.co.nz/ar/

Then, print your picture at correct size, go here, and make the necessary AR data file:

http://flash.tarotaro.org/blog/2008/12/14/artoolkit-marker-generator-onl...

I think that the correct setting is 16x16, but it's been awhile since I've set it up. If you check what a valid AR data file looks like in text editor (and look at the project as a whole), you can see what's going on clearly. The AR Toolkit runs an edge detection that's looking for the black edge outline on the glyph. You'll see that the width of outer edges is equivalent to 3/4 of the entire area combined (to my memory). After it's grabbed that, then the greyscale values of it all are written to file.

When AR Tookit "sees" the ar glyph image, it then uses the difference between the reference file's greyscale blocks, and the skewed ones in the image that's being analyzed, to calc the rotation matrix. If I had more willpower and time, I would write something that does this from scratch and avoid the shitty AR licensing.

funboixero's picture
Re: Single Marker Detector image input for AR

Alright cool I got it to add new AR codes.

Thanks!

PS now I just need to add a command like "sleep 2s" to one of my particle effects. If you have any advice that would be awesome. I would like to avoid writing a plugin if there is something available

Josue Abraham's picture
SingleMarkerDetectorPlugIn" is missing

I am woking whit QZ 4.0 and i tring ARtools whit kineme3d and whit the George Toledo m_AR-kz2 file but i get this error

(null) : Patch with name "QCPlugInPatch:SingleMarkerDetectorPlugIn" is missing

I moved from patches to plugins and nothing

I create the plugin from the xprojet but nothing

also i note that the single marker has change for Kineme AR Marker Detector , no error apears when using this box but i dont get nothing

HELP