title: OpenCV/C++ - Convert a gray picture to BGR picture after some images process
body: <p>I'm working on a project which consist to stabilize a video.
  Therefore, during the process of stabilization, i had to convert my frames to gray in order to use some methods like goodFeaturesToTrack() or opticalFlow().</p>
  
  <p>But at the end of my process, after applying my last transformation using warpAffine(), i would like to recover the colour information of the frame but i'm not able to do this. I tried some things.</p>
  
  <ul>
  <li><p>I try cvtColor(outFrame,outFrame,CV_GRAY2BGR) but not working (obviously). Still back and white</p></li>
  <li><p>At the beginning of the loop, i picked up the three colour channels B G R of my original picture like that:</p>
  
  <p>Mat channel[3];</p>
  
  <p>split(frameColor, channel);</p></li>
  </ul>
  
  <p>And then at the end of the process, i'm doing that:</p>
  
  <pre><code> merge(channel,3,outFrame);
  </code></pre>
  
  <p>So i have the colour of my frame but not stabilized , that is to say it's like merging channels has removed all the transformation.</p>
  
  <ul>
  <li>I also try to use the warpAffine() function with the colour picture but i have the same result of above.</li>
  </ul>
  
  <p>Please help me.</p>
  
  <p>Thank.</p>