
Kinect使ってMRIやCRTスキャンの画像を操作できるようです。
これからいろんな現場でジェスチャー操作ができるようになるんでしょうか。
元記事:Gigazin-カナダの医療チームが「Kinect」を外科手術の現場で採用、執刀医の作業負担を大幅に削減
public class Compass extends Activity implements SensorEventListener{ private SensorManager sm; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); sm=(SensorManager)getSystemService(SENSOR_SERVICE); } @Override protected void onResume() { super.onResume(); //全センサを取得 //List<Sensor> sensors = sm.getSensorList(Sensor.TYPE_ALL); //加速度センサ //List<Sensor> sensors = sm.getSensorList(Sensor.TYPE_ACCELEROMETER); //磁気センサ //List<Sensor> sensors = sm.getSensorList(Sensor.TYPE_MAGNETIC_FIELD); //方位センサ List<Sensor> sensors = sm.getSensorList(Sensor.TYPE_ORIENTATION); for(Sensor sensor : sensors){ //イベントを登録 sm.registerListener(this, sensor, SensorManager.SENSOR_DELAY_GAME); } } … }
//SensorEventListenerにより実装が要求されるメソッド public void onSensorChanged(SensorEvent event) { float[] amv=new float[3]; float[] mfv=new float[3]; float[] orv=new float[3]; switch(event.sensor.getType()){ case Sensor.TYPE_ACCELEROMETER: amv=event.values.clone(); break; case Sensor.TYPE_MAGNETIC_FIELD: mfv=event.values.clone(); break; } float[] in_r=new float[16]; float[] out_r=new float[16]; if(amv!=null && mfv!=null){ SensorManager.getRotationMatrix(in_r, null, amv, mfv); SensorManager.remapCoordinateSystem(in_r, SensorManager.AXIS_X, SensorManager.AXIS_Z, out_r); SensorManager.getOrientation(out_r, orv); Log.d("message", String.valueOf(orv[0])); Log.d("message", String.valueOf(orv[1])); Log.d("message", String.valueOf(orv[2])); } }
Using the camera (Y axis along the camera's axis) for an augmented reality application where the rotation angles are needed:
remapCoordinateSystem(inR, AXIS_X, AXIS_Z, outR);
Using the device as a mechanical compass when rotation is Surface.ROTATION_90:
remapCoordinateSystem(inR, AXIS_Y, AXIS_MINUS_X, outR);
CFBundleTypeRole QLGenerator LSItemContentTypes public.source-code public.xml com.apple.property-list org.tug.tex public.plain-text com.apple.applesingle-archive