2014-03-02 71 views
0

我想訪問Kinect加速度計以確定設備載體是否正在移動。 Kinect加速度計可以嗎?如果是這樣,我該怎麼做? isxKinect框架對此有用嗎?訪問Kinect加速度計

回答

1

微軟SDK中包含的方法來讀取加速度:KinectSensor.AccelerometerGetCurrentReading

private void OnAllFramesReady(object sender, AllFramesReadyEventArgs e) 
{ 
    if (this.KinectSensor == null) 
    { 
     return; 
    } 

    Vector4 reading = this.KinectSensor.AccelerometerGetCurrentReading(); 
} 

ofxKinect有聲有前途的幾種方法:

/// get the XYZ accelerometer values 
/// 
/// ... yes, the kinect has an accelerometer 

/// raw axis values 
ofPoint getRawAccel(); 

/// axis-based gravity adjusted accelerometer values 
/// 
/// from libfreeenect: 
/// 
/// as laid out via the accelerometer data sheet, which is available at 
/// 
/// http://www.kionix.com/Product%20Sheets/KXSD9%20Product%20Brief.pdf 
/// 
ofPoint getMksAccel(); 

/// get the current pitch (x axis) & roll (z axis) of the kinect in degrees 
/// 
/// useful to correct the 3d scene based on the camera inclination 
/// 
float getAccelPitch(); 
float getAccelRoll();