资源简介

这是角点检测的程序,图像中所有凹凸点都可以检测到,并在二值图像上显示出来,效果不错。直接运行corner.m即可

资源截图

代码片段和文件信息

Para=[1.516230.35011]; %Default experience value;   原来是  Para=[1.516230.35011]; 
C=Para(1)
T_angle=Para(2)             
sig=Para(3);
H=Para(4);
L=Para(5);
Endpoint=Para(6);
Gap_size=Para(7);
   
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
I=imread(‘123.jpg‘);

if size(I3)==3
    I=rgb2gray(I); % Transform RGB image to a Gray one. 
end


BW=EDGE(I‘canny‘[LH]);  % Detect edges

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
figure(1)                   %%
imshow(BW)title(‘边界图‘)  %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


[curvecurve_startcurve_endcurve_modecurve_num]=extract_curve(BWGap_size);  % Extract curves


cout=get_corner(curvecurve_startcurve_endcurve_modecurve_numBWsigEndpointCT_angle) % D

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2011-07-26 08:53  角点corner检测\
     文件       11195  2011-07-25 10:06  角点corner检测\123.jpg
     文件        8194  2011-07-26 13:19  角点corner检测\corner.jpg
     文件        1364  2011-07-26 08:50  角点corner检测\corner.m
     文件        1955  2011-07-26 08:42  角点corner检测\curve_tangent.m
     文件        8429  2011-07-26 13:19  角点corner检测\edge.jpg
     文件        3552  2011-07-26 08:41  角点corner检测\extract_curve.m
     文件        5459  2011-07-26 08:41  角点corner检测\get_corner.m
     文件        1062  2011-07-26 08:52  角点corner检测\mark.m
     文件         653  2011-07-26 08:43  角点corner检测\parse_inputs.m

评论

共有 条评论