Wednesday, February 24, 2010

SLARToolkit - Silverlight Augmented Reality Toolkit

In my last blog post I've preannounced SLARToolkit: The open source Silverlight Augmented Reality Toolkit. Today I'm proud to announce that SLARToolkit is now available at CodePlex.
The aim of SLARToolkit is to make Augmented Reality with Silverlight as easy as possible so that everyone will be able to make Silverlight Augmented Reality applications. Therefore the SLARToolkit release not only includes the full Balder sample you might know from this blog post, it also comes with a brand new sample that uses Silverlight's 3D projection capabilities through my Matrix3DEx library to project different UIElements on the marker.

The SLARToolkit project description from the CodePlex site:
SLARToolkit is a flexible Augmented Reality library for Silverlight with the aim to make real time Augmented Reality applications with Silverlight as easy and fast as possible. It can be used with Silverlight's Webcam API or with any other CaptureSource or a WriteableBitmap. SLARTookit is based on the established NyARToolkit and ARToolkit. SLARToolkit uses a dual license model and could be used for open or closed source applications under certain conditions. See the License page for details.
Features:
Live
A webcam and at least the Silverlight 4 runtime must be installed to run the sample. It's available for Windows and Mac. Alternatively there is also a new video of the Silverlight projection sample embedded below.
If you want to try it yourself you need do download the SLAR and / or L marker, print them and hold them in front of the camera. The marker(s) should be printed non-scaled at the original size (80 x 80 mm) and centered for a small white border. Also make sure the camera is set up properly and the scene is illuminated well without hard shadows. See the SLARToolkit Markers documentation for more details.




Simply press the "Start Fun" Button to start the webcam. Use the ComboBox to select a different UIElement that will be mapped on the marker. The size and the orientation can be changed with the "Scale" and "Rotation" Sliders. The "Threshold" Slider controls the threshold for the marker detection. The "Flip x-axis" Checkbox could be used to flip the video (the webcam output is mirror-reversed by default).
If you click the "Start Fun" Button for the first time you need to give your permission for the capturing. This application uses the default Silverlight capture device. You can specify the video and audio devices that are used by default with the Silverlight Configuration. Just press the right mouse button over the application, click "Silverlight" in the context menu and select the "Webcam / Mic" tab to set them.

Video
I've recorded a short video of the new sample with Expression Encoder's Screen Capture feature. Please keep in mind that the screen recording software eats up a lot of resources while recording and that the actual frame rate is way better.


Background music is leandi by mosaik.


How it works
This sample uses the SLARToolkit CaptureSourceMarkerDetector to detect the markers in each webcam frame. The detection result contains a transformation matrix for each found marker which is then used to transform the selected UIElement. The tracked marker region is highlighted with a red quad through the WriteableBitmapEx library.

Download it, build your app and augment your reality
The open source SLARToolkit library and the samples are hosted at CodePlex. If you have any comments, questions or suggestions don't hesitate and write a comment, use the Issue Tracker on the CodePlex site or contact me via any other media.
Have fun with the library and please keep me updated if you use it anywhere so I can put a link on the project site.

Update 03-15-2010
Updated to the Silverlight 4 Release Candidate.

Update 04-15-2010
Updated to the final Silverlight 4 RTW build.

Monday, February 15, 2010

SLARToolkit Preannouncement

SLARToolkit has been released. Please read this blog post.

In my latest blog posts, the comments and on Twitter I hinted at on one of the projects I'm currently working on: SLARToolkit - The Silverlight Augmented Reality Toolkit. My aim for SLARToolkit is to make Augmented Reality with Silverlight as easy as possible, fast and open source. With this everyone will be able to make Silverlight Augmented Reality applications like that one. SLARToolkit is based on NyARToolkit which is a extented port of the famous ARToolkit. I'm almost done with the implementation and in contact with ARToolworks, which are holding the license for ARToolkit, to get a license agreement. I hope I'll be able to release SLARToolkit within the next two or three weeks at CodePlex. Please stay tuned.


Two weeks ago Julien Dollon contacted me and asked if I could help him with an Augmented Reality demo for his Silverlight 4 talk at Microsoft TechDays 2010 in Paris. Since I'm a nice guy, I've built a special SLARToolkit version for him and send it along with the source code of the SLARToolkit Silverlight projection sample. The sample uses my Matrix3DEx library to project UIElements on the markers. Actually the Matrix3DEx library has its roots there.
Julien altered the sample a bit and showed it at MS TechDays 2010 during his Silverlight 4 talk last week. The presentation was recorded and the official video is available, but you can also watch Julien's self recorded video of the session. The SLARToolkit demo starts at 39:02.





And the official screen cast: