<p>In <a href="https://github.com/mlpack/mlpack/pull/683#discussion_r66462533">src/mlpack/methods/edge_boxes/feature_extraction_impl.hpp</a>:</p>
<pre style='color:#555'>> + 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);
</pre>
<p>quite need, I like this</p>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/mlpack/mlpack/pull/683/files/9d85b64c6c6bdff608331195351d09abf56cfc96#r66462533">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe/AJ4bFDzC2q7kv5-yrMh2c6LSGzTJ081eks5qKDArgaJpZM4IvUrl">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFH7JlK9tfaRMdCa1vHmAaZFk70-aks5qKDArgaJpZM4IvUrl.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
<link itemprop="url" href="https://github.com/mlpack/mlpack/pull/683/files/9d85b64c6c6bdff608331195351d09abf56cfc96#r66462533"></link>
<meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>