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

1 view (last 30 days)
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 Comment
Image Analyst
Image Analyst on 13 May 2013
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.

Sign in to comment.

Answers (0)

Tags

Community Treasure Hunt

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

Start Hunting!