MATLAB 读取TXT文件显示角点

MATLAB 读取TXT文件显示角点

cnt=21;
ldpath = sprintf(‘02Images/%d.png’,cnt);
f=imread(ldpath);
imshow(f);
hold on;
detectionfilename=strcat(‘asj_only_origin_txt’,num2str(cnt),’.txt’);
fid = fopen(detectionfilename,‘r’);
formatSpec = ‘%f\t%f’
sizeA = [2 Inf]
A = fscanf(fid,formatSpec,sizeA);
fclose(fid);
detection_corner=A’; %需要转置
hold on;
plot(detection_corner(:,2), detection_corner(:,1),‘gs’,‘MarkerSize’,3);
% original_corners1= filter_origion(original_corners,a_first);
set(gca,‘position’,[0 0 1 1])
set (gcf,‘Position’,[200,200,256,256])

MATLAB 算法直接显示角点

cnt=21;
ldpath = sprintf(‘02Images/%d.png’,cnt);
f=imread(ldpath);
f1=rgb2gray(f);
%%%%%%%%%%%%%%susan%%%%%%%%%%%%%
% f1=im2double(f);
% f1=rgb2gray(f1);
% [map, r, c] = susanCorner(f1);
% original_corners=[r,c];
%%%%%%%%%%%%%%%%%%susan%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%lap%%%%%%%
% corners=InterestPointDetector_Harris_Laplace(f,0.001);
% [corners]=corners(:,1:2);
% original_corners=corners;
%%%%%%%%%%%%%%%%lap%%%%%%%%%%%%
%%%%%%%%%%%%%%tensor%%%%%%%%%%%
% original_corners=first;
%%%%%%%%%%%%%%tensor%%%%%%%%%%%%%
%显示算法检测的角点
% original_corners=GCMDetector(f1) ; %获得原始图片的角点
% original_corners=fast_cpda(f1) ;
% original_corners=DoGDetector(f1) ;
% original_corners=cpda(f1) ;
% original_corners=he(f1) ;
% original_corners=msrj(f1)
% original_corners=mscp(f1) ;
% original_corners=andd(f1) ;
% original_corners=andd(f1) ;
% original_corners=weae_g(f1) ;
% original_corners=tpami(f1) ;
% original_corners=multi_curvature(f1) ;
figure(2);
imshow(f);
hold on;
plot(original_corners(:,2), original_corners(:,1),‘gs’,‘MarkerSize’,3);
% original_corners1= filter_origion(original_corners,a_first);
set(gca,‘position’,[0 0 1 1])
set (gcf,‘Position’,[200,200,256,256])

你可能感兴趣的:(matlab,matlab)