引子: 课题需要SURF特征提取算法,在运动中提取摄像头图像中的特征点,并进行跟踪匹配,以此估计运动状态。开始找到了SIFT算法,SIFT特征提取具有极强的适应能力,但运算量稍大,后来就有了SURF特征提取算法,简化了计算量,保持了较高的性能,是性价比很不错的算法。开始并不知道OpenCV的存在,后来的后来发现OpenCV中已经有了SURF算法,感叹于技术发展之快(要知道SIFT是Low在2004年系统的提出的,SURF是在2006年才被Bay等提出的),感谢Low, Bay, et al. 感谢Internet、感谢Google、感谢Intel、感谢OpenCV、感谢Liu Liu(OpenCV中实现SURF算法的作者)、最重要的感谢祖国、感谢全世界最大的局域网。
2、特征点的描述,例如 objectKeypoints 定义:CvSeq *objectKeypoints = 0; 对于描述特征点和特征点的描述是基于一种 结构体CvSeq,结构CvSeq是所有OpenCV动态数据结构的基础,内部结构: int flags; /* micsellaneous flags */ \ //不懂 int header_size; /* size of sequence header */ \ // 头大小,具体不懂 struct CvSeq* h_prev; /* previous sequence */ \//类似链表中的东西 struct CvSeq* h_next; /* next sequence */ \ //同上 struct CvSeq* v_prev; /* 2nd previous sequence */ \//同上 struct CvSeq* v_next; /* 2nd next sequence */ \ //同上 int total; /* total number of elements */ \ // 总共有多少个元素,objectKeypoints->total 表有多少个特征点 int elem_size;/* size of sequence element in bytes */ \ // 每个元素的大小,字节表示 char* block_max;/* maximal bound of the last block */ \ //不懂 char* ptr; /* current write pointer */ \ // 当时写指针的位置,可能就是指向实际数据的指针吧 int delta_elems; /* how many elements allocated when the sequence grows (sequence granularity) */ \ //不懂 CvMemStorage* storage; /* where the seq is stored */ \//同上 CvSeqBlock* free_blocks; /* free blocks list */ \ //同上 CvSeqBlock* first; /* pointer to the first sequence block */ //同上