title: error in applying gamma in open cv c++
body: <p>I am trying to apply power of 2 to an image, But the output image is something different. This is  my 
  code:</p>
  
  <pre><code>double val = 2;
  cv::Mat src = imread("123.png",0);
  cv::Mat dest ( src.size(), CV_8UC1);
  for( int i=0; i&lt;src.rows; i++)
      for(int j=0; j&lt;src.cols; j++)
          dest.at&lt;uchar&gt;(i,j) = cv::saturate_cast&lt;uchar&gt;(std::pow(src.at&lt;uchar&gt;(i,j),val));
  </code></pre>
  
  <p>I dint know what is the mistake i am doing, Help me with this. Thanks.</p>