From help-request at octave dot org Sun Apr 17 14:26:57 2005 Subject: Re: Zerocrossings in an image From: =?ISO-8859-1?Q?S=F8ren_Hauberg?= To: etienne at cs dot uky dot edu CC: help at octave dot org Date: Sun, 17 Apr 2005 21:25:31 +0200 Thanks, not only for the quick response, but also for the code. It appears to be working very well for my needs. Can I use your code in a gpl'ed script? /Søren Etienne Grossmann wrote: > Hth > > f = 2*kron (randn(4)>0,ones(4))-1 > > z0 = f<0; ## Negative > [R,C] = size(f); > z = zeros(R,C); > z(1:R-1,:) |= z0(2:R,:); ## Grow > z(2:R,:) |= z0(1:R-1,:); > z(:,1:C-1) |= z0(:,2:C); > z(:,2:C) |= z0(:,1:C-1); > > z &= !z0 ## "Positive zero-crossings"? > > > > On Sun, Apr 17, 2005 at 06:02:02PM +0200, Søren Hauberg wrote: > # Hi > # Does anybody here know a simple way to find the zerocrossings in an > # image in Octave? > # I usually do something like this (where f is the image (or 2d function)) > # > # zerocrossings = bwmorph(f>=0, "remove"); > # > # but then I depend on bwmorph which only is octave-forge (which I don't > # have at school). > # > # Any help would be great, > # \Søren > # > # > # > # ------------------------------------------------------------- > # Octave is freely available under the terms of the GNU GPL. > # > # Octave's home on the web: http://www.octave.org > # How to fund new projects: http://www.octave.org/funding.html > # Subscription information: http://www.octave.org/archive.html > # ------------------------------------------------------------- > # > ------------------------------------------------------------- Octave is freely available under the terms of the GNU GPL. Octave's home on the web: http://www.octave.org How to fund new projects: http://www.octave.org/funding.html Subscription information: http://www.octave.org/archive.html -------------------------------------------------------------