tor, 19 06 2008 kl. 16:59 -0400, skrev Thomas L. Scofield:
> OK.  Just to get my feet wet, I'm looking at bwdist.  You've
> implemented just the Euclidean method, and all of the work is really
> done by code in __bwdist.oct, right?
Yes.

> I'm thinking .oct files are produced somehow using mkoctfile (not sure
> if its done in a shell, or from within Octave).  At any rate, this
> being a binary file and your code, what is preferred here?  Make
> alterations within __bwdist (source file) (something I do not have),
> or create a separate branch in bwdist that, after verifying the chosen
> method is "e", checks the dimensions of the input matrix and continues
> to call __bwdist.oct if the matrix is 2D, but calls some other routine
> when ND with N > 2?
You would need to look at the source code of __bwdist, and change that.
You can just download the image package from sourceforge and uncompress
that, there you'll find the source code. The source can then be compiled
with the mkoctfile command from within Octave. Basically, what the code
does is that it implements the 1D Euclidian distance transform. This is
then computed along each dimension of the image. This is currently hard
coded to two dimensions. What I'd do is to change __bwdist to only work
on 1D data, and then I would change bwdist.m to call this function for
each dimension.

> Even if the latter is preferred, it might be nice to see how you
> implemented the 2D case.
Actually, I didn't do the implementation. This is an implementation by
the author of the used method. I've just ported it to Octave.

Søren



-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Octave-dev mailing list
Octave-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/octave-dev

Reply via email to