title: How do I convert openCV transformed images into its orignal format
body: <p>I have resized my orignal image from 200x200 to 128x128 , since opencv in default read in BGR , I took care of that but after resizing it becomes grayscale(as expected) but I can't convert back to its RGB format </p>
  
  <pre><code>orignal = cv2.imread(os.path.join("/path","some_image.png"),0)
  
  rgb = cv2.cvtColor(orignal, cv2.COLOR_BGR2RGB)
  
  resized = cv2.resize(rgb,(128,128))
  
  backtorgb = cv2.cvtColor(resized,cv2.COLOR_GRAY2RGB)
  
  plt.imshow(backtorgb)
  </code></pre>
  
  <p>here last line gives error: </p>
  
  <blockquote>
    <p>error: OpenCV(4.0.0) /io/opencv/modules/imgproc/src/color.hpp:259: error: (-2:Unspecified error) in function 'cv::CvtHelper::CvtHelper(cv::InputArray, cv::OutputArray, int) [with VScn = cv::Set&lt;1>; VDcn = cv::Set&lt;3, 4>; VDepth = cv::Set&lt;0, 2, 5>; cv::SizePolicy sizePolicy = (cv::SizePolicy)2u; cv::InputArray = const cv::_InputArray&amp;; cv::OutputArray = const cv::_OutputArray&amp;]'
    Invalid number of channels in input image:
        'VScn::contains(scn)'
    where
        'scn' is 3</p>
  </blockquote>