Augmented Reality – Recursive Webcam

Thursday, March 12th, 2009 | examples

This version is much faster with a much better marker:

1. Print this (here’s the .psd source) (also, this will be the official marker of our competition)
2. Open this for a live demo

If you don’t have a webcam, you can watch the video below:

Get Adobe Flash player

Of special note before downloading the source: Seb Lee-Delisle helped me out by providing the threshold code in this demo which provides more accurate detection of the marker. He’s asked that you respect the Creative Commons 2.0 non-commercial share-alike license with the code related to the “threshold”: http://creativecommons.org/licenses/by-nc-sa/2.0/uk/

Download Source

Tags: ,

  • Weasley
    Seth, I've learned a couple of interesting things while playing with AR code samples when the video didn't display. 1. Micrsoft IIS 6.0 doesn't recognize .pat, .dat and .dae files unless you tell it how in the MIME type list. 2. If you aren't working in a well lit area, you might need to shine a flashlight at your camera to 'wake it up' (sounds weird, but it worked for me.)
  • Patricia
    Now it worked... Thanks
  • Good day?

    AR is obviously an exciting field and has many applications. It's rapid growth for instance on the iPhone is perhaps a glimpse of the future of applications which ride on creative multimedia.

    However if I may seek some help. I am on a 1.3 Mega Pixels web cam and tinkering with an AR project. However upon loading the flash application, I get a blank (black) image instead of a live video stream. Are there web cam minimum specs?

    Kind regards
  • Weasley
    Patricia, I'm surprised you had trouble with this app and your webcam. I found that this is the only app I can compile and run on my own website--the other apps I tried to compile simply don't recognize the markers. For now, my site is not yet working until I figure out all of the differences in marker detection between this and other code I've looked at. Newer libraries? New threshold code? Or should I be looking at other factors too?
  • Hey....I don't know if the conversation is still moving on this...but..
    Do you have ideas of how you might just sample an area from the video and then map that to your video/bitmap material plane?
  • boxmanbr
    lol D:, nice, I found the samething, but with a 3D model, but I not remember where is it, and nice end \o/
  • Patricia
    Nice, but this do not work on my webcam
  • great example!
    Really like what's going on there, the thing is I can not get this example to work with just a simple flv loaded as texture in the plane, can you help me with that?
    Regards
  • aj
    Nice, but this dont not work in my webcam
  • Silly me...I looked a little closer and you can just pass the new threshold (as the above code is doing) into detectMarkerLite(this.flarRaster, this.threshold);
  • ericsoco -

    The threshold thing does help, but I think it can be made more efficient. Basically, the extra code adds an adaptive thresholding because the threshold value changes over time based on what has worked well recently.

    FLARToolkit (where you pointed out) does a static threshold at a value of 100. That may work well for many people, but those (like me) that suffer from poor lighting conditions may get better results if the threshold was set a bit lower (60-80). The additional advantage of an adaptive threshold is that if you're going to deploy this on the web, you can't predict the lighting conditions of all of your users, so it helps to be flexible.

    That said, I was just looking over this code to incorporate it into one of my own AR experiments (also using your FLARManager BTW) and I believe the performance of this can be improved by taking advantage of the code section you pointed out. Instead of doing a threshold of the image before sending it to the FLAR detector (as in the code above), just pass the "currentThreshold" into FLAR using the FLARRasterFilter_BitmapDataThreshold.setThreshold() function. I'll test this out shortly, and post the code snippet if it helps.
  • Nice app. I liked how it resuled in a fractal-like geometric shape. My webcam was a bit too slow to really get good pictures. What cameras would you recommend for viewing good AR?
  • allmost everything i know about papervision i owe to you john.
    http://www.splengy.com/wordpress/?p=142
    i used the code from the flart starter package since i dont flex and i was getting matrix3D errors porting this particular sample to flash. ive done pretty well with most of the others but i had to start from scratch here.
    enjoy :)
  • does the bitmap thresholding really help here? FLARToolkit does exactly the same thing, in FLARRasterFilter_BitmapDataThreshold.doFilter().
  • I love this recursive web cam! It could be a great screensaver (do people still use those?) Thanks also for being such a great teacher (you helped an employee of mine learn Papervision in Chicago a few weeks ago - he loves it!)

    - Ted
  • hey john. pretty cool stuff. ; )
  • John Lindquist
    Gabo! We miss you man!
blog comments powered by Disqus

Search

Recommended Books

Speaking at FITC Toronto

 

March 2009
M T W T F S S
« Feb   Apr »
 1
2345678
9101112131415
16171819202122
23242526272829
3031  

Preferred Video Tutorial Resolution

  • 1024x768 (53%, 85 Votes)
  • 1280x1024 (15%, 24 Votes)
  • 1920x1080 (15%, 24 Votes)
  • 800x600 (13%, 20 Votes)
  • 480x320 (4%, 6 Votes)
  • 640x480 (0%, 2 Votes)

Total Voters: 160

Loading ... Loading ...