<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'>> +template<typename MatType, typename CubeType>
> +void StructuredForests<MatType, CubeType>::
> +GetFeatureDimension(arma::vec& FtrDim)
> +{
> + FtrDim = arma::vec(2);
> +
> + const size_t shrink = this->params.Shrink();
> + const size_t pSize = this->params.PSize();
> + const size_t numCell = this->params.NumCell();
> + const size_t numOrient = this->params.NumOrient();
> +
> + size_t nColorCh;
> + if (this->params.RGBD() == 0)
> + nColorCh = 3;
> + else
> + 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;">—<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>