發表文章

目前顯示的是有「ARToolkit」標籤的文章

使用avi影片作為ARToolkit的視訊輸入源

在ARToolkit中,讀取video configuration的語法為: arVideoOpen( vconf ); 在範例中都可以看到 vconf 所指向的xml內容,預設是以camera作為影像輸入源,如果要改用avi格式的影像來做辨識,只要把xml內容的<camera>標籤改為如下的<avi_file>標籤即可。     <avi_file file_name="Data/hiro_pattern640x480.avi" loopAVI="true">         <pixel_format>             <RGB32 flip_h="false" flip_v="true"/>         </pixel_format>     </avi_file> avi的路徑是以exe檔為相對位置,不是以xml為相對位置。

ARToolkit官方文件閱讀筆記[3]: 開發第一個應用

圖片
原文 Developing your First Application, Part 1 筆記 這篇文件主要的重點是在說明所謂的"ARToolKit Step Functions" ,也就是運行ARToolkit的過程中會經歷的6大步驟,這些步驟在原文件中已經被整理成一個清楚的表格。 ARToolKit Step Functions 1. Initialize the application init 2. Grab a video input frame arVideoGetImage  (called in  mainLoop ) 3. Detect the markers arDetectMarker  (called in  mainLoop ) 4. Calculate camera transformation arGetTransMat  (called in  mainLoop ) 5. Draw the virtual objects draw  (called in  mainLoop ) 6. Close the video capture down cleanup 不過這六大步驟中沒有包含全部被實際使用到的ARToolkit函式,所以為了更進一步地了解建構一個AR應用究竟需要用到哪些ARToolkit函式,所以我再把每個步驟內所使用到的function抓出來加到表格中。 ARToolKit Step Functions 1. Initialize the application 由init() 作初使化工作,init內包括的function : arVideoOpen(vconf)[說明: 開啟video設置檔] vconfarVideoInqSize(&amp;xsize, &amp;ysize)[說明: 不懂用途] arParamLoad(cparaname, 1, &amp;wparam)[說明: dat檔和ARParam] arParamChangeSize( &amp;wparam, xsize, ysize, &amp;cparam )[說明: 需要因應攝影機,計算一下參數的變化] arInitCparam( &amp;cparam ) [說明: 設定為讀進來的參...

ARToolkit官方文件閱讀筆記[2]: How does ARToolKit work?

原文 How does ARToolKit work? 筆記 Table 1 shows some typical maximum ranges for square markers of different sizes. These results were gathered by making maker patterns of a range of different sizes (length on a side), placing them perpendicular to the camera and moving the camera back until the virtual objects on the squares disappeared. Pattern Size (inches) Usable Range (inches) 2.75 16 3.50 25 4.25 34 7.37 50 Table 1: Tracking range for different sized patterns. The simpler the pattern the better. Patterns with large black and white regions (i.e. low frequency patterns) are the most effective. Replacing the 4.25 inch square pattern used above, with a pattern of the same size but much more complexity, reduced the tracking range from 34 to 15 inches.

ARToolkit官方文件閱讀筆記[1]: 第一個範例

原文 Your First ARToolKit Example 筆記  In each platform you have generally two choices: click on the program from your OS explorer or starting from the command line: the last choice is better since it give you the error and standard output stream (and ARToolKit used it a lot). In this video dialog you can change the output size of the video or the video format acquired from the camera. You need to notice that better the format is similar to ARToolKit tracking format, faster is the acquisition (RGB more efficient). In some camera driver you can also change the frame rate. By default this dialog is associate to your first video input so you can have some problems (see the FAQ ). If you hit the "t" key on the keyboard you will be prompted to enter a new threshold value. This should be a value between 0 and 255; the default is 100. Hitting the "d" key will show the thresholded video image below the main video window . Possible tracking patterns found in the input...