




版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、Machine Perception and Interaction Group (MPIGMPIG) Feature matching陈伟杰MPIG Seminar 0046Machine Perception and Interaction Group (MPIG)Feature Extraction Feature matchingCompute E or F for R|tDrawing pathThe main steps of Visual OdometryimagesparametersMachine Perception and Interaction Group (MPIG)
2、secondFeature matching rich feature descriptorsoptical flowPoint matching usingbrute-forceFLANNHorn-SchunckLucas-KanadeMachine Perception and Interaction Group (MPIG)rich feature descriptorsComparing each feature in the first set to each feature in the second setK-dimension treeK-means treebrute-for
3、ceFLANN (Fast Library for Approximate Nearest Neighbors)Machine Perception and Interaction Group (MPIG)rich feature descriptorsexampleFLANN FlannBasedMatcher matcher; std:vector matches; matcher.match(descriptors1,descriptors2,matches); Mat img_matches; drawMatches( img1, keypoints1, img2, keypoints
4、2, matches, img_matches ); /- Draw matches imshow(Matches, img_matches ); /- Show detected matchescodeMachine Perception and Interaction Group (MPIG)rich feature descriptorsexampleFLANNMachine Perception and Interaction Group (MPIG)Eliminate errorscode double max_dist = 0; double min_dist = 100; for
5、( int i=0; idescriptors1.rows; i+ ) double dist = matchesi.distance; if( dist max_dist ) max_dist = dist; /- Draw only good matches (i.e. whose distance is less than 2*min_dist ) std:vector good_matches; for( int i = 0; i descriptors1.rows; i+ ) if( matchesi.distance 2*min_dist ) good_matches.push_b
6、ack( matchesi); /- Draw only good matches Mat img_matches; drawMatches( img1, keypoints1, img2, keypoints2, good_matches, img_matches, Scalar:all(- 1), Scalar:all(-1),vector(), DrawMatchesFlags:NOT_DRAW_SINGLE_POINTS ); /- Show detected matches imshow( Good Matches, img_matches ); Machine Perception
7、 and Interaction Group (MPIG)Eliminate errorsexampleMachine Perception and Interaction Group (MPIG)optical flowWhats optical flow?Machine Perception and Interaction Group (MPIG)optical flow Brightness constancy Temporal persistence or small movements Spatial coherencethree assumptionsLucas-Kanade (L
8、K or KLT) 1 1 B. D. Lucas, T. Kanade, An Iterative Image Registration Technique with an Application to Stereo Vision.Machine Perception and Interaction Group (MPIG) Brightness Constancy AssumptionAssumptionstranslational model:Machine Perception and Interaction Group (MPIG)TaylorAssumptions2nd assum
9、ptionMachine Perception and Interaction Group (MPIG)Assumptions3rd assumptionMachine Perception and Interaction Group (MPIG)KLT algorithmgray value u is I(x,y)uvThe goal is to find v on J, where I(u) and J(v) are similarThe way is to compute dMachine Perception and Interaction Group (MPIG)KLT algori
10、thmMachine Perception and Interaction Group (MPIG)Pyramid ImplementationStandard KLT algorithm deal with small pixel displacementSolution for this is a pyramidal implementationMachine Perception and Interaction Group (MPIG)Pyramid ImplementationInitial guessMachine Perception and Interaction Group (
11、MPIG)Pyramid Implementationmatching error function:Machine Perception and Interaction Group (MPIG)Standard KLT algorithmDefine new images A and BWe write as follow for convenienceMachine Perception and Interaction Group (MPIG)Standard KLT algorithmMachine Perception and Interaction Group (MPIG)Stand
12、ard KLT algorithmMachine Perception and Interaction Group (MPIG)Standard KLT algorithmMachine Perception and Interaction Group (MPIG)Code of LK based openCVcalcOpticalFlowPyrLK () vector err; vector status; Size winSize=Size(21,21);/设定金字塔层搜索窗口尺寸 TermCriteria termcrit=TermCriteria(TermCriteria:COUNT+
13、TermCriteria:EPS, 30, 0.01);/指定光流法搜索算法收敛迭代的类型 calcOpticalFlowPyrLK(img1, img2, points1, points2, status, err, winSize, 3, termcrit, 0, 0.001);Address: Perception and Interaction Group (MPIG)Eliminate errorsGetting rid of points for which the KLT tracking failed or those who have gone outside the frame int indexCorrection = 0;/初始化参数 for( int i=0; istatus.size(); i+) Point2f pt = points2.at(i- indexCorrection); if (status.at(i) = 0)|(pt.x0)|(pt.y0) if(pt.x0)|(pt.y0) status.at(i) = 0;/将对应的这组光流置零,等同于未发现该光流 points1.erase (points1.begin() + (i - indexCorrection);/删除该点 points2.e
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 工程问题课件图片
- 工程透视课件
- 二零二五年度地基处理与建筑基础施工合同标准文本
- 2025版酒类产品线上线下整合营销合同
- 二零二五年度景区场地租赁与旅游服务合同
- 2025年度光伏发电项目施工合同二
- 写景作文夏夜的星空真美350字8篇
- 疫情后大班健康课件
- 读谁动了我的奶酪有感750字(14篇)
- 疫情下规则班会课件
- 超星尔雅学习通《红色经典影片与近现代中国发展(首都师范大学)》2025章节测试附答案
- 内镜技术进修心得分享与模板
- 2025年度股东合作协议书编制指南(全新版)
- 医疗护理医学培训 简易呼吸气囊的介绍及使用课件
- 铁路顶管施工方案
- 产品安装及质量保障措施
- 2025年中考初中历史核心素养新课标解读课件(含真题分析)
- 《典型生物质颗粒的安全性能分析综述》2200字
- 商业球房运营方案
- 九年级历史上册复习提纲
- 事业单位个人述职报告(汇编9篇)
评论
0/150
提交评论