Sorry about the late reply, but I'm terribly busy at the moment :-(
man, 06 04 2009 kl. 01:48 +0200, skrev Stefan Gustavson:
> I enclose my implementation of BWDIST, currently in
> the form of a MEX file with a function named EDT,
> to avoid clashes and to facilitate comparison.
> It should compile in Octave with "mex edt.c".
I tried your code and it works very well. I think it would be better if
the code accepted a boolean matrix as input rather than requiring a
double matrix.
> If you want this in Octave-image, I'd be happy to learn
> how to do a proper .oct file instead of this .mex version
> and submit the result. I did have some trouble finding
> instructions on how to write oct files in plain C, though.
> Is C++ what you want? My C++ skills are not stellar.
Octave is written in C++ so oct-files are also in C++. That being said,
you only need to known a minimal amount of C++ (if you already know C)
to use the interface. The Octave manual contains a (IMHO) very good
introduction to writing oct-files.
I would love to see this code in the 'image' package, so let me know if
you need any help.
> Adding the three missing distance functions would be
> fairly easy, if that is desirable. The Matlab manual states
> that they are included "mostly for educational purposes".
Well, sometimes it can actually be nice to have the different metrics. I
would love it if we supported as many metrics as possible.
> The ND case is pretty straightforward to implement if
> you don't care about optimal performance, but anything
> above 2D would be a different function entirely, and that
> is probably beyond my reach right now. I don't have any
> existing code of my own for it, and I lack the time.
> I'll ask around at work, though. I have colleagues doing level
> set stuff in 3D and 4D, and perhaps they have something
> I could use. Chances are that they're using Matlab, though...
I think it would be acceptable to have a slow support for the ND case.
The 2D case (and to some extend the 3D case) is the most common one, so
I think it's most important to have good support for this situation. I
mean, usually memory constraints prevent you from doing any dense level
set stuff in high dimensions anyway.
> Stefan Gustavson ("stegu" on SF)
I've given you developer access. For know, I'd prefer it if we can make
an oct-file wrapper before your code goes in.
Søren
------------------------------------------------------------------------------
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
_______________________________________________
Octave-dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/octave-dev