Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: R2012a problem with Canny edge detection
Replies: 3   Last Post: Apr 20, 2012 3:03 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
NIcholas

Posts: 54
Registered: 5/19/10
Re: R2012a problem with Canny edge detection
Posted: Apr 20, 2012 3:03 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Actually, it seems that the canny was calling the function "gradient" which comes with MATLAB, but I had created a different function called gradient that was on my MATLAB path.

I renamed my function and it works. In general, is there a way to avoid this from happening again? How should I know what to name my functions and what to not name them? Is there any way to tell the built-in MATLAB functions to use the correct versions of the helper functions they are looking for and not try to call anything the user creates on his or her path?


"Nick" wrote in message <jmn2s0$qca$1@newscl01ah.mathworks.com>...
> Thanks.
> I uninstalled previous verions of MATLAB and now the canny edge detection works. In fact, while running 2012a, I tried uninstalling R2010b and windows wouldn't let me. It said that 2010b was in use, so I guess the 2012a was accidentally pulling files from the 2010b release.
>
> "Spandan Tiwari" <spandant@mathworks.com> wrote in message <jmmvvf$dl1$1@newscl01ah.mathworks.com>...

> > I am not able to reproduce this error in R2012a on my win64 and 64-bit Linux
> > machines. It works fine. Could you make sure that:
> >
> > 1) You are working with the original 'edge' function shipped with R2012a,
> > which is not modified in any way.
> >
> > 2) You have a clean R2012a installation (especially files from different
> > releases are not getting mixed).
> >
> > --
> > Spandan Tiwari
> >
> > Image Processing Toolbox
> > The Mathworks
> >
> >
> >
> > "Nick " <dsfadfa@aol.com> wrote in message
> > news:jmmnnm$6ir$1@newscl01ah.mathworks.com...

> > > Other edge detection seems to work, (I've tried sobel and prewitt), but
> > > canny throws an error for me in R2012a. (I've tried with both double and
> > > uint8 data)
> > >

> > >>> load porche
> > >>> edge(double(X),'canny');

> > > Error using griddedInterpolant
> > > Interpolation requires at least two sample points in each dimension.
> > >
> > > Error in interp2/makegriddedinterp (line 220)
> > > F = griddedInterpolant(varargin{:});
> > >
> > > Error in interp2 (line 125)
> > > F = makegriddedinterp({X, Y}, V, method);
> > >
> > > Error in gradient (line 18)
> > > DPlus1 = interp2(gridX, gridY, I, gridX+delX, gridY+delY, 'linear');
> > >
> > > Error in edge>smoothGradient (line 709)
> > > derivGaussKernel = gradient(gaussKernel);
> > >
> > > Error in edge (line 213)
> > > [dx, dy] = smoothGradient(a, sigma);
> > >




Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.