code showing "Too many output arguments", how to resolve it?

1 次查看(过去 30 天)
I am trying to detect lines using following code using hough transform but having this error- "Too many output arguments". I am giving input a 420*560 grayscale image. code is following:-
function HTPLine(inputimage)
%image size
[rows,columns]=size(inputimage);
%accumulator
rmax=round(sqrt(rows^2+columns^2));
acc=zeros(rmax,180);
%image
for x=1:columns
for y=1:rows
if(inputimage(y,x)==0)
for m=1:180
r=round(x*cos((m*pi)/180)+y*sin(m*pi)/180);
if(r<rmax && r>0)
acc(r,m)=acc(r,m)+1;
end
end
end
  1 个评论
Image Analyst
Image Analyst 2013-5-13
Which line is throwing the error? Please copy and paste the entire error message - all the red text - so we don't have to guess. You do know that hough() and houghlines() are in the Image Processing Toolbox, don't you? So you don't have to do this yourself.

请先登录,再进行评论。

回答(0 个)

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by