title: OpenCV: normalization is too slow or I am doing it in a wrong way?
body: <p>I am trying to normalize one matrix in OpenCV, I am doing it like this:</p>
  
  <pre><code>cv::Mat matrix = cv::Mat::zeros ( 3, 480000, CV_8UC1 );
  cv::Mat matrix_norm = cv::Mat::zeros ( 3, 480000, CV_8UC1 );
  ...  // give values to matrix
  </code></pre>
  
  <p>I read the documentation for "normalize" function, but couldn't fully understand how to give values for "alpha" and "beta". So from the example:</p>
  
  <p><a href="http://docs.opencv.org/doc/tutorials/features2d/trackingmotion/harris_detector/harris_detector.html" rel="nofollow">http://docs.opencv.org/doc/tutorials/features2d/trackingmotion/harris_detector/harris_detector.html</a></p>
  
  <p>I did it like:</p>
  
  <pre><code>cv::normalize ( matrix, matrix_norm, 0, 255, NORM_MINMAX, CV_8UC1, Mat() );
  </code></pre>
  
  <p>But it crashed here, which I don't surprise. I think the matrix size is too big, right? Or am I doing the normalization incorrectly here? </p>
  
  <p>And is there any way to speed up the normalization?</p>