<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'>&gt; +sepFilter2D(CubeType&amp; InImage, arma::vec&amp; kernel, int radius)
&gt; +{
&gt; +  CubeType OutImage = this-&gt;CopyMakeBorder(InImage, radius, radius, radius, radius);
&gt; +
&gt; +  arma::vec row_res(1), col_res(1);
&gt; +  // reverse InImage and OutImage to avoid making an extra matrix.  
&gt; +  for(size_t k = 0; k &lt; OutImage.n_slices; ++k)
&gt; +  {
&gt; +    for(size_t j = radius; j &lt; OutImage.n_cols - radius; ++j)
&gt; +    {
&gt; +      for(size_t i = radius; i &lt; OutImage.n_rows - radius; ++i)
&gt; +      {
&gt; +        row_res = OutImage.slice(k).row(i).subvec(j - radius, j + radius) * kernel;
&gt; +        col_res = OutImage.slice(k).col(i).subvec(i - radius, i + radius).t() * kernel;
&gt; +        // divide by 2: avg of row_res and col_res, divide by 3: avg over 3 locations.
&gt; +        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;">&mdash;<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>