help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Zerocrossings in an image


From: Søren Hauberg
Subject: Re: Zerocrossings in an image
Date: Sun, 17 Apr 2005 21:25:31 +0200
User-agent: Mozilla Thunderbird 1.0.2 (X11/20050404)

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
-------------------------------------------------------------



reply via email to

[Prev in Thread] Current Thread [Next in Thread]