No BSD License  

Highlights from
IDE@L

image thumbnail
from IDE@L by Joseph Morlier
IDE@L is a toolbox for Matlab dealing with Tree rings detection by image processing. This is a Graph

Ring_Reconstruction.m
%Ring_P

%hoo=warndlg('left-click : Mark a snake point! u: Undo last point! e: End');
stopinp=0;
v=[];
disp('left-click : Mark a snake point');
disp('   ''u''     : Undo last point')
disp('   ''e''     : End');
while stopinp==0,
   
[vx,vy,but]=ginput(1);
if but==1
   v=[v;ceil(vx) ceil(vy)];
	line( v(:,1), v(:,2), 'Marker', '+','Color','red', 'LineWidth', 2 );
elseif but==117
    %undo
   v=v(1:end-1,:);
elseif but==101
   %end
    stopinp=1;
end
end

hold on;
% 
% cs = spline(v(:,1),v(:,2));
% xx = linspace(0,2*pi,101);
plot(v(:,1),v(:,2),'r');%,xx,ppval(cs,xx),'-');
m_v=[v(:,1),v(:,2)]
header = sprintf(' Extracted ring (X,Y)');
colnames = {'x','y'};
xlswrite(m_v,header,colnames);
disp('EXCEL ON');

Contact us at files@mathworks.com