Kinectは、カラーカメラ、深度センサー、マイクアレイを備えているセンサー機器です。最も特徴的な機能として、深度センサーから人を認識して「ボーン」とよばれる骨格データを自動生成する機能があります。
入手しやすいこともあり、Natural User Interfaceデバイスとしての標準的なデバイスとなっています。Kinectで得たノウハウは他のNUIデバイスを使うときにも役立つノウハウです。また、今夏発売される新型Kinectでも継承できるものになります。
The document discusses using facial tracking with AI and WebXR to create a pseudo-3D representation. It provides steps to download sample files and setup, then explains using MediaPipe and TensorFlow to implement real-time facial recognition and link the camera position to the detected face position, creating a sense of 3D. Code snippets are included to initialize the model, start face tracking each frame, and display the 3D scene and camera video feed.
47. この後やること
(x, y, z) [mm]
rightからleftの距離[mm]をウィンドウや画像の横のサイズWidth [pixel]に合わせる
right [mm]
Width [pixel]
left [mm]
(right-left) [mm]
48. スキャンラインの3次元データを可視化
int right = 500;
int left = -500;
void draw(){
/*記述省略*/
for(int i = 0; i < depth.width; i++){
int index = depth.width * scanHeight + i;
PVector p = realWorld[index];
float y = (p.z - near) / (far - near);
float x = (p.x - left) / (right - left); //left-right間の相対位置
y = y * depth.height;
x = x * depth.width; //画像の横方向の座標に変換
vertex(p.x, y); //y座標を書き換える
}
/*以下省略*/
vertex(x, y); //x座標を書き換える