經驗不足嗎?
看不到未來性 有點後知後覺的感覺
大家能力都很強 也有很好的idea 可是沒幫大家把資訊統整起來
可能是平時都待在幕後吧 突然變成決策者很不習慣 也沒做好

Genius 發表在 痞客邦 留言(0) 人氣()

(簡易整理)

抓取深度影像步驟:
1. 使用 C++ 寫 OpenNI header 要加上 #include <XnCppWrapper.h>

Genius 發表在 痞客邦 留言(0) 人氣()

download
OpenNI 簡介(Heresy 的網站):https://kheresy.wordpress.com/2011/01/19/openni_1st/
 
安裝 OpenNI(程式開發者):

Genius 發表在 痞客邦 留言(0) 人氣()

DSC04636
Xtion PRO規格

有效距離:0.8 公尺 – 3.5 公尺
有效角度:58° H、45° V、70° D
介面/電源:USB 2.0
感測器:RGB & 深度
支援平台:Intel x86 & AMD
支援作業系統:程式語言:C++/C#(Windows)、C++(Linux)

  • Win 32/64: XP、Vista、Win7

  • Linux Ubuntu 10.10: x86 32/64bit




  • 音效:內建兩組麥克風
  • Genius 發表在 痞客邦 留言(0) 人氣()

    RGB光線強度可以用3D向量(r, g, b),0 <= r, g, b <= 1,小於0以0表示,大於1以1表示
    顏色運算可以用加法、乘法,或是分量乘法
    D3DX 提供 D3DXCOLOR 結構來表示顏色,分量乘法提供 D3DXColorModulate

    Genius 發表在 痞客邦 留言(0) 人氣()

    • Jul 04 Wed 2012 06:19
    • HLSL

    HLSL 的語法與C++類似
    1. 如果顯卡不支援 vertex shader & pixel shader,必須改用 REF 裝置(D3DCREATE_SOFTWARE_VERTEX-PROCESSING)來模擬,但執行速度會大幅下降

    Genius 發表在 痞客邦 留言(0) 人氣()


    有時自己就是太鑽牛角尖了
    真的要多親近善知識
    很感恩! 也謝謝善知識願意跟我分享 也接到了我很多小黑黑吧...
    有問題就往上丟 很感恩上面有人接收!

    Genius 發表在 痞客邦 留言(0) 人氣()

    未命名
    Direct3D API 處理錯誤的方法很簡單,大部份 Direct3D API 回傳一個 HRESULT 結果表示測試成功 or 失敗,最常見的 failing 就是 D3DERR_INVALIDCALL,是當傳入的參數數量或型態錯誤導致。
    處理錯誤方面,DXUT 與 Direct3D API 非常相似。如果不是會導致整個程式當掉方面的嚴重錯誤,就會產生 dialog box 顯示 debug build
    DXUT 將這些巨集定義在 DxStdAfx.h 裡:

    Genius 發表在 痞客邦 留言(0) 人氣()



    一個可變參數函數是指一個函數擁有不定引數,即是它接受一個可變數目的參數。不同的程式語言對可變參數函數的支持有很大差異。


    一般而言,在設計函數時會遇到許多數學和邏輯操作,是需要一些可變功能。例如,計算數字串的總和、字元串的聯接或其他操作過程,都可以存在任意數量的引數。


    另一種許多語言都實現為可變參數函數的是格式輸出函數,在C語言的printf函數和Common Lisp的format函數就是例子。這些函數都需要一個參數,指定格式的輸出,再讀取可變參數的值進行格式化。


    另外,可變參數函數在某些語言存在安全問題。例如C語言在沒有長度檢查和類型檢查,在傳入過少的參數或不符的類型時可能會出現溢位的情況,更可能會被利用為攻擊目標。所以,在設計函數時可以先考慮其他替補方案,例如以類型安全的方式——重載。







    C/C++


    在C語言中,C標準函式庫的stdarg.h標頭檔定義了提供可變參數函數使用的巨集。在C++,應該使用標頭檔cstdarg


    要創建一個可變參數函數,必須把省略號(...)放到參數列表後面。函數內部必須定義一個va_list變數。然後使用va_startva_argva_end來讀取。例如:




    #include <stdarg.h>  

    double average(int count, ...){ 

    va_list ap; 

    int j; 

    double tot = 0; 

    va_start(ap, count); //使va_list指向起始的參數 

    for(j=0; j<count; j++) tot+=va_arg(ap, double); //檢索參數,必須按需要指定類型 

    va_end(ap); //釋放va_list return tot/count;

    }





    這個是一段計算平均數的程式碼,可以輸入任意數量的小數並計算平均數。請注意,函數不知道參數的數量或它們的類型,這裡要求的類型是double,而且第一個參數傳遞可變參數的數量。在另外的情況下,例如printf,參數的數量和類型都設定在格式字元串中。在這兩種情況下,程序員實際上需要提供正確的參數,如果參數傳遞少了或參數的類型不正確,導致讀入內存的無效區,這樣會有安全漏洞如格式字元串攻擊。



    Genius 發表在 痞客邦 留言(0) 人氣()


    其實我算是在”兼職”了
    花了很多時間在研究以外的事
    不知不覺一個禮拜又過了 又要meeting
    進度壓力又跟著來

    Genius 發表在 痞客邦 留言(0) 人氣()

    DXUT is a layer that is built on top of Direct3D to help make samples, prototypes, tools, and professional games more robust and easier to build. It simplifies Windows and Direct3D APIs, based on typical usage.
    它簡化了建立視窗、建立 Direct3D device、處理 windows messages 的程序,使我們可以更輕易的寫程式。
    DXUT 的核心包含了建立視窗、建立 device、管理 functions 的標準程序。

    Genius 發表在 痞客邦 留言(1) 人氣()


    CALLBACK function 本質上是實作給系統呼叫用的。一般 windows 應用程式都會實作多個 callback function,每個都對應到不同的 events。當事件發生時,系統會通知應用程式呼叫對應的 callback function。callback function 通常會有自己的參數列,提供系統傳關於 event 細部的參數或資訊。最常見的 callback function 例子就是 windows procedure。這個函式被系統用來把視窗的訊息傳遞給應用程式。DirectX 會依需求去實作不同的 callback function。
     

    Implementing a Callback Function

    Because callback functions have different purposes and usage, they are documented in the appropriate reference section in much the same way as a regular function. However, a callback function reference is essentially a template that describes how to implement the function, and it is not a normal API reference. The callback function reference provides the following information:




    • How the function is used




    • The function's syntax




    • An explanation of the information that will be contained by each parameter




    • An explanation of the possible return values




    You should declare the function type as CALLBACK or WINAPI. Either type is acceptable. You can use any function name. The name used in the documentation is just a convenient label for a particular callback function.


    Implement the function according to the description in the reference. The implementation details depend on the particular function and the requirements of your application. See the sample code for some examples of how to implement various callback functions.


    Pass a pointer to the function to the appropriate DirectX component. The DirectX component can then use the function pointer to call the function. The way in which you pass this pointer varies from function to function, so you should see the particular function's reference for details.


    The following code fragment is borrowed from the DirectInput Joystick sample. It sketches out the essential elements of implementing DIEnumDeviceObjectsCallback, a callback function that is used to enumerate the axes of a joystick.


    // The function declaration 

    BOOL CALLBACK EnumAxesCallback( const DIDEVICEOBJECTINSTANCE* pdidoi, VOID* pContext );

     ... 

    // Pass the function pointer to DirectInput by calling the 

    // IDirectInputDevice9::EnumObjects method 

    if ( FAILED( hr = g_pJoystick->EnumObjects(EnumAxesCallback, (VOID*)hDlg, DIDFT_AXIS )));

     ... 

    // The function implementation 

    BOOL CALLBACK EnumAxesCallback( const DIDEVICEOBJECTINSTANCE* pdidoi, VOID* pContext ) { 

    // Process the information passed in through the two parameters 

    // Return DIENUM_CONTINUE to request the next device object 

    // Return DIENUM_STOP to stop the enumeration 

    } 


    Genius 發表在 痞客邦 留言(0) 人氣()

    Blog Stats
    ⚠️

    成人內容提醒

    本部落格內容僅限年滿十八歲者瀏覽。
    若您未滿十八歲,請立即離開。

    已滿十八歲者,亦請勿將內容提供給未成年人士。