2011/06/30

Eclipse

* Add External jar

- Project Property > Build Path > Configuration Build Path > Libraries > Add External JARs

* Generate Javadoc

- Window > Generate Javadoc

* Colors and Fonts

- Eclipse Menu > Window > Preference > General > Appearance > Colors and Fonts

* Tab, Indent
- Eclipse Menu > Window > Java > Code Style > Formatter > Indentation
-- Tab policy : Spaces only
-- Indentation size : 2
-- Tab size : 2
-- Show invisible characters : clear the check box

-- Export : C:\application\eclipse\eclipse-rcp-indigo-win32\eclipse\format_eclipse_oga.xml


- Eclipse Menu > Window > General > Editors > Text Editors
-- Displayed tab width : 2
-- Inset spaces for tabs : check
-- Show line numbers : check


2011/06/20

NIC double

* Default Gateway

* Route
- route PRINT

- route ADD src_ip MASK 255.255.255.255 gateway
-- -p (true after reboot)

* office network
- 172.xxx.xxx.xxx : Broadcom NetXtremer(12)
- 192.yyy.yyy.yyy : Realtek(10)

* reference
- Windows/Linux

- Linux

chrome

* Translation

Option -> 高度な設定 -> 翻訳

* Mouse Gesture


* Search by Image for Google

* Webpage Screen Shot

* Cookie

- if Bad Request 400 is occured, you delete cookie

-- Option > High > Content Settings > Delete All Cookies and Sight

2011/06/18

Debug : DirectX9 IDirect3D9 CreateDevice

* API

HRESULT CreateDevice(
UINT Adapter,
D3DDEVTYPE DeviceType,
HWND hFocusWindow,
DWORD BehaviorFlags,
D3DPRESENT_PARAMETERS *pPresentationParameters,
IDirect3DDevice9** ppReturnedDeviceInterface
);

* RunError in OfficePC

hr = m_pD3D->CreateDevice(
D3DADAPTER_DEFAULT,
D3DDEVTYPE_HAL,
hwnd,
D3DCREATE_HARDWARE_VERTEXPROCESSING | D3DCREATE_FPU_PRESERVE,
&pp,
&m_pDevice
);

- D3DCREATE_HARDWARE_VERTEXPROCESSING : ハードウェアによる頂点処理を指定する。
- D3DCREATE_FPU_PRESERVE :

- m_pDevice : [out] IDirect3DDevice9
インターフェースへのポインタでのアドレス。作成されたデバイスを表す


2011/06/17

Microsoft Research Kinect SDK beta

1. Delete Driver of PrimeSensor in "Windows Device Manager".

2. Install .NET Framework


3. Install MS Kinect SDK

http://research.microsoft.com/en-us/um/redmond/projects/kinectsdk/download.aspx

4. Install Others following the ProgrammingGuide

e.g.) Install DirectX Runtime

5. Build & Debug

- ms sample
-- C:\users\public\documents\microsoft Research KinectSDK Samples\NUI\SkeletalViewer\

- what is "..\..\..\unmanaged_core\inc_public" ?

- Directx CreateDevice return IDS_ERROR_D3DCREATE.

why?

Office : Intel(R) 82945G Express Chipset Family



2011/06/16

Dummies Visual C++

* Build & Debug ShortCut

F7 : Build
F5 : Debug
Ctrl + F5 : no Debug

* Debug 自動変数

* Display Space

Edit -> Detail

* Incremental Researh

How?


2011/06/13

visual C# /unsafe


build option of Visual C#

OpenNI + NITE on Visual C#


1. Create Project
select "Windows Form Application"

2. Add Reference Setting
add "OpenNI.Net.dll" and "XnVNITE.net_1_3_1" to tab "Referece" .

3. Write, Build & Debug

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using OpenNI;★
using NITE;★

namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}

private void Form1_Load(object sender, EventArgs e)
{
try
{
const string CONFIG_XML_PATH = "C:\\kinect\\SamplesConfig.xml";
Context xn_cxt = new Context(CONFIG_XML_PATH);
SessionManager ssnMng = new SessionManager(xn_cxt, "Wave,Click", "RaiseHand");
MessageBox.Show("Success");
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
}
}

reference:

good tweet

http://twitter.com/#!/chibicode/status/33769337827368960

アップルで働くまで、イノベーションというのは「今にない、新しいものを作ること」だと思っていた。
でもそれは違って、イノベーションというのは「未来にある普通のものを作ること」なのです。
この違いを理解できるまでにかなり時間がかかった。

2011/06/12

Build Kinect (OpenNI + NITE + OpenCV ) on Visual C++

Add follows to Project Property on Visual C++

1. OpenNI + NITE : Add Include Directory & Depended Directory

- where? Configration Property -> VC++ Directory

- 1-1 Include
C:\Program Files\OpenNI\Include
C:\Program Files\PrimeSense\NITE\Include

- 1-2 Lib
C:\Program Files\OpenNI\Lib
C:\Program Files\PrimeSense\NITE\Lib


2. OpenCV
- where? Configuration Property -> C/C++ -> General -> Add Include Directory

- where? Configuration Property -> Linker -> General -> Add Library Directory


3. All : Add Depended File
- where? Configuration Property -> Linker -> Input -> Add Library Directory

3-A OpenCV2.1
cv210.lib
highgui210.lib
cxcore210.lib
cvaux210.lib
OpenNI.lib
XnVNITE_1_3_1.lib

3-B OpenCV2.2
OpenNI.lib
XnVNITE_1_3_1.lib
opencv_core220.lib
opencv_imgproc220.lib
opencv_highgui220.lib
opencv_calib3d220.lib

Sample Program of NITE onWin7

Modify C:\Program Files\Prime Sense\NITE\Data to follows

* from
\

* to
MapOutputMode xRes="640" yRes="480" FPS="30"




Memory tickler of Win7

* Extension

StartMenu -> 規定のプログラム

* Snap OFF

- マウスキー機能を使ったキーボードでのマウスポインタの移動
-- ウィンドウの管理を簡単にします
--- ウィンドウが画面の端に移動されたとき自動的に整列されないようにします

* ThinkPad USB Track Point

- IN Mouse Menu

* Copy Path

- shift + ContextMenu(Right Click)

* WindowsKey

- RightClick -> Customize -> Check
-- ネットワーク
-- 最近使用したファイル
-- ファイル名を指定して実行

* Task Manager

- Ctrl + Shift + Esc

* StartUp

C:\Users\101279.CANON\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup

* Start Menu

C:\ProgramData\Microsoft\Windows\スタートメニュー

* Move Window

- 1. Select Application is concealed on task bar.

- 2. Alt + Space (after quit bluewind)

- 3. Select "Move"

- 4. Push any arrow key


* Reference

Visual Studio 2010 : fatal error C1033


if "fetal error C1033" is occured in Visual C++ 2010,

C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\VCExpress.exe

's compatibility is changed to "Windows Vista (Service Pack 2)"

Path for Build & Debug OpenNI on Windows

1. Create Project
New > Win32 Console Application > Console Application

2. Add Path of Include and Librar
y

- 2-1. Include Path
-- Project Property > Configuration Property (構成プロパティ) > VC++ Directory > Include Directory
--- C:\Program Files\OpenNI\Include

- 2-2. Library Path
-- Project Property > Configuration Property (構成プロパティ) > VC++ Directory > Library Directory
--- C:\Program Files\OpenNI\Lib

- 2-3. Linker : Input Library
-- Project Property > Configuration Property (構成プロパティ) > Linker > Add depended Library
--- OpenNI.lib

Dummies : Visual Studio 2010 Express

* Tab/Indent

Tool > Option > Text Editor > All Format
Tool > Option > Text Editor > Text Format
- Tab Size
- Indent Size

* Line Number
- Tool > Option > Text Editor > C/C++ > Gernal

* Font
- Tool > Environment > Font

install OpenCV 2.1 WIndows




1. Download & Execute
http://sourceforge.net/projects/opencvlibrary/files/opencv-win/2.1/


2. Create Project
New > Win32 Console Application > Console Application


3. Add Path

3-1. Include
Project Property > Configuration Property (構成プロパティ) > C/C++ > General > Add Include Directory
- C:\OpenCV2.1\include;

3-2. Lib
Project Property > Configuration Property (構成プロパティ) > Linker > General > Add Library Directory
- C:\OpenCV2.1\Lib

3-3. Add Lib
Project Property > Configuration Property (構成プロパティ) > Linker > Output

cv210.lib
highgui210.lib
cxcore210.lib
cvaux210.lib


3-* Error occur if i set fellows
Project Property -> Configuration Property (構成プロパティ) -> ; VC++ Directory
- Include C:\OpenCV2.1\include;
- Lib C:\OpenCV2.1\lib;


4. Build & Debug Sample Code

#include "stdafx.h"
#include
#include
#include
#include

int _tmain(int argc, _TCHAR* argv[])
{
std::cout << "Hello OpenCV" << std::endl;
const char* fileName = "C:\\OpenCV2.1\\samples\\c\\box_in_scene.png";
const char* windowName = "Sample - Sample";
//View Image
try{
//Load Image File
::IplImage* img = :: cvLoadImage(fileName);
if(img==0){
std::cout << "can't open file" << std::endl;
return -1;
}
//View Image File
::cvNamedWindow(windowName);
::cvShowImage(windowName, img);
//Close Window
::cvWaitKey();
::cvDestroyWindow(windowName);

//Release Window
::cvReleaseImage(&img);
}
catch(std::exception& ex){
std::cout << ex.what() << std::endl;
}
return 0;
}




2011/06/08

bludwind on win7

1. Quit bluewind

2. Edit 2 files

.../bluewind/Users/foo/bluewind.ini
.../bluewind/Files/bluewind.ini

Call_key=32
Call_Mod=2
Call_S=Ctrl+Space

Call_key=32
Call_Mod=1
Call_S=Alt+Space

Call_Mod : Win/Shift/Ctrl/Alt