SummaryFor starters introducing ARToolkit and writing a simple skelton code is quite troublesome. Some of the reasons are that it need many extra components and that it is written in old type C++ language. In fact, I prefer .Net environment and the C# language much. Brains-N-Brawn has written C# wrapper code for ARToolkitPlus, DirectShow.NET provides video capturing feature for C# programmers, and Windows Presentation Foundation(WPF) itself already has 3D drawing features. In this circumstance, it is theoritically possible to make Augmented Reality program by pure C# coding. It is what I am tying to do here.Useful Links
Sample CodesPlease visit the ``Download'' page. Currently a C# solution which implements a most basic feature of augmented reality, overlaying prism object on markes appear on a captured video image, is available. It uses DirectShow.Net for video capturing and Windows Presentation Foundation for 3D drawing, so no extra components needed. Visual C# 2008 is all you need to build the solution. For this reason it may be a good skelton for starters.Now other C# solutions are also available.
VideoHow to: Camera CalibrationYou can use the GML Camera Calibration Toolbox to calibrate your PC camera by your own. For calibration to be executed, you need some (>=3) photos taken by the camera. Photos must satisfy some condition. See http://research.graphicon.ru/calibration/recommendations-for-taking-calibration-photos.html. PDF files availbale in ``Calibration pattern'' directry under the installation directry may be used as the chekerboard pattern. Further, note that the photos must have the same size. Let (xsize, ysize) be the size of the photo images.The calibration results in the following set of parameters: focal length (fc_x, fc_y), principal point (cc_x, cc_y), distortion (kc1, kc2, kc3, kc4). Now make a text file which has the following format. ARToolKitPlus_CamCal_Rev02 xsize ysize cc_x cc_y fc_x fc_y kc1 kc2 kc3 kc3 kc5 kc6 iter ``kc5'', ``kc6'' can be 0. The larger the ``iter'' be, the more accurate and the more slower the calculation be. I recommend the value to be from 0 to 10. To use your own calibration file with ``ARWithWPF'' C# program which can be downloaded from ``download'' page of this site, please read the readme-en.txt or readme-jp.txt. |