title: using pow in opencv to raise every array element to a power generate error
body: <p>I am trying to write a function that change the gamma of input image.</p>
  
  <p>The code that I wrote is as follow:</p>
  
  <pre><code>if(inputImage.channels() &gt;= 3)
  {
     Mat hsv;
  
      cvtColor(inputImage,hsv,CV_BGR2HSV_FULL);
  
      vector&lt;Mat&gt; channels;
      split(hsv,channels);
  
      Mat tmp1=(channels[2]/255);
      Mat tmp;
      pow(tmp1,1.5,tmp);
      channels[2]=255 *tmp;
      Mat result;
      merge(channels,hsv);
  
      cvtColor(hsv,result,CV_HSV2BGR_FULL);
  
      return result;
  }
  </code></pre>
  
  <p>But I am getting run timeerror on line pwo(...): The error is:</p>
  
  <pre><code>OpenCV Error: Assertion failed (depth == CV_32F || depth == CV_64F) in unknown function, file C:\slave\builds\WinInstallerMegaPack\src\opencv\modules\core\src\mathfuncs.cpp, line 1931
  </code></pre>
  
  <p>If I change 1.5 to 2 in pow, There is no error.
  How can I raise each element of a matrix in openCV to a non integer value?</p>
  
  <p>Is there any better way to change the gamma of an image in OpenCV?</p>