<p>In <a href="https://github.com/mlpack/mlpack/pull/703#discussion_r68423267">src/mlpack/methods/edge_boxes/feature_extraction_impl.hpp</a>:</p>
<pre style='color:#555'>&gt; +template&lt;typename MatType, typename CubeType&gt;
&gt; +void StructuredForests&lt;MatType, CubeType&gt;::
&gt; +GetFeatureDimension(arma::vec&amp; FtrDim)
&gt; +{
&gt; +  FtrDim = arma::vec(2);
&gt; +
&gt; +  const size_t shrink = this-&gt;params.Shrink();
&gt; +  const size_t pSize = this-&gt;params.PSize();
&gt; +  const size_t numCell = this-&gt;params.NumCell();
&gt; +  const size_t numOrient = this-&gt;params.NumOrient();
&gt; +  
&gt; +  size_t nColorCh;
&gt; +  if (this-&gt;params.RGBD() == 0)
&gt; +    nColorCh = 3;
&gt; +  else
&gt; +    nColorCh = 4;
</pre>
<p>Another solution(a problem of taste, pick the one you like more :) ) : <br>
<code>const size_t nColorCh = params.RGBD() == 0 ? 3 : 4;</code></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/703/files/0abec2cbb44a0556b129485b485bae8d07986af7#r68423267">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe/AJ4bFFlkZ9rePYAf7lN7uwTwlbzfpkxQks5qPARigaJpZM4I5X__">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFIVn0vJfLGZ7fmmAulQSp1Y1PqTuks5qPARigaJpZM4I5X__.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/703/files/0abec2cbb44a0556b129485b485bae8d07986af7#r68423267"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>