Skip to content

Instantly share code, notes, and snippets.

@neon-izm
neon-izm / VoiceThread.cs
Created April 3, 2014 16:11
VoiceThread (Senz3D+Unity Voice Recognition minimal sample script)
using UnityEngine;
using System.Collections;
using System.Threading;
/* スレッドを分けて音声認識をする*/
public class VoiceThread : MonoBehaviour {
private System.Object cs=new System.Object();
private System.Threading.Thread thread=null;
private PXCUPipeline pp=null;
@neon-izm
neon-izm / generator.rb
Last active August 29, 2015 14:00
Paiza Online Hackathon vol.2 testdata genarator
# paiza online hackathon testdata generator
# https://paiza.jp/poh/paizen
#画面サイズ、各最大300
h=230
w=219
#ウィジェットの数 最大300*300?
widget_num=40000
File.open('outstr.txt','w'){|f|
@neon-izm
neon-izm / Ovrvision.cs
Last active August 29, 2015 14:00
カメラ画像取得部を別スレッドに分けた Ovrvision.cs (OVR SDK v0.6) また、「s」キーでカメラの明るさやコントラストを保存する。 @hecomi さんに感謝 https://gist.github.com/hecomi/9993595
using UnityEngine;
using System.Collections;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading;
using System.IO;
/// <summary>
/// This class provides main interface to the Ovrvision
/// </summary>
public class Ovrvision : MonoBehaviour
@neon-izm
neon-izm / mycafe_oculus.md
Last active August 29, 2015 14:03
2014/7/7 七夕oculusコンテンツの感想

これは個人の日記レベルです #概要 名古屋のコワーキングスペースMYCAFE錦通店にて七夕カフェwith初音ミク というイベントがあり、これにOculusRiftを使ったコンテンツがあったので体験した感想を書きます。 技術スタッフはハラペコラボの西岡さん(URLは出展お知らせ) http://www.hara-peco.com/blog/archives/534

余談ですが、この会場のカフェは極めて安価な料金形態と、ノートPCを広げても怒られない雰囲気、そしてちょっとした運動スペースもあり、非常に居心地が良さそうでした。大変良いと思います。 http://party-working.com/

@neon-izm
neon-izm / GameWindowMover.cs
Created August 13, 2014 08:31
unity editor script: UnityEditor GameView automatically move to "Rift DK2 Extend Display"
using UnityEngine;
using UnityEditor;
//Version 0.21 | twitter:@izm update for DK2
//Version 0.2 | s.b.Newsom Edition
//Source from http://answers.unity3d.com/questions/179775/game-window-size-from-editor-window-in-editor-mode.html
//Modified by seieibob for use at the Virtual Environment and Multimodal Interaction Lab at the University of Maine.
//Use however you'd like!
@neon-izm
neon-izm / three_point_registration.cpp
Last active August 29, 2015 14:06
finding a transformation from one coordinate system to another so that all features that appear in both data sets are aligned with each other
//PointsAとPointsBはそれぞれ対応が取れている3点の三次元座標が入っている。
//このPointsAからPointsBまでの座標変換を行う行列を計算する。
// OpenCV 2.4.x, VS2012Proで動作確認済み
// 参考資料 http://www1.cs.columbia.edu/~allen/PHOTOPAPERS/hmwk1.pdf 等
void GetTransformMatrix(const std::vector<cv::Point3d> PointsA,const std::vector<cv::Point3d> PointsB,cv::Mat &modelview_matrix ){
std::cout<<"Get Modelview Matrix from 3point "<<std::endl;
if(PointsA.size() != 3 || PointsB.size()!=3)
{
throw std::length_error("vector length not match exception");
@neon-izm
neon-izm / SteelBattelion.net.md
Last active August 29, 2015 14:06
鉄騎コントローラをWindows7,8(64bit)で使うメモ書き
@neon-izm
neon-izm / MMDおきゅdemo.md
Created November 20, 2014 15:11
多数のOculusRift DK2対応アプリを切り替えてデモする時にちょっと便利な手法

#概要 Oculusで好きなキャラを召喚しよう!の体験会などで、多数のDK2向けexeを起動終了を繰り返す必要がある時、2014/11現在ではUnityバージョンなどの組み合わせだと、適切なショートカットオプションを指定して_DirectToRift.exeを起動する必要があります。
全部のexeにショートカットを作ってオプション指定するのはつらいので、自動化します。

#作り方 ##最初に. きゅーこんさんが、exeと同じ場所にコピーして、ダブルクリックするだけで、適切なショートカットオプションを指定してDK2向けの起動をしてくれるvbスクリプトを公開されているので、ダウンロードして体験会用の一番親のフォルダにコピーします http://cubic9.com/Devel/OculusRift/Unity%C0%BDDK2%CD%D1%A5%A2%A5%D7%A5%EA%A4%CE%B5%AF%C6%B0%CA%FD%CB%A1/

##次に このvbsを全部のexeがあるフォルダにコピーします。

@neon-izm
neon-izm / f__kOptimus.md
Last active August 29, 2015 14:10
OculusSDK Optimus検証メモ

#ハードウェア環境

  • G-TUNE i420(Geforce GTX860M)ClevoOEM Optimus対応機種
  • Intel Graphic Driver 10.18.10.3412
  • OculusRuntime 0.4.3インストール
  • OculusFirmware 2.12

#動作検証A Windows8.1Pro(x64)
Geforce 344.75
OculusConfigureUnitiltyのShowDemoSceneではDirectモードではクラッシュ

@neon-izm
neon-izm / main.cpp
Last active August 29, 2015 14:13
openFrameworksとC++/CLIのフォームを同時使用するサンプル
//構成プロパティ →全般→共通言語ランタイムサポート→ /clr
//
int main(){
FrmMain^ mf = gcnew FrmMain();
mf->StartPosition=System::Windows::Forms::FormStartPosition::Manual;
mf->Left = 100; mf->Top = 100;
//this line shoud Show()
// NOT ShowDialog();
mf->Show();