title: Convert RGB to Grayscale while keeping maximum quality
body: <p>I have a program that requires grayscale format videos.</p>
  
  <p>The correct video format that I require looks like this when imported with <code>VideoReader</code></p>
  
  <p><img src="https://i.stack.imgur.com/OVA82.png" alt="enter image description here"></p>
  
  <p>I have received a video file that imports with VideoReader as follows:</p>
  
  <p><img src="https://i.stack.imgur.com/QCoLR.png" alt="enter image description here"></p>
  
  <p>So I want to change the VideoFromat to Grayscale. I found this code and ran it:</p>
  
  <p><a href="http://www.mathworks.com/matlabcentral/answers/102367-how-do-i-convert-my-video-2-gb-to-uncompressed-avi-grayscale-in-matlab-7-12-r2011a" rel="nofollow noreferrer">http://www.mathworks.com/matlabcentral/answers/102367-how-do-i-convert-my-video-2-gb-to-uncompressed-avi-grayscale-in-matlab-7-12-r2011a</a></p>
  
  <p>and while it does output a Grayscale video, the quality has been severely reduced (a lot of the detail is 'blurred' together and there looks like a lot of artifacts in the video). A part of the same frame shows what I mean:</p>
  
  <p><img src="https://i.stack.imgur.com/Yb82O.png" alt="enter image description here"></p>
  
  <p>I have also loaded the original video file into ImageJ as Grayscale and saved it as "Uncompressed AVI", and the same kind of thing happens.</p>
  
  <p>So my question is</p>
  
  <p>(a) why is this occurring?</p>
  
  <p>(b) what would be the best way to perform the conversion I am after?</p>
  
  <p>Thanks</p>