This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void InitKinect() | |
{ | |
//0番目のKinectと接続 | |
kinect = Device.Open(0); | |
//Kinectの各種モードを設定して動作開始(設定内容自体は今回は特に考えなくてOK) | |
kinect.StartCameras(new DeviceConfiguration | |
{ | |
ColorFormat = ImageFormat.ColorBGRA32, | |
ColorResolution = ColorResolution.R720p, | |
DepthMode = DepthMode.NFOV_2x2Binned, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace AzureKinectTest | |
{ | |
public partial class Form1 : Form | |
{ | |
//Kinectを扱う変数 | |
Device kinect; | |
//(追加3)カラー/Depth画像をBitmapとして扱う変数 | |
Bitmap colorBitmap; | |
Bitmap depthBitmap; | |
//追加4)各画像間の位置合わせ変換 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.ComponentModel; | |
using System.Data; | |
using System.Drawing; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using System.Windows.Forms; | |
//AzureKinectSDKの読み込み |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Kinectを扱う変数 | |
Device kinect; | |
//(追加①)Depth画像のBitmap | |
Bitmap depthBitmap; | |
public Form1() | |
{ | |
InitializeComponent(); | |
InitKinect(); | |
//(追加②)Kinectの設定情報に基づいてBitmap関連情報を初期化 | |
InitBitmap(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.ComponentModel; | |
using System.Data; | |
using System.Drawing; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using System.Windows.Forms; | |
//AzureKinectSDKの読み込み |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Kinectを扱う変数 | |
Device kinect; | |
//(追加①)カラー画像のBitmap | |
Bitmap colorBitmap; | |
public Form1() | |
{ | |
InitializeComponent(); | |
InitKinect(); | |
//(追加②)Kinectの設定情報に基づいてBitmap関連情報を初期化 | |
InitBitmap(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.ComponentModel; | |
using System.Data; | |
using System.Drawing; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using System.Windows.Forms; | |
//①AzureKinectSDKの読み込み |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Hello, WebVR! • A-Frame</title> | |
<meta name="description" content="Hello, WebVR! • A-Frame"> | |
<script src="https://aframe.io/releases/0.9.2/aframe.min.js"></script> | |
</head> | |
<body> | |
<a-scene background="color: #FAFAFA"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<a-scene background="color: #FAFAFA"> | |
<a-box position="-1 0.5 -3" rotation="0 45 0" color="#4CC3D9" shadow></a-box> | |
<a-sphere position="0 1.25 -5" radius="1.25" color="#EF2D5E" shadow></a-sphere> | |
<a-cylinder position="1 0.75 -3" radius="0.5" height="1.5" color="#FFC65D" shadow></a-cylinder> | |
<a-plane position="0 0 -4" rotation="-90 0 0" width="4" height="4" color="#7BC8A4" shadow></a-plane> | |
<!--下記を追加--> | |
<a-entity id="ctlL" laser-controls="hand: left"></a-entity> | |
<a-entity id="ctlR" laser-controls="hand: right"></a-entity> | |
<a-entity camera look-controls position="0 1.6 0"> | |
<a-text id="txt" value="test" position="0 0 -1" scale="0.5 0.5 0.5" align="center" color="#000000"></a-text> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Hello, WebVR! - A-Frame</title> | |
<meta name="description" content="Hello, WebVR! - A-Frame"> | |
<script src="https://aframe.io/releases/0.7.0/aframe.min.js"></script> | |
<!--three.ar.jsとaframe-ar.jsを追加(下記2行)--> | |
<script src="https://rawgit.com/google-ar/three.ar.js/master/dist/three.ar.js"></script> | |
<script src="https://rawgit.com/chenzlabs/aframe-ar/master/dist/aframe-ar.js"></script> | |
</head> |