Sunday, 19 July 2015

MATLAB program for HOUGH TRANSFORM



/*MATLAB program for HOUGH TRANSFORM*/

clc;
clear all;
a=[1 1
   2 2
   3 8
   3 3];
ax=[1 2 3 3];
ay=[1 2 8 3];
figure;
subplot(1,2,1);
for k=1:4
plot(ax,ay,'r*');
end
bx=[0 0];
by=[0 0];
subplot(1,2,2);
for i=1:4
    y= a(i,2);
    x=a(i,1);
for j=1:2
bx(j)=j;
by(j) =y-(j*x);
end
line(bx,by);
end

No comments:

Post a Comment