<p>I think I got your point, after looking at the codes of convolution_layer, what you want to do is something like solution A.</p>

<p>Solution A : split three channels to different arma::mat</p>

<pre><code>cv::Mat img = cv::imread("00002.jpg");
std::vector&lt;cv::Mat&gt; channels;
cv::split(img, channels);
//........convert channels to arma::mat
arma::cube cubes;
join_slices(cubes, armaCh[0]);
join_slices(cubes, armaCh[1]);
join_slices(cubes, armaCh[2]);
</code></pre>

<p>Yeah, I think we should support this case, I prefer write a class to do the task since this would be a lot of parameters need to specify. Please correct me if I misunderstand your points.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">&mdash;<br>Reply to this email directly or <a href="https://github.com/mlpack/mlpack/pull/523#issuecomment-189101725">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFOmd5-619LYGzvPlOsAST7HRAUX5ks5pn8XxgaJpZM4HhWF3.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/523#issuecomment-189101725"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>