- 42
- 0
- 约5.76千字
- 约 12页
- 2017-07-24 发布于河南
- 举报
harris角点检测与ncc匹配(Harris corner detection and NCC matching)
harris角点检测与ncc匹配(Harris corner detection and NCC matching)
Harris corner detection and NCC matching
File1:--------------------------------------------------------------------------------------
Function, [y1, Y2, R, c]=harris (X)
% corner detection using the Harris algorithm
% output is an image
% [result, CNT, R, c]=harris (X)
% CLC, clear all;
% filename=qiao1.bmp;
% X= imread (filename.bmp);% reads the image
% Info=imfinfo (filename);%; this is customary
% f=rgb2gray (X);
F=X;
%
Ori_im=double (f) /255;%unit8 is converted to 64 double precision double64
FX = [-2, -1 01, 2],% X direction gradient operator (for Harris corner extraction algorithm)
Ix = Filter2 (FX, ori_im);% x directional filtering is good at using filter
% FY = [5 85; 000; -5, -8, -5];% Gauss function, first order differential, Y direction (for improved Harris corner extraction algorithm)
FY = [-2; -1; 0; 1; 2];% Y direction gradient operator (used in Harris corner extraction algorithm)
Iy = Filter2 (FY, ori_im);% y directional filtering
Ix2 = Ix.^2;
Iy2 = Iy.^2;
Ixy = Ix.*Iy;
Clear Ix;
Clear Iy =% elimination variable ha
H=, fspecial (gaussian, [10, 10], 2);% produces Gauss window functions of 7*7, sigma=2
Ix2 = Filter2 (h, Ix2);
Iy2 = Filter2 (h, Iy2);
Ixy = Filter2 (h, Ixy);% Gauss filtering, respectively
Height = size (ori_im, 1);
Width = size (ori_im, 2);
Result = zeros (height, width);% record corner position, corner value is 1, background is black ha
R = zeros (height, width);
Rmax = 0;% the maximum R value in the image in order to set the threshold
For I = 1:height
For J = 1:width
M = [Ix2 (I, J), Ixy (I, J); Ixy (I, J), Iy2 (I, J)];%2*2 matrix
R (I, J) = det (M) -0.06* (trace (M)) ^2;% calculates R and obtains RMAX, which appears to be the whole, and the corner response function
If R (I, J) Rmax
Rmax = R (I, J);
End;
End;
End;
CNT = 0;% record count
For I = 2:height-1
For J = 2:width-1% carry on non maximum suppression, window 3*3
If R (I, J) 0.01*Rmax R (I, J) R (i-1, J-1) and R (I, J)
您可能关注的文档
- 英语六级写作难点问题(Difficulties in writing English at six levels).doc
- 英语六级听力同步字幕2004.6 lrc(English level six listening synchronized subtitles 2004.6 LRC).doc
- 英语800个有趣句子帮你记忆7000个单词(完整修正版)-4(800 interesting sentences in English help you memorize 7000 words (complete revision) -4).doc
- 英语专业用书(English major book).doc
- 英语六级听力同步字幕2005.12 lrc(English level six listening synchronized subtitles 2005.12 LRC).doc
- 英语六级听力同步字幕2007.12 lrc(English level six listening synchronized subtitles 2007.12 LRC).doc
- 英语六级考试五大题型精辟解析(Incisive analysis of the five major types of English Test Band Six).doc
- 英语写作之系列(A series of English Writing).doc
- 英语写作指南(A guide to English Writing).doc
- 英语剧本有翻译的家庭代沟(The English play has a translated family generation gap).doc
- 2026年航空发动机热管理分析报告及未来五至十年材料创新报告.docx
- 2026年智能城市行业分析报告及未来五至十年智慧交通报告.docx
- 2026年新能源汽车充电桩布局报告及未来五至十年充电设施行业报告.docx
- 2026年新能源汽车产业链分析报告及未来五至十年智能化报告.docx
- 2026年智慧城市交通管理方案报告及未来五至十年智能升级报告.docx
- 2026年桑蚕养殖产业资本运作与投资机会报告.docx
- 2026年数字经济功率芯片市场分析与发展趋势报告.docx
- 2026年生物识别身份认证报告及未来五至十年防伪技术报告.docx
- 2026年智能城市安全监控报告及未来五至十年智慧警务报告.docx
- 2026年智能家居设备市场分析报告及未来五至十年行业增长报告.docx
原创力文档

文档评论(0)