Steve Eddins <Steve.Eddins@mathworks.com> wrote in message <guulnc$5jn$1@fred.mathworks.com>...> Pradyumna A wrote:> > I have a problem with the function houghpeaks in the image processing tool box. > > When I use the command > > P = houghpeaks(H,4);> > > > It returns P as a 1x4 matrix rather than 2x4 (as said in the documentation of houghpeaks function). > > > > the piece of code I am using is here:> > > > im = imread('test.tif')> > imB = rgb2gray(im);> > BW = edge(imB,'canny',[0.3]);> > [H,T,R]=hough(BW);> > P = houghpeaks(H,4);> > > > Can somebody help me ?> > Possibly you are using the function houghpeaks from the book Digital > Image Processing Using MATLAB, 2004. That function has a different > interface than the houghpeaks function in the Image Processing Toolbox.> > ---> Steve Eddins> http://blogs.mathworks.com/steve/

Hello Steve Eddins,

Thank you very much for the reply. The problem was precisely that. I had added the functions from the Book long time ago and had forgotten to remove it !