title: Hough Transform Matlab - how to display?
body: <p>I got a code from the book <code>Feature Extraction &amp; Image Processing</code>.
  As I am a total beginner in Matlab, I don't know how to run these codes to see results.
  Are they complete?</p>
  
  <p>First one : Hough Transform for Lines</p>
  
  <pre><code>%Polar Hough Transform for Lines
  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(r0) acc(r,m)=acc(r,m)+1; end
        end
      end
    end
  end
  </code></pre>
  
  <p>Second one : Hough Transform for Circles</p>
  
  <pre><code>%Hough Transform for Circles
  function HTCircle(inputimage,r)
  
  %image size
  [rows,columns]=size(inputimage);
  
  %accumulator
  acc=zeros(rows,columns);
  
  %image
  for x=1:columns
    for y=1:rows
      if(inputimage(y,x)==0)
        for ang=0:360
          t=(ang*pi)/180;
          x0=round(x-r*cos(t));
          y0=round(y-r*sin(t));
          if(x00 &amp; y00)
            acc(y0,x0)=acc(y0,x0)+1;
          end
        end
      end
    end
  end
  </code></pre>
  
  <p>Third one : Hough Transform for Elipses</p>
  
  <pre><code>%Hough Transform for Ellipses
  function HTEllipse(inputimage,a,b)
  
  %image size
  [rows,columns]=size(inputimage);
  
  %accumulator
  acc=zeros(rows,columns);
  
  %image
  for x=1:columns
    for y=1:rows
      if(inputimage(y,x)==0)
        for ang=0:360
          t=(ang*pi)/180;
          x0=round(x-a*cos(t));
          y0=round(y-b*sin(t));
          if(x00 &amp; y0&lt; rows &amp; y0&gt;0)
            acc(y0,x0)=acc(y0,x0)+1;
          end
        end
      end
    end
  end
  </code></pre>
  
  <p>I have images (png) that I need to run these programs with.
  But I cannot seem to run it.
  I create new script, paste the code, save it and in main window I run the function name sending path to the image as a parameter. It does nothing, no message or so.</p>