2013年3月30日土曜日

Sony Vaio Duo 11 Review: AR developers' perspective

This review is only interested in whether the Sony Vaio Duo 11, a Window 8 tablet PC, can be used as an augmented reality (AR) terminal. The most important advantages of Windows 8 tablet as far as this review are that windows developers are not forced to change their programming environment, and that Windows 8 devices only offer the option of using Intel CPUs. Therefore, this review does not mention the usability of either normal Windows 8 GUI or pre-installed software.

Configuration related to AR

  • OS: Windows 8 Pro 64
  • CPU: Intel Core i7-3687U (max 3.30GHz, 2 cores, 4 threads)
  • GPU: Intel HD Graphics 4000
  • RAM: 8GB
  • rear camera: Full HD web camera
  • front camera: Full HD web camera
  • pose sensor:accelerometer,gyro,magnetic field sensor
  • weight: 1.665 kg
  • size: 319.9mm×199mm×17.85mm

Limitation on Camera Capture

If you use Vaio Duo 11 as an AR device, the camera, together with the display, becomes an indispensable part. The Vaio duo 11 has front and rear cameras which are placed in opposite directions to each other. The rear camera can be used to obtain a real scene to be displayed with virtual (CG) objects. The front camera can also be used to detect user's action for interaction in augmented reality space. In this sense, it is interesting whether or not both cameras can work simultaneously, which has not yet been seen. The following list shows the possible combination of video resolutions.

  • front: 320x240 (7.5fps), rear: 1280x1024 (7.5fps) (frame droping)
  • front: 640x480 (30fps), rear: 640x480 (30fps) (frame droping)
  • front: 640x480 (30fps), rear: 320x240 (30fps)
  • front: 320x240 (30fps), rear: 640x480 (30fps)
  • front: 320x240 (30fps), rear: 320x240 (30fps)

Possible choice in practical use for AR is 640x480 pixels for one camera and 320x240 for the other. What is surprising is that each camera cannot capture full HD resolution video (1920 x 1080) at 30 fps. "Full HD web camera" means full HD sill camera. This is a really misleading expression. The above list were obtained by testing the following OpenCV code. DirectShow GraphEdit did not work well.

#include <opencv2/opencv.hpp>
#include <iostream>
using namespace cv;
 
int main(int, char**)
{
    VideoCapture cap1(0);
    cap1.set(CV_CAP_PROP_FRAME_WIDTH, 320.0);
    cap1.set(CV_CAP_PROP_FRAME_HEIGHT,240.0);
 
    VideoCapture cap2(1);
    cap2.set(CV_CAP_PROP_FRAME_WIDTH,640);
    cap2.set(CV_CAP_PROP_FRAME_HEIGHT,480);
 
    std::cout &lt;&lt; cap1.get(CV_CAP_PROP_FPS);
    std::cout &lt;&lt; cap2.get(CV_CAP_PROP_FPS);
 
    cap1.set(CV_CAP_PROP_FPS,30);
    cap2.set(CV_CAP_PROP_FPS,30);
 
    double sum_t = 0;
    for(int i=0;;i++)
    {
        double t = (double)getTickCount();
        Mat frame1;
        cap1 &gt;&gt; frame1;
        imshow(&quot;cap1&quot;, frame1);
 
        Mat frame2;
        cap2 &gt;&gt; frame2;
        imshow(&quot;cap2&quot;, frame2);
 
        sum_t += getTickFrequency()/((double)getTickCount() - t);
        if(i % 10 ==0)
        {
            std::cout &lt;&lt; sum_t/10 &lt;&lt; &quot;\r&quot;;
            sum_t =0;
        }
        if(waitKey(1) &gt;= 0) break;
    }
    return 0;
}