当前位置:网站首页>[Chapter 17 corner feature detection based on Harris -- actual combat of MATLAB machine learning project]
[Chapter 17 corner feature detection based on Harris -- actual combat of MATLAB machine learning project]
2022-06-22 02:05:00 【Haibao 7】
Deep learning machine learning image processing matlab Source code – be based on Harris A case study of corner feature detection based on – Program Source code download source 
Corner detection subfunction :
function varargout=harris(I,k,q,h)
narginchk(0,4);
nargoutchk(0,2);
if nargin<1
I=checkerboard(50,2,2);
end
if nargin<2
k=0.04;
end
if nargin<3
q=0.01;
end
if nargin<3
h=fspecial('gaussian',[5 5],1.5);
end
fx=[-2,-1,0,1,2];
Ix=filter2(fx,I);
fy=[-2,-1,0,1,2]';
Iy=filter2(fy,I);
Ix2=filter2(h,Ix.^2);
Iy2=filter2(h,Iy.^2);
Ixy=filter2(h,Ix.*Iy);
rfcn=@(a,b,c)(a*b-c^2)-k*(a+b)^2;
R=arrayfun(rfcn,Ix2,Iy2,Ixy);
R(R < q*max(R(:)))=0;
[xp,yp]=find(imregionalmax(R,8));
if nargout==0
subplot(121)
imshow(I);
hold on;
plot(xp,yp,'ro');
title(' Write your own HARRIS Algorithm ')
subplot(122)
cp=corner(I);
imshow(I)
hold on
plot(cp(:,1),cp(:,2),'ro');
title('MATLAB Bring their own CORNER function ')
elseif nargout==1
varargout={
[xp,yp]};
elseif nargout==2
varargout={
xp,yp};
end
The main function :
clc; clear all; close all;
I = checkerboard(50,3,3);
h = fspecial('gaussian',[5 5],2);
harris(I,0.05,0.01,h);

This algorithm is relatively basic – There are also many descriptions and uses on the Internet .
Harris Corner detection algorithm is divided into the following three steps :
1、 When the window ( Local areas ) Simultaneous direction x ( level ) and y( vertical ) When moving in both directions , Calculate the change of pixel value inside the window ;
2、 For each window , The corresponding corner response function is calculated ;
3、 Then the function is threshold processed , If , Indicates that the window corresponds to a corner feature .

Many are in openCV The use of , Preprocessing module combined with machine learning , wait . stay matlab Just test it out . The same principle , It's just that the platform is different . There is no unique innovation .
边栏推荐
- Mathematical knowledge in the first round of noip preliminary round csp-j1 csp-s1 Sinorgchem (III)
- [chapter 01 image defogging technology based on histogram optimization - full system matlab intelligent driving depth learning]
- “早安、午安、晚安” Game Jam
- Chapter 09 English printed character recognition based on feature matching matlab deep learning practical case
- 2019 csp-j1 csp-s1 first round preliminary round answer analysis and summary, video, etc
- How to restore the IE browser auto jump edge
- LeetCode+ 46 - 50
- MBA-day18 消元法
- excel常用快捷键excel快捷键汇总
- acwing 838. 堆排序 (手写一个堆)
猜你喜欢

Commission contract on BSV (2)

Chapter 09 English printed character recognition based on feature matching matlab deep learning practical case

Pdf to word PDF to picture picture to PDF modifying PDF files is as convenient as operating word (Introduction to acrobat DC)

Recommended by Alibaba, Tencent and Baidu Software Test Engineers - rapid prototype model of software test model

Chrome浏览器取消输入框记录表单输入历史

idea----bookmark

Efficient packet processing system based on dpdk

Redis缓存异常及处理方案总结

Games-101 personal summary transformation

机器学习编译第1讲:机器学习编译概述
随机推荐
The sandbox has reached a cooperation with Time magazine to establish "New York Times Square" in metauniverse
Appium面试题
1277_FreeRTOS中vTaskDelay的实现分析
测试用例设计方法——因果图法
acwing 835. Trie string statistics
DAST black box vulnerability scanner part 4: scanning performance
NOIP 提高组 初赛 三、问题求解 习题集NOIP1995-NOIP2018
shadertoy 实现简易指南针
第298场力扣周赛个人题解
atguigu----过滤器
Machine learning compilation lesson 1: overview of machine learning compilation
GAMES-101-个人总结归纳-Transformation
es-object vs nested vs has_child and has_parent
快速学会CAD绘制传输线路图纸
阿里,腾讯,百度软件测试工程师推荐——软件测试模型之瀑布模型
BSV上的委托合约(2)
Games-101 personal summary transformation
Mathematical knowledge of Sinorgchem in the first round of noip preliminary csp-j1 csp-s1 (I)
word中mathtype公式右编号右对齐
acwing 836. 合并集合 (并查集)