title: How to find MSE for color images?
body: <p>I am doing work on color and gray scale images, i find out the Mean Square error for Gray scale but don't know how to find Mean square error  for color images.</p>
  
  <p>I did this for Gray image:</p>
  
  <pre><code> acc = sum( (data_gray(:)- reconstructData(:)).^2 ); 
   mse = acc / numel(data_gray);
  </code></pre>
  
  <p>For color Image the follow code not work, and give me error like: 
  <strong>Error using  -
  Integers can only be combined with integers of the same class, or scalar doubles.
  Error in finalCompress (line 60)
   accRC = sum( (RC(:) - recRC(:)).^2 );</strong></p>
  
  <p>Code for color image MSE:</p>
  
  <pre><code> accRC = sum( (RC(:) - recRC(:)).^2 ); 
   accGC = sum( (GC(:)- recGC(:)).^2 );
   accBC = sum( (BC(:)- recBC(:)).^2 );
   mse = accRC+accGC+accBC / numel(combineColorChannels);
  </code></pre>
  
  <p>The <code>combineColorChannels</code> is the Color image consist of <code>(recRC,recGC,recBC)</code></p>