Download this file

26 lines (19 with data), 536 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
% show image, contours
function showCurveAndPhi(varargin)
I=varargin{1};
if iscell(I)
I=cell2mat(I);
end
max_range=min(255,max(I(:)));
imshow(I,'initialmagnification',200,'displayrange',[0 max_range]); hold on;
colsty1=['g';'r';'b';'y';'k'];
for k=1:nargin-1
B1=varargin{k+1};
if size(B1,1)==2 || size(B1,2)==2
plot(B1(:,1),B1(:,2),colsty1(k),'LineWidth',2);
else
contour(B1, [0 0], colsty1(k),'LineWidth',2);
%contour(B1, [0 0], 'k','LineWidth',1);
end
end
end