DHIKRA
unread,Nov 2, 2012, 8:23:07 AM11/2/12You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to
hello,
i have a problem with this code ,I'am looking for the équation of the polynomial that fits the curve on this image
I tried the fitting by figure window-tools-basic fiting but I didn't have any convincing result
could you please help me
[code]
clear;
clc;
I=imread('C:\Documents and Settings\Administrateur\Bureau\TT.bmp');
I=I(:,:,1)>160;
imshow(I)
I=bwmorph(~I,'thin','inf');
imshow(~I)
I = imresize(I, [199 199]);
imtool(I);
[N,N]=size(I);
iptsetpref('ImshowAxesVisible','on')
figure; imshow(I,[],'Xdata',[0:N-1],'Ydata',[0:N-1],'InitialMagnification','fit')
xlabel('x')
ylabel('y')
title('initial image');
colormap(gray), colorbar;
x=zeros(1,199*199);
inc=1;
y=x;
figure;
for l=1:199
for c=1:199
if (I(l,c)==1)
x(1,inc)=l;
y(1,inc)= c;
inc=inc+1;
end
end
end
imtool(x);
imtool(y);
hold on
plot(x,y,'.');
[/code]