⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 handvu_cintf.cpp

📁 tracciatore di mani con webcam
💻 CPP
📖 第 1 页 / 共 2 页
字号:
    g_pHandVu->GetDetectionArea(area);    *pLeft = (int) area.left;    *pTop = (int) area.top;    *pRight = (int) area.right;    *pBottom = (int) area.bottom;  } catch (HVException& hve) {    CV_ERROR(CV_StsError, hve.GetMessage().c_str());  }  __END__;}void hvRecomputeNormalLatency(){  CV_FUNCNAME( "hvRecomputeNormalLatency" ); // declare cvFuncName  __BEGIN__;  if (!g_pHandVu) {    CV_ERROR(CV_StsError, "HandVu not initialized");  }  try {    g_pHandVu->RecomputeNormalLatency();  } catch (HVException& hve) {    CV_ERROR(CV_StsError, hve.GetMessage().c_str());  }  __END__;}void hvSetOverlayLevel(int level){  CV_FUNCNAME( "hvSetOverlayLevel" ); // declare cvFuncName  __BEGIN__;  if (!g_pHandVu) {    CV_ERROR(CV_StsError, "HandVu not initialized");  }  try {    g_pHandVu->SetOverlayLevel(level);  } catch (HVException& hve) {    CV_ERROR(CV_StsError, hve.GetMessage().c_str());  }  __END__;}int hvGetOverlayLevel(){  CV_FUNCNAME( "hvRecomputeNormalLatency" ); // declare cvFuncName  __BEGIN__;  if (!g_pHandVu) {    CV_ERROR(CV_StsError, "HandVu not initialized");  }  try {    int level = g_pHandVu->GetOverlayLevel();    return level;  } catch (HVException& hve) {    CV_ERROR(CV_StsError, hve.GetMessage().c_str());  }  __END__;}void hvCorrectDistortion(bool enable){  CV_FUNCNAME( "hvCorrectDistortion" ); // declare cvFuncName  __BEGIN__;  if (!g_pHandVu) {    CV_ERROR(CV_StsError, "HandVu not initialized");  }  try {    g_pHandVu->CorrectDistortion(enable);  } catch (HVException& hve) {    CV_ERROR(CV_StsError, hve.GetMessage().c_str());  }  __END__;}bool hvIsCorrectingDistortion(){  CV_FUNCNAME( "hvIsCorrectingDistortion" ); // declare cvFuncName  __BEGIN__;  if (!g_pHandVu) {    CV_ERROR(CV_StsError, "HandVu not initialized");  }  try {    return g_pHandVu->IsCorrectingDistortion();  } catch (HVException& hve) {    CV_ERROR(CV_StsError, hve.GetMessage().c_str());  }  __END__;}bool hvCanCorrectDistortion(){  CV_FUNCNAME( "hvCanCorrectDistortion" ); // declare cvFuncName  __BEGIN__;  if (!g_pHandVu) {    CV_ERROR(CV_StsError, "HandVu not initialized");  }  try {    return g_pHandVu->CanCorrectDistortion();  } catch (HVException& hve) {    CV_ERROR(CV_StsError, hve.GetMessage().c_str());  }  __END__;}void hvSetAdjustExposure(bool enable){  CV_FUNCNAME( "hvSetAdjustExposure" ); // declare cvFuncName  __BEGIN__;  if (!g_pHandVu) {    CV_ERROR(CV_StsError, "HandVu not initialized");  }  try {    g_pHandVu->SetAdjustExposure(enable);  } catch (HVException& hve) {    CV_ERROR(CV_StsError, hve.GetMessage().c_str());  }  __END__;}bool hvCanAdjustExposure(){  CV_FUNCNAME( "hvCanAdjustExposure" ); // declare cvFuncName  __BEGIN__;  if (!g_pHandVu) {    CV_ERROR(CV_StsError, "HandVu not initialized");  }  try {    return g_pHandVu->CanAdjustExposure();  } catch (HVException& hve) {    CV_ERROR(CV_StsError, hve.GetMessage().c_str());  }  __END__;}bool hvIsAdjustingExposure(){  CV_FUNCNAME( "hvIsAdjustingExposure" ); // declare cvFuncName  __BEGIN__;  if (!g_pHandVu) {    CV_ERROR(CV_StsError, "HandVu not initialized");  }  try {    return g_pHandVu->IsAdjustingExposure();  } catch (HVException& hve) {    CV_ERROR(CV_StsError, hve.GetMessage().c_str());  }  __END__;}void hvSetLogfile(const string& filename){  CV_FUNCNAME( "hvSetLogfile" ); // declare cvFuncName  __BEGIN__;  if (!g_pHandVu) {    CV_ERROR(CV_StsError, "HandVu not initialized");  }  try {    g_pHandVu->SetLogfile(filename);  } catch (HVException& hve) {    CV_ERROR(CV_StsError, hve.GetMessage().c_str());  }  __END__;}void hvSaveScannedArea(IplImage* pImg, string& picfile){  CV_FUNCNAME( "hvSaveScannedArea" ); // declare cvFuncName  __BEGIN__;  if (!g_pHandVu) {    CV_ERROR(CV_StsError, "HandVu not initialized");  }  try {    g_pHandVu->SaveScannedArea(pImg, picfile);  } catch (HVException& hve) {    CV_ERROR(CV_StsError, hve.GetMessage().c_str());  }  __END__;}void hvSaveImageArea(IplImage* pImg, int left, int top, int right, int bottom, string& picfile){  CV_FUNCNAME( "hvSaveImageArea" ); // declare cvFuncName  __BEGIN__;  if (!g_pHandVu) {    CV_ERROR(CV_StsError, "HandVu not initialized");  }  try {    g_pHandVu->SaveImageArea(pImg, CRect(left, top, right, bottom), picfile);  } catch (HVException& hve) {    CV_ERROR(CV_StsError, hve.GetMessage().c_str());  }  __END__;}void hvSetSaveFilenameRoot(const string& fname_root){  CV_FUNCNAME( "hvSetSaveFilenameRoot" ); // declare cvFuncName  __BEGIN__;  if (!g_pHandVu) {    CV_ERROR(CV_StsError, "HandVu not initialized");  }  try {    g_pHandVu->SetSaveFilenameRoot(fname_root);  } catch (HVException& hve) {    CV_ERROR(CV_StsError, hve.GetMessage().c_str());  }  __END__;}void hvSetDoTrack(bool do_track){  CV_FUNCNAME( "hvSetDoTrack" ); // declare cvFuncName  __BEGIN__;  if (!g_pHandVu) {    CV_ERROR(CV_StsError, "HandVu not initialized");  }  try {    g_pHandVu->SetDoTrack(do_track);  } catch (HVException& hve) {    CV_ERROR(CV_StsError, hve.GetMessage().c_str());  }  __END__;}void hvStartGestureServer(int port, int max_num_clients){  CV_FUNCNAME( "hvStartGestureServer" ); // declare cvFuncName  __BEGIN__;  if (!g_pHandVu) {    CV_ERROR(CV_StsError, "HandVu not initialized");  }  try {    g_pservers.push_back(new GestureServerStream(port, max_num_clients));    g_pservers.back()->Start();  } catch (HVException& hve) {    CV_ERROR(CV_StsError, hve.GetMessage().c_str());  }  __END__;}void hvStartOSCServer(const string& desthost, int destport){  CV_FUNCNAME( "hvStartOSCServer" ); // declare cvFuncName  __BEGIN__;  if (!g_pHandVu) {    CV_ERROR(CV_StsError, "HandVu not initialized");  }  try {    g_pservers.push_back(new GestureServerOSC(desthost, destport));    g_pservers.back()->Start();  } catch (HVException& hve) {    CV_ERROR(CV_StsError, hve.GetMessage().c_str());  }  __END__;}void hvStopGestureServer(int /*port*/){  CV_FUNCNAME( "hvStopGestureServer" ); // declare cvFuncName  __BEGIN__;  if (!g_pHandVu) {    CV_ERROR(CV_StsError, "HandVu not initialized");  }  try {    throw HVException("sorry, stop server not implemented");  } catch (HVException& hve) {    CV_ERROR(CV_StsError, hve.GetMessage().c_str());  }  __END__;}void hvStopOSCServer(const string& /*desthost*/, int /*destport*/){  CV_FUNCNAME( "hvStopOSCServer" ); // declare cvFuncName  __BEGIN__;  if (!g_pHandVu) {    CV_ERROR(CV_StsError, "HandVu not initialized");  }  try {    throw HVException("sorry, stop server not implemented");  } catch (HVException& hve) {    CV_ERROR(CV_StsError, hve.GetMessage().c_str());  }  __END__;}void HandVu::SendEvent() const{  HVState state;  GetState(0, state);  for (int s=0; s<(int)g_pservers.size(); s++) {    g_pservers[s]->Send(state);  }}/** verbosity: 0 minimal, 3 maximal*/void hvGetVersion(string& version, int verbosity){//  todo: version = HV_CURRENT_VERSION_STRING;  version = "handvu version beta2";  if (verbosity>=1) {#if defined(WIN32)    version = version + ", win32";#elif defined(TARGET_SYSTEM)    version = version + ", "TARGET_SYSTEM;#else#error TARGET_SYSTEM must be defined#endif#if defined(DEBUG)    version = version + " debug";#endif#ifdef USE_MFC    version = version + ", MFC";#endif  }  if (verbosity>=2) {    version = version + ", built on "__DATE__" at "__TIME__;  }  if (verbosity>=3) {    version = version + "\nCVS id: $Id: HandVu_Cintf.cpp,v 1.3 2005/10/30 23:00:43 matz Exp $";  }  string cubicles_version;  cuGetVersion(cubicles_version, verbosity);  version = version + "\n" + cubicles_version;}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -