<p>In <a href="https://github.com/mlpack/mlpack/pull/683#discussion_r66475398">src/mlpack/methods/edge_boxes/feature_extraction_impl.hpp</a>:</p>
<pre style='color:#555'>> +sepFilter2D(CubeType& InImage, arma::vec& kernel, int radius)
> +{
> + CubeType OutImage = this->CopyMakeBorder(InImage, radius, radius, radius, radius);
> +
> + arma::vec row_res(1), col_res(1);
> + // reverse InImage and OutImage to avoid making an extra matrix.
> + for(size_t k = 0; k < OutImage.n_slices; ++k)
> + {
> + for(size_t j = radius; j < OutImage.n_cols - radius; ++j)
> + {
> + for(size_t i = radius; i < OutImage.n_rows - radius; ++i)
> + {
> + row_res = OutImage.slice(k).row(i).subvec(j - radius, j + radius) * kernel;
> + col_res = OutImage.slice(k).col(i).subvec(i - radius, i + radius).t() * kernel;
> + // divide by 2: avg of row_res and col_res, divide by 3: avg over 3 locations.
> + InImage(i - radius, j - radius, k) = (row_res(0) + col_res(0)) / 2 / 3;
</pre>
<p>if the value of InImage woud be altered, could you change the name to inoutImage?</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#r66475398">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe/AJ4bFEMIEpQcufSvrgk3JA_PnFgFPrxEks5qKEAigaJpZM4IvUrl">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFLKqlczTzkbzIgiBsL-szmrpjHNeks5qKEAigaJpZM4IvUrl.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#r66475398"></link>
<meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>