【OpenCV学习】HandVu API分析

简介: 作者:gnuhpc 出处:http://www.cnblogs.com/gnuhpc/ HandVu是UCSB的Mathias Kolsch, matz@cs.ucsb.edu所写的一个开源计算机视觉库,它以C++为基本实现语言,以OpenCV为图像处理和部分算法实现的基础,并以C语言的形式将接口呈现了出来以方便Linux C程序员。

作者:gnuhpc
出处:http://www.cnblogs.com/gnuhpc/

HandVu是UCSB的Mathias Kolsch, matz@cs.ucsb.edu所写的一个开源计算机视觉库,它以C++为基本实现语言,以OpenCV为图像处理和部分算法实现的基础,并以C语言的形式将接口呈现了出来以方便Linux C程序员。一下是对这个接口的注释型分析:
typedef struct _hvState {
  int        obj_id;//fixed to a value of zero,indentify the right hand.
  /* whether the object is successfully tracked and whether one of the key postures was recognized */
  bool       tracked;
  bool       recognized;
  /* The location of the tracked object is reported in relative image coordinates,the image origin is in the left upper corner of the image */
  double     center_xpos, center_ypos;//The location of the result of tracking
  double     scale;
  string     posture;//posture that is recognized
  RefTime    tstamp;//time stamp
} hvState;
/*finite state machines  */
enum hvAction {         // specify recommendations to application:
  HV_INVALID_ACTION = 0,// Invalid Action
  HV_PROCESS_FRAME = 1, // fully process and display the frame
  HV_SKIP_FRAME = 2,    // display but do not further process
  HV_DROP_FRAME = 3     // do not display the frame
};
/*Initialize or Uninitialize the interface  */
void hvInitialize(int width, int height);
void hvUninitialize();
/* Load the config file or judge whether or not it is loaded correctly*/
void hvLoadConductor(const string& filename);
bool hvConductorLoaded();
/* start or stop recongnition,default obj_id is 0 (indicates the right hand) */
void hvStartRecognition(int obj_id=0);
void hvStopRecognition(int obj_id=0);
/* Process the frame,the type IplImage is belong to the OpenCV library */
hvAction hvProcessFrame(IplImage* inOutImage, IplImage* rightImage=NULL);
bool hvIsActive();//Judge whether the hv is active
/* Asynchronize method of processing the frame */
void hvAsyncSetup(int num_buffers, void (*cb)(IplImage* img, hvAction action));
void hvAsyncGetImageBuffer(IplImage** pImage, int* pBufferID);
void hvAsyncProcessFrame(int bufferID);
/* Get the State of the hand which is being tracked */
void hvGetState(int obj_id, hvState& state);
/* set the area of the hand being detected */
void hvSetDetectionArea(int left, int top, int right, int bottom);
/* Get the area of the hand being detected */
void hvGetDetectionArea(int* pLeft, int* pTop, int* pRight, int* pBottom);
/* recompute the latency of normal */
void hvRecomputeNormalLatency();
/* Set or Get the amount and verbosity of the overlay */
/* Please refer to the page 90 of the paper  */
void hvSetOverlayLevel(int level);
int hvGetOverlayLevel();
/* some operation on correcting the distortion of camrea .
* This operation takes a considerable amount of time */
void hvCorrectDistortion(bool enable=true);
bool hvIsCorrectingDistortion();
bool hvCanCorrectDistortion();
/* some operation on adjusting the exposure of camrea .
For the exposure adjustment to be possible(turned on via SetAdjustExposure),
HandVu must have been initialized with the CameraController!=NULL.*/
void hvSetAdjustExposure(bool enable=true);
bool hvCanAdjustExposure();
bool hvIsAdjustingExposure();
/* Set the log file */
void hvSetLogfile(const string& filename);
/* Save the related picture  */
void hvSaveScannedArea(IplImage* pImg, string& picfile);
void hvSaveImageArea(IplImage* pImg, int left, int top, int right, int bottom, string& picfile);
void hvSetSaveFilenameRoot(const string& fname_root);
void hvSetDoTrack(bool do_track);
/* Set or Start the Open Sound Control (OSC) Server or Gesture Server defined by the author */
/* For Open Sound Control (OSC), Please refer to the page 93 of the paper */
/* For the Gesture Server, Please erfer to the page 94 of the paper */
void hvStartGestureServer(int port, int max_num_clients=10);
void hvStartOSCServer(const string& desthost, int destport);
void hvStopGestureServer(int port);
void hvStopOSCServer(const string& desthost, int destport);
/** verbosity: 0 minimal, 3 maximal
*/
void hvGetVersion(string& version, int verbosity);

作者:gnuhpc
出处:http://www.cnblogs.com/gnuhpc/


               作者:gnuhpc
               出处:http://www.cnblogs.com/gnuhpc/
               除非另有声明,本网站采用知识共享“署名 2.5 中国大陆”许可协议授权。


分享到:

目录
相关文章
|
1月前
|
数据采集 运维 数据挖掘
API电商接口大数据分析与数据挖掘 (商品详情店铺)
API接口、数据分析以及数据挖掘在商品详情和店铺相关的应用中,各自扮演着重要的角色。以下是关于它们各自的功能以及如何在商品详情和店铺分析中协同工作的简要说明。
|
1月前
|
存储 资源调度 算法
Opencv(C++)系列学习---SIFT、SURF、ORB算子特征检测
Opencv(C++)系列学习---SIFT、SURF、ORB算子特征检测
|
2月前
|
机器学习/深度学习 算法 数据可视化
计算机视觉+深度学习+机器学习+opencv+目标检测跟踪+一站式学习(代码+视频+PPT)-2
计算机视觉+深度学习+机器学习+opencv+目标检测跟踪+一站式学习(代码+视频+PPT)
97 0
|
2月前
|
机器学习/深度学习 Ubuntu Linux
计算机视觉+深度学习+机器学习+opencv+目标检测跟踪+一站式学习(代码+视频+PPT)-1
计算机视觉+深度学习+机器学习+opencv+目标检测跟踪+一站式学习(代码+视频+PPT)
55 1
|
1月前
|
算法 C++ 计算机视觉
Opencv(C++)学习系列---Laplacian拉普拉斯边缘检测算法
Opencv(C++)学习系列---Laplacian拉普拉斯边缘检测算法
|
1月前
|
算法 计算机视觉 C++
Opencv(C++)学习系列---Sobel索贝尔算子边缘检测
Opencv(C++)学习系列---Sobel索贝尔算子边缘检测
|
1月前
|
算法 C++ 计算机视觉
Opencv(C++)学习系列---Canny边缘检测算法
Opencv(C++)学习系列---Canny边缘检测算法
|
1月前
|
存储 计算机视觉 C++
Opencv(C++)学习系列---特征点检测和匹配
Opencv(C++)学习系列---特征点检测和匹配
|
1月前
|
算法 测试技术 计算机视觉
Opencv(C++)系列学习---opencv_contrib安装
Opencv(C++)系列学习---opencv_contrib安装
|
1月前
|
C++ 计算机视觉
Opencv(C++)系列学习---读取视频文件和打开摄像头
Opencv(C++)系列学习---读取视频文件和打开摄像头