【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 中国大陆”许可协议授权。


分享到:

目录
相关文章
|
11月前
|
存储 缓存 算法
亚马逊 SP-API 深度开发:关键字搜索接口的购物意图挖掘与合规竞品分析
本文深度解析亚马逊SP-API关键字搜索接口的合规调用与商业应用,涵盖意图识别、竞品分析、性能优化全链路。通过COSMO算法解析用户购物意图,结合合规技术方案提升关键词转化率,助力卖家实现数据驱动决策,安全高效优化运营。
|
12月前
|
自然语言处理 监控 API
小红书爆文解码:用API分析互动数据,精准指导创作方向
在内容为王时代,爆文背后有科学公式!通过小红书API抓取百万笔记数据,提炼出点赞转化率、收藏价值系数、评论情感值三大核心指标,揭秘爆文特征不等式与内容元素矩阵,手把手教你用数据驱动创作,实现从0到百万曝光的逆袭!
1328 0
|
12月前
|
数据采集 API
京东:调用用户行为API分析购买路径,优化页面跳转逻辑
京东通过整合用户行为API,构建购买路径分析体系,运用马尔可夫链模型识别高损耗、断裂与冗余路径,优化页面跳转逻辑。实施流程合并、预加载及实时干预策略,转化率提升30.2%,路径缩短34.9%,跳转失败率下降78.7%,实现数据驱动的精细化运营。
|
12月前
|
缓存 监控 供应链
唯品会自定义 API 自定义操作深度分析及 Python 实现
唯品会开放平台提供丰富API,支持商品查询、订单管理、促销活动等电商全流程操作。基于OAuth 2.0认证机制,具备安全稳定的特点。通过组合调用基础接口,可实现数据聚合、流程自动化、监控预警及跨平台集成,广泛应用于供应链管理、数据分析和智能采购等领域。结合Python实现方案,可高效完成商品搜索、订单分析、库存监控等功能,提升电商运营效率。
|
12月前
|
缓存 监控 供应链
京东自定义 API 操作深度分析及 Python 实现
京东开放平台提供丰富API接口,支持商品、订单、库存等电商全链路场景。通过自定义API组合调用,可实现店铺管理、数据分析、竞品监控等功能,提升运营效率。本文详解其架构、Python实现与应用策略。
机器学习/深度学习 搜索推荐 算法
329 0
缓存 监控 供应链
425 0
缓存 监控 数据挖掘
288 0
|
12月前
|
数据采集 数据可视化 API
巧用唯品会 API,精准分析唯品会女性时尚商品销售趋势
本文介绍如何利用唯品会API分析女性时尚商品销售趋势。通过API获取数据、清洗处理后,结合时间序列分析与可视化,精准把握市场需求变化,助力商家优化库存和营销策略,提升用户体验与营收。
|
数据采集 搜索推荐 API
苏宁易购 API 接口:苏宁易购平台促销活动用户参与度分析
本文探讨如何利用苏宁易购API接口进行促销活动中的用户参与度分析。通过API获取数据,定义关键指标如点击率、转化率及参与度指数,并结合统计分析与回归模型揭示用户行为模式。以“618大促”为例,展示数据驱动的优化策略及其成效,提升用户粘性与销售转化。