<p>In <a href="https://github.com/mlpack/mlpack/pull/683#discussion_r66463201">src/mlpack/methods/edge_boxes/feature_extraction_impl.hpp</a>:</p>
<pre style='color:#555'>> +
> + // transform along rows
> + 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);
</pre>
<p>Maybe this could save some typing</p>
<p><code>MatType out (im.n_rows, im.cols, arma::fill::zeros);</code></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#r66463201">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe/AJ4bFLt_sUvz1V6q9RTtlazXNaoKYGWOks5qKDDygaJpZM4IvUrl">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFI3_8TSIDHMNLI35NIDjZuanBgxBks5qKDDygaJpZM4IvUrl.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#r66463201"></link>
<meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>