#ifdef LOOK_FOR_ADDITIONAL_WIIMOTES
    // try to connect any additional wiimotes (just to show the code)
    _tprintf(_T("\n\n"));                                                              // [1]
    wiimote  *extra_motes [7] = { NULL }; // 7 should cover it  [2]
    unsigned detected          = 0;
    while(detected < 7)
        {
        wiimote *next = new wiimote;                                      // [3]
        if(!next->Connect(wiimote::FIRST_AVAILABLE))            // [4]
            break;
        extra_motes[detected++] = next;                                // [5]
        
        WHITE        ; _tprintf(_T("   also found wiimote "));       // [6]
        BRIGHT_GREEN; _tprintf(_T("%u"), detected+1);         // [7]
        if(next->IsBalanceBoard()) {                                       // [8]
            WHITE; _tprintf(_T("  (Balance Board)"));
            }
        _tprintf(_T("\n\n"));
# ifdef USE_BEEPS_AND_DELAYS
        Beep(1000 + (detected*100), 100);                             // [9]
        Sleep(500);
# endif
        }
    WHITE; _tprintf( ((detected == 7)? _T("     (can't detect any more).") :
                                       _T("    (no more found).")) );
# ifdef USE_BEEPS_AND_DELAYS
    Sleep(2000);
# endif
    // clean up
    for(unsigned index=0; index<detected; index++)
        delete extra_motes[index];
    
    SetConsoleCursorPosition(console, cursor_pos);
#endif // LOOK_FOR_ADDITIONAL_WIIMOTES

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


1. 安裝WinDDK  Windows Driver Kit Version 7.1.0   
2. 安裝Balance Board C API   Wiiyourself1.15    

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

#include <afxwin.h>
class MyApp : public CWinApp
{
    public:
        BOOL InitInstance()
        {
              CFrameWnd *Frame = new CFrameWnd(); 
              m_pMainWnd = Frame;                              //繼承CWinThread 類別的m_pMainWnd屬性
            
              Frame->Create(NULL, "Hello Win32");
              Frame->ShowWindow(SW_SHOW);
              return true;
        }
};
MyApp aApp;

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

string ExePath() {
    char buffer[MAX_PATH];
    GetModuleFileName( NULL, buffer, MAX_PATH );
    string::size_type pos = string( buffer ).find_last_of( "\\/" );
    return string( buffer ).substr( 0, pos);
}

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


專案名稱: OpenCVCamera
應用程式類型: 單一文件介面
基底類別:下拉選單選擇CFormView
 

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

專案名稱: OpenCVLoadImage
應用程式類型: 單一文件介面
基底類別:下拉選單選擇CFormView
 

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

利用MATLAB查詢我自己筆電的攝影機資訊:
>> info = imaqhwinfo('winvideo')
info =
       AdaptorDllName: [1x67 char]
    AdaptorDllVersion: '4.3 (R2012a)'
          AdaptorName: 'winvideo'
            DeviceIDs: {[1]}
           DeviceInfo: [1x1 struct]
>> info.DeviceInfo
ans =
             DefaultFormat: 'YUY2_160x120'
       DeviceFileSupported: 0
                DeviceName: 'USB2.0 Camera'
                  DeviceID: 1
     VideoInputConstructor: 'videoinput('winvideo', 1)'
    VideoDeviceConstructor: 'imaq.VideoDevice('winvideo', 1)'
          SupportedFormats: {1x4 cell}
>> info.DeviceInfo.SupportedFormats
ans =
  Columns 1 through 3
    'YUY2_160x120'    'YUY2_176x144'    'YUY2_320x240'
  Column 4
    'YUY2_640x480'

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

Visual Studio有一專案類型 Windows Form應用程式,
採用一種叫做Manged Code(列管碼)的應用程式, 即使用.NET Framework進行控管的應用程式

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


1. 新增專案vddocmnt
基底類別選擇 CFormView

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


VS版本: visual studio 2005
OpenCV版本: 2.1
1. 創建MFC專案: 檔案 -> 新增 ->專案 -> 專案類型:MFC -> 專案名稱:DialogBasedOpenCV

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

安裝檔下載: OpenCV-2.1.0-win32-vs2008.exe
Youtube操作展示: 2013-04-03_安裝OpenCV2.1_VS2008

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

1. 創建一MFC專案 -> SDI專案 -> 專案名稱: vddocmnt
2. 類別檢視-> 點選CvddocmntDoc -> 滑鼠右鍵加入變數
            -> (1) 變數名稱: mydata

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

Blog Stats
⚠️

成人內容提醒

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

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