Image Processing Reference
In-Depth Information
c=y-j;
i=round(x+(c-y)/m);
if(c>0 & c<rows & i>0 & i<columns & M(c,i)~=0)
x1=i; y1=c;
i=rows;
end
end
end
if(x1~=-1)
%compute beta
phi=tan(Ang(y,x));
phj=tan(Ang(y1,x1));
if((1+phi*phj)~=0)
beta=atan((phi-phj)/(1+phi*phj));
else
beta=1.57;
end
i=round((beta+(pi/2))/D);
if(i==0) i=1; end;
%search for k
for j=1:columnsT
if(RTable(i,j)==0)
j=columnsT; % no more entries
else
k=RTable(i,j);
%lines of votes
m=tan(k+Ang(y,x));
if(m>-1 & m<1)
for x0=1:columns
y0=round(y+m*(x0-x));
if(y0>0 & y0<rows)
acc(y0,x0)=acc(y0,x0)+1;
end
end
else
for y0=1:rows
x0=round(x+(y0-y)/m);
if(x0>0 & x0<columns)
acc(y0,x0)=acc(y0,x0)+1;
end
end
end
end
end
end
end %if
end %y
end %x
Code 5.13
Implementation of the invariant GHT
Search WWH ::




Custom Search