none
FPS in FaceTrackingVisualization program RRS feed

  • Question

  • I am new to c++  and winapi and I am trying to modify a little FaceTrackingVisualization  program. What I want to do is to display actual position of the head and use the same function from SkeletalViewer to display number of frames per second.
    I managed to delete left image (where the face is drawing) and  I added some instructions to display text "Position of the head ": like:
    TCHAR position[] = _T(" Position of the head");
    case WM_PAINT:
          hdc = BeginPaint(hWnd, &ps);
          PaintWindow(hdc, hWnd);
          TextOut(hdc,100, 5, position, _tcslen(position));
    and it works but I have a problem with displaing FPS and actual position of the head. 
    I am trying to put the same function which was used in SKeletonVeiwer program but it's not working:
    case WM_INITDIALOG:
    { // Clean state the class
      KinectSensor();
    // Bind application window handle
      m_hWnd = hWnd;
               // Set the font for Frames Per Second display
    LOGFONT lf;
    GetObject( (HFONT)GetStockObject(DEFAULT_GUI_FONT), sizeof(lf), &lf );
                lf.lfHeight *= 4;
                m_hFontFPS = CreateFontIndirect(&lf);
                SendDlgItemMessageW(hWnd, IDC_FPS, WM_SETFONT, m_hFontFPS, 0);
    }
    Could you be so kind and help me to add FPS  and create function to display position of the head and visualizate it? I really I dont know how could I do that.:(

    Monday, August 27, 2012 1:51 PM