转战matlab了。步骤说一下:

目标图obj 含目标的场景图scene

0. 载入图像

  1. 分别检测SURF特征点
  2. 分别提取SURF描述子,即特征向量
  3. 用两个特征相互匹配
  4. 利用匹配结果计算两者之间的transform关系tform
  5. 根据obj位置与变换关系tform,在scene图上框出obj

代码,来自matlab,http://localhost:9090/vision/gs/object-detection-and-tracking.html#btt5qyu

%step1:读取图片
%读取object图片
boxImage = imread('stapleRemover.jpg');
%读取场景图片
sceneImage = imread('clutteredDesk.jpg'); %step2:检测特征点
boxPoints = detectSURFFeatures(boxImage);
scenePoints = detectSURFFeatures(sceneImage); % figure; imshow(boxImage);
% title('Box Image中最强的100个feature points');
% hold on;
% plot(boxPoints.selectStrongest(100)); %step3 extract feature descriptors 提取出特征的描述子
%使用extractFeatures(),具体的feature类型是通过boxPoints位置的参数指定的,这里是SURF
%烂设计,为什么extractFeatures输入了boxPoints后,还要返回boxPoints?
[boxFeatures, boxPoints] = extractFeatures(boxImage, boxPoints);
[sceneFeatures, scenePoints] = extractFeatures(sceneImage, scenePoints); %step4 find putative point matches
%Match the features using their descriptors.
boxPairs = matchFeatures(boxFeatures, sceneFeatures);
%Display putatively matched features.
matchedBoxPoints = boxPoints(boxPairs(:,1), :);
matchedScenePoints = scenePoints(boxPairs(:,2),:);
figure;
showMatchedFeatures(boxImage, sceneImage, matchedBoxPoints, matchedScenePoints, 'montage');
title('Putatively Matched Points (Including Outliers)'); %step5 locate the Object in the Scene Using Putative Matches
[tform, inlierBoxPoints, inlierScenePoints] = ...
estimateGeometricTransform(matchedBoxPoints, matchedScenePoints, 'affine');
figure;
showMatchedFeatures(boxImage, sceneImage, inlierBoxPoints, ...
inlierScenePoints, 'montage');
title('Matched Points (Inliers Only)'); %Get the bounding polygon of the reference image.
boxPolygon = [1, 1;... % top-left
size(boxImage,2), 1; ... % top-right
size(boxImage, 2), size(boxImage, 1); ... % bottom-right
1, size(boxImage, 1); ... % bottom-left
1, 1]; % top-left again to close the polygon % transform the polygon into the coordinate system of the target image
%将多边形变换到目标图片上,变换的结果表示了物体的位置
newBoxPolygon = transformPointsForward(tform, boxPolygon); %display the detected object 显示被检测到的物体
figure; imshow(sceneImage);
hold on;
line(newBoxPolygon(:, 1), newBoxPolygon(:, 2), 'Color', 'y');
title('Detected Box');

基于SURF特征的目标检测的更多相关文章

  1. #Deep Learning回顾#之基于深度学习的目标检测(阅读小结)

    原文链接:https://www.52ml.net/20287.html 这篇博文主要讲了深度学习在目标检测中的发展. 博文首先介绍了传统的目标检测算法过程: 传统的目标检测一般使用滑动窗口的框架,主 ...

  2. AAAI2019 | 基于区域分解集成的目标检测 论文解读

    Object Detection based on Region Decomposition and Assembly AAAI2019 | 基于区域分解集成的目标检测 论文解读 作者 | 文永亮 学 ...

  3. 基于深度学习的目标检测技术演进:R-CNN、Fast R-CNN,Faster R-CNN

    基于深度学习的目标检测技术演进:R-CNN.Fast R-CNN,Faster R-CNN object detection我的理解,就是在给定的图片中精确找到物体所在位置,并标注出物体的类别.obj ...

  4. OpenCV中基于HOG特征的行人检测

    目前基于机器学习方法的行人检测的主流特征描述子之一是HOG(Histogram of Oriented Gradient, 方向梯度直方图).HOG特征是用于目标检测的特征描述子,它通过计算和统计图像 ...

  5. 基于SURF特征的图像与视频拼接技术的研究和实现(一)

    基于SURF特征的图像与视频拼接技术的研究和实现(一)      一直有计划研究实时图像拼接,但是直到最近拜读西电2013年张亚娟的<基于SURF特征的图像与视频拼接技术的研究和实现>,条 ...

  6. 基于Haar特征Adaboost人脸检测级联分类

    基于Haar特征Adaboost人脸检测级联分类 基于Haar特征Adaboost人脸检测级联分类,称haar分类器. 通过这个算法的名字,我们能够看到这个算法事实上包括了几个关键点:Haar特征.A ...

  7. 第十九节、基于传统图像处理的目标检测与识别(词袋模型BOW+SVM附代码)

    在上一节.我们已经介绍了使用HOG和SVM实现目标检测和识别,这一节我们将介绍使用词袋模型BOW和SVM实现目标检测和识别. 一 词袋介绍 词袋模型(Bag-Of-Word)的概念最初不是针对计算机视 ...

  8. 第十八节、基于传统图像处理的目标检测与识别(HOG+SVM附代码)

    其实在深度学习中我们已经介绍了目标检测和目标识别的概念.为了照顾一些没有学过深度学习的童鞋,这里我重新说明一次:目标检测是用来确定图像上某个区域是否有我们要识别的对象,目标识别是用来判断图片上这个对象 ...

  9. 基于深度学习的目标检测技术演进:R-CNN、Fast R-CNN、Faster R-CNN

    object detection我的理解,就是在给定的图片中精确找到物体所在位置,并标注出物体的类别.object detection要解决的问题就是物体在哪里,是什么这整个流程的问题.然而,这个问题 ...

随机推荐

  1. swift中第三方网络请求库Alamofire的安装与使用

    swift中第三方网络请求库Alamofire的安装与使用 Alamofire是swift中一个比较流行的网络请求库:https://github.com/Alamofire/Alamofire.下面 ...

  2. tween.js

     简要教程 tween.js是一款可生成平滑动画效果的js动画库.相关的动画库插件还有:snabbt.js 强大的jQuery动画库插件和Tweene-超级强大的jQuery动画代理插件. tween ...

  3. distributed caching for .net applications

    distributed caching for .net applications fast, scalable distributed caching with meaningful perform ...

  4. MySQL分表(Partition)学习研究报告

    最近在开发一个新的项目,可能会产生大数据量,需要对部分表进行分表操作,故来研究学习MySQL的分表功能. 由于实验报告已经写成Exlce文件了,各位看过就直接下载吧:MySQL分表分析报告.xls 以 ...

  5. linux不同角色server分区方案

    服务器角色 分区建议 优点    RAID方案 单机服务器 如8G内存,300G硬盘        /boot 100-200M swap 16G,内存大小8G*2 / 80G /var 20G(也可 ...

  6. 获取iframe加载完毕事件

    function IframeLoad(o,fn) { if (document.all) { o.attachEvent('onload', fn); } else { o.onload = fn; ...

  7. Spring Security笔记:HTTP Basic 认证

    在第一节 Spring Security笔记:Hello World 的基础上,只要把Spring-Security.xml里改一个位置 <http auto-config="true ...

  8. fstab 中 通过UUID挂载 参数解释

    UUID=cf474122-1d51-4953-846d-9ce1c8d23ae6 / ext4 defaults 1 1UUID=ef21d494-0dc7-41ec-95b2-a691bfd4e5 ...

  9. [BZOJ3714][PA2014]Kuglarz(MST)

    题目: Description 魔术师的桌子上有n个杯子排成一行,编号为1,2,…,n,其中某些杯子底下藏有一个小球,如果你准确地猜出是哪些杯子,你就可以获得奖品.花费c_ij元,魔术师就会告诉你杯子 ...

  10. C#中的Where和Lambda表达式

    1 2 3 4 5 6 7 8 9 10 11 List<string> listString = new List<string>(); listString.Add(&qu ...