31 May 2011

matlab局部放大图

效果:



















局部放大图
d = imread('http://www.taopic.com/uploads/allimg/110310/292-110310121Q181.jpg');
h = figure;
axes('position',[0.1,0.1,0.5,0.5]);
imshow(d);
hold on;
rectangle('position',[100,100,50,50],'LineWidth',2,'EdgeColor','y');
d2 = d(100:150,100:150,:);
axes('position',[0.4,0.5,0.3,0.3]);
imshow(d2);
annotation(h,'arrow',[0.22 0.44],...
[0.55 0.8],'Color','m');
annotation(h,'arrow',[0.22 0.44],...
[0.52 0.5],'Color','m'); 

No comments :

Post a Comment