[mlpack-git] [mlpack/mlpack] backported ind2sub and sub2ind. (#683)
stereomatchingkiss
notifications at github.com
Thu Jun 9 11:24:27 EDT 2016
> + for (int y = 0; y < im.n_rows; y++)
> + {
> + f.subvec(0, im.n_cols - 1) = im.row(y).t();
> + arma::vec d = this->dt_1d(f, im.n_cols);
> + im.row(y) = d.t();
> + }
> +}
> +
> +/* euclidean distance transform of binary image using squared distance */
> +template<typename MatType, typename CubeType>
> +MatType StructuredForests<MatType, CubeType>::
> +dt_image(MatType& im, double on)
> +{
> + MatType out = MatType(im.n_rows, im.n_cols);
> + out.fill(0.0);
> + out.elem( find(im != on) ).fill(INF);
quite need, I like this
---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/mlpack/mlpack/pull/683/files/9d85b64c6c6bdff608331195351d09abf56cfc96#r66462533
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack-git/attachments/20160609/4ba236e4/attachment.html>
More information about the mlpack-git
mailing list