title: Convert a single color with cvtColor
body: <p>I have a color that I want to convert to a different color space. Is it possible to use <code>cvtColor</code> on a <code>cv::Vec3f</code> directly without creating a 1x1 <code>cv::Mat</code> and populating it with that pixel, using <code>cvtColor</code> on the <code>cv::Mat</code>, then getting the only pixel out of the output? I have tried the following, but it doesn't seem to like getting passed a vector.</p>
  
  <p>Any suggestions?</p>
  
  <pre><code>#include &lt;iostream&gt;
  
  #include &lt;opencv2/opencv.hpp&gt;
  
  int main(int, char*[])
  {
      cv::Vec3f hsv;
      hsv[0] = .9;
      hsv[1] = .8;
      hsv[2] = .7;
  
      std::cout &lt;&lt; "HSV: " &lt;&lt; hsv &lt;&lt; std::endl;
  
      cv::Vec3b bgr;
      cvtColor(hsv, bgr, CV_HSV2BGR); // OpenCV Error: Assertion failed (scn == 3 &amp;&amp; (dcn == 3 || dcn == 4) &amp;&amp; (depth == CV_8U || depth == CV_32F)) in cvtColor
  
      std::cout &lt;&lt; "BGR: " &lt;&lt; bgr &lt;&lt; std::endl; 
  
      return EXIT_SUCCESS;
  }
  </code></pre>
  
  <p>I also tried this, but get a different error:</p>
  
  <pre><code>#include &lt;iostream&gt;
  
  #include &lt;opencv2/opencv.hpp&gt;
  
  int main(int, char*[])
  {
      cv::Mat_&lt;cv::Vec3f&gt; hsv(cv::Vec3f(0.7, 0.7, 0.8));
  
      std::cout &lt;&lt; "HSV: " &lt;&lt; hsv &lt;&lt; std::endl;
  
      cv::Mat_&lt;cv::Vec3b&gt; bgr;
  
      cvtColor(hsv, bgr, CV_HSV2BGR); // OpenCV Error: Assertion failed (!fixedType() || ((Mat*)obj)-&gt;type() == mtype) in create
  
      std::cout &lt;&lt; "BGR: " &lt;&lt; bgr &lt;&lt; std::endl;
  
      return EXIT_SUCCESS;
  }
  </code></pre>