物体检测SURF算法matlab实现
来源:互联网 发布:运用python成为黑客 编辑:程序博客网 时间:2024/05/29 07:19
注:此次实现中用到的函数需要在matlab2013后的版本才能正常运行,故顺手附上matlab2014b下载地址: http://download.csdn.net/detail/lrrent/9499859
close all;clear all;clc;boxImage = imread('2_2.jpg');sceneImage = imread('2.jpeg');sceneImage = rgb2gray(sceneImage);boxImage = rgb2gray(boxImage);boxPoints = detectSURFFeatures(boxImage);scenePoints = detectSURFFeatures(sceneImage);[boxFeatures,boxPoints] = extractFeatures(boxImage,boxPoints);[sceneFeatures,scenePoints] = extractFeatures(sceneImage,scenePoints);boxPairs = matchFeatures(boxFeatures,sceneFeatures);% display putatively matched featuresmatchedBoxPoints = boxPoints(boxPairs(:,1),:);matchedScenePoints = scenePoints(boxPairs(:,2),:);figure;showMatchedFeatures(boxImage,sceneImage,matchedBoxPoints,matchedScenePoints,'montage'):title('Matched Points(Including Outliers)');[tform,inlierBoxPoints,inlierScenePoints] = estimateGeometricTransform(matchedBoxPoints,matchedScenePoints,'affine');% display the matching points pairs with the outliers removedfigure;showMatchedFeatures(boxImage,sceneImage,inlierBoxPoints,inlierScenePoints,'montage'):title('Matched Points(inliers Only)');% Get the bounding polygon of the reference imageboxPolygon = [1,1; size(boxImage,2),1; size(boxImage,2),size(boxImage,1); 1,size(boxImage,1); 1,1];newBoxPolygon = transformPointsForward(tform,boxPolygon);% displayfigure;imshow(sceneImage);hold on;line(newBoxPolygon(:,1),newBoxPolygon(:,2),'Color','y');title('Detected Box');figure; imshow(boxImage);title('100 Strongest Feature Points from Box Image');hold on;plot(boxPoints.selectStrongest(100));figure; imshow(sceneImage);title('300 Strongest Feature Points from Scene Image');hold on;plot(scenePoints.selectStrongest(300));
0 0
- 物体检测SURF算法matlab实现
- SURF算法matlab实现
- 特征点检测(surf算法)
- surf特征点检测算法
- SURF配准差分算法实现
- 特征点检测学习_2(surf算法)
- 特征点检测学习_2(surf算法)
- 特征点检测学习_2(surf算法)
- 特征点检测学习_2(surf算法)
- 特征点检测之surf算法
- 特征点检测学习_2(surf算法)
- 特征点检测学习_2(surf算法)
- 特征点检测学习_2(surf算法)
- 特征点检测学习(surf算法)
- 【特征检测】SURF算法源码收集
- 特征点检测学习_2(surf算法)
- 特征点检测学习_2(surf算法)
- 特征点检测学习_2(surf算法)
- 在Oracle中索引的使用
- 白话空间统计二十一:密度分析(一)
- Leetcode #51&52 N-Queens I&II N皇后问题 1&2 解题报告
- CodeForces 612A The Text Splitting
- 【图-二分图染色】NOIP2010提高组关押罪犯
- 物体检测SURF算法matlab实现
- oracle rac
- CodeForces 612B HDD is Outdated Technology
- PHP URL 重定向 的三种方法
- CodeForces 612C Replace To Make Regular Bracket Sequence
- ubuntu sublime 支持拼音输入的方法
- 聊聊Android的缓存(一)
- 数据结构的二叉链表中序遍历
- hdu1061Rightmost Digit